v1.2.10.1
This commit is contained in:
@@ -225,16 +225,22 @@ namespace Saxonite.Net.Core.Web.Base.App
|
||||
return GetCodeTypeCaption(Sax.CodeType.SportContactType, sportContactType);
|
||||
}
|
||||
|
||||
// Sport Participation.
|
||||
public String GetSportParticipationCaption(Sax.SportParticipation participation)
|
||||
// Sport Participating.
|
||||
public String GetSportParticipatingCaption(Sax.SportParticipating participating)
|
||||
{
|
||||
return GetCodeTypeCaption(Sax.CodeType.SportParticipation, participation);
|
||||
return GetCodeTypeCaption(Sax.CodeType.SportParticipating, participating);
|
||||
}
|
||||
|
||||
// Sport Preparing.
|
||||
public String GetSportPreparingCaption(Sax.SportPreparing preparing)
|
||||
{
|
||||
return GetCodeTypeCaption(Sax.CodeType.SportPreparing, preparing);
|
||||
}
|
||||
|
||||
// Sport Officiating.
|
||||
public String GetSportOfficiatingCaption(Sax.SportOfficiating participation)
|
||||
public String GetSportOfficiatingCaption(Sax.SportOfficiating officiating)
|
||||
{
|
||||
return GetCodeTypeCaption(Sax.CodeType.SportOfficiating, participation);
|
||||
return GetCodeTypeCaption(Sax.CodeType.SportOfficiating, officiating);
|
||||
}
|
||||
|
||||
// Region type.
|
||||
|
||||
@@ -115,7 +115,8 @@ namespace Saxonite.Net.Core.Web.Base.Controllers
|
||||
public List<TypeCodeDesc> DataItemTypeCodes { get { return Internals.DataItemTypeCodes; } }
|
||||
public List<TypeCodeDesc> SportSpecialityLabelCodes { get { return Internals.SportSpecialityLabelCodes; } }
|
||||
public List<TypeCodeDesc> SportContactTypeCodes { get { return Internals.SportContactTypeCodes; } }
|
||||
public List<TypeCodeDesc> SportParticipationCodes { get { return Internals.SportParticipationCodes; } }
|
||||
public List<TypeCodeDesc> SportParticipatingCodes { get { return Internals.SportParticipatingCodes; } }
|
||||
public List<TypeCodeDesc> SportPreparingCodes { get { return Internals.SportPreparingCodes; } }
|
||||
public List<TypeCodeDesc> SportOfficiatingCodes { get { return Internals.SportOfficiatingCodes; } }
|
||||
public List<TypeCodeDesc> RegionTypeCodes { get { return Internals.RegionTypeCodes; } }
|
||||
public List<TypeCodeDesc> EligibilityTypeCodes { get { return Internals.EligibilityTypeCodes; } }
|
||||
|
||||
@@ -92,7 +92,8 @@ namespace Saxonite.Net.Core.Web.Base.Models
|
||||
public List<TypeCodeDesc> YesNoCodes { get { return Internals.YesNoCodes; } }
|
||||
public List<TypeCodeDesc> SportSpecialityLabelCodes { get { return Internals.SportSpecialityLabelCodes; } }
|
||||
public List<TypeCodeDesc> SportContactTypeCodes { get { return Internals.SportContactTypeCodes; } }
|
||||
public List<TypeCodeDesc> SportParticipationCodes { get { return Internals.SportParticipationCodes; } }
|
||||
public List<TypeCodeDesc> SportParticipatingCodes { get { return Internals.SportParticipatingCodes; } }
|
||||
public List<TypeCodeDesc> SportPreparingCodes { get { return Internals.SportPreparingCodes; } }
|
||||
public List<TypeCodeDesc> SportOfficiatingCodes { get { return Internals.SportOfficiatingCodes; } }
|
||||
public List<TypeCodeDesc> RegionTypeCodes { get { return Internals.RegionTypeCodes; } }
|
||||
public List<TypeCodeDesc> EligibilityTypeCodes { get { return Internals.EligibilityTypeCodes; } }
|
||||
@@ -345,7 +346,7 @@ namespace Saxonite.Net.Core.Web.Base.Models
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>List of Sport Participation options for dropdown.</summary>
|
||||
/// <summary>List of Sport Speciality Labels for dropdown.</summary>
|
||||
public IEnumerable<SelectListItem> SportSpecialityLabelCodesForSelect
|
||||
{
|
||||
get
|
||||
@@ -358,14 +359,26 @@ namespace Saxonite.Net.Core.Web.Base.Models
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>List of Sport Participation options for dropdown.</summary>
|
||||
public IEnumerable<SelectListItem> SportParticipationCodesForSelect
|
||||
/// <summary>List of Sport Participating options for dropdown.</summary>
|
||||
public IEnumerable<SelectListItem> SportParticipatingCodesForSelect
|
||||
{
|
||||
get
|
||||
{
|
||||
List<SelectListItem> values = new List<SelectListItem>();
|
||||
foreach (TypeCodeDesc sportParticipation in SportParticipationCodes)
|
||||
values.Add(new SelectListItem(Localiser.GetSportParticipationCaption((Sax.SportParticipation)sportParticipation.Type), sportParticipation.Code));
|
||||
foreach (TypeCodeDesc sportParticipating in SportParticipatingCodes)
|
||||
values.Add(new SelectListItem(Localiser.GetSportParticipatingCaption((Sax.SportParticipating)sportParticipating.Type), sportParticipating.Code));
|
||||
return values;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>List of Sport Preparing options for dropdown.</summary>
|
||||
public IEnumerable<SelectListItem> SportPreparingCodesForSelect
|
||||
{
|
||||
get
|
||||
{
|
||||
List<SelectListItem> values = new List<SelectListItem>();
|
||||
foreach (TypeCodeDesc sportPreparing in SportPreparingCodes)
|
||||
values.Add(new SelectListItem(Localiser.GetSportPreparingCaption((Sax.SportPreparing)sportPreparing.Type), sportPreparing.Code));
|
||||
return values;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -75,7 +75,7 @@ namespace Saxonite.Net.Core.Web.Admin.Controllers
|
||||
|
||||
// Construct response.
|
||||
PopulateOrganisationResponseItemData(organisation, address, responseData.organisation);
|
||||
GetOrganisationMembers(model, organisationId, responseData.Members);
|
||||
GetOrganisationMembers(model, organisationId, responseData.Members, true);
|
||||
}
|
||||
|
||||
// Complete response.
|
||||
|
||||
@@ -118,7 +118,7 @@ namespace Saxonite.Net.Core.Web.Admin.Controllers
|
||||
responseData.DefaultStatusCode = SacsSystem.GetStatusCode(SaxUserOrganisation.DefaultStatus);
|
||||
|
||||
// Get organisation members.
|
||||
GetOrganisationMembers(model, organisationId, responseData.Members);
|
||||
GetOrganisationMembers(model, organisationId, responseData.Members, false);
|
||||
|
||||
if (model.Paging.IsPaged)
|
||||
model.Paging.ItemCount = (ushort)responseData.Members.Count;
|
||||
@@ -128,13 +128,13 @@ namespace Saxonite.Net.Core.Web.Admin.Controllers
|
||||
responseData.Success = true;
|
||||
return Json(responseData);
|
||||
}
|
||||
private void GetOrganisationMembers(SaxModel_Admin model, SysId organisationId, List<MemberListData> members)
|
||||
private void GetOrganisationMembers(SaxModel_Admin model, SysId organisationId, List<MemberListData> members, bool inactiveOnly)
|
||||
{
|
||||
// Item filter.
|
||||
SaxUserOrganisation.Params prmUserOrganisation = new SaxUserOrganisation.Params();
|
||||
prmUserOrganisation.OrganisationIdsIncluded.Add(organisationId);
|
||||
prmUserOrganisation.OrganisationMembersOnly = true;
|
||||
prmUserOrganisation.UserAccountStatusCat = SaxUserAccount.StatusCat.NotDeleted;
|
||||
prmUserOrganisation.UserAccountStatusCat = inactiveOnly ? SaxUserAccount.StatusCat.InactiveOnly : SaxUserAccount.StatusCat.NotDeleted;
|
||||
prmUserOrganisation.StatusCat = SaxUserOrganisation.StatusCat.NotDeleted;
|
||||
model.Paging.ItemTotal = (ulong)AccountMgr.GetUserOrganisationCount(prmUserOrganisation);
|
||||
model.PopulatePagingTo(prmUserOrganisation.ResultsPaging);
|
||||
|
||||
@@ -126,6 +126,8 @@ namespace Saxonite.Net.Core.Web.Admin.Controllers
|
||||
{
|
||||
// Construction.
|
||||
public AjaxResponse_ValidateDatabaseSchema(SaxModel_Admin model) : base(model) { }
|
||||
// Database instance.
|
||||
public String Instance { get; set; }
|
||||
// Schema validation list.
|
||||
public List<DbSchemaItemResponseData> Items { get; } = new List<DbSchemaItemResponseData>();
|
||||
}
|
||||
@@ -146,12 +148,20 @@ namespace Saxonite.Net.Core.Web.Admin.Controllers
|
||||
using (DisposableCollection<SacsDisposable> disposableItems = new DisposableCollection<SacsDisposable>())
|
||||
{
|
||||
|
||||
// Database instance.
|
||||
Sax.Database databaseInstance = EnumUtil.ParseEnum(StringUtil.EmptyOnNull(model.DatabaseInstance), Sax.Database.Unknown);
|
||||
if (databaseInstance <= 0)
|
||||
return Json(responseData.SetMessage(messageTitle, "Database instance must be specified"));
|
||||
responseData.Instance = databaseInstance.ToString();
|
||||
|
||||
// Core Database connection.
|
||||
ISacsDatabase db = Internals.CoreDatabase;
|
||||
ISacsDatabase db = App.GetDatabase(SessionContext, databaseInstance);
|
||||
if (db == null)
|
||||
return Json(responseData.SetMessage(messageTitle, "Unrecognised database instance specified: " + model.DatabaseInstance));
|
||||
|
||||
// Retrieve XML database schema definition.
|
||||
var assembly = typeof(SaxSystem_Dbas).GetTypeInfo().Assembly;
|
||||
String xmlSchema = SacsResourceHelper.GetManifestResourceAsText(assembly, "", "SaxDbDfn_Core.xml");
|
||||
String xmlSchema = SacsResourceHelper.GetManifestResourceAsText(assembly, "", "SaxDbDfn_" + databaseInstance.ToString() + ".xml");
|
||||
if (StringUtil.IsEmpty(xmlSchema))
|
||||
return Json(responseData.SetMessage(messageTitle, "Failed to extract XML schema definition."));
|
||||
|
||||
|
||||
@@ -19,6 +19,7 @@ namespace Saxonite.Net.Core.Web.Admin.Models
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Properties.
|
||||
public String DatabaseInstance { get; set; }
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Database page properties.
|
||||
|
||||
@@ -699,6 +699,9 @@
|
||||
<data name="system.caption.logs" xml:space="preserve">
|
||||
<value>System - Logs</value>
|
||||
</data>
|
||||
<data name="system.caption.support.database.schema" xml:space="preserve">
|
||||
<value>Support Database Schema</value>
|
||||
</data>
|
||||
<data name="system.msg.database.schema.valid" xml:space="preserve">
|
||||
<value>Database schema is valid.</value>
|
||||
</data>
|
||||
|
||||
@@ -51,8 +51,15 @@
|
||||
|
||||
</div>
|
||||
|
||||
@* Database Schema *@
|
||||
<div class="sax-panel-info sax-panel-results DbSchema">
|
||||
|
||||
@* Database Schema form. *@
|
||||
@using (@Html.BeginForm(FormMethod.Post, new { @id = "frmDatabaseSchema" }))
|
||||
{
|
||||
<input type="hidden" name="DatabaseInstance" class="DatabaseInstance" />
|
||||
}
|
||||
|
||||
@* Database Schema - Core *@
|
||||
<div class="sax-panel-info sax-panel-results DbSchema Core">
|
||||
|
||||
<div class="sax-header">
|
||||
<div class="sax-caption">@Localiser["system.caption.core.database.schema"]</div>
|
||||
@@ -77,3 +84,29 @@
|
||||
|
||||
</div>
|
||||
|
||||
@* Database Schema - Support *@
|
||||
<div class="sax-panel-info sax-panel-results DbSchema Support">
|
||||
|
||||
<div class="sax-header">
|
||||
<div class="sax-caption">@Localiser["system.caption.support.database.schema"]</div>
|
||||
</div>
|
||||
<div class="sax-content">
|
||||
<div class="sax-panel-messages"></div>
|
||||
<div class="sax-panel-item-list"></div>
|
||||
<div class="sax-panel-item-template">
|
||||
@* Db Schema templates *@
|
||||
<div class="sax-panel-item DbSchemaItem">
|
||||
<div class="sax-header">
|
||||
<div class="sax-caption SchemaTable">@(Localiser["label.table"]): <span class="TableName"></span></div>
|
||||
</div>
|
||||
<div class="sax-content">
|
||||
<div class="SchemaIndex">@(Localiser["label.index"]): <span class="IndexName"></span></div>
|
||||
<div class="SchemaColumn">@(Localiser["label.column"]): <span class="ColumnName"></span></div>
|
||||
<div class=""><span class="Comment"></span></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
// Users.
|
||||
let user = response.stats.user;
|
||||
let $user = sax.getAppStatItemTemplate();
|
||||
$('.sax-header .sax-caption', $user).text(user.caption||'Users');
|
||||
$('.sax-header .sax-caption', $user).text(user.caption || 'Users');
|
||||
ah.populateAppStat($user, user.awaiting.label, user.awaiting.value, user.awaitingLink)
|
||||
for (let item of user.onlineStats)
|
||||
ah.populateAppStat($user, item.label, item.value, user.onlineLink)
|
||||
@@ -43,7 +43,7 @@
|
||||
// Organisations.
|
||||
let org = response.stats.organisation;
|
||||
let $org = sax.getAppStatItemTemplate();
|
||||
$('.sax-header .sax-caption', $org).text(org.caption||'Organisations');
|
||||
$('.sax-header .sax-caption', $org).text(org.caption || 'Organisations');
|
||||
ah.populateAppStat($org, org.awaiting.label, org.awaiting.value, org.awaitingLink)
|
||||
$items.append($org);
|
||||
$items.slideDown(750);
|
||||
@@ -67,35 +67,39 @@
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
sax.refreshDbSchema = function (delay)
|
||||
ah.refreshDbSchema = function (instance, delay)
|
||||
{
|
||||
if (sax.awaitingLogin) return;
|
||||
if (!ah.awaitingSchemaResponse)
|
||||
{
|
||||
var $items = $('.sax-panel-item-list', $pnl.dbSchema).fadeOut(200).empty();
|
||||
var $msgs = $('.sax-panel-messages', $pnl.dbSchema).hide().empty().append($('<div class="sax-message">' + sax.msg.dataQuerying + '</div>')).fadeIn(200);
|
||||
let $pnlSchema = $('.sax-panel-results.DbSchema.' + instance);
|
||||
var $items = $('.sax-panel-item-list', $pnlSchema).fadeOut(200).empty();
|
||||
var $msgs = $('.sax-panel-messages', $pnlSchema).hide().empty().append($('<div class="sax-message">' + sax.msg.dataQuerying + '</div>')).fadeIn(200);
|
||||
}
|
||||
sax.ajax.dbSchema = sax.ajax.dbSchema || { url: sax.url.base + 'System/Ajax/ValidateDatabaseSchema', formId: 'frmNavigate', callbackFn: sax.handleDbSchemaResponse, noWaitIcon: true };
|
||||
$('.DatabaseInstance', $frm.dbSchema).val(instance);
|
||||
sax.ajax.dbSchema = sax.ajax.dbSchema || { url: sax.url.base + 'System/Ajax/ValidateDatabaseSchema', formId: $frm.dbSchema.prop('id'), callbackFn: ah.handleDbSchemaResponse, noWaitIcon: true };
|
||||
sax.doAjaxRequest(sax.ajax.dbSchema, delay || 50);
|
||||
ah.awaitingSchemaResponse = true;
|
||||
}
|
||||
sax.handleDbSchemaResponse = function (response)
|
||||
ah.handleDbSchemaResponse = function (response)
|
||||
{
|
||||
//sax.debug('handleDbSchemaResponse', response);
|
||||
delete ah.awaitingSchemaResponse;
|
||||
var $msgs = $('.sax-panel-messages', $pnl.dbSchema).hide().empty();
|
||||
var $items = $('.sax-panel-item-list', $pnl.dbSchema).hide().empty();
|
||||
var $tmpl = $('.sax-panel-item-template .sax-panel-item.DbSchemaItem', $pnl.dbSchema);
|
||||
let $pnlSchema = $('.sax-panel-results.DbSchema.' + response.instance) ;
|
||||
var $msgs = $('.sax-panel-messages', $pnlSchema).hide().empty();
|
||||
var $items = $('.sax-panel-item-list', $pnlSchema).hide().empty();
|
||||
var $tmpl = $('.sax-panel-item-template .sax-panel-item.DbSchemaItem', $pnlSchema);
|
||||
if (!response.success) return;
|
||||
if (response.instance == 'Core') ah.toSchema = setTimeout(function () { ah.refreshDbSchema('Support'); }, 250);
|
||||
// Items.
|
||||
var items = response.items;
|
||||
if (!items.length)
|
||||
return $msgs.append($('<div class="sax-message">' + sax.msg.dbSchemaValid + '</div>')).fadeIn(500);
|
||||
for (let itemIdx = 0; itemIdx < items.length; itemIdx++)
|
||||
$items.append(sax.populateDbSchemaItem($tmpl.clone(), items[itemIdx]));
|
||||
$items.append(ah.populateDbSchemaItem($tmpl.clone(), items[itemIdx]));
|
||||
$items.slideDown(750);
|
||||
}
|
||||
sax.populateDbSchemaItem = function ($item, item)
|
||||
ah.populateDbSchemaItem = function ($item, item)
|
||||
{
|
||||
if (!item) return;
|
||||
$item.prop('id', sax.itemIdPrefix + item.id);
|
||||
@@ -112,10 +116,13 @@
|
||||
$(function ()
|
||||
{
|
||||
$pnl.appStats = $('.sax-panel-results.ApplicationStats');
|
||||
$pnl.dbSchema = $('.sax-panel-results.DbSchema');
|
||||
$frm.dbSchema = $('#frmDatabaseSchema');
|
||||
$pnl.dbSchemaCore = $('.sax-panel-results.DbSchema.Core');
|
||||
$pnl.dbSchemaSupport = $('.sax-panel-results.DbSchema.Support');
|
||||
|
||||
ah.toStats = setTimeout(ah.refreshApplicationStats, 400);
|
||||
ah.toSchema = setTimeout(sax.refreshDbSchema, 600);
|
||||
ah.toSchema = setTimeout(function () { ah.refreshDbSchema('Core'); }, 600);
|
||||
// NB Can only request one of the database schemas at a time as they share the same ajax config.
|
||||
});
|
||||
|
||||
//--------------------------------------------------------------
|
||||
|
||||
@@ -411,6 +411,10 @@
|
||||
|
||||
//--------------------------------------------------------------
|
||||
// Data entry.
|
||||
sax.hasControlErrors = function (context)
|
||||
{
|
||||
return $('.sax-form-control', $(context || doc.body)).hasClass('sax-error');
|
||||
}
|
||||
sax.clearControlErrors = function (context)
|
||||
{
|
||||
var $ctrls = $('.sax-form-control', $(context || doc.body)).removeClass('sax-error');
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
}
|
||||
oa.doRefreshResults = function (response)
|
||||
{
|
||||
sax.debug('doRefreshResults', response);
|
||||
//sax.debug('doRefreshResults', response);
|
||||
delete oa.awaitingRefreshResponse;
|
||||
sax.refreshControlValues(response.controlValues);
|
||||
var $msgs = $('.sax-panel-messages', $pnl.results).hide().empty();
|
||||
@@ -156,7 +156,7 @@
|
||||
}
|
||||
oa.onUpdateItem = function (response)
|
||||
{
|
||||
sax.debug('onUpdateItemAssociation', response);
|
||||
//sax.debug('onUpdateItemAssociation', response);
|
||||
if (!response.success) return;
|
||||
oa.clearItem();
|
||||
// Association.
|
||||
|
||||
@@ -189,6 +189,9 @@
|
||||
<data name="caption.contact.method" xml:space="preserve">
|
||||
<value>Contact Method</value>
|
||||
</data>
|
||||
<data name="caption.feedback" xml:space="preserve">
|
||||
<value>Feedback</value>
|
||||
</data>
|
||||
<data name="caption.member.create" xml:space="preserve">
|
||||
<value>Add Member</value>
|
||||
</data>
|
||||
@@ -204,6 +207,9 @@
|
||||
<data name="caption.user.config" xml:space="preserve">
|
||||
<value>User Configuration</value>
|
||||
</data>
|
||||
<data name="caption.version.history" xml:space="preserve">
|
||||
<value>Version History</value>
|
||||
</data>
|
||||
<data name="company.name" xml:space="preserve">
|
||||
<value>Solum Forti</value>
|
||||
</data>
|
||||
@@ -279,6 +285,9 @@
|
||||
<data name="label.any" xml:space="preserve">
|
||||
<value>Any</value>
|
||||
</data>
|
||||
<data name="label.application" xml:space="preserve">
|
||||
<value>Application</value>
|
||||
</data>
|
||||
<data name="label.article" xml:space="preserve">
|
||||
<value>Article</value>
|
||||
</data>
|
||||
@@ -525,8 +534,8 @@
|
||||
<data name="label.page.info" xml:space="preserve">
|
||||
<value>Page {0} of {1}</value>
|
||||
</data>
|
||||
<data name="label.participation" xml:space="preserve">
|
||||
<value>Participation</value>
|
||||
<data name="label.participating" xml:space="preserve">
|
||||
<value>Participating</value>
|
||||
</data>
|
||||
<data name="label.password" xml:space="preserve">
|
||||
<value>Password</value>
|
||||
@@ -549,6 +558,9 @@
|
||||
<data name="label.postal.code" xml:space="preserve">
|
||||
<value>Postal code</value>
|
||||
</data>
|
||||
<data name="label.preparing" xml:space="preserve">
|
||||
<value>Preparing</value>
|
||||
</data>
|
||||
<data name="label.previous" xml:space="preserve">
|
||||
<value>Previous</value>
|
||||
</data>
|
||||
|
||||
@@ -132,7 +132,7 @@ namespace Saxonite.Net.Core.Web.Online.Controllers
|
||||
// Construction.
|
||||
public AjaxResponse_ProfileOrganisationList(SaxModel_Online model) : base(model) { }
|
||||
// Reference data.
|
||||
public List<AjaxResponse_Data.ItemCodeDesc> ContactMethods { get; } = new List<ItemCodeDesc>();
|
||||
public List<ItemCodeDesc> ContactMethods { get; } = new List<ItemCodeDesc>();
|
||||
// Organisation list.
|
||||
public List<ProfileOrganisationListData> Organisations { get; } = new List<ProfileOrganisationListData>();
|
||||
}
|
||||
|
||||
@@ -30,13 +30,15 @@ namespace Saxonite.Net.Core.Web.Online.Controllers
|
||||
public String SportId { get; set; }
|
||||
public String SportName { get; set; }
|
||||
public String SportSpecialityLabel { get; set; }
|
||||
public String SportParticipation { get; set; }
|
||||
public String SportParticipating { get; set; }
|
||||
public String SportPreparing { get; set; }
|
||||
public String SportOfficiating { get; set; }
|
||||
}
|
||||
private class ProfileSportResponseItemData : ProfileSportResponseListData
|
||||
{
|
||||
public String SportAbout { get; set; }
|
||||
public String SportParticipationCode { get; set; }
|
||||
public String SportParticipatingCode { get; set; }
|
||||
public String SportPreparingCode { get; set; }
|
||||
public String SportOfficiatingCode { get; set; }
|
||||
}
|
||||
private void PopulateProfileSportResponseListData(Model_Account model, SaxUserSport userSport, SaxSport sport, ProfileSportResponseListData data)
|
||||
@@ -45,14 +47,16 @@ namespace Saxonite.Net.Core.Web.Online.Controllers
|
||||
data.SportId = model.GetEncryptedSportId(userSport.SportId);
|
||||
data.SportName = sport.Name;
|
||||
data.SportSpecialityLabel = model.GetSportSpecialityLabel(userSport.SportId);
|
||||
data.SportParticipation = Localiser.GetSportParticipationCaption(userSport.Participation);
|
||||
data.SportParticipating = Localiser.GetSportParticipatingCaption(userSport.Participating);
|
||||
data.SportPreparing = Localiser.GetSportPreparingCaption(userSport.Preparing);
|
||||
data.SportOfficiating = Localiser.GetSportOfficiatingCaption(userSport.Officiating);
|
||||
}
|
||||
private void PopulateProfileSportResponseItemData(Model_Account model, SaxUserSport userSport, SaxSport sport, ProfileSportResponseItemData data)
|
||||
{
|
||||
PopulateProfileSportResponseListData(model, userSport, sport, data);
|
||||
data.SportAbout = userSport.About;
|
||||
data.SportParticipationCode = SportParticipationCodes.GetCodeForType(userSport.Participation);
|
||||
data.SportParticipatingCode = SportParticipatingCodes.GetCodeForType(userSport.Participating);
|
||||
data.SportPreparingCode = SportPreparingCodes.GetCodeForType(userSport.Preparing);
|
||||
data.SportOfficiatingCode = SportOfficiatingCodes.GetCodeForType(userSport.Officiating);
|
||||
data.CreatedOnFmt = model.FormatDateForDisplay(userSport.CreateStamp.On);
|
||||
data.StatusCode = userSport.StatusCode;
|
||||
@@ -66,6 +70,9 @@ namespace Saxonite.Net.Core.Web.Online.Controllers
|
||||
{
|
||||
// Construction.
|
||||
public AjaxResponse_ProfileSportsData(SaxModel_Online model) : base(model) { }
|
||||
// Reference data.
|
||||
public List<ItemCodeDesc> ContactTypes { get; } = new List<ItemCodeDesc>();
|
||||
public List<ItemCodeDesc> Titles { get; } = new List<ItemCodeDesc>();
|
||||
// Sport list.
|
||||
public List<ProfileSportResponseListData> Sports { get; } = new List<ProfileSportResponseListData>();
|
||||
}
|
||||
@@ -83,6 +90,18 @@ namespace Saxonite.Net.Core.Web.Online.Controllers
|
||||
if (!ValidUserSession) return GetAjaxResult_InvalidSession(responseData);
|
||||
RefreshModel(model);
|
||||
|
||||
// Reference data - Contact types.
|
||||
List<Sax.SportContactType> validContactTypes = new List<Sax.SportContactType>(EnumUtil.GetValues<Sax.SportContactType>());
|
||||
foreach (TypeCodeDesc contactType in SportContactTypeCodes)
|
||||
{
|
||||
if (!validContactTypes.Contains((Sax.SportContactType)contactType.Type)) continue;
|
||||
responseData.ContactTypes.Add(new AjaxResponse_Data.ItemCodeDesc() { Code = contactType.Code, Desc = Localiser.GetSportContactTypeCaption((Sax.SportContactType)contactType.Type) });
|
||||
}
|
||||
|
||||
// Reference data - Titles.
|
||||
foreach (var title in model.TitlesForSelect)
|
||||
responseData.Titles.Add(new AjaxResponse_Data.ItemCodeDesc() { Code = title.Value, Desc = title.Text });
|
||||
|
||||
// Item filter.
|
||||
SaxUserSport.Params prmUserSport = new SaxUserSport.Params();
|
||||
prmUserSport.UserAccountIdsIncluded.Add(SessionUserAccountId);
|
||||
@@ -94,14 +113,15 @@ namespace Saxonite.Net.Core.Web.Online.Controllers
|
||||
ColumnDfn colId = AccountMgr.GetUserSportColumnDfn(SaxUserSport.Column.Id);
|
||||
ColumnDfn colSportId = AccountMgr.GetUserSportColumnDfn(SaxUserSport.Column.SportId);
|
||||
ColumnDfn colSportName = AccountMgr.GetUserSportColumnDfn(SaxUserSport.Column.Sport_Name);
|
||||
ColumnDfn colParticipation = AccountMgr.GetUserSportColumnDfn(SaxUserSport.Column.SportParticipation);
|
||||
ColumnDfn colParticipating = AccountMgr.GetUserSportColumnDfn(SaxUserSport.Column.SportParticipating);
|
||||
ColumnDfn colPreparing = AccountMgr.GetUserSportColumnDfn(SaxUserSport.Column.SportPreparing);
|
||||
ColumnDfn colOfficiating = AccountMgr.GetUserSportColumnDfn(SaxUserSport.Column.SportOfficiating);
|
||||
ColumnDfn colStatus = AccountMgr.GetUserSportColumnDfn(SaxUserSport.Column.Status);
|
||||
List<ColumnDfn> columns = new List<ColumnDfn>()
|
||||
{
|
||||
colId,
|
||||
colSportId, colSportName,
|
||||
colParticipation, colOfficiating,
|
||||
colParticipating, colPreparing, colOfficiating,
|
||||
colStatus,
|
||||
};
|
||||
|
||||
@@ -121,7 +141,8 @@ namespace Saxonite.Net.Core.Web.Online.Controllers
|
||||
SportId = model.GetEncryptedSportId(sportId),
|
||||
SportName = values.GetString(colSportName.DataName),
|
||||
SportSpecialityLabel = model.GetSportSpecialityLabel(sportId),
|
||||
SportParticipation = Localiser.GetSportParticipationCaption((Sax.SportParticipation)values.GetLong(colParticipation.DataName)),
|
||||
SportParticipating = Localiser.GetSportParticipatingCaption((Sax.SportParticipating)values.GetLong(colParticipating.DataName)),
|
||||
SportPreparing = Localiser.GetSportPreparingCaption((Sax.SportPreparing)values.GetLong(colPreparing.DataName)),
|
||||
SportOfficiating = Localiser.GetSportOfficiatingCaption((Sax.SportOfficiating)values.GetLong(colOfficiating.DataName)),
|
||||
StatusCode = values.GetString(colStatus.DataName),
|
||||
StatusDesc = SacsSystem.GetStatusDescForCode(values.GetString(colStatus.DataName))
|
||||
@@ -197,7 +218,43 @@ namespace Saxonite.Net.Core.Web.Online.Controllers
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Store ProfileSport ajax request.
|
||||
// Validate Profile Sport Contact ajax request.
|
||||
//-------------------------------------------------------------------
|
||||
private class AjaxResponse_ProfileSportContact : AjaxResponse_Data
|
||||
{
|
||||
// Construction.
|
||||
public AjaxResponse_ProfileSportContact(SaxModel_Online model) : base(model) { }
|
||||
}
|
||||
[HttpPost]
|
||||
[Route("Account/Ajax/ValidateProfileSportContact")]
|
||||
public IActionResult Ajax_ValidateProfileSportContact(Model_UserSportContact model)
|
||||
{
|
||||
String fn = GetType().Name + ".Ajax_ValidateProfileSportContact";
|
||||
String messageTitle = Localiser["account.caption.profile.sport.contact"];
|
||||
AjaxResponse_ProfileSportContact responseData = new AjaxResponse_ProfileSportContact(model);
|
||||
|
||||
// Validate session and referrer.
|
||||
if (!ValidReferer) return Forbid();
|
||||
if (!ValidUserSession) return GetAjaxResult_InvalidSession(responseData);
|
||||
RefreshModel(model);
|
||||
|
||||
// Record disposable items as they are created so all can be disposed when needed.
|
||||
using (DisposableCollection<SacsHierarchyItem> disposableItems = new DisposableCollection<SacsHierarchyItem>())
|
||||
{
|
||||
|
||||
// Validate item properties.
|
||||
model.ValidateUserSportContactData(responseData);
|
||||
if (responseData.HasControlErrors())
|
||||
return Json(responseData);
|
||||
|
||||
// Construct response.
|
||||
responseData.Success = true;
|
||||
}
|
||||
return Json(responseData);
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Store Profile Sport ajax request.
|
||||
//-------------------------------------------------------------------
|
||||
[HttpPost]
|
||||
[Route("Account/Ajax/StoreProfileSport")]
|
||||
@@ -295,8 +352,10 @@ namespace Saxonite.Net.Core.Web.Online.Controllers
|
||||
// Populate item properties.
|
||||
if (model.ProfileSportAbout != null)
|
||||
userSport.About = model.ProfileSportAbout;
|
||||
if (model.ProfileSportParticipationCode != null)
|
||||
userSport.Participation = model.ProfileSportParticipation;
|
||||
if (model.ProfileSportParticipatingCode != null)
|
||||
userSport.Participating = model.ProfileSportParticipating;
|
||||
if (model.ProfileSportPreparingCode != null)
|
||||
userSport.Preparing = model.ProfileSportPreparing;
|
||||
if (model.ProfileSportOfficiatingCode != null)
|
||||
userSport.Officiating = model.ProfileSportOfficiating;
|
||||
|
||||
|
||||
@@ -0,0 +1,81 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Sarand.Net.Standard.Base.Bus;
|
||||
using Sarand.Net.Standard.Base.Core;
|
||||
using Sarand.Net.Standard.Base.Dbas;
|
||||
using Sarand.Net.Standard.Base.Utils;
|
||||
using Saxonite.Net.Core.Web.Base.App;
|
||||
using Saxonite.Net.Core.Web.Online.Models;
|
||||
using Saxonite.Net.Standard.Base.App;
|
||||
using Saxonite.Net.Standard.Base.Bus;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Saxonite.Net.Core.Web.Online.Controllers
|
||||
{
|
||||
//=======================================================================
|
||||
// Online Application Controller.
|
||||
//=======================================================================
|
||||
public partial class ApplicationController : SaxController_Online
|
||||
{
|
||||
//-------------------------------------------------------------------
|
||||
// Construction.
|
||||
public ApplicationController(SaxLocaliser localiser, ILogger<HomeController> logger) :
|
||||
base(localiser, logger)
|
||||
{
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
[HttpGet]
|
||||
public IActionResult Index()
|
||||
{
|
||||
// Validate session.
|
||||
if (!ValidUserSession)
|
||||
return RedirectToAction("", "");
|
||||
|
||||
// No Application index page.
|
||||
return RedirectToAction("", "");
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
[HttpGet,HttpPost]
|
||||
public IActionResult Feedback()
|
||||
{
|
||||
// Validate session.
|
||||
if (!ValidUserSession)
|
||||
return RedirectToAction("", "");
|
||||
|
||||
// User must be a member of the 'Reviewers' role.
|
||||
if (!SessionData_Online.User.Roles.Exists(item => item.Role == Sax.UserRole.SystemReviewer))
|
||||
return RedirectToAction("", "");
|
||||
|
||||
// Applincation index page.
|
||||
Model_Application model = new Model_Application(Localiser);
|
||||
model.ProhibitCache = false;
|
||||
return View(model);
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
[HttpGet, HttpPost]
|
||||
public IActionResult Versions()
|
||||
{
|
||||
// Validate session.
|
||||
if (!ValidUserSession)
|
||||
return RedirectToAction("", "");
|
||||
|
||||
// User must be a member of the 'Reviewers' role.
|
||||
if (!SessionData_Online.User.Roles.Exists(item => item.Role == Sax.UserRole.SystemReviewer))
|
||||
return RedirectToAction("", "");
|
||||
|
||||
// Applincation index page.
|
||||
Model_Application model = new Model_Application(Localiser);
|
||||
model.ProhibitCache = false;
|
||||
return View(model);
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
}
|
||||
//=======================================================================
|
||||
}
|
||||
@@ -138,21 +138,23 @@ namespace Saxonite.Net.Core.Web.Online.Controllers
|
||||
// Read discrete values to avoid loading the entire UserSport records which can be substantial.
|
||||
ColumnDfn colSportId = AccountMgr.GetUserSportColumnDfn(SaxUserSport.Column.SportId);
|
||||
ColumnDfn colSportName = AccountMgr.GetUserSportColumnDfn(SaxUserSport.Column.Sport_Name);
|
||||
ColumnDfn colParticipation = AccountMgr.GetUserSportColumnDfn(SaxUserSport.Column.SportParticipation);
|
||||
ColumnDfn colParticipating = AccountMgr.GetUserSportColumnDfn(SaxUserSport.Column.SportParticipating);
|
||||
ColumnDfn colPreparing = AccountMgr.GetUserSportColumnDfn(SaxUserSport.Column.SportPreparing);
|
||||
ColumnDfn colOfficiating = AccountMgr.GetUserSportColumnDfn(SaxUserSport.Column.SportOfficiating);
|
||||
ColumnDfn colStatus = AccountMgr.GetUserSportColumnDfn(SaxUserSport.Column.Status);
|
||||
|
||||
SaxUserSport.Params prmUserSport = new SaxUserSport.Params();
|
||||
prmUserSport.UserAccountIdsIncluded.Add(userAccountId);
|
||||
prmUserSport.StatusCat = SaxUserSport.StatusCat.ActiveOnly;
|
||||
using (DbResultSet resultSet = AccountMgr.ExecuteUserSportQuery(new List<ColumnDfn>() { colSportId, colSportName, colParticipation, colOfficiating, colStatus }, prmUserSport))
|
||||
using (DbResultSet resultSet = AccountMgr.ExecuteUserSportQuery(new List<ColumnDfn>() { colSportId, colSportName, colParticipating, colOfficiating, colStatus }, prmUserSport))
|
||||
{
|
||||
while (resultSet != null && resultSet.NextRecord())
|
||||
{
|
||||
NamedValue.Map values = resultSet.GetRecordValues();
|
||||
SysId sportId = new SysId(values.GetLong(colSportId.DataName));
|
||||
String sportName = values.GetString(colSportName.DataName);
|
||||
Sax.SportParticipation participation = (Sax.SportParticipation)values.GetLong(colParticipation.DataName);
|
||||
Sax.SportParticipating participating = (Sax.SportParticipating)values.GetLong(colParticipating.DataName);
|
||||
Sax.SportPreparing preparing = (Sax.SportPreparing)values.GetLong(colPreparing.DataName);
|
||||
Sax.SportOfficiating officiating = (Sax.SportOfficiating)values.GetLong(colOfficiating.DataName);
|
||||
SaStatus status = SacsSystem.GetStatusForCode(values.GetString(colStatus.DataName));
|
||||
sessionData.Profile.AddSport(sportId, status);
|
||||
|
||||
@@ -61,11 +61,17 @@ namespace Saxonite.Net.Core.Web.Online.Models
|
||||
public String UserSportId { get; set; }
|
||||
public String ProfileSportId { get; set; }
|
||||
public String ProfileSportExists { get; set; }
|
||||
public String ProfileSportParticipationCode { get; set; }
|
||||
public Sax.SportParticipation ProfileSportParticipation
|
||||
public String ProfileSportParticipatingCode { get; set; }
|
||||
public Sax.SportParticipating ProfileSportParticipating
|
||||
{
|
||||
get { return (Sax.SportParticipation)SportParticipationCodes.GetTypeForCode(ProfileSportParticipationCode); }
|
||||
set { ProfileSportParticipationCode = SportParticipationCodes.GetCodeForType(value); }
|
||||
get { return (Sax.SportParticipating)SportParticipatingCodes.GetTypeForCode(ProfileSportParticipatingCode); }
|
||||
set { ProfileSportParticipatingCode = SportParticipatingCodes.GetCodeForType(value); }
|
||||
}
|
||||
public String ProfileSportPreparingCode { get; set; }
|
||||
public Sax.SportPreparing ProfileSportPreparing
|
||||
{
|
||||
get { return (Sax.SportPreparing)SportPreparingCodes.GetTypeForCode(ProfileSportPreparingCode); }
|
||||
set { ProfileSportPreparingCode = SportPreparingCodes.GetCodeForType(value); }
|
||||
}
|
||||
public String ProfileSportOfficiatingCode { get; set; }
|
||||
public Sax.SportOfficiating ProfileSportOfficiating
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
using Saxonite.Net.Core.Web.Base.App;
|
||||
using Saxonite.Net.Core.Web.Base.Models;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Saxonite.Net.Core.Web.Online.Models
|
||||
{
|
||||
//=======================================================================
|
||||
public class Model_Application : SaxModel_Online
|
||||
{
|
||||
//-------------------------------------------------------------------
|
||||
// Construction.
|
||||
public Model_Application(SaxLocaliser localiser) :
|
||||
base(localiser)
|
||||
{
|
||||
AdditionalFiles_CSS.Add("css/sax-appl.css");
|
||||
AdditionalFiles_JS.Add("js/sax-appl.js");
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
}
|
||||
//=======================================================================
|
||||
}
|
||||
@@ -0,0 +1,102 @@
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Sarand.Net.Standard.Base.Bus;
|
||||
using Sarand.Net.Standard.Base.Core;
|
||||
using Sarand.Net.Standard.Base.Utils;
|
||||
using Saxonite.Base.App;
|
||||
using Saxonite.Net.Core.Web.Base.App;
|
||||
using Saxonite.Net.Core.Web.Base.Controllers;
|
||||
using Saxonite.Net.Core.Web.Base.Models;
|
||||
using Saxonite.Net.Standard.Base.App;
|
||||
using Saxonite.Net.Standard.Base.Bus;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Saxonite.Net.Core.Web.Online.Models
|
||||
{
|
||||
//=======================================================================
|
||||
public class Model_UserSportContact: SaxModel_Online
|
||||
{
|
||||
//-------------------------------------------------------------------
|
||||
// Construction.
|
||||
public Model_UserSportContact(SaxLocaliser localiser) :
|
||||
base(localiser)
|
||||
{
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// User Sports Contact properties.
|
||||
public class SportContactData
|
||||
{
|
||||
public String Type { get; set; }
|
||||
public String EmailAddress { get; set; }
|
||||
public String Title { get; set; }
|
||||
public String FirstName { get; set; }
|
||||
public String LastName { get; set; }
|
||||
}
|
||||
public SportContactData SportContact { get; } = new SportContactData();
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Validate User Sport Contact data.
|
||||
public bool ValidateUserSportContactData(SaxController_Base.AjaxResponse_Data responseData)
|
||||
{
|
||||
// Contact Type.
|
||||
String controlName = "ContactType";
|
||||
if (SportContact.Type != null)
|
||||
{
|
||||
// Contact Type is mandatory.
|
||||
if (StringUtil.IsBlank(SportContact.Type))
|
||||
responseData.SetControlError(controlName, Localiser["msg.validation.invalid.value"]);
|
||||
}
|
||||
|
||||
// Email.
|
||||
controlName = "ContactEmailAddress";
|
||||
if (SportContact.EmailAddress != null)
|
||||
{
|
||||
responseData.SetControlValue(controlName, SportContact.EmailAddress);
|
||||
// Email is optional.
|
||||
if (StringUtil.GetLength(SportContact.EmailAddress) > GetControlMaxLength(SaxDbDfn_Core.ColumnIdx.UserAccount_EmailAddress))
|
||||
responseData.SetControlError(controlName, Localiser["msg.validation.maximum.length", GetControlMaxLength(SaxDbDfn_Core.ColumnIdx.UserAccount_EmailAddress)]);
|
||||
}
|
||||
|
||||
// Title.
|
||||
controlName = "ContactTitle";
|
||||
if (SportContact.Title != null)
|
||||
{
|
||||
// Title is selected from dropdown so no validation should be required.
|
||||
if (StringUtil.GetLength(SportContact.Title) > GetControlMaxLength(SaxDbDfn_Core.ColumnIdx.UserAccount_Title))
|
||||
responseData.SetControlError(controlName, Localiser["msg.validation.maximum.length", GetControlMaxLength(SaxDbDfn_Core.ColumnIdx.UserAccount_Title)]);
|
||||
}
|
||||
|
||||
// First Name.
|
||||
controlName = "ContactFirstName";
|
||||
if (SportContact.FirstName != null)
|
||||
{
|
||||
responseData.SetControlValue(controlName, SportContact.FirstName);
|
||||
// First name is mandatory.
|
||||
if (StringUtil.IsBlank(SportContact.FirstName))
|
||||
responseData.SetControlError(controlName, Localiser["msg.validation.invalid.value"]);
|
||||
else if (StringUtil.GetLength(SportContact.FirstName) > GetControlMaxLength(SaxDbDfn_Core.ColumnIdx.UserAccount_FirstName))
|
||||
responseData.SetControlError(controlName, Localiser["msg.validation.maximum.length", GetControlMaxLength(SaxDbDfn_Core.ColumnIdx.UserAccount_FirstName)]);
|
||||
}
|
||||
|
||||
// Last Name.
|
||||
controlName = "ContactLastName";
|
||||
if (SportContact.LastName != null)
|
||||
{
|
||||
responseData.SetControlValue(controlName, SportContact.LastName);
|
||||
// Last name is mandatory.
|
||||
if (StringUtil.IsBlank(SportContact.LastName))
|
||||
responseData.SetControlError(controlName, Localiser["msg.validation.invalid.value"]);
|
||||
else if (StringUtil.GetLength(SportContact.LastName) > GetControlMaxLength(SaxDbDfn_Core.ColumnIdx.UserAccount_LastName))
|
||||
responseData.SetControlError(controlName, Localiser["msg.validation.maximum.length", GetControlMaxLength(SaxDbDfn_Core.ColumnIdx.UserAccount_LastName)]);
|
||||
}
|
||||
|
||||
return !responseData.HasControlErrors();
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
}
|
||||
//=======================================================================
|
||||
}
|
||||
@@ -50,6 +50,8 @@ namespace Saxonite.Net.Core.Web.Online.Models
|
||||
public bool ArticlesAllowed { get { return UserIsJournalist || UserCanManageOrganisationArticles; } }
|
||||
public bool OrganisationOpportunitiesAllowed { get { return UserCanManageOrganisationOpportunities; } }
|
||||
public bool OrganisationEventsAllowed { get { return UserCanManageOrganisationSchedule; } }
|
||||
// Application menu is for admin reviewers only.
|
||||
public bool ApplicationMenuAllowed { get { return SessionData_Online?.User.Roles.Exists(item => item.Role == Sax.UserRole.SystemReviewer) ?? false; } }
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Security profile.
|
||||
|
||||
@@ -110,14 +110,14 @@
|
||||
|
||||
<div class="col-sm-3">
|
||||
<div class="sax-label d-none d-sm-block">
|
||||
<label for="ifAccountEmailAddress"><span>@Localiser["label.name"]</span></label>
|
||||
<label for="ifAccountFirstName"><span>@Localiser["label.name"]</span></label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-sm row">
|
||||
|
||||
<div class="col-sm-4">
|
||||
@* User first Title *@
|
||||
@* User Title *@
|
||||
<div class="sax-form-control AccountTitle pr8">
|
||||
<div class="sax-label">
|
||||
<label for="cbAccountTitle"><span>@Localiser["label.title"]</span></label>
|
||||
|
||||
@@ -61,8 +61,9 @@
|
||||
</div>
|
||||
<div class="sax-content">
|
||||
<div class="row">
|
||||
<div class="col-sm-6 SportParticipation sax-note">@Localiser["label.participation"]: <span class="SportParticipationValue"></span></div>
|
||||
<div class="col-sm-6 SportOfficiating sax-note">@Localiser["label.officiating"]: <span class="SportOfficiatingValue"></span></div>
|
||||
<div class="col-sm-4 SportParticipating sax-note">@Localiser["label.participating"]: <span class="SportParticipatingValue"></span></div>
|
||||
<div class="col-sm-4 SportPreparing sax-note">@Localiser["label.preparing"]: <span class="SportPreparingValue"></span></div>
|
||||
<div class="col-sm-4 SportOfficiating sax-note">@Localiser["label.officiating"]: <span class="SportOfficiatingValue"></span></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -128,17 +129,34 @@
|
||||
@* Contact controls *@
|
||||
<partial name="~/Views/Common/SportControls-Contacts.cshtml" />
|
||||
|
||||
@* Sport Participation *@
|
||||
<div class="sax-form-control ProfileSportParticipation">
|
||||
@* Sport Participating *@
|
||||
<div class="sax-form-control ProfileSportParticipating">
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<div class="sax-label">
|
||||
<label for="cbProfileSportParticipation"><span>@Localiser["label.participation"]</span></label>
|
||||
<label for="cbProfileSportParticipating"><span>@Localiser["label.participating"]</span></label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm">
|
||||
<div class="sax-control">
|
||||
@Html.DropDownListFor(model => model.ProfileSportParticipationCode, Model.SportParticipationCodesForSelect, "", new { @id = "cbProfileSportParticipation", @class = "ProfileSportParticipation sax-select" })
|
||||
@Html.DropDownListFor(model => model.ProfileSportParticipatingCode, Model.SportParticipatingCodesForSelect, "", new { @id = "cbProfileSportParticipating", @class = "ProfileSportParticipating sax-select" })
|
||||
</div>
|
||||
<div class="sax-message"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@* Sport Preparing *@
|
||||
<div class="sax-form-control ProfileSportPreparing">
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<div class="sax-label">
|
||||
<label for="cbProfileSportPreparing"><span>@Localiser["label.preparing"]</span></label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm">
|
||||
<div class="sax-control">
|
||||
@Html.DropDownListFor(model => model.ProfileSportPreparingCode, Model.SportPreparingCodesForSelect, "", new { @id = "cbProfileSportPreparing", @class = "ProfileSportPreparing sax-select" })
|
||||
</div>
|
||||
<div class="sax-message"></div>
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
@model Model_Application
|
||||
@inject SaxLocaliser Localiser
|
||||
@{
|
||||
// Online - Application - Index.
|
||||
ViewData["Title"] = "Application";
|
||||
}
|
||||
|
||||
<div style="max-width:400px;margin:12px auto;padding:12px;font-size:16px;text-align:center;border:1px solid #808080;border-radius:4px;">
|
||||
Application Feedback - page under construction, delivery imminent.
|
||||
</div>
|
||||
@@ -0,0 +1,10 @@
|
||||
@model Model_Application
|
||||
@inject SaxLocaliser Localiser
|
||||
@{
|
||||
// Online - Application - Index.
|
||||
ViewData["Title"] = "Application";
|
||||
}
|
||||
|
||||
<div style="max-width:400px;margin:12px auto;padding:12px;font-size:16px;text-align:center;border:1px solid #808080;border-radius:4px;">
|
||||
Application Versions - page under construction, delivery imminent.
|
||||
</div>
|
||||
@@ -7,7 +7,6 @@
|
||||
// Scripts.
|
||||
Model.AdditionalFiles_JS.Add("js/sax-cnt-mth.js");
|
||||
}
|
||||
|
||||
<div id="dlgContactMethod" class="sax-dialog sax-form" title="@Localiser["caption.contact.method"]">
|
||||
<div class="spacer4"></div>
|
||||
|
||||
|
||||
@@ -1,59 +1,106 @@
|
||||
@model SaxModel_Online
|
||||
@inject SaxLocaliser Localiser
|
||||
@{
|
||||
/* Sport Contacts */
|
||||
// Sport Contacts.
|
||||
// Ensure view is only included once in page.
|
||||
if (!Model.RegisterView("Views/Common/Sport-Contacts")) return;
|
||||
// Scripts.
|
||||
Model.AdditionalFiles_JS.Add("js/sax-spt-cnt.js");
|
||||
}
|
||||
|
||||
<link rel="stylesheet" href="~/css/sax-spt-cnt.css?@Model.HrefVersion" />
|
||||
<div id="dlgCodeSelect" class="sax-dialog sax-form" style="padding-bottom:8px;">
|
||||
|
||||
@* Filter *@
|
||||
<div class=""></div>
|
||||
|
||||
<div class="row h-100">
|
||||
|
||||
@* Available codes *@
|
||||
<div class="col-sm-5">
|
||||
|
||||
<div class="h-100 sax-codeSelect-codes AvailableCodes"></div>
|
||||
|
||||
</div>
|
||||
|
||||
@* Code selection *@
|
||||
<div class="col-sm-2">
|
||||
<div id="dlgSportContact" class="sax-dialog sax-form" style="padding-bottom:8px;">
|
||||
<div class="spacer4"></div>
|
||||
@using (Html.BeginForm(FormMethod.Post, new { @id = "frmProfileSportContact", @class = "sax-form", @onSubmit = "return false;" }))
|
||||
{
|
||||
|
||||
@* Contact type *@
|
||||
<div class="sax-form-control ContactType">
|
||||
<div class="row">
|
||||
|
||||
<div class="col-sx-6 col-sm-12 center">
|
||||
<button class="sax-button Select">@Localiser["label.select"]</button>
|
||||
<div class="col-sm-3">
|
||||
<div class="sax-label">
|
||||
<label for=""><span>@Localiser["label.contact"]</span><span class="required"> *</span></label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-sx-6 col-sm-12 center">
|
||||
<button class="sax-button Remove">@Localiser["label.remove"]</button>
|
||||
<div class="col-sm">
|
||||
<div class="sax-control">
|
||||
<select name="SportContact.Type" class="ContactType sax-select" style="max-width:240px;"></select>
|
||||
</div>
|
||||
<div class="sax-message"></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="spacer"></div>
|
||||
|
||||
@* Selected codes *@
|
||||
<div class="col-sm-5">
|
||||
|
||||
<div class="h-100 sax-codeSelect-codes SelectedCodes">
|
||||
|
||||
@* User email *@
|
||||
<div class="sax-form-control ContactEmailAddress">
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<div class="sax-label">
|
||||
<label for="ifContactEmailAddress"><span>@Localiser["label.email"]</span></label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm">
|
||||
<div class="sax-control">
|
||||
<input type="text" id="ifContactEmailAddress" name="SportContact.EmailAddress" class="ContactEmailAddress sax-input" maxlength="@Model.GetControlMaxLength(SaxDbDfn_Core.ColumnIdx.UserAccount_EmailAddress)" />
|
||||
</div>
|
||||
<div class="sax-message"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@* Contact Name *@
|
||||
<div class="row">
|
||||
|
||||
<div class="sax-panel-item-template">
|
||||
<div class="sax-panel-item Code">
|
||||
<div class="CodeDesc"></div>
|
||||
<div class="col-sm-3">
|
||||
<div class="sax-label d-none d-sm-block">
|
||||
<label for="ifContactFirstName"><span>@Localiser["label.name"]</span></label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-sm row">
|
||||
|
||||
<div class="col-sm-4">
|
||||
@* Contact Title *@
|
||||
<div class="sax-form-control ContactTitle pr8">
|
||||
<div class="sax-label">
|
||||
<label for="cbContactTitle"><span>@Localiser["label.title"]</span></label>
|
||||
</div>
|
||||
<div class="sax-control">
|
||||
<select name="SportContact.Title" class="ContactTitle sax-select"></select>
|
||||
</div>
|
||||
<div class="sax-message"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-4">
|
||||
@* Contact first name *@
|
||||
<div class="sax-form-control ContactFirstName pr8">
|
||||
<div class="sax-label">
|
||||
<label for="ifContactFirstName"><span>@Localiser["label.first.name"]</span><span class="required"> *</span></label>
|
||||
</div>
|
||||
<div class="sax-control">
|
||||
<input type="text" name="SportContact.FirstName" class="ContactFirstName sax-input" maxlength="@Model.GetControlMaxLength(SaxDbDfn_Core.ColumnIdx.UserAccount_FirstName)" />
|
||||
</div>
|
||||
<div class="sax-message"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-4">
|
||||
@* Contact last name *@
|
||||
<div class="sax-form-control ContactLastName">
|
||||
<div class="sax-label">
|
||||
<label for="ifContactLastName"><span>@Localiser["label.last.name"]</span><span class="required"> *</span></label>
|
||||
</div>
|
||||
<div class="sax-control">
|
||||
<input type="text" name="SportContact.LastName" class="ContactLastName sax-input" maxlength="@Model.GetControlMaxLength(SaxDbDfn_Core.ColumnIdx.UserAccount_LastName)" />
|
||||
</div>
|
||||
<div class="sax-message"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
}
|
||||
<div class="spacer"></div>
|
||||
</div>
|
||||
|
||||
@@ -85,7 +85,9 @@
|
||||
sax.msg.dataRefreshing = '@Localiser.GetJavascriptText("msg.data.refreshing")';
|
||||
sax.msg.dataQuerying = '@Localiser.GetJavascriptText("msg.data.querying")';
|
||||
sax.msg.dataNoneFound = '@Localiser.GetJavascriptText("msg.data.noneFound")';
|
||||
sax.maxProfileImageSize = 2*10**6;
|
||||
sax.msg.mandatoryValue = '@Localiser.GetJavascriptText("msg.validation.mandatory.value")';
|
||||
sax.msg.invalidValue = '@Localiser.GetJavascriptText("msg.validation.invalid.value")';
|
||||
sax.maxProfileImageSize = 2 * 10 ** 6;
|
||||
sax.session.cookieName = '@Model.SessionCookieName';
|
||||
sax.awaitingLogin = @awaitingLogin;
|
||||
sax.kli.active = @keepLoggedIn;
|
||||
@@ -158,6 +160,18 @@
|
||||
<div class="dropdown-item text-dark sax-action" onclick="sax.goToPage('Search/Organisations');">@Localiser["organisation.caption.organisations"]</div>
|
||||
</div>
|
||||
</li>
|
||||
@if (Model.ApplicationMenuAllowed)
|
||||
{
|
||||
<li class="nav-item dropdown">
|
||||
<a class="nav-link text-dark dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
@Localiser["label.application"]
|
||||
</a>
|
||||
<div class="dropdown-menu" aria-labelledby="navbarDropdown">
|
||||
<div class="dropdown-item text-dark sax-action" onclick="sax.navigateTo('Application/Feedback');">@Localiser["caption.feedback"]</div>
|
||||
<div class="dropdown-item text-dark sax-action" onclick="sax.navigateTo('Application/Versions');">@Localiser["caption.version.history"]</div>
|
||||
</div>
|
||||
</li>
|
||||
}
|
||||
<li class="nav-item dropdown">
|
||||
<a class="nav-link text-dark dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
@Localiser["label.security"]
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
/*
|
||||
Application stylesheet.
|
||||
*/
|
||||
|
||||
/* The End */
|
||||
@@ -0,0 +1,14 @@
|
||||
/*
|
||||
* Application scripts.
|
||||
*/
|
||||
(function (win, doc, undef)
|
||||
{
|
||||
"use strict";
|
||||
//--------------------------------------------------------------
|
||||
//--------------------------------------------------------------
|
||||
$(function ()
|
||||
{
|
||||
});
|
||||
//--------------------------------------------------------------
|
||||
}(window, window.document));
|
||||
/* The End */
|
||||
@@ -297,10 +297,10 @@
|
||||
/*
|
||||
ed.on('paste', function (e)
|
||||
{
|
||||
sax.debug('segment.paste');
|
||||
//sax.debug('segment.paste');
|
||||
let paste = (event.clipboardData || window.clipboardData).getData('text');
|
||||
paste = paste.toUpperCase();
|
||||
sax.debug(paste);
|
||||
//sax.debug(paste);
|
||||
const selection = window.getSelection();
|
||||
if (!selection.rangeCount) return false;
|
||||
selection.deleteFromDocument();
|
||||
|
||||
@@ -390,6 +390,10 @@
|
||||
}
|
||||
//--------------------------------------------------------------
|
||||
// Data entry.
|
||||
sax.hasControlErrors = function (context)
|
||||
{
|
||||
return $('.sax-form-control', $(context || doc.body)).hasClass('sax-error');
|
||||
}
|
||||
sax.clearControlErrors = function (context)
|
||||
{
|
||||
var $ctrls = $('.sax-form-control', $(context || doc.body)).removeClass('sax-error');
|
||||
|
||||
@@ -89,7 +89,7 @@
|
||||
ue.data.hideInfoKey = 'HideProfileEligibilityInfo';
|
||||
ue.showInfoTip = function ()
|
||||
{
|
||||
sax.debug('showInfoTip');
|
||||
//sax.debug('showInfoTip');
|
||||
$pnl.infoTip.show();
|
||||
sax.updateUserConfigOption(ue.data.hideInfoKey, 0);
|
||||
}
|
||||
@@ -203,7 +203,7 @@
|
||||
//--------------------------------------------------------------
|
||||
ue.removeItem = function (item, $item)
|
||||
{
|
||||
sax.debug('removeItem', item);
|
||||
//sax.debug('removeItem', item);
|
||||
ue.data.item = item;
|
||||
ue.data.$item = $item;
|
||||
let fn = function ()
|
||||
|
||||
@@ -28,6 +28,8 @@
|
||||
//sax.debug('onRefreshProfileSportsInfo', response);
|
||||
if (!response || !response.success) return;
|
||||
$('.sax-message', $pnl.proSpt).stop(true, false).fadeOut(200).empty();
|
||||
ps.data.contactTypes = response.contactTypes;
|
||||
ps.data.titles = response.titles;
|
||||
sax.profile.sports.Ids = [];
|
||||
let items = response.sports;
|
||||
if (!items) return;
|
||||
@@ -46,8 +48,10 @@
|
||||
$('.sax-content', $item).on('dblclick', function (evt) { ps.updateProfileSport(item); });
|
||||
$('.sax-header .sax-action.sax-experience', $item).on('click', function (evt) { sax.showSportExperience(item); });
|
||||
$('.SportName', $item).text(item.sportName);
|
||||
$('.SportParticipationValue', $item).text(item.sportParticipation);
|
||||
$('.SportParticipation', $item).toggle(!!item.sportParticipation);
|
||||
$('.SportParticipatingValue', $item).text(item.sportParticipating);
|
||||
$('.SportParticipating', $item).toggle(!!item.sportParticipating);
|
||||
$('.SportPreparingValue', $item).text(item.sportPreparing);
|
||||
$('.SportPreparing', $item).toggle(!!item.sportPreparing);
|
||||
$('.SportOfficiatingValue', $item).text(item.sportOfficiating);
|
||||
$('.SportOfficiating', $item).toggle(!!item.sportOfficiating);
|
||||
return $item;
|
||||
@@ -62,7 +66,12 @@
|
||||
{
|
||||
//sax.debug('addProfileSport');
|
||||
ps.clearProfileSport();
|
||||
sax.openDialog($dlg.spt.dialog('option', 'title', sax.dlg.title.addUserSport), 640, 480);
|
||||
ps.openProfileSportDialog(sax.dlg.title.addUserSport);
|
||||
}
|
||||
ps.openProfileSportDialog = function (title)
|
||||
{
|
||||
if (title) $dlg.spt.dialog('option', 'title', title);
|
||||
sax.openDialog($dlg.spt, 680, 560);
|
||||
}
|
||||
ps.clearProfileSport = function ()
|
||||
{
|
||||
@@ -90,16 +99,17 @@
|
||||
$('#ifProfileSportId', frm).val(item.sportId);
|
||||
$('#ifProfileSport', frm).val(item.sportName);
|
||||
$('#ifProfileSportAbout', frm).val(item.sportAbout);
|
||||
$('#cbProfileSportParticipation', frm).val(item.sportParticipationCode);
|
||||
$('#cbProfileSportParticipating', frm).val(item.sportParticipatingCode);
|
||||
$('#cbProfileSportPreparing', frm).val(item.sportPreparingCode);
|
||||
$('#cbProfileSportOfficiating', frm).val(item.sportOfficiatingCode);
|
||||
$('.SelectSport', frm).hide();
|
||||
sax.openDialog(dlg.dialog('option', 'title', sax.dlg.title.updateUserSport), 640, 480);
|
||||
ps.openProfileSportDialog(sax.dlg.title.updateUserSport);
|
||||
}
|
||||
//--------------------------------------------------------------
|
||||
ps.selectUserSport = function (sport)
|
||||
{
|
||||
//sax.debug('selectUserSport');
|
||||
if ($('.UserSportId', $frm.spt).val() > 0) return;
|
||||
if (!!$('.UserSportId', $frm.spt).val()) return;
|
||||
let excludeIds = $.grep(sax.profile.sports.Ids, function (value) { return !sport || value != sport.id; });
|
||||
sax.mdl.selectSport.fn.selectSport({ caption: sax.dlg.title.selectSport, sportId: $('#ifProfileSportId', $frm.spt).val(), excludeIds: excludeIds, fnCallback: ps.onSelectUserSport })
|
||||
}
|
||||
@@ -111,7 +121,7 @@
|
||||
//--------------------------------------------------------------
|
||||
ps.getSportContactCfg = function (contact)
|
||||
{
|
||||
let cfg = { fnCallback: ps.applySportContact, methods: ps.data.contactTypes, typesUsed: ps.getUsedContactTypes(), contact: contact};
|
||||
let cfg = { fnCallback: ps.applySportContact, contactTypes: ps.data.contactTypes, titles: ps.data.titles, typesUsed: ps.getUsedContactTypes(), contact: contact};
|
||||
return cfg;
|
||||
}
|
||||
ps.getUsedContactTypes = function ()
|
||||
@@ -120,12 +130,12 @@
|
||||
}
|
||||
ps.addSportContact = function ()
|
||||
{
|
||||
sax.debug('addSportContact');
|
||||
//sax.debug('addSportContact');
|
||||
ps.showSportContact(ps.getSportContactCfg());
|
||||
}
|
||||
ps.editSportContact= function (contact)
|
||||
{
|
||||
sax.debug('editSportContact');
|
||||
//sax.debug('editSportContact');
|
||||
ps.showSportContact(ps.getSportContactCfg(contact));
|
||||
}
|
||||
ps.showSportContact=function(cfg)
|
||||
@@ -136,9 +146,9 @@
|
||||
{
|
||||
return 'SptCon_' + contact.type;
|
||||
}
|
||||
ps.applySportContact = function ()
|
||||
ps.applySportContact = function (contact)
|
||||
{
|
||||
sax.debug('applySportContact');
|
||||
//sax.debug('applySportContact', contact);
|
||||
}
|
||||
//--------------------------------------------------------------
|
||||
ps.storeProfileSport = function ()
|
||||
@@ -150,7 +160,7 @@
|
||||
}
|
||||
ps.onStoreProfileSport = function (response)
|
||||
{
|
||||
sax.refreshControlValues(response.controlValues);
|
||||
sax.refreshControlValues(response.controlValues, $frm.spt);
|
||||
if (!response || !response.success) return;
|
||||
$dlg.spt.dialog('close');
|
||||
sax.refreshProfileSportsInfo();
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
{
|
||||
//--------------------------------------------------------------
|
||||
"use strict";
|
||||
let sc = sax.mdl.sportContact = { fn: {}, ajax: {}, data: {}, $pnl: {}, $dlg: {}, $frm: {} };
|
||||
let sc = sax.mdl.sportContact = { fn: {}, ajax: {}, data: {}, $pnl: {}, $dlg: {}, $frm: {}, $ctrl: {} };
|
||||
//--------------------------------------------------------------
|
||||
/*
|
||||
* Sport Contact config:
|
||||
@@ -20,12 +20,71 @@
|
||||
*/
|
||||
sc.showSportContact = function (cfg)
|
||||
{
|
||||
//sax.debug('showSportContact', cfg);
|
||||
sc.fn.cleanUp();
|
||||
sc.data.cfg = cfg;
|
||||
sax.openDialog(sc.$dlg.sptCnt.dialog('option', { title: sc.data.cfg.caption || 'Sport Contact' }), sc.data.cfg.width || 400, sc.data.cfg.height || 800);
|
||||
sc.populateContactTypes(cfg);
|
||||
sc.populateTitles(cfg);
|
||||
sc.fn.displaySportContact(cfg.contact || {});
|
||||
sax.clearControlErrors(sc.$dlg.sptCnt);
|
||||
sax.openDialog(sc.$dlg.sptCnt.dialog('option', { title: sc.data.cfg.caption || 'Sport Contact' }), sc.data.cfg.width || 640, sc.data.cfg.height || 320);
|
||||
}
|
||||
//--------------------------------------------------------------
|
||||
sc.fn.displayContact = function ()
|
||||
sc.populateContactTypes = function (cfg)
|
||||
{
|
||||
let contact = cfg.contact || {};
|
||||
sc.$ctrl.contactType.empty();
|
||||
if (!contact.contactType)
|
||||
sc.$ctrl.contactType.append($('<option>').prop('selected', true));
|
||||
for (let typ of cfg.contactTypes || [])
|
||||
{
|
||||
if (typ.code && typ.code == cfg.contactType || !(cfg.contactTypesUsed || []).includes(typ.code))
|
||||
sc.$ctrl.contactType.append($('<option>').prop('value', typ.code).text(typ.desc));
|
||||
}
|
||||
//sc.$ctrl.contactType.val(contact.contactType).attr('disabled', contact.contactType && sc.$ctrl.contactType.val() == contact.contactType ? true : null);
|
||||
}
|
||||
sc.populateTitles = function (cfg)
|
||||
{
|
||||
let contact = cfg.contact || {};
|
||||
sc.$ctrl.title.empty();
|
||||
sc.$ctrl.title.append($('<option>').prop('selected', true));
|
||||
for (let typ of cfg.titles || [])
|
||||
{
|
||||
if (typ.code && typ.code == cfg.title || !(cfg.titlesUsed || []).includes(typ.code))
|
||||
sc.$ctrl.title.append($('<option>').prop('value', typ.code).text(typ.desc));
|
||||
}
|
||||
}
|
||||
sc.fn.displaySportContact = function (contact)
|
||||
{
|
||||
sc.$ctrl.emailAddress.val(contact.email);
|
||||
}
|
||||
//--------------------------------------------------------------
|
||||
sc.fn.storeSportContact = function ()
|
||||
{
|
||||
//sax.debug('storeSportContact');
|
||||
let cfg = sc.data.cfg;
|
||||
sax.clearControlErrors(sc.$dlg.sptCnt);
|
||||
let fn = function (response)
|
||||
{
|
||||
//sax.debug('storeSportContact handle response', response);
|
||||
sax.refreshControlValues(response.controlValues, sc.$dlg.sptCnt);
|
||||
if (!response.success || sax.hasControlErrors(sc.$dlg.sptCnt)) return;
|
||||
let contact = { contactType: sc.$ctrl.contactType.val(), email: sc.$ctrl.emailAddress.val(), title: sc.$ctrl.title.val(), firstName: sc.$ctrl.firstName.val(), lastName: sc.$ctrl.lastName.val() };
|
||||
if (cfg.fnCallback) cfg.fnCallback(contact);
|
||||
sc.$dlg.sptCnt.dialog('close');
|
||||
sc.fn.cleanUp();
|
||||
}
|
||||
sc.ajax.sportContact = sc.ajax.sportContact || { url: sax.url.base + 'Account/Ajax/ValidateProfileSportContact', formId: sc.$frm.sptCnt.prop('id'), callbackFn: fn };
|
||||
sax.doAjaxRequest(sc.ajax.sportContact, 50);
|
||||
}
|
||||
//--------------------------------------------------------------
|
||||
sc.fn.onDlgSize = function ()
|
||||
{
|
||||
}
|
||||
sc.fn.cleanUp = function ()
|
||||
{
|
||||
$('.sax-input,.sax-textarea,.sax-select', sc.$frm.sptCnt).val('');
|
||||
sc.data = {};
|
||||
}
|
||||
//--------------------------------------------------------------
|
||||
$(function ()
|
||||
@@ -33,9 +92,16 @@
|
||||
var opt = sax.dlgOpts();
|
||||
opt.open = function (evt, ui) { sc.fn.onDlgSize(); };
|
||||
opt.resize = function (evt, ui) { sc.fn.onDlgSize(); };
|
||||
opt.buttons[sax.dlg.btn.ok] = function () { sc.fn.storeSelectSport(); };
|
||||
opt.buttons[sax.dlg.btn.ok] = function () { sc.fn.storeSportContact(); };
|
||||
opt.buttons[sax.dlg.btn.cancel] = function () { sc.fn.cleanUp(); $(this).dialog('close'); };
|
||||
sc.$dlg.sptCnt = $('#dlgSportContact').dialog(opt);
|
||||
sc.$frm.sptCnt = $('#frmProfileSportContact', sc.$dlg.sptCnt);
|
||||
sc.$frm.sptCnt.on('input', '.sax-input, .sax-textarea', function () { sax.clearControlError(this); }).on('change', '.sax-select', function () { sax.clearControlError(this); });
|
||||
sc.$ctrl.contactType = $('.sax-select.ContactType', sc.$frm.sptCnt);
|
||||
sc.$ctrl.emailAddress = $('.sax-input.ContactEmailAddress', sc.$frm.sptCnt);
|
||||
sc.$ctrl.title = $('.sax-select.ContactTitle', sc.$frm.sptCnt);
|
||||
sc.$ctrl.firstName = $('.sax-input.ContactFirstName', sc.$frm.sptCnt);
|
||||
sc.$ctrl.lastName = $('.sax-input.ContactLastName', sc.$frm.sptCnt);
|
||||
});
|
||||
//--------------------------------------------------------------
|
||||
}(window, window.document));
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace Saxonite.Net.Standard.Base.App
|
||||
//-------------------------------------------------------------------
|
||||
public static class Version
|
||||
{
|
||||
private static String version { get; } = "1.2.10.0";
|
||||
private static String version { get; } = "1.2.10.1";
|
||||
// Retrieve version.
|
||||
public static String GetFullVersion () { return version; }
|
||||
public static String GetAppVersion ()
|
||||
@@ -42,6 +42,7 @@ namespace Saxonite.Net.Standard.Base.App
|
||||
//-------------------------------------------------------------------
|
||||
// 1.2.10 11-Oct-2022
|
||||
// - Online organisations display issue fixed.
|
||||
// - User Sport 'Preparing' options.
|
||||
// 1.2.9 12-Oct-2022
|
||||
// - Online Sports Experience update bug resolved.
|
||||
// - Sports Experience Awards.
|
||||
|
||||
@@ -21,7 +21,8 @@ namespace Saxonite.Net.Standard.Base.App
|
||||
Gender,
|
||||
SportSpecialityLabel,
|
||||
SportContactType,
|
||||
SportParticipation,
|
||||
SportParticipating,
|
||||
SportPreparing,
|
||||
SportOfficiating,
|
||||
RegionType,
|
||||
EligibilityType,
|
||||
@@ -49,6 +50,7 @@ namespace Saxonite.Net.Standard.Base.App
|
||||
//-------------------------------------------------------------------
|
||||
public enum Database
|
||||
{
|
||||
Unknown = 0,
|
||||
Core = 10,
|
||||
Support = 20,
|
||||
}
|
||||
@@ -188,8 +190,8 @@ namespace Saxonite.Net.Standard.Base.App
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
/// <summary>Sport Participation</summary>
|
||||
public enum SportParticipation
|
||||
/// <summary>Sport Participating</summary>
|
||||
public enum SportParticipating
|
||||
{
|
||||
Unknown = 0,
|
||||
/* Do not change the values/codes - tied to database. */
|
||||
@@ -200,6 +202,17 @@ namespace Saxonite.Net.Standard.Base.App
|
||||
Interested = 900,
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
/// <summary>Sport Preparing</summary>
|
||||
public enum SportPreparing
|
||||
{
|
||||
Unknown = 0,
|
||||
/* Do not change the values/codes - tied to database. */
|
||||
Coach = 100,
|
||||
Manager = 200,
|
||||
Agent = 300,
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
/// <summary>Sport Officiating</summary>
|
||||
public enum SportOfficiating
|
||||
|
||||
@@ -6,7 +6,7 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// Code generated by Sarand Database Utilities Tue 6-Dec-2022 18:22:59
|
||||
// Code generated by Sarand Database Utilities Mon 12-Dec-2022 13:20:42
|
||||
//---------------------------------------------------------------------------
|
||||
namespace Saxonite.Base.App
|
||||
{
|
||||
@@ -380,7 +380,8 @@ namespace Saxonite.Base.App
|
||||
UserSport_SportId,
|
||||
UserSport_About,
|
||||
UserSport_ContactsData,
|
||||
UserSport_Participation,
|
||||
UserSport_Participating,
|
||||
UserSport_Preparing,
|
||||
UserSport_Officiating,
|
||||
UserSport_UserSportData,
|
||||
UserSport_Notes,
|
||||
@@ -421,7 +422,7 @@ namespace Saxonite.Base.App
|
||||
//-------------------------------------------------------------------
|
||||
// Data members.
|
||||
private static readonly int tableCount = 22;
|
||||
private static readonly int columnCount = 370;
|
||||
private static readonly int columnCount = 371;
|
||||
private static ulong maxTextLen = 0;
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
@@ -949,7 +950,8 @@ namespace Saxonite.Base.App
|
||||
new ColumnDfn(21,"SportId",4,4,false,10),
|
||||
new ColumnDfn(21,"About",0,-9,false,2000),
|
||||
new ColumnDfn(21,"ContactsData",0,-9,false,0),
|
||||
new ColumnDfn(21,"Participation",3,5,false,5),
|
||||
new ColumnDfn(21,"Participating",3,5,false,5),
|
||||
new ColumnDfn(21,"Preparing",3,5,false,5),
|
||||
new ColumnDfn(21,"Officiating",3,5,false,5),
|
||||
new ColumnDfn(21,"UserSportData",0,-9,false,0),
|
||||
new ColumnDfn(21,"Notes",0,-9,false,2000),
|
||||
|
||||
@@ -6,7 +6,7 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// Code generated by Sarand Database Utilities Tue 6-Dec-2022 18:22:59
|
||||
// Code generated by Sarand Database Utilities Mon 12-Dec-2022 13:20:42
|
||||
//---------------------------------------------------------------------------
|
||||
namespace Saxonite.Base.App
|
||||
{
|
||||
@@ -17,6 +17,8 @@ namespace Saxonite.Base.App
|
||||
public enum TableIdx
|
||||
{
|
||||
Unknown = 0,
|
||||
UserReport,
|
||||
UserReportComment,
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
@@ -24,12 +26,41 @@ namespace Saxonite.Base.App
|
||||
public enum ColumnIdx
|
||||
{
|
||||
Unknown = 0,
|
||||
UserReport_Id,
|
||||
UserReport_UserAccountId,
|
||||
UserReport_ReportType,
|
||||
UserReport_Report,
|
||||
UserReport_RecordedOn,
|
||||
UserReport_ReportData,
|
||||
UserReport_Notes,
|
||||
UserReport_Flags,
|
||||
UserReport_Status,
|
||||
UserReport_CreateOn,
|
||||
UserReport_CreateBy,
|
||||
UserReport_CreateHost,
|
||||
UserReport_UpdateOn,
|
||||
UserReport_UpdateBy,
|
||||
UserReport_UpdateHost,
|
||||
UserReportComment_Id,
|
||||
UserReportComment_UserReportId,
|
||||
UserReportComment_RecordedAt,
|
||||
UserReportComment_UserAccountId,
|
||||
UserReportComment_CommentData,
|
||||
UserReportComment_Notes,
|
||||
UserReportComment_Flags,
|
||||
UserReportComment_Status,
|
||||
UserReportComment_CreateOn,
|
||||
UserReportComment_CreateBy,
|
||||
UserReportComment_CreateHost,
|
||||
UserReportComment_UpdateOn,
|
||||
UserReportComment_UpdateBy,
|
||||
UserReportComment_UpdateHost,
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Data members.
|
||||
private static readonly int tableCount = 0;
|
||||
private static readonly int columnCount = 0;
|
||||
private static readonly int tableCount = 2;
|
||||
private static readonly int columnCount = 29;
|
||||
private static ulong maxTextLen = 0;
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
@@ -175,6 +206,8 @@ namespace Saxonite.Base.App
|
||||
// Table definitions.
|
||||
private static readonly String[] tables =
|
||||
{
|
||||
"UserReport",
|
||||
"UserReportComment",
|
||||
};
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
@@ -201,6 +234,35 @@ namespace Saxonite.Base.App
|
||||
//-------------------------------------------------------------------
|
||||
private static readonly ColumnDfn[] columns =
|
||||
{
|
||||
new ColumnDfn(1,"Id",5,-5,true,19),
|
||||
new ColumnDfn(1,"UserAccountId",4,4,false,10),
|
||||
new ColumnDfn(1,"ReportType",3,5,false,5),
|
||||
new ColumnDfn(1,"Report",0,-9,false,4000),
|
||||
new ColumnDfn(1,"RecordedOn",9,93,false,16),
|
||||
new ColumnDfn(1,"ReportData",0,-9,false,0),
|
||||
new ColumnDfn(1,"Notes",0,-9,false,2000),
|
||||
new ColumnDfn(1,"Flags",3,5,false,5),
|
||||
new ColumnDfn(1,"Status",0,12,false,3),
|
||||
new ColumnDfn(1,"CreateOn",9,93,false,23),
|
||||
new ColumnDfn(1,"CreateBy",4,4,false,10),
|
||||
new ColumnDfn(1,"CreateHost",0,12,false,100),
|
||||
new ColumnDfn(1,"UpdateOn",9,93,false,23),
|
||||
new ColumnDfn(1,"UpdateBy",4,4,false,10),
|
||||
new ColumnDfn(1,"UpdateHost",0,12,false,100),
|
||||
new ColumnDfn(2,"Id",5,-5,true,19),
|
||||
new ColumnDfn(2,"UserReportId",5,-5,false,19),
|
||||
new ColumnDfn(2,"RecordedAt",9,93,false,23),
|
||||
new ColumnDfn(2,"UserAccountId",4,4,false,10),
|
||||
new ColumnDfn(2,"CommentData",0,-9,false,0),
|
||||
new ColumnDfn(2,"Notes",0,-9,false,2000),
|
||||
new ColumnDfn(2,"Flags",3,5,false,5),
|
||||
new ColumnDfn(2,"Status",0,12,false,3),
|
||||
new ColumnDfn(2,"CreateOn",9,93,false,23),
|
||||
new ColumnDfn(2,"CreateBy",4,4,false,10),
|
||||
new ColumnDfn(2,"CreateHost",0,12,false,100),
|
||||
new ColumnDfn(2,"UpdateOn",9,93,false,23),
|
||||
new ColumnDfn(2,"UpdateBy",4,4,false,10),
|
||||
new ColumnDfn(2,"UpdateHost",0,12,false,100),
|
||||
};
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
|
||||
@@ -93,7 +93,8 @@ namespace Saxonite.Net.Standard.Base.App
|
||||
public List<TypeCodeDesc> GenderCodes { get { return GetCodesOfType(Sax.CodeType.Gender); } }
|
||||
public List<TypeCodeDesc> SportSpecialityLabelCodes { get { return GetCodesOfType(Sax.CodeType.SportSpecialityLabel); } }
|
||||
public List<TypeCodeDesc> SportContactTypeCodes { get { return GetCodesOfType(Sax.CodeType.SportContactType); } }
|
||||
public List<TypeCodeDesc> SportParticipationCodes { get { return GetCodesOfType(Sax.CodeType.SportParticipation); } }
|
||||
public List<TypeCodeDesc> SportParticipatingCodes { get { return GetCodesOfType(Sax.CodeType.SportParticipating); } }
|
||||
public List<TypeCodeDesc> SportPreparingCodes { get { return GetCodesOfType(Sax.CodeType.SportPreparing); } }
|
||||
public List<TypeCodeDesc> SportOfficiatingCodes { get { return GetCodesOfType(Sax.CodeType.SportOfficiating); } }
|
||||
public List<TypeCodeDesc> RegionTypeCodes { get { return GetCodesOfType(Sax.CodeType.RegionType); } }
|
||||
public List<TypeCodeDesc> EligibilityTypeCodes { get { return GetCodesOfType(Sax.CodeType.EligibilityType); } }
|
||||
|
||||
@@ -18,7 +18,8 @@ namespace Saxonite.Net.Standard.Base.App
|
||||
private static readonly List<TypeCodeDesc> genderCodes = new List<TypeCodeDesc>();
|
||||
private static readonly List<TypeCodeDesc> sportSpecialityLabelCodes = new List<TypeCodeDesc>();
|
||||
private static readonly List<TypeCodeDesc> sportContactCodes = new List<TypeCodeDesc>();
|
||||
private static readonly List<TypeCodeDesc> sportParticipationCodes = new List<TypeCodeDesc>();
|
||||
private static readonly List<TypeCodeDesc> sportParticipatingCodes = new List<TypeCodeDesc>();
|
||||
private static readonly List<TypeCodeDesc> sportPreparingCodes = new List<TypeCodeDesc>();
|
||||
private static readonly List<TypeCodeDesc> sportOfficiatingCodes = new List<TypeCodeDesc>();
|
||||
private static readonly List<TypeCodeDesc> regionTypeCodes = new List<TypeCodeDesc>();
|
||||
private static readonly List<TypeCodeDesc> eligibilityTypeCodes = new List<TypeCodeDesc>();
|
||||
@@ -53,8 +54,10 @@ namespace Saxonite.Net.Standard.Base.App
|
||||
return new List<TypeCodeDesc>(sportSpecialityLabelCodes);
|
||||
case Sax.CodeType.SportContactType:
|
||||
return new List<TypeCodeDesc>(sportContactCodes);
|
||||
case Sax.CodeType.SportParticipation:
|
||||
return new List<TypeCodeDesc>(sportParticipationCodes);
|
||||
case Sax.CodeType.SportParticipating:
|
||||
return new List<TypeCodeDesc>(sportParticipatingCodes);
|
||||
case Sax.CodeType.SportPreparing:
|
||||
return new List<TypeCodeDesc>(sportPreparingCodes);
|
||||
case Sax.CodeType.SportOfficiating:
|
||||
return new List<TypeCodeDesc>(sportOfficiatingCodes);
|
||||
case Sax.CodeType.RegionType:
|
||||
@@ -143,18 +146,24 @@ namespace Saxonite.Net.Standard.Base.App
|
||||
sportContactCodes.Add(Sax.SportContactType.Agent, "AGE", "Agent");
|
||||
|
||||
//---------------------------------------------------------------
|
||||
// Sport participation.
|
||||
sportParticipationCodes.Add(Sax.SportParticipation.Professional, "PRO", "Professional");
|
||||
sportParticipationCodes.Add(Sax.SportParticipation.Regular, "REG", "Regular");
|
||||
sportParticipationCodes.Add(Sax.SportParticipation.Occasional, "OCC", "Occasional");
|
||||
sportParticipationCodes.Add(Sax.SportParticipation.Spectator, "SPC", "Spectator");
|
||||
sportParticipationCodes.Add(Sax.SportParticipation.Interested, "INT", "Interested");
|
||||
// Sport participating.
|
||||
sportParticipatingCodes.Add(Sax.SportParticipating.Professional, "PRO", "Professional");
|
||||
sportParticipatingCodes.Add(Sax.SportParticipating.Regular, "REG", "Regular");
|
||||
sportParticipatingCodes.Add(Sax.SportParticipating.Occasional, "OCC", "Occasional");
|
||||
sportParticipatingCodes.Add(Sax.SportParticipating.Spectator, "SPC", "Spectator");
|
||||
sportParticipatingCodes.Add(Sax.SportParticipating.Interested, "INT", "Interested");
|
||||
|
||||
//---------------------------------------------------------------
|
||||
// Sport preparing.
|
||||
sportPreparingCodes.Add(Sax.SportPreparing.Coach, "CCH", "Coach");
|
||||
sportPreparingCodes.Add(Sax.SportPreparing.Manager, "MGR", "Manager");
|
||||
sportPreparingCodes.Add(Sax.SportPreparing.Agent, "AGT", "Agent");
|
||||
|
||||
//---------------------------------------------------------------
|
||||
// Sport officiating.
|
||||
sportOfficiatingCodes.Add(Sax.SportParticipation.Professional, "PRO", "Professional");
|
||||
sportOfficiatingCodes.Add(Sax.SportParticipation.Regular, "REG", "Regular");
|
||||
sportOfficiatingCodes.Add(Sax.SportParticipation.Occasional, "OCC", "Occasional");
|
||||
sportOfficiatingCodes.Add(Sax.SportOfficiating.Professional, "PRO", "Professional");
|
||||
sportOfficiatingCodes.Add(Sax.SportOfficiating.Regular, "REG", "Regular");
|
||||
sportOfficiatingCodes.Add(Sax.SportOfficiating.Occasional, "OCC", "Occasional");
|
||||
|
||||
//---------------------------------------------------------------
|
||||
// Region types.
|
||||
|
||||
@@ -30,9 +30,12 @@ namespace Saxonite.Net.Standard.Base.Bus
|
||||
SportId,
|
||||
Sport_Name,
|
||||
About,
|
||||
SportParticipation,
|
||||
SportParticipation_Code,
|
||||
SportParticipation_Desc,
|
||||
SportParticipating,
|
||||
SportParticipating_Code,
|
||||
SportParticipating_Desc,
|
||||
SportPreparing,
|
||||
SportPreparing_Code,
|
||||
SportPreparing_Desc,
|
||||
SportOfficiating,
|
||||
SportOfficiating_Code,
|
||||
SportOfficiating_Desc,
|
||||
@@ -55,7 +58,8 @@ namespace Saxonite.Net.Standard.Base.Bus
|
||||
public SysId SportId { get; set; }
|
||||
public String About { get; set; } = String.Empty;
|
||||
public String ContactsData { get; set; } = String.Empty;
|
||||
public Sax.SportParticipation Participation { get; set; }
|
||||
public Sax.SportParticipating Participating { get; set; }
|
||||
public Sax.SportPreparing Preparing { get; set; }
|
||||
public Sax.SportOfficiating Officiating { get; set; }
|
||||
public String UserSportData { get; set; }
|
||||
}
|
||||
@@ -92,10 +96,15 @@ namespace Saxonite.Net.Standard.Base.Bus
|
||||
get { return data.ContactsData; }
|
||||
set { CheckChanged(data.ContactsData, value); data.ContactsData = value; }
|
||||
}
|
||||
public Sax.SportParticipation Participation
|
||||
public Sax.SportParticipating Participating
|
||||
{
|
||||
get { return data.Participation; }
|
||||
set { CheckChanged((int)data.Participation, (int)value); data.Participation = value; }
|
||||
get { return data.Participating; }
|
||||
set { CheckChanged((int)data.Participating, (int)value); data.Participating = value; }
|
||||
}
|
||||
public Sax.SportPreparing Preparing
|
||||
{
|
||||
get { return data.Preparing; }
|
||||
set { CheckChanged((int)data.Preparing, (int)value); data.Preparing = value; }
|
||||
}
|
||||
public Sax.SportOfficiating Officiating
|
||||
{
|
||||
@@ -114,7 +123,8 @@ namespace Saxonite.Net.Standard.Base.Bus
|
||||
SportId = data.SportId;
|
||||
About = data.About;
|
||||
ContactsData = data.ContactsData;
|
||||
Participation = data.Participation;
|
||||
Participating = data.Participating;
|
||||
Preparing = data.Preparing;
|
||||
Officiating = data.Officiating;
|
||||
UserSportData = data.UserSportData;
|
||||
base.PopulateFrom(data);
|
||||
@@ -136,7 +146,8 @@ namespace Saxonite.Net.Standard.Base.Bus
|
||||
public ValidValue SportId { get; set; } = ValidValue.Valid;
|
||||
public ValidValue About { get; set; } = ValidValue.Valid;
|
||||
public ValidValue ContactsAbout { get; set; } = ValidValue.Valid;
|
||||
public ValidValue Participation { get; set; } = ValidValue.Valid;
|
||||
public ValidValue Participating { get; set; } = ValidValue.Valid;
|
||||
public ValidValue Preparing { get; set; } = ValidValue.Valid;
|
||||
public ValidValue Officiating { get; set; } = ValidValue.Valid;
|
||||
public ValidValue UserSportData { get; set; } = ValidValue.Valid;
|
||||
}
|
||||
@@ -215,10 +226,15 @@ namespace Saxonite.Net.Standard.Base.Bus
|
||||
get { return data.ContactsData; }
|
||||
set { data.ContactsData = value; }
|
||||
}
|
||||
public Sax.SportParticipation Participation
|
||||
public Sax.SportParticipating Participating
|
||||
{
|
||||
get { return data.Participation; }
|
||||
set { data.Participation = value; }
|
||||
get { return data.Participating; }
|
||||
set { data.Participating = value; }
|
||||
}
|
||||
public Sax.SportPreparing Preparing
|
||||
{
|
||||
get { return data.Preparing; }
|
||||
set { data.Preparing = value; }
|
||||
}
|
||||
public Sax.SportOfficiating Officiating
|
||||
{
|
||||
|
||||
@@ -213,14 +213,25 @@ namespace Saxonite.Net.Standard.Base.Mgr
|
||||
switch ((SaxUserSport.Column)column.Id)
|
||||
{
|
||||
//-----------------------------------------------------------
|
||||
// Sport Participation.
|
||||
case SaxUserSport.Column.SportParticipation_Code:
|
||||
case SaxUserSport.Column.SportParticipation_Desc:
|
||||
Sax.SportParticipation sportParticipation = (Sax.SportParticipation)values.GetLong(column.DataName);
|
||||
if (column.Id == (int)SaxUserSport.Column.SportParticipation_Code)
|
||||
value = new DataValue(SportParticipationCodes.GetCodeForType(sportParticipation));
|
||||
// Sport Participating.
|
||||
case SaxUserSport.Column.SportParticipating_Code:
|
||||
case SaxUserSport.Column.SportParticipating_Desc:
|
||||
Sax.SportParticipating sportParticipating = (Sax.SportParticipating)values.GetLong(column.DataName);
|
||||
if (column.Id == (int)SaxUserSport.Column.SportParticipating_Code)
|
||||
value = new DataValue(SportParticipatingCodes.GetCodeForType(sportParticipating));
|
||||
else
|
||||
value = new DataValue(SportParticipationCodes.GetDescForType(sportParticipation));
|
||||
value = new DataValue(SportParticipatingCodes.GetDescForType(sportParticipating));
|
||||
break;
|
||||
|
||||
//-----------------------------------------------------------
|
||||
// Sport Preparing.
|
||||
case SaxUserSport.Column.SportPreparing_Code:
|
||||
case SaxUserSport.Column.SportPreparing_Desc:
|
||||
Sax.SportPreparing sportPreparing = (Sax.SportPreparing)values.GetLong(column.DataName);
|
||||
if (column.Id == (int)SaxUserSport.Column.SportPreparing_Code)
|
||||
value = new DataValue(SportPreparingCodes.GetCodeForType(sportPreparing));
|
||||
else
|
||||
value = new DataValue(SportPreparingCodes.GetDescForType(sportPreparing));
|
||||
break;
|
||||
|
||||
//-----------------------------------------------------------
|
||||
|
||||
@@ -69,7 +69,8 @@ namespace Saxonite.Net.Standard.Base.Mgr
|
||||
public List<TypeCodeDesc> DataItemTypeCodes { get { return Internals.DataItemTypeCodes; } }
|
||||
public List<TypeCodeDesc> SportSpecialityLabelCodes { get { return Internals.SportSpecialityLabelCodes; } }
|
||||
public List<TypeCodeDesc> SportContactTypeCodes { get { return Internals.SportContactTypeCodes; } }
|
||||
public List<TypeCodeDesc> SportParticipationCodes { get { return Internals.SportParticipationCodes; } }
|
||||
public List<TypeCodeDesc> SportParticipatingCodes { get { return Internals.SportParticipatingCodes; } }
|
||||
public List<TypeCodeDesc> SportPreparingCodes { get { return Internals.SportPreparingCodes; } }
|
||||
public List<TypeCodeDesc> SportOfficiatingCodes { get { return Internals.SportOfficiatingCodes; } }
|
||||
public List<TypeCodeDesc> RegionTypeCodes { get { return Internals.RegionTypeCodes; } }
|
||||
public List<TypeCodeDesc> EligibilityTypeCodes { get { return Internals.EligibilityTypeCodes; } }
|
||||
|
||||
@@ -1 +1,13 @@
|
||||
{ "Versions": [] }
|
||||
{
|
||||
"Versions": [
|
||||
{
|
||||
"On": "2021-05-03",
|
||||
"Version": "1.0.0",
|
||||
"Topics": [
|
||||
"Admin/Online security.",
|
||||
"Admin Users, Organisations, Regions, Sports",
|
||||
"Online Journalist Articles (header)."
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -9,7 +9,7 @@ using System.Data.Common;
|
||||
using System.Linq;
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// Code generated by Sarand Database Utilities Tue 6-Dec-2022 18:22:59
|
||||
// Code generated by Sarand Database Utilities Mon 12-Dec-2022 13:20:42
|
||||
//---------------------------------------------------------------------------
|
||||
namespace Saxonite.Net.Standard.Dbas.Internal.Core
|
||||
{
|
||||
|
||||
@@ -9,7 +9,7 @@ using System.Data.Common;
|
||||
using System.Linq;
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// Code generated by Sarand Database Utilities Tue 6-Dec-2022 18:22:59
|
||||
// Code generated by Sarand Database Utilities Mon 12-Dec-2022 13:20:42
|
||||
//---------------------------------------------------------------------------
|
||||
namespace Saxonite.Net.Standard.Dbas.Internal.Core
|
||||
{
|
||||
|
||||
@@ -9,7 +9,7 @@ using System.Data.Common;
|
||||
using System.Linq;
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// Code generated by Sarand Database Utilities Tue 6-Dec-2022 18:22:59
|
||||
// Code generated by Sarand Database Utilities Mon 12-Dec-2022 13:20:42
|
||||
//---------------------------------------------------------------------------
|
||||
namespace Saxonite.Net.Standard.Dbas.Internal.Core
|
||||
{
|
||||
|
||||
@@ -9,7 +9,7 @@ using System.Data.Common;
|
||||
using System.Linq;
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// Code generated by Sarand Database Utilities Tue 6-Dec-2022 18:22:59
|
||||
// Code generated by Sarand Database Utilities Mon 12-Dec-2022 13:20:42
|
||||
//---------------------------------------------------------------------------
|
||||
namespace Saxonite.Net.Standard.Dbas.Internal.Core
|
||||
{
|
||||
|
||||
@@ -9,7 +9,7 @@ using System.Data.Common;
|
||||
using System.Linq;
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// Code generated by Sarand Database Utilities Tue 6-Dec-2022 18:22:59
|
||||
// Code generated by Sarand Database Utilities Mon 12-Dec-2022 13:20:42
|
||||
//---------------------------------------------------------------------------
|
||||
namespace Saxonite.Net.Standard.Dbas.Internal.Core
|
||||
{
|
||||
|
||||
@@ -9,7 +9,7 @@ using System.Data.Common;
|
||||
using System.Linq;
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// Code generated by Sarand Database Utilities Tue 6-Dec-2022 18:22:59
|
||||
// Code generated by Sarand Database Utilities Mon 12-Dec-2022 13:20:42
|
||||
//---------------------------------------------------------------------------
|
||||
namespace Saxonite.Net.Standard.Dbas.Internal.Core
|
||||
{
|
||||
|
||||
@@ -9,7 +9,7 @@ using System.Data.Common;
|
||||
using System.Linq;
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// Code generated by Sarand Database Utilities Tue 6-Dec-2022 18:22:59
|
||||
// Code generated by Sarand Database Utilities Mon 12-Dec-2022 13:20:42
|
||||
//---------------------------------------------------------------------------
|
||||
namespace Saxonite.Net.Standard.Dbas.Internal.Core
|
||||
{
|
||||
|
||||
@@ -9,7 +9,7 @@ using System.Data.Common;
|
||||
using System.Linq;
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// Code generated by Sarand Database Utilities Tue 6-Dec-2022 18:22:59
|
||||
// Code generated by Sarand Database Utilities Mon 12-Dec-2022 13:20:42
|
||||
//---------------------------------------------------------------------------
|
||||
namespace Saxonite.Net.Standard.Dbas.Internal.Core
|
||||
{
|
||||
|
||||
@@ -9,7 +9,7 @@ using System.Data.Common;
|
||||
using System.Linq;
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// Code generated by Sarand Database Utilities Tue 6-Dec-2022 18:22:59
|
||||
// Code generated by Sarand Database Utilities Mon 12-Dec-2022 13:20:42
|
||||
//---------------------------------------------------------------------------
|
||||
namespace Saxonite.Net.Standard.Dbas.Internal.Core
|
||||
{
|
||||
|
||||
@@ -9,7 +9,7 @@ using System.Data.Common;
|
||||
using System.Linq;
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// Code generated by Sarand Database Utilities Tue 6-Dec-2022 18:22:59
|
||||
// Code generated by Sarand Database Utilities Mon 12-Dec-2022 13:20:42
|
||||
//---------------------------------------------------------------------------
|
||||
namespace Saxonite.Net.Standard.Dbas.Internal.Core
|
||||
{
|
||||
|
||||
@@ -9,7 +9,7 @@ using System.Data.Common;
|
||||
using System.Linq;
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// Code generated by Sarand Database Utilities Tue 6-Dec-2022 18:22:59
|
||||
// Code generated by Sarand Database Utilities Mon 12-Dec-2022 13:20:42
|
||||
//---------------------------------------------------------------------------
|
||||
namespace Saxonite.Net.Standard.Dbas.Internal.Core
|
||||
{
|
||||
|
||||
@@ -9,7 +9,7 @@ using System.Data.Common;
|
||||
using System.Linq;
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// Code generated by Sarand Database Utilities Tue 6-Dec-2022 18:22:59
|
||||
// Code generated by Sarand Database Utilities Mon 12-Dec-2022 13:20:42
|
||||
//---------------------------------------------------------------------------
|
||||
namespace Saxonite.Net.Standard.Dbas.Internal.Core
|
||||
{
|
||||
|
||||
@@ -9,7 +9,7 @@ using System.Data.Common;
|
||||
using System.Linq;
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// Code generated by Sarand Database Utilities Tue 6-Dec-2022 18:22:59
|
||||
// Code generated by Sarand Database Utilities Mon 12-Dec-2022 13:20:42
|
||||
//---------------------------------------------------------------------------
|
||||
namespace Saxonite.Net.Standard.Dbas.Internal.Core
|
||||
{
|
||||
|
||||
@@ -9,7 +9,7 @@ using System.Data.Common;
|
||||
using System.Linq;
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// Code generated by Sarand Database Utilities Tue 6-Dec-2022 18:22:59
|
||||
// Code generated by Sarand Database Utilities Mon 12-Dec-2022 13:20:42
|
||||
//---------------------------------------------------------------------------
|
||||
namespace Saxonite.Net.Standard.Dbas.Internal.Core
|
||||
{
|
||||
|
||||
@@ -9,7 +9,7 @@ using System.Data.Common;
|
||||
using System.Linq;
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// Code generated by Sarand Database Utilities Tue 6-Dec-2022 18:22:59
|
||||
// Code generated by Sarand Database Utilities Mon 12-Dec-2022 13:20:42
|
||||
//---------------------------------------------------------------------------
|
||||
namespace Saxonite.Net.Standard.Dbas.Internal.Core
|
||||
{
|
||||
|
||||
@@ -9,7 +9,7 @@ using System.Data.Common;
|
||||
using System.Linq;
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// Code generated by Sarand Database Utilities Tue 6-Dec-2022 18:22:59
|
||||
// Code generated by Sarand Database Utilities Mon 12-Dec-2022 13:20:42
|
||||
//---------------------------------------------------------------------------
|
||||
namespace Saxonite.Net.Standard.Dbas.Internal.Core
|
||||
{
|
||||
|
||||
@@ -9,7 +9,7 @@ using System.Data.Common;
|
||||
using System.Linq;
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// Code generated by Sarand Database Utilities Tue 6-Dec-2022 18:22:59
|
||||
// Code generated by Sarand Database Utilities Mon 12-Dec-2022 13:20:42
|
||||
//---------------------------------------------------------------------------
|
||||
namespace Saxonite.Net.Standard.Dbas.Internal.Core
|
||||
{
|
||||
|
||||
@@ -9,7 +9,7 @@ using System.Data.Common;
|
||||
using System.Linq;
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// Code generated by Sarand Database Utilities Tue 6-Dec-2022 18:22:59
|
||||
// Code generated by Sarand Database Utilities Mon 12-Dec-2022 13:20:42
|
||||
//---------------------------------------------------------------------------
|
||||
namespace Saxonite.Net.Standard.Dbas.Internal.Core
|
||||
{
|
||||
|
||||
@@ -9,7 +9,7 @@ using System.Data.Common;
|
||||
using System.Linq;
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// Code generated by Sarand Database Utilities Tue 6-Dec-2022 18:22:59
|
||||
// Code generated by Sarand Database Utilities Mon 12-Dec-2022 13:20:42
|
||||
//---------------------------------------------------------------------------
|
||||
namespace Saxonite.Net.Standard.Dbas.Internal.Core
|
||||
{
|
||||
|
||||
@@ -9,7 +9,7 @@ using System.Data.Common;
|
||||
using System.Linq;
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// Code generated by Sarand Database Utilities Tue 6-Dec-2022 18:22:59
|
||||
// Code generated by Sarand Database Utilities Mon 12-Dec-2022 13:20:42
|
||||
//---------------------------------------------------------------------------
|
||||
namespace Saxonite.Net.Standard.Dbas.Internal.Core
|
||||
{
|
||||
|
||||
@@ -9,7 +9,7 @@ using System.Data.Common;
|
||||
using System.Linq;
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// Code generated by Sarand Database Utilities Tue 6-Dec-2022 18:22:59
|
||||
// Code generated by Sarand Database Utilities Mon 12-Dec-2022 13:20:42
|
||||
//---------------------------------------------------------------------------
|
||||
namespace Saxonite.Net.Standard.Dbas.Internal.Core
|
||||
{
|
||||
|
||||
@@ -9,7 +9,7 @@ using System.Data.Common;
|
||||
using System.Linq;
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// Code generated by Sarand Database Utilities Tue 6-Dec-2022 18:22:59
|
||||
// Code generated by Sarand Database Utilities Mon 12-Dec-2022 13:20:42
|
||||
//---------------------------------------------------------------------------
|
||||
namespace Saxonite.Net.Standard.Dbas.Internal.Core
|
||||
{
|
||||
@@ -24,7 +24,8 @@ namespace Saxonite.Net.Standard.Dbas.Internal.Core
|
||||
public ColumnDataInt32 _SportId { get; } = new ColumnDataInt32("SportId");
|
||||
public ColumnDataString _About { get; } = new ColumnDataString("About");
|
||||
public ColumnDataString _ContactsData { get; } = new ColumnDataString("ContactsData");
|
||||
public ColumnDataInt16 _Participation { get; } = new ColumnDataInt16("Participation");
|
||||
public ColumnDataInt16 _Participating { get; } = new ColumnDataInt16("Participating");
|
||||
public ColumnDataInt16 _Preparing { get; } = new ColumnDataInt16("Preparing");
|
||||
public ColumnDataInt16 _Officiating { get; } = new ColumnDataInt16("Officiating");
|
||||
public ColumnDataString _UserSportData { get; } = new ColumnDataString("UserSportData");
|
||||
public ColumnDataString _Notes { get; } = new ColumnDataString("Notes");
|
||||
@@ -47,7 +48,8 @@ namespace Saxonite.Net.Standard.Dbas.Internal.Core
|
||||
"SportId",
|
||||
"About",
|
||||
"ContactsData",
|
||||
"Participation",
|
||||
"Participating",
|
||||
"Preparing",
|
||||
"Officiating",
|
||||
"UserSportData",
|
||||
"Notes",
|
||||
@@ -96,7 +98,8 @@ namespace Saxonite.Net.Standard.Dbas.Internal.Core
|
||||
public Int32 _SportId { get { return Cols._SportId.Value; } set { Cols._SportId.Value = value; } }
|
||||
public String _About { get { return Cols._About.Value; } set { Cols._About.Value = value; } }
|
||||
public String _ContactsData { get { return Cols._ContactsData.Value; } set { Cols._ContactsData.Value = value; } }
|
||||
public Int16 _Participation { get { return Cols._Participation.Value; } set { Cols._Participation.Value = value; } }
|
||||
public Int16 _Participating { get { return Cols._Participating.Value; } set { Cols._Participating.Value = value; } }
|
||||
public Int16 _Preparing { get { return Cols._Preparing.Value; } set { Cols._Preparing.Value = value; } }
|
||||
public Int16 _Officiating { get { return Cols._Officiating.Value; } set { Cols._Officiating.Value = value; } }
|
||||
public String _UserSportData { get { return Cols._UserSportData.Value; } set { Cols._UserSportData.Value = value; } }
|
||||
public String _Notes { get { return Cols._Notes.Value; } set { Cols._Notes.Value = value; } }
|
||||
@@ -134,7 +137,8 @@ namespace Saxonite.Net.Standard.Dbas.Internal.Core
|
||||
_SportId = GetFieldInt32(dbDataReader, "SportId", _SportId);
|
||||
_About = GetFieldString(dbDataReader, "About", _About);
|
||||
_ContactsData = GetFieldString(dbDataReader, "ContactsData", _ContactsData);
|
||||
_Participation = GetFieldInt16(dbDataReader, "Participation", _Participation);
|
||||
_Participating = GetFieldInt16(dbDataReader, "Participating", _Participating);
|
||||
_Preparing = GetFieldInt16(dbDataReader, "Preparing", _Preparing);
|
||||
_Officiating = GetFieldInt16(dbDataReader, "Officiating", _Officiating);
|
||||
_UserSportData = GetFieldString(dbDataReader, "UserSportData", _UserSportData);
|
||||
_Notes = GetFieldString(dbDataReader, "Notes", _Notes);
|
||||
@@ -171,7 +175,8 @@ namespace Saxonite.Net.Standard.Dbas.Internal.Core
|
||||
if (columnNames.ContainsCI("SportId")) AddCommandParameter(dbCommand, "@SportId", _SportId);
|
||||
if (columnNames.ContainsCI("About")) AddCommandParameter(dbCommand, "@About", _About);
|
||||
if (columnNames.ContainsCI("ContactsData")) AddCommandParameter(dbCommand, "@ContactsData", _ContactsData);
|
||||
if (columnNames.ContainsCI("Participation")) AddCommandParameter(dbCommand, "@Participation", _Participation);
|
||||
if (columnNames.ContainsCI("Participating")) AddCommandParameter(dbCommand, "@Participating", _Participating);
|
||||
if (columnNames.ContainsCI("Preparing")) AddCommandParameter(dbCommand, "@Preparing", _Preparing);
|
||||
if (columnNames.ContainsCI("Officiating")) AddCommandParameter(dbCommand, "@Officiating", _Officiating);
|
||||
if (columnNames.ContainsCI("UserSportData")) AddCommandParameter(dbCommand, "@UserSportData", _UserSportData);
|
||||
if (columnNames.ContainsCI("Notes")) AddCommandParameter(dbCommand, "@Notes", _Notes);
|
||||
@@ -223,7 +228,8 @@ namespace Saxonite.Net.Standard.Dbas.Internal.Core
|
||||
if (columnNames.ContainsCI("SportId")) AddCommandParameter(dbCommand, "@SportId", _SportId);
|
||||
if (columnNames.ContainsCI("About")) AddCommandParameter(dbCommand, "@About", _About);
|
||||
if (columnNames.ContainsCI("ContactsData")) AddCommandParameter(dbCommand, "@ContactsData", _ContactsData);
|
||||
if (columnNames.ContainsCI("Participation")) AddCommandParameter(dbCommand, "@Participation", _Participation);
|
||||
if (columnNames.ContainsCI("Participating")) AddCommandParameter(dbCommand, "@Participating", _Participating);
|
||||
if (columnNames.ContainsCI("Preparing")) AddCommandParameter(dbCommand, "@Preparing", _Preparing);
|
||||
if (columnNames.ContainsCI("Officiating")) AddCommandParameter(dbCommand, "@Officiating", _Officiating);
|
||||
if (columnNames.ContainsCI("UserSportData")) AddCommandParameter(dbCommand, "@UserSportData", _UserSportData);
|
||||
if (columnNames.ContainsCI("Notes")) AddCommandParameter(dbCommand, "@Notes", _Notes);
|
||||
|
||||
@@ -0,0 +1,224 @@
|
||||
using Microsoft.Data.SqlClient;
|
||||
using Sarand.Net.Standard.Base.Core;
|
||||
using Sarand.Net.Standard.Base.Dbas;
|
||||
using Sarand.Net.Standard.Base.Utils;
|
||||
using Saxonite.Net.Standard.Dbas.Data;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data.Common;
|
||||
using System.Linq;
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// Code generated by Sarand Database Utilities Mon 12-Dec-2022 13:20:42
|
||||
//---------------------------------------------------------------------------
|
||||
namespace Saxonite.Net.Standard.Dbas.Internal.Support
|
||||
{
|
||||
internal class UserReportComment_Db : SaxDbDataItem
|
||||
{
|
||||
//-------------------------------------------------------------------
|
||||
// Column definitions.
|
||||
public class ColumnsData
|
||||
{
|
||||
public ColumnDataInt64 _Id { get; } = new ColumnDataInt64("Id", true);
|
||||
public ColumnDataInt64 _UserReportId { get; } = new ColumnDataInt64("UserReportId");
|
||||
public ColumnDataDateTime _RecordedAt { get; } = new ColumnDataDateTime("RecordedAt");
|
||||
public ColumnDataInt32 _UserAccountId { get; } = new ColumnDataInt32("UserAccountId");
|
||||
public ColumnDataString _CommentData { get; } = new ColumnDataString("CommentData");
|
||||
public ColumnDataString _Notes { get; } = new ColumnDataString("Notes");
|
||||
public ColumnDataInt16 _Flags { get; } = new ColumnDataInt16("Flags");
|
||||
public ColumnDataString _Status { get; } = new ColumnDataString("Status");
|
||||
public ColumnDataDateTime _CreateOn { get; } = new ColumnDataDateTime("CreateOn");
|
||||
public ColumnDataInt32 _CreateBy { get; } = new ColumnDataInt32("CreateBy");
|
||||
public ColumnDataString _CreateHost { get; } = new ColumnDataString("CreateHost");
|
||||
public ColumnDataDateTime _UpdateOn { get; } = new ColumnDataDateTime("UpdateOn");
|
||||
public ColumnDataInt32 _UpdateBy { get; } = new ColumnDataInt32("UpdateBy");
|
||||
public ColumnDataString _UpdateHost { get; } = new ColumnDataString("UpdateHost");
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Data members.
|
||||
protected static List<String> fields { get; } = new List<String>()
|
||||
{
|
||||
"Id",
|
||||
"UserReportId",
|
||||
"RecordedAt",
|
||||
"UserAccountId",
|
||||
"CommentData",
|
||||
"Notes",
|
||||
"Flags",
|
||||
"Status",
|
||||
"CreateOn",
|
||||
"CreateBy",
|
||||
"CreateHost",
|
||||
"UpdateOn",
|
||||
"UpdateBy",
|
||||
"UpdateHost",
|
||||
};
|
||||
protected static List<String> fieldsId { get; } = new List<String>()
|
||||
{
|
||||
"Id",
|
||||
};
|
||||
protected static List<String> fieldsPrimary { get; } = new List<String>()
|
||||
{
|
||||
"Id",
|
||||
};
|
||||
protected static List<String> fieldsIgnoreOnUpdate { get; } = new List<String>()
|
||||
{
|
||||
"CreateOn",
|
||||
"CreateBy",
|
||||
"CreateHost",
|
||||
};
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Construction.
|
||||
internal UserReportComment_Db (IDatabaseInfo dbInfo) : base(dbInfo)
|
||||
{
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Properties.
|
||||
public override String SchemaName { get; } = "dbo";
|
||||
public override String TableName { get; } = "UserReportComment";
|
||||
public String TableNameFmt { get { return (!String.IsNullOrEmpty(SchemaName) ? "[" + SchemaName + "]." : "") + "[" + TableName + "]"; } }
|
||||
public static List<String> Fields { get { return new List<String>(fields); } }
|
||||
public static List<String> FieldsId { get { return new List<String>(fieldsId); } }
|
||||
public static List<String> FieldsNonId { get { return fields.FindAll(item => !fieldsId.ContainsCI(item)); } }
|
||||
// Columns.
|
||||
public ColumnsData Cols { get; } = new ColumnsData();
|
||||
public Int64 _Id { get { return Cols._Id.Value; } set { Cols._Id.Value = value; } }
|
||||
public Int64 _UserReportId { get { return Cols._UserReportId.Value; } set { Cols._UserReportId.Value = value; } }
|
||||
public DateTime _RecordedAt { get { return Cols._RecordedAt.Value; } set { Cols._RecordedAt.Value = value; } }
|
||||
public Int32 _UserAccountId { get { return Cols._UserAccountId.Value; } set { Cols._UserAccountId.Value = value; } }
|
||||
public String _CommentData { get { return Cols._CommentData.Value; } set { Cols._CommentData.Value = value; } }
|
||||
public String _Notes { get { return Cols._Notes.Value; } set { Cols._Notes.Value = value; } }
|
||||
public Int16 _Flags { get { return Cols._Flags.Value; } set { Cols._Flags.Value = value; } }
|
||||
public String _Status { get { return Cols._Status.Value; } set { Cols._Status.Value = value; } }
|
||||
public DateTime _CreateOn { get { return Cols._CreateOn.Value; } set { Cols._CreateOn.Value = value; } }
|
||||
public Int32 _CreateBy { get { return Cols._CreateBy.Value; } set { Cols._CreateBy.Value = value; } }
|
||||
public String _CreateHost { get { return Cols._CreateHost.Value; } set { Cols._CreateHost.Value = value; } }
|
||||
public DateTime _UpdateOn { get { return Cols._UpdateOn.Value; } set { Cols._UpdateOn.Value = value; } }
|
||||
public Int32 _UpdateBy { get { return Cols._UpdateBy.Value; } set { Cols._UpdateBy.Value = value; } }
|
||||
public String _UpdateHost { get { return Cols._UpdateHost.Value; } set { Cols._UpdateHost.Value = value; } }
|
||||
// Existing columns - confirmed on database if table exists.
|
||||
public List<String> ExistingColumnNames { get { return GetExistingColumnNames(Fields); } }
|
||||
public List<String> ExistingColumnNamesNonId { get { return GetExistingColumnNames(FieldsNonId); } }
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Population.
|
||||
public override void PopulateFrom (DbCommand dbCommand, String tableAlias, String filter)
|
||||
{
|
||||
dbCommand.CommandText =
|
||||
"SELECT " + ExistingColumnNames.Concat(", ", (!String.IsNullOrEmpty(tableAlias) ? tableAlias + "." : "") + "[", "]") + " " +
|
||||
"FROM " + TableNameFmt + (!String.IsNullOrEmpty(tableAlias) ? " " + tableAlias : "") + " " +
|
||||
(!String.IsNullOrEmpty(filter) ? "WHERE " + filter : "");
|
||||
Log(GetType().Name + ".PopulateFrom", dbCommand.CommandText);
|
||||
using (DbDataReader dbDataReader = dbCommand.ExecuteReader())
|
||||
{
|
||||
dbDataReader.Read();
|
||||
PopulateFrom(dbDataReader);
|
||||
}
|
||||
}
|
||||
public override void PopulateFrom (DbDataReader dbDataReader)
|
||||
{
|
||||
_Id = GetFieldInt64(dbDataReader, "Id", _Id);
|
||||
_UserReportId = GetFieldInt64(dbDataReader, "UserReportId", _UserReportId);
|
||||
_RecordedAt = GetFieldDateTime(dbDataReader, "RecordedAt", _RecordedAt);
|
||||
_UserAccountId = GetFieldInt32(dbDataReader, "UserAccountId", _UserAccountId);
|
||||
_CommentData = GetFieldString(dbDataReader, "CommentData", _CommentData);
|
||||
_Notes = GetFieldString(dbDataReader, "Notes", _Notes);
|
||||
_Flags = GetFieldInt16(dbDataReader, "Flags", _Flags);
|
||||
_Status = GetFieldString(dbDataReader, "Status", _Status);
|
||||
_CreateOn = GetFieldDateTime(dbDataReader, "CreateOn", _CreateOn);
|
||||
_CreateBy = GetFieldInt32(dbDataReader, "CreateBy", _CreateBy);
|
||||
_CreateHost = GetFieldString(dbDataReader, "CreateHost", _CreateHost);
|
||||
_UpdateOn = GetFieldDateTime(dbDataReader, "UpdateOn", _UpdateOn);
|
||||
_UpdateBy = GetFieldInt32(dbDataReader, "UpdateBy", _UpdateBy);
|
||||
_UpdateHost = GetFieldString(dbDataReader, "UpdateHost", _UpdateHost);
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Insert command.
|
||||
public override bool ExecuteInsertCommand (DbCommand dbCommand)
|
||||
{
|
||||
List<String> columnNames = ExistingColumnNamesNonId;
|
||||
// Avoid insert if Identity field is already valid.
|
||||
if (_Id != 0) throw new Exception("Invalid for Insert - item already has a valid Id");
|
||||
// Construct query.
|
||||
String query =
|
||||
"INSERT INTO " + TableNameFmt + " " +
|
||||
"("+columnNames.Concat(",","[","]")+") ";
|
||||
query += "Output Inserted.Id ";
|
||||
if (dbCommand is SqlCommand)
|
||||
query += "VALUES (" + columnNames.Concat(",", "@", "") + ") ";
|
||||
else query += "VALUES (" + StringListUtil.CreateList("?", columnNames.Count).Concat(",") + ") ";
|
||||
dbCommand.CommandText = query;
|
||||
Log(GetType().Name + ".ExecuteInsertCommand", dbCommand.CommandText);
|
||||
// Populate parameters.
|
||||
dbCommand.Parameters.Clear();
|
||||
if (columnNames.ContainsCI("UserReportId")) AddCommandParameter(dbCommand, "@UserReportId", _UserReportId);
|
||||
if (columnNames.ContainsCI("RecordedAt")) AddCommandParameter(dbCommand, "@RecordedAt", _RecordedAt);
|
||||
if (columnNames.ContainsCI("UserAccountId")) AddCommandParameter(dbCommand, "@UserAccountId", _UserAccountId);
|
||||
if (columnNames.ContainsCI("CommentData")) AddCommandParameter(dbCommand, "@CommentData", _CommentData);
|
||||
if (columnNames.ContainsCI("Notes")) AddCommandParameter(dbCommand, "@Notes", _Notes);
|
||||
if (columnNames.ContainsCI("Flags")) AddCommandParameter(dbCommand, "@Flags", _Flags);
|
||||
if (columnNames.ContainsCI("Status")) AddCommandParameter(dbCommand, "@Status", _Status);
|
||||
if (columnNames.ContainsCI("CreateOn")) AddCommandParameter(dbCommand, "@CreateOn", _CreateOn);
|
||||
if (columnNames.ContainsCI("CreateBy")) AddCommandParameter(dbCommand, "@CreateBy", _CreateBy);
|
||||
if (columnNames.ContainsCI("CreateHost")) AddCommandParameter(dbCommand, "@CreateHost", _CreateHost);
|
||||
if (columnNames.ContainsCI("UpdateOn")) AddCommandParameter(dbCommand, "@UpdateOn", _UpdateOn);
|
||||
if (columnNames.ContainsCI("UpdateBy")) AddCommandParameter(dbCommand, "@UpdateBy", _UpdateBy);
|
||||
if (columnNames.ContainsCI("UpdateHost")) AddCommandParameter(dbCommand, "@UpdateHost", _UpdateHost);
|
||||
// Execute insert command.
|
||||
bool commandSuccess = false;
|
||||
int executeNonQuery = dbCommand.ExecuteNonQuery();
|
||||
if (executeNonQuery == 1)
|
||||
{
|
||||
dbCommand.CommandText = "SELECT Max(Id) FROM " + TableNameFmt + ";";
|
||||
_Id = Convert.ToInt64(dbCommand.ExecuteScalar());
|
||||
commandSuccess = (_Id > 0);
|
||||
}
|
||||
return commandSuccess;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Update command.
|
||||
public override bool ExecuteUpdateCommand (DbCommand dbCommand)
|
||||
{
|
||||
// Avoid update if Identity field isn't valid.
|
||||
if (_Id == 0) throw new Exception("Invalid for Update - item has an invalid Id");
|
||||
// Columns to update.
|
||||
List<String> columnNames = ExistingColumnNamesNonId.Where(item => !fieldsPrimary.ContainsCI(item) && !fieldsIgnoreOnUpdate.ContainsCI(item)).ToList();
|
||||
// Construct query.
|
||||
String query = "UPDATE " + TableNameFmt + " SET ";
|
||||
if (dbCommand is SqlCommand)
|
||||
{
|
||||
query += StringPairList.CreateFrom(columnNames.Bracket("[","]"),columnNames).Concat("=@").Concat(", ") + " ";
|
||||
query += "WHERE Id=@Id;";
|
||||
}
|
||||
else
|
||||
{
|
||||
query += columnNames.Concat(", ", "", "=?") + " ";
|
||||
query += "WHERE Id=?;";
|
||||
}
|
||||
dbCommand.CommandText = query;
|
||||
Log(GetType().Name + ".ExecuteUpdateCommand", dbCommand.CommandText);
|
||||
// Populate parameters.
|
||||
dbCommand.Parameters.Clear();
|
||||
if (columnNames.ContainsCI("UserReportId")) AddCommandParameter(dbCommand, "@UserReportId", _UserReportId);
|
||||
if (columnNames.ContainsCI("RecordedAt")) AddCommandParameter(dbCommand, "@RecordedAt", _RecordedAt);
|
||||
if (columnNames.ContainsCI("UserAccountId")) AddCommandParameter(dbCommand, "@UserAccountId", _UserAccountId);
|
||||
if (columnNames.ContainsCI("CommentData")) AddCommandParameter(dbCommand, "@CommentData", _CommentData);
|
||||
if (columnNames.ContainsCI("Notes")) AddCommandParameter(dbCommand, "@Notes", _Notes);
|
||||
if (columnNames.ContainsCI("Flags")) AddCommandParameter(dbCommand, "@Flags", _Flags);
|
||||
if (columnNames.ContainsCI("Status")) AddCommandParameter(dbCommand, "@Status", _Status);
|
||||
if (columnNames.ContainsCI("UpdateOn")) AddCommandParameter(dbCommand, "@UpdateOn", _UpdateOn);
|
||||
if (columnNames.ContainsCI("UpdateBy")) AddCommandParameter(dbCommand, "@UpdateBy", _UpdateBy);
|
||||
if (columnNames.ContainsCI("UpdateHost")) AddCommandParameter(dbCommand, "@UpdateHost", _UpdateHost);
|
||||
AddCommandParameter(dbCommand, "@Id", _Id);
|
||||
int executeNonQueryResult = dbCommand.ExecuteNonQuery();
|
||||
return (executeNonQueryResult == 1);
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,230 @@
|
||||
using Microsoft.Data.SqlClient;
|
||||
using Sarand.Net.Standard.Base.Core;
|
||||
using Sarand.Net.Standard.Base.Dbas;
|
||||
using Sarand.Net.Standard.Base.Utils;
|
||||
using Saxonite.Net.Standard.Dbas.Data;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data.Common;
|
||||
using System.Linq;
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// Code generated by Sarand Database Utilities Mon 12-Dec-2022 13:20:42
|
||||
//---------------------------------------------------------------------------
|
||||
namespace Saxonite.Net.Standard.Dbas.Internal.Support
|
||||
{
|
||||
internal class UserReport_Db : SaxDbDataItem
|
||||
{
|
||||
//-------------------------------------------------------------------
|
||||
// Column definitions.
|
||||
public class ColumnsData
|
||||
{
|
||||
public ColumnDataInt64 _Id { get; } = new ColumnDataInt64("Id", true);
|
||||
public ColumnDataInt32 _UserAccountId { get; } = new ColumnDataInt32("UserAccountId");
|
||||
public ColumnDataInt16 _ReportType { get; } = new ColumnDataInt16("ReportType");
|
||||
public ColumnDataString _Report { get; } = new ColumnDataString("Report");
|
||||
public ColumnDataDateTime _RecordedOn { get; } = new ColumnDataDateTime("RecordedOn");
|
||||
public ColumnDataString _ReportData { get; } = new ColumnDataString("ReportData");
|
||||
public ColumnDataString _Notes { get; } = new ColumnDataString("Notes");
|
||||
public ColumnDataInt16 _Flags { get; } = new ColumnDataInt16("Flags");
|
||||
public ColumnDataString _Status { get; } = new ColumnDataString("Status");
|
||||
public ColumnDataDateTime _CreateOn { get; } = new ColumnDataDateTime("CreateOn");
|
||||
public ColumnDataInt32 _CreateBy { get; } = new ColumnDataInt32("CreateBy");
|
||||
public ColumnDataString _CreateHost { get; } = new ColumnDataString("CreateHost");
|
||||
public ColumnDataDateTime _UpdateOn { get; } = new ColumnDataDateTime("UpdateOn");
|
||||
public ColumnDataInt32 _UpdateBy { get; } = new ColumnDataInt32("UpdateBy");
|
||||
public ColumnDataString _UpdateHost { get; } = new ColumnDataString("UpdateHost");
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Data members.
|
||||
protected static List<String> fields { get; } = new List<String>()
|
||||
{
|
||||
"Id",
|
||||
"UserAccountId",
|
||||
"ReportType",
|
||||
"Report",
|
||||
"RecordedOn",
|
||||
"ReportData",
|
||||
"Notes",
|
||||
"Flags",
|
||||
"Status",
|
||||
"CreateOn",
|
||||
"CreateBy",
|
||||
"CreateHost",
|
||||
"UpdateOn",
|
||||
"UpdateBy",
|
||||
"UpdateHost",
|
||||
};
|
||||
protected static List<String> fieldsId { get; } = new List<String>()
|
||||
{
|
||||
"Id",
|
||||
};
|
||||
protected static List<String> fieldsPrimary { get; } = new List<String>()
|
||||
{
|
||||
"Id",
|
||||
};
|
||||
protected static List<String> fieldsIgnoreOnUpdate { get; } = new List<String>()
|
||||
{
|
||||
"CreateOn",
|
||||
"CreateBy",
|
||||
"CreateHost",
|
||||
};
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Construction.
|
||||
internal UserReport_Db (IDatabaseInfo dbInfo) : base(dbInfo)
|
||||
{
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Properties.
|
||||
public override String SchemaName { get; } = "dbo";
|
||||
public override String TableName { get; } = "UserReport";
|
||||
public String TableNameFmt { get { return (!String.IsNullOrEmpty(SchemaName) ? "[" + SchemaName + "]." : "") + "[" + TableName + "]"; } }
|
||||
public static List<String> Fields { get { return new List<String>(fields); } }
|
||||
public static List<String> FieldsId { get { return new List<String>(fieldsId); } }
|
||||
public static List<String> FieldsNonId { get { return fields.FindAll(item => !fieldsId.ContainsCI(item)); } }
|
||||
// Columns.
|
||||
public ColumnsData Cols { get; } = new ColumnsData();
|
||||
public Int64 _Id { get { return Cols._Id.Value; } set { Cols._Id.Value = value; } }
|
||||
public Int32 _UserAccountId { get { return Cols._UserAccountId.Value; } set { Cols._UserAccountId.Value = value; } }
|
||||
public Int16 _ReportType { get { return Cols._ReportType.Value; } set { Cols._ReportType.Value = value; } }
|
||||
public String _Report { get { return Cols._Report.Value; } set { Cols._Report.Value = value; } }
|
||||
public DateTime _RecordedOn { get { return Cols._RecordedOn.Value; } set { Cols._RecordedOn.Value = value; } }
|
||||
public String _ReportData { get { return Cols._ReportData.Value; } set { Cols._ReportData.Value = value; } }
|
||||
public String _Notes { get { return Cols._Notes.Value; } set { Cols._Notes.Value = value; } }
|
||||
public Int16 _Flags { get { return Cols._Flags.Value; } set { Cols._Flags.Value = value; } }
|
||||
public String _Status { get { return Cols._Status.Value; } set { Cols._Status.Value = value; } }
|
||||
public DateTime _CreateOn { get { return Cols._CreateOn.Value; } set { Cols._CreateOn.Value = value; } }
|
||||
public Int32 _CreateBy { get { return Cols._CreateBy.Value; } set { Cols._CreateBy.Value = value; } }
|
||||
public String _CreateHost { get { return Cols._CreateHost.Value; } set { Cols._CreateHost.Value = value; } }
|
||||
public DateTime _UpdateOn { get { return Cols._UpdateOn.Value; } set { Cols._UpdateOn.Value = value; } }
|
||||
public Int32 _UpdateBy { get { return Cols._UpdateBy.Value; } set { Cols._UpdateBy.Value = value; } }
|
||||
public String _UpdateHost { get { return Cols._UpdateHost.Value; } set { Cols._UpdateHost.Value = value; } }
|
||||
// Existing columns - confirmed on database if table exists.
|
||||
public List<String> ExistingColumnNames { get { return GetExistingColumnNames(Fields); } }
|
||||
public List<String> ExistingColumnNamesNonId { get { return GetExistingColumnNames(FieldsNonId); } }
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Population.
|
||||
public override void PopulateFrom (DbCommand dbCommand, String tableAlias, String filter)
|
||||
{
|
||||
dbCommand.CommandText =
|
||||
"SELECT " + ExistingColumnNames.Concat(", ", (!String.IsNullOrEmpty(tableAlias) ? tableAlias + "." : "") + "[", "]") + " " +
|
||||
"FROM " + TableNameFmt + (!String.IsNullOrEmpty(tableAlias) ? " " + tableAlias : "") + " " +
|
||||
(!String.IsNullOrEmpty(filter) ? "WHERE " + filter : "");
|
||||
Log(GetType().Name + ".PopulateFrom", dbCommand.CommandText);
|
||||
using (DbDataReader dbDataReader = dbCommand.ExecuteReader())
|
||||
{
|
||||
dbDataReader.Read();
|
||||
PopulateFrom(dbDataReader);
|
||||
}
|
||||
}
|
||||
public override void PopulateFrom (DbDataReader dbDataReader)
|
||||
{
|
||||
_Id = GetFieldInt64(dbDataReader, "Id", _Id);
|
||||
_UserAccountId = GetFieldInt32(dbDataReader, "UserAccountId", _UserAccountId);
|
||||
_ReportType = GetFieldInt16(dbDataReader, "ReportType", _ReportType);
|
||||
_Report = GetFieldString(dbDataReader, "Report", _Report);
|
||||
_RecordedOn = GetFieldDateTime(dbDataReader, "RecordedOn", _RecordedOn);
|
||||
_ReportData = GetFieldString(dbDataReader, "ReportData", _ReportData);
|
||||
_Notes = GetFieldString(dbDataReader, "Notes", _Notes);
|
||||
_Flags = GetFieldInt16(dbDataReader, "Flags", _Flags);
|
||||
_Status = GetFieldString(dbDataReader, "Status", _Status);
|
||||
_CreateOn = GetFieldDateTime(dbDataReader, "CreateOn", _CreateOn);
|
||||
_CreateBy = GetFieldInt32(dbDataReader, "CreateBy", _CreateBy);
|
||||
_CreateHost = GetFieldString(dbDataReader, "CreateHost", _CreateHost);
|
||||
_UpdateOn = GetFieldDateTime(dbDataReader, "UpdateOn", _UpdateOn);
|
||||
_UpdateBy = GetFieldInt32(dbDataReader, "UpdateBy", _UpdateBy);
|
||||
_UpdateHost = GetFieldString(dbDataReader, "UpdateHost", _UpdateHost);
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Insert command.
|
||||
public override bool ExecuteInsertCommand (DbCommand dbCommand)
|
||||
{
|
||||
List<String> columnNames = ExistingColumnNamesNonId;
|
||||
// Avoid insert if Identity field is already valid.
|
||||
if (_Id != 0) throw new Exception("Invalid for Insert - item already has a valid Id");
|
||||
// Construct query.
|
||||
String query =
|
||||
"INSERT INTO " + TableNameFmt + " " +
|
||||
"("+columnNames.Concat(",","[","]")+") ";
|
||||
query += "Output Inserted.Id ";
|
||||
if (dbCommand is SqlCommand)
|
||||
query += "VALUES (" + columnNames.Concat(",", "@", "") + ") ";
|
||||
else query += "VALUES (" + StringListUtil.CreateList("?", columnNames.Count).Concat(",") + ") ";
|
||||
dbCommand.CommandText = query;
|
||||
Log(GetType().Name + ".ExecuteInsertCommand", dbCommand.CommandText);
|
||||
// Populate parameters.
|
||||
dbCommand.Parameters.Clear();
|
||||
if (columnNames.ContainsCI("UserAccountId")) AddCommandParameter(dbCommand, "@UserAccountId", _UserAccountId);
|
||||
if (columnNames.ContainsCI("ReportType")) AddCommandParameter(dbCommand, "@ReportType", _ReportType);
|
||||
if (columnNames.ContainsCI("Report")) AddCommandParameter(dbCommand, "@Report", _Report);
|
||||
if (columnNames.ContainsCI("RecordedOn")) AddCommandParameter(dbCommand, "@RecordedOn", _RecordedOn);
|
||||
if (columnNames.ContainsCI("ReportData")) AddCommandParameter(dbCommand, "@ReportData", _ReportData);
|
||||
if (columnNames.ContainsCI("Notes")) AddCommandParameter(dbCommand, "@Notes", _Notes);
|
||||
if (columnNames.ContainsCI("Flags")) AddCommandParameter(dbCommand, "@Flags", _Flags);
|
||||
if (columnNames.ContainsCI("Status")) AddCommandParameter(dbCommand, "@Status", _Status);
|
||||
if (columnNames.ContainsCI("CreateOn")) AddCommandParameter(dbCommand, "@CreateOn", _CreateOn);
|
||||
if (columnNames.ContainsCI("CreateBy")) AddCommandParameter(dbCommand, "@CreateBy", _CreateBy);
|
||||
if (columnNames.ContainsCI("CreateHost")) AddCommandParameter(dbCommand, "@CreateHost", _CreateHost);
|
||||
if (columnNames.ContainsCI("UpdateOn")) AddCommandParameter(dbCommand, "@UpdateOn", _UpdateOn);
|
||||
if (columnNames.ContainsCI("UpdateBy")) AddCommandParameter(dbCommand, "@UpdateBy", _UpdateBy);
|
||||
if (columnNames.ContainsCI("UpdateHost")) AddCommandParameter(dbCommand, "@UpdateHost", _UpdateHost);
|
||||
// Execute insert command.
|
||||
bool commandSuccess = false;
|
||||
int executeNonQuery = dbCommand.ExecuteNonQuery();
|
||||
if (executeNonQuery == 1)
|
||||
{
|
||||
dbCommand.CommandText = "SELECT Max(Id) FROM " + TableNameFmt + ";";
|
||||
_Id = Convert.ToInt64(dbCommand.ExecuteScalar());
|
||||
commandSuccess = (_Id > 0);
|
||||
}
|
||||
return commandSuccess;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Update command.
|
||||
public override bool ExecuteUpdateCommand (DbCommand dbCommand)
|
||||
{
|
||||
// Avoid update if Identity field isn't valid.
|
||||
if (_Id == 0) throw new Exception("Invalid for Update - item has an invalid Id");
|
||||
// Columns to update.
|
||||
List<String> columnNames = ExistingColumnNamesNonId.Where(item => !fieldsPrimary.ContainsCI(item) && !fieldsIgnoreOnUpdate.ContainsCI(item)).ToList();
|
||||
// Construct query.
|
||||
String query = "UPDATE " + TableNameFmt + " SET ";
|
||||
if (dbCommand is SqlCommand)
|
||||
{
|
||||
query += StringPairList.CreateFrom(columnNames.Bracket("[","]"),columnNames).Concat("=@").Concat(", ") + " ";
|
||||
query += "WHERE Id=@Id;";
|
||||
}
|
||||
else
|
||||
{
|
||||
query += columnNames.Concat(", ", "", "=?") + " ";
|
||||
query += "WHERE Id=?;";
|
||||
}
|
||||
dbCommand.CommandText = query;
|
||||
Log(GetType().Name + ".ExecuteUpdateCommand", dbCommand.CommandText);
|
||||
// Populate parameters.
|
||||
dbCommand.Parameters.Clear();
|
||||
if (columnNames.ContainsCI("UserAccountId")) AddCommandParameter(dbCommand, "@UserAccountId", _UserAccountId);
|
||||
if (columnNames.ContainsCI("ReportType")) AddCommandParameter(dbCommand, "@ReportType", _ReportType);
|
||||
if (columnNames.ContainsCI("Report")) AddCommandParameter(dbCommand, "@Report", _Report);
|
||||
if (columnNames.ContainsCI("RecordedOn")) AddCommandParameter(dbCommand, "@RecordedOn", _RecordedOn);
|
||||
if (columnNames.ContainsCI("ReportData")) AddCommandParameter(dbCommand, "@ReportData", _ReportData);
|
||||
if (columnNames.ContainsCI("Notes")) AddCommandParameter(dbCommand, "@Notes", _Notes);
|
||||
if (columnNames.ContainsCI("Flags")) AddCommandParameter(dbCommand, "@Flags", _Flags);
|
||||
if (columnNames.ContainsCI("Status")) AddCommandParameter(dbCommand, "@Status", _Status);
|
||||
if (columnNames.ContainsCI("UpdateOn")) AddCommandParameter(dbCommand, "@UpdateOn", _UpdateOn);
|
||||
if (columnNames.ContainsCI("UpdateBy")) AddCommandParameter(dbCommand, "@UpdateBy", _UpdateBy);
|
||||
if (columnNames.ContainsCI("UpdateHost")) AddCommandParameter(dbCommand, "@UpdateHost", _UpdateHost);
|
||||
AddCommandParameter(dbCommand, "@Id", _Id);
|
||||
int executeNonQueryResult = dbCommand.ExecuteNonQuery();
|
||||
return (executeNonQueryResult == 1);
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
}
|
||||
}
|
||||
@@ -217,7 +217,8 @@ namespace Saxonite.Net.Standard.Dbas.Mgr
|
||||
dbUserSport._SportId = SysId.ToInt(userSport.SportId);
|
||||
dbUserSport._About = userSport.About;
|
||||
dbUserSport._ContactsData = userSport.ContactsData;
|
||||
dbUserSport._Participation = (short)userSport.Participation;
|
||||
dbUserSport._Participating = (short)userSport.Participating;
|
||||
dbUserSport._Preparing = (short)userSport.Preparing;
|
||||
dbUserSport._Officiating = (short)userSport.Officiating;
|
||||
dbUserSport._UserSportData = userSport.UserSportData;
|
||||
// Common.
|
||||
@@ -241,7 +242,8 @@ namespace Saxonite.Net.Standard.Dbas.Mgr
|
||||
//userSport.SportId = new SysId(dbUserSport._SportId);
|
||||
userSport.About = dbUserSport._About;
|
||||
userSport.ContactsData = dbUserSport._ContactsData;
|
||||
userSport.Participation = (Sax.SportParticipation)dbUserSport._Participation;
|
||||
userSport.Participating = (Sax.SportParticipating)dbUserSport._Participating;
|
||||
userSport.Preparing = (Sax.SportPreparing)dbUserSport._Preparing;
|
||||
userSport.Officiating = (Sax.SportOfficiating)dbUserSport._Officiating;
|
||||
userSport.UserSportData = dbUserSport._UserSportData;
|
||||
// Common.
|
||||
@@ -325,15 +327,26 @@ namespace Saxonite.Net.Standard.Dbas.Mgr
|
||||
columnDfn.ReadOnly = true;
|
||||
break;
|
||||
|
||||
// Participation.
|
||||
case SaxUserSport.Column.SportParticipation:
|
||||
SetUserSportColDfn(columnDfn, "Participation", 80, SaxDbDfn_Core.ColumnIdx.UserSport_Participation, ColumnAlignment.Center, DataValue.DataType.Long);
|
||||
// Participating.
|
||||
case SaxUserSport.Column.SportParticipating:
|
||||
SetUserSportColDfn(columnDfn, "Participating", 80, SaxDbDfn_Core.ColumnIdx.UserSport_Participating, ColumnAlignment.Center, DataValue.DataType.Long);
|
||||
break;
|
||||
case SaxUserSport.Column.SportParticipation_Code:
|
||||
SetUserSportColDfn(columnDfn, "Participation", 80, SaxDbDfn_Core.ColumnIdx.UserSport_Participation, ColumnAlignment.Center, DataValue.DataType.String);
|
||||
case SaxUserSport.Column.SportParticipating_Code:
|
||||
SetUserSportColDfn(columnDfn, "Participating", 80, SaxDbDfn_Core.ColumnIdx.UserSport_Participating, ColumnAlignment.Center, DataValue.DataType.String);
|
||||
break;
|
||||
case SaxUserSport.Column.SportParticipation_Desc:
|
||||
SetUserSportColDfn(columnDfn, "Participation", 120, SaxDbDfn_Core.ColumnIdx.UserSport_Participation, ColumnAlignment.Center, DataValue.DataType.String);
|
||||
case SaxUserSport.Column.SportParticipating_Desc:
|
||||
SetUserSportColDfn(columnDfn, "Participating", 120, SaxDbDfn_Core.ColumnIdx.UserSport_Participating, ColumnAlignment.Center, DataValue.DataType.String);
|
||||
break;
|
||||
|
||||
// Preparing.
|
||||
case SaxUserSport.Column.SportPreparing:
|
||||
SetUserSportColDfn(columnDfn, "Preparing", 80, SaxDbDfn_Core.ColumnIdx.UserSport_Preparing, ColumnAlignment.Center, DataValue.DataType.Long);
|
||||
break;
|
||||
case SaxUserSport.Column.SportPreparing_Code:
|
||||
SetUserSportColDfn(columnDfn, "Preparing", 80, SaxDbDfn_Core.ColumnIdx.UserSport_Preparing, ColumnAlignment.Center, DataValue.DataType.String);
|
||||
break;
|
||||
case SaxUserSport.Column.SportPreparing_Desc:
|
||||
SetUserSportColDfn(columnDfn, "Preparing", 120, SaxDbDfn_Core.ColumnIdx.UserSport_Preparing, ColumnAlignment.Center, DataValue.DataType.String);
|
||||
break;
|
||||
|
||||
// Officiating.
|
||||
@@ -536,8 +549,10 @@ namespace Saxonite.Net.Standard.Dbas.Mgr
|
||||
bool hasSportCols = (columns.HasId(SaxUserSport.Column.Sport_Name));
|
||||
if (columns.HasId(SaxUserSport.Column.SportId) || hasSportCols)
|
||||
query.Columns.Add(SaxDbDfn_Core.GetColumnNameQual(SaxDbDfn_Core.ColumnIdx.UserSport_SportId, aliasUserSport));
|
||||
if (columns.HasId(SaxUserSport.Column.SportParticipation) || columns.HasId(SaxUserSport.Column.SportParticipation_Code) || columns.HasId(SaxUserSport.Column.SportParticipation_Desc))
|
||||
query.Columns.Add(SaxDbDfn_Core.GetColumnNameQual(SaxDbDfn_Core.ColumnIdx.UserSport_Participation, aliasUserSport));
|
||||
if (columns.HasId(SaxUserSport.Column.SportParticipating) || columns.HasId(SaxUserSport.Column.SportParticipating_Code) || columns.HasId(SaxUserSport.Column.SportParticipating_Desc))
|
||||
query.Columns.Add(SaxDbDfn_Core.GetColumnNameQual(SaxDbDfn_Core.ColumnIdx.UserSport_Participating, aliasUserSport));
|
||||
if (columns.HasId(SaxUserSport.Column.SportPreparing) || columns.HasId(SaxUserSport.Column.SportPreparing_Code) || columns.HasId(SaxUserSport.Column.SportPreparing_Desc))
|
||||
query.Columns.Add(SaxDbDfn_Core.GetColumnNameQual(SaxDbDfn_Core.ColumnIdx.UserSport_Preparing, aliasUserSport));
|
||||
if (columns.HasId(SaxUserSport.Column.SportOfficiating) || columns.HasId(SaxUserSport.Column.SportOfficiating_Code) || columns.HasId(SaxUserSport.Column.SportOfficiating_Desc))
|
||||
query.Columns.Add(SaxDbDfn_Core.GetColumnNameQual(SaxDbDfn_Core.ColumnIdx.UserSport_Officiating, aliasUserSport));
|
||||
// Common properties.
|
||||
|
||||
@@ -2374,7 +2374,7 @@
|
||||
<Clustered>false</Clustered>
|
||||
<Nullable>false</Nullable>
|
||||
<Pages>4</Pages>
|
||||
<UniqueValues>39</UniqueValues>
|
||||
<UniqueValues>40</UniqueValues>
|
||||
<HasColumns>false</HasColumns>
|
||||
<Columns>
|
||||
<DbDfnIndexColumn>
|
||||
@@ -7106,7 +7106,7 @@
|
||||
<Clustered>false</Clustered>
|
||||
<Nullable>false</Nullable>
|
||||
<Pages>1</Pages>
|
||||
<UniqueValues>5</UniqueValues>
|
||||
<UniqueValues>7</UniqueValues>
|
||||
<HasColumns>false</HasColumns>
|
||||
<Columns>
|
||||
<DbDfnIndexColumn>
|
||||
@@ -7388,7 +7388,7 @@
|
||||
<Schema>dbo</Schema>
|
||||
<Table>UserSport</Table>
|
||||
<Pos>6</Pos>
|
||||
<Name>Participation</Name>
|
||||
<Name>Participating</Name>
|
||||
<DataType>SmallInt</DataType>
|
||||
<DataTypeName />
|
||||
<DataTypeNative>5</DataTypeNative>
|
||||
@@ -7405,7 +7405,7 @@
|
||||
<Schema>dbo</Schema>
|
||||
<Table>UserSport</Table>
|
||||
<Pos>7</Pos>
|
||||
<Name>Officiating</Name>
|
||||
<Name>Preparing</Name>
|
||||
<DataType>SmallInt</DataType>
|
||||
<DataTypeName />
|
||||
<DataTypeNative>5</DataTypeNative>
|
||||
@@ -7422,6 +7422,23 @@
|
||||
<Schema>dbo</Schema>
|
||||
<Table>UserSport</Table>
|
||||
<Pos>8</Pos>
|
||||
<Name>Officiating</Name>
|
||||
<DataType>SmallInt</DataType>
|
||||
<DataTypeName />
|
||||
<DataTypeNative>5</DataTypeNative>
|
||||
<DataTypeNameNative>smallint</DataTypeNameNative>
|
||||
<IsIdentity>false</IsIdentity>
|
||||
<Size>5</Size>
|
||||
<BufferLen>2</BufferLen>
|
||||
<DecimalDigits>0</DecimalDigits>
|
||||
<Nullable>Nullable</Nullable>
|
||||
<IsNullable>true</IsNullable>
|
||||
<Remarks />
|
||||
</DbDfnColumn>
|
||||
<DbDfnColumn>
|
||||
<Schema>dbo</Schema>
|
||||
<Table>UserSport</Table>
|
||||
<Pos>9</Pos>
|
||||
<Name>UserSportData</Name>
|
||||
<DataType>VarChar</DataType>
|
||||
<DataTypeName />
|
||||
@@ -7438,7 +7455,7 @@
|
||||
<DbDfnColumn>
|
||||
<Schema>dbo</Schema>
|
||||
<Table>UserSport</Table>
|
||||
<Pos>9</Pos>
|
||||
<Pos>10</Pos>
|
||||
<Name>Notes</Name>
|
||||
<DataType>VarChar</DataType>
|
||||
<DataTypeName />
|
||||
@@ -7455,7 +7472,7 @@
|
||||
<DbDfnColumn>
|
||||
<Schema>dbo</Schema>
|
||||
<Table>UserSport</Table>
|
||||
<Pos>10</Pos>
|
||||
<Pos>11</Pos>
|
||||
<Name>Flags</Name>
|
||||
<DataType>SmallInt</DataType>
|
||||
<DataTypeName />
|
||||
@@ -7472,7 +7489,7 @@
|
||||
<DbDfnColumn>
|
||||
<Schema>dbo</Schema>
|
||||
<Table>UserSport</Table>
|
||||
<Pos>11</Pos>
|
||||
<Pos>12</Pos>
|
||||
<Name>Status</Name>
|
||||
<DataType>VarChar</DataType>
|
||||
<DataTypeName />
|
||||
@@ -7489,7 +7506,7 @@
|
||||
<DbDfnColumn>
|
||||
<Schema>dbo</Schema>
|
||||
<Table>UserSport</Table>
|
||||
<Pos>12</Pos>
|
||||
<Pos>13</Pos>
|
||||
<Name>CreateOn</Name>
|
||||
<DataType>DateTime</DataType>
|
||||
<DataTypeName />
|
||||
@@ -7506,7 +7523,7 @@
|
||||
<DbDfnColumn>
|
||||
<Schema>dbo</Schema>
|
||||
<Table>UserSport</Table>
|
||||
<Pos>13</Pos>
|
||||
<Pos>14</Pos>
|
||||
<Name>CreateBy</Name>
|
||||
<DataType>Int</DataType>
|
||||
<DataTypeName />
|
||||
@@ -7523,7 +7540,7 @@
|
||||
<DbDfnColumn>
|
||||
<Schema>dbo</Schema>
|
||||
<Table>UserSport</Table>
|
||||
<Pos>14</Pos>
|
||||
<Pos>15</Pos>
|
||||
<Name>CreateHost</Name>
|
||||
<DataType>VarChar</DataType>
|
||||
<DataTypeName />
|
||||
@@ -7540,7 +7557,7 @@
|
||||
<DbDfnColumn>
|
||||
<Schema>dbo</Schema>
|
||||
<Table>UserSport</Table>
|
||||
<Pos>15</Pos>
|
||||
<Pos>16</Pos>
|
||||
<Name>UpdateOn</Name>
|
||||
<DataType>DateTime</DataType>
|
||||
<DataTypeName />
|
||||
@@ -7557,7 +7574,7 @@
|
||||
<DbDfnColumn>
|
||||
<Schema>dbo</Schema>
|
||||
<Table>UserSport</Table>
|
||||
<Pos>16</Pos>
|
||||
<Pos>17</Pos>
|
||||
<Name>UpdateBy</Name>
|
||||
<DataType>Int</DataType>
|
||||
<DataTypeName />
|
||||
@@ -7574,7 +7591,7 @@
|
||||
<DbDfnColumn>
|
||||
<Schema>dbo</Schema>
|
||||
<Table>UserSport</Table>
|
||||
<Pos>17</Pos>
|
||||
<Pos>18</Pos>
|
||||
<Name>UpdateHost</Name>
|
||||
<DataType>VarChar</DataType>
|
||||
<DataTypeName />
|
||||
@@ -7600,7 +7617,7 @@
|
||||
<Clustered>false</Clustered>
|
||||
<Nullable>false</Nullable>
|
||||
<Pages>1</Pages>
|
||||
<UniqueValues>16</UniqueValues>
|
||||
<UniqueValues>17</UniqueValues>
|
||||
<HasColumns>false</HasColumns>
|
||||
<Columns>
|
||||
<DbDfnIndexColumn>
|
||||
|
||||
@@ -1,4 +1,601 @@
|
||||
<?xml version="1.0"?>
|
||||
<DbDfnDatabase xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
|
||||
<Tables />
|
||||
<Tables>
|
||||
<DbDfnTable>
|
||||
<Schema>dbo</Schema>
|
||||
<Name>UserReport</Name>
|
||||
<Remarks />
|
||||
<Columns>
|
||||
<DbDfnColumn>
|
||||
<Schema>dbo</Schema>
|
||||
<Table>UserReport</Table>
|
||||
<Pos>1</Pos>
|
||||
<Name>Id</Name>
|
||||
<DataType>BigInt</DataType>
|
||||
<DataTypeName />
|
||||
<DataTypeNative>-5</DataTypeNative>
|
||||
<DataTypeNameNative>bigint</DataTypeNameNative>
|
||||
<IsIdentity>true</IsIdentity>
|
||||
<Size>19</Size>
|
||||
<BufferLen>8</BufferLen>
|
||||
<DecimalDigits>0</DecimalDigits>
|
||||
<Nullable>NoNulls</Nullable>
|
||||
<IsNullable>false</IsNullable>
|
||||
<Remarks />
|
||||
</DbDfnColumn>
|
||||
<DbDfnColumn>
|
||||
<Schema>dbo</Schema>
|
||||
<Table>UserReport</Table>
|
||||
<Pos>2</Pos>
|
||||
<Name>UserAccountId</Name>
|
||||
<DataType>Int</DataType>
|
||||
<DataTypeName />
|
||||
<DataTypeNative>4</DataTypeNative>
|
||||
<DataTypeNameNative>int</DataTypeNameNative>
|
||||
<IsIdentity>false</IsIdentity>
|
||||
<Size>10</Size>
|
||||
<BufferLen>4</BufferLen>
|
||||
<DecimalDigits>0</DecimalDigits>
|
||||
<Nullable>NoNulls</Nullable>
|
||||
<IsNullable>false</IsNullable>
|
||||
<Remarks />
|
||||
</DbDfnColumn>
|
||||
<DbDfnColumn>
|
||||
<Schema>dbo</Schema>
|
||||
<Table>UserReport</Table>
|
||||
<Pos>3</Pos>
|
||||
<Name>ReportType</Name>
|
||||
<DataType>SmallInt</DataType>
|
||||
<DataTypeName />
|
||||
<DataTypeNative>5</DataTypeNative>
|
||||
<DataTypeNameNative>smallint</DataTypeNameNative>
|
||||
<IsIdentity>false</IsIdentity>
|
||||
<Size>5</Size>
|
||||
<BufferLen>2</BufferLen>
|
||||
<DecimalDigits>0</DecimalDigits>
|
||||
<Nullable>NoNulls</Nullable>
|
||||
<IsNullable>false</IsNullable>
|
||||
<Remarks />
|
||||
</DbDfnColumn>
|
||||
<DbDfnColumn>
|
||||
<Schema>dbo</Schema>
|
||||
<Table>UserReport</Table>
|
||||
<Pos>4</Pos>
|
||||
<Name>Report</Name>
|
||||
<DataType>VarChar</DataType>
|
||||
<DataTypeName />
|
||||
<DataTypeNative>-9</DataTypeNative>
|
||||
<DataTypeNameNative>nvarchar</DataTypeNameNative>
|
||||
<IsIdentity>false</IsIdentity>
|
||||
<Size>4000</Size>
|
||||
<BufferLen>8000</BufferLen>
|
||||
<DecimalDigits>0</DecimalDigits>
|
||||
<Nullable>NoNulls</Nullable>
|
||||
<IsNullable>false</IsNullable>
|
||||
<Remarks />
|
||||
</DbDfnColumn>
|
||||
<DbDfnColumn>
|
||||
<Schema>dbo</Schema>
|
||||
<Table>UserReport</Table>
|
||||
<Pos>5</Pos>
|
||||
<Name>RecordedOn</Name>
|
||||
<DataType>DateTime</DataType>
|
||||
<DataTypeName />
|
||||
<DataTypeNative>93</DataTypeNative>
|
||||
<DataTypeNameNative>smalldatetime</DataTypeNameNative>
|
||||
<IsIdentity>false</IsIdentity>
|
||||
<Size>16</Size>
|
||||
<BufferLen>16</BufferLen>
|
||||
<DecimalDigits>0</DecimalDigits>
|
||||
<Nullable>Nullable</Nullable>
|
||||
<IsNullable>true</IsNullable>
|
||||
<Remarks />
|
||||
</DbDfnColumn>
|
||||
<DbDfnColumn>
|
||||
<Schema>dbo</Schema>
|
||||
<Table>UserReport</Table>
|
||||
<Pos>6</Pos>
|
||||
<Name>ReportData</Name>
|
||||
<DataType>VarChar</DataType>
|
||||
<DataTypeName />
|
||||
<DataTypeNative>-9</DataTypeNative>
|
||||
<DataTypeNameNative>nvarchar</DataTypeNameNative>
|
||||
<IsIdentity>false</IsIdentity>
|
||||
<Size>0</Size>
|
||||
<BufferLen>0</BufferLen>
|
||||
<DecimalDigits>0</DecimalDigits>
|
||||
<Nullable>NoNulls</Nullable>
|
||||
<IsNullable>false</IsNullable>
|
||||
<Remarks />
|
||||
</DbDfnColumn>
|
||||
<DbDfnColumn>
|
||||
<Schema>dbo</Schema>
|
||||
<Table>UserReport</Table>
|
||||
<Pos>7</Pos>
|
||||
<Name>Notes</Name>
|
||||
<DataType>VarChar</DataType>
|
||||
<DataTypeName />
|
||||
<DataTypeNative>-9</DataTypeNative>
|
||||
<DataTypeNameNative>nvarchar</DataTypeNameNative>
|
||||
<IsIdentity>false</IsIdentity>
|
||||
<Size>2000</Size>
|
||||
<BufferLen>4000</BufferLen>
|
||||
<DecimalDigits>0</DecimalDigits>
|
||||
<Nullable>NoNulls</Nullable>
|
||||
<IsNullable>false</IsNullable>
|
||||
<Remarks />
|
||||
</DbDfnColumn>
|
||||
<DbDfnColumn>
|
||||
<Schema>dbo</Schema>
|
||||
<Table>UserReport</Table>
|
||||
<Pos>8</Pos>
|
||||
<Name>Flags</Name>
|
||||
<DataType>SmallInt</DataType>
|
||||
<DataTypeName />
|
||||
<DataTypeNative>5</DataTypeNative>
|
||||
<DataTypeNameNative>smallint</DataTypeNameNative>
|
||||
<IsIdentity>false</IsIdentity>
|
||||
<Size>5</Size>
|
||||
<BufferLen>2</BufferLen>
|
||||
<DecimalDigits>0</DecimalDigits>
|
||||
<Nullable>NoNulls</Nullable>
|
||||
<IsNullable>false</IsNullable>
|
||||
<Remarks />
|
||||
</DbDfnColumn>
|
||||
<DbDfnColumn>
|
||||
<Schema>dbo</Schema>
|
||||
<Table>UserReport</Table>
|
||||
<Pos>9</Pos>
|
||||
<Name>Status</Name>
|
||||
<DataType>VarChar</DataType>
|
||||
<DataTypeName />
|
||||
<DataTypeNative>12</DataTypeNative>
|
||||
<DataTypeNameNative>varchar</DataTypeNameNative>
|
||||
<IsIdentity>false</IsIdentity>
|
||||
<Size>3</Size>
|
||||
<BufferLen>3</BufferLen>
|
||||
<DecimalDigits>0</DecimalDigits>
|
||||
<Nullable>NoNulls</Nullable>
|
||||
<IsNullable>false</IsNullable>
|
||||
<Remarks />
|
||||
</DbDfnColumn>
|
||||
<DbDfnColumn>
|
||||
<Schema>dbo</Schema>
|
||||
<Table>UserReport</Table>
|
||||
<Pos>10</Pos>
|
||||
<Name>CreateOn</Name>
|
||||
<DataType>DateTime</DataType>
|
||||
<DataTypeName />
|
||||
<DataTypeNative>93</DataTypeNative>
|
||||
<DataTypeNameNative>datetime</DataTypeNameNative>
|
||||
<IsIdentity>false</IsIdentity>
|
||||
<Size>23</Size>
|
||||
<BufferLen>16</BufferLen>
|
||||
<DecimalDigits>3</DecimalDigits>
|
||||
<Nullable>NoNulls</Nullable>
|
||||
<IsNullable>false</IsNullable>
|
||||
<Remarks />
|
||||
</DbDfnColumn>
|
||||
<DbDfnColumn>
|
||||
<Schema>dbo</Schema>
|
||||
<Table>UserReport</Table>
|
||||
<Pos>11</Pos>
|
||||
<Name>CreateBy</Name>
|
||||
<DataType>Int</DataType>
|
||||
<DataTypeName />
|
||||
<DataTypeNative>4</DataTypeNative>
|
||||
<DataTypeNameNative>int</DataTypeNameNative>
|
||||
<IsIdentity>false</IsIdentity>
|
||||
<Size>10</Size>
|
||||
<BufferLen>4</BufferLen>
|
||||
<DecimalDigits>0</DecimalDigits>
|
||||
<Nullable>NoNulls</Nullable>
|
||||
<IsNullable>false</IsNullable>
|
||||
<Remarks />
|
||||
</DbDfnColumn>
|
||||
<DbDfnColumn>
|
||||
<Schema>dbo</Schema>
|
||||
<Table>UserReport</Table>
|
||||
<Pos>12</Pos>
|
||||
<Name>CreateHost</Name>
|
||||
<DataType>VarChar</DataType>
|
||||
<DataTypeName />
|
||||
<DataTypeNative>12</DataTypeNative>
|
||||
<DataTypeNameNative>varchar</DataTypeNameNative>
|
||||
<IsIdentity>false</IsIdentity>
|
||||
<Size>100</Size>
|
||||
<BufferLen>100</BufferLen>
|
||||
<DecimalDigits>0</DecimalDigits>
|
||||
<Nullable>NoNulls</Nullable>
|
||||
<IsNullable>false</IsNullable>
|
||||
<Remarks />
|
||||
</DbDfnColumn>
|
||||
<DbDfnColumn>
|
||||
<Schema>dbo</Schema>
|
||||
<Table>UserReport</Table>
|
||||
<Pos>13</Pos>
|
||||
<Name>UpdateOn</Name>
|
||||
<DataType>DateTime</DataType>
|
||||
<DataTypeName />
|
||||
<DataTypeNative>93</DataTypeNative>
|
||||
<DataTypeNameNative>datetime</DataTypeNameNative>
|
||||
<IsIdentity>false</IsIdentity>
|
||||
<Size>23</Size>
|
||||
<BufferLen>16</BufferLen>
|
||||
<DecimalDigits>3</DecimalDigits>
|
||||
<Nullable>NoNulls</Nullable>
|
||||
<IsNullable>false</IsNullable>
|
||||
<Remarks />
|
||||
</DbDfnColumn>
|
||||
<DbDfnColumn>
|
||||
<Schema>dbo</Schema>
|
||||
<Table>UserReport</Table>
|
||||
<Pos>14</Pos>
|
||||
<Name>UpdateBy</Name>
|
||||
<DataType>Int</DataType>
|
||||
<DataTypeName />
|
||||
<DataTypeNative>4</DataTypeNative>
|
||||
<DataTypeNameNative>int</DataTypeNameNative>
|
||||
<IsIdentity>false</IsIdentity>
|
||||
<Size>10</Size>
|
||||
<BufferLen>4</BufferLen>
|
||||
<DecimalDigits>0</DecimalDigits>
|
||||
<Nullable>NoNulls</Nullable>
|
||||
<IsNullable>false</IsNullable>
|
||||
<Remarks />
|
||||
</DbDfnColumn>
|
||||
<DbDfnColumn>
|
||||
<Schema>dbo</Schema>
|
||||
<Table>UserReport</Table>
|
||||
<Pos>15</Pos>
|
||||
<Name>UpdateHost</Name>
|
||||
<DataType>VarChar</DataType>
|
||||
<DataTypeName />
|
||||
<DataTypeNative>12</DataTypeNative>
|
||||
<DataTypeNameNative>varchar</DataTypeNameNative>
|
||||
<IsIdentity>false</IsIdentity>
|
||||
<Size>100</Size>
|
||||
<BufferLen>100</BufferLen>
|
||||
<DecimalDigits>0</DecimalDigits>
|
||||
<Nullable>NoNulls</Nullable>
|
||||
<IsNullable>false</IsNullable>
|
||||
<Remarks />
|
||||
</DbDfnColumn>
|
||||
</Columns>
|
||||
<Indices>
|
||||
<DbDfnIndex>
|
||||
<Schema>dbo</Schema>
|
||||
<Table>UserReport</Table>
|
||||
<Name>PK_UserReport</Name>
|
||||
<IndexType>1</IndexType>
|
||||
<Unique>true</Unique>
|
||||
<Primary>false</Primary>
|
||||
<Clustered>false</Clustered>
|
||||
<Nullable>false</Nullable>
|
||||
<Pages>0</Pages>
|
||||
<UniqueValues>0</UniqueValues>
|
||||
<HasColumns>false</HasColumns>
|
||||
<Columns>
|
||||
<DbDfnIndexColumn>
|
||||
<Seq>1</Seq>
|
||||
<Name>Id</Name>
|
||||
<Ascend>true</Ascend>
|
||||
</DbDfnIndexColumn>
|
||||
</Columns>
|
||||
</DbDfnIndex>
|
||||
<DbDfnIndex>
|
||||
<Schema>dbo</Schema>
|
||||
<Table>UserReport</Table>
|
||||
<Name>IX_UserReport_User</Name>
|
||||
<IndexType>3</IndexType>
|
||||
<Unique>false</Unique>
|
||||
<Primary>false</Primary>
|
||||
<Clustered>false</Clustered>
|
||||
<Nullable>false</Nullable>
|
||||
<Pages>0</Pages>
|
||||
<UniqueValues>0</UniqueValues>
|
||||
<HasColumns>false</HasColumns>
|
||||
<Columns>
|
||||
<DbDfnIndexColumn>
|
||||
<Seq>1</Seq>
|
||||
<Name>UserAccountId</Name>
|
||||
<Ascend>true</Ascend>
|
||||
</DbDfnIndexColumn>
|
||||
</Columns>
|
||||
</DbDfnIndex>
|
||||
<DbDfnIndex>
|
||||
<Schema>dbo</Schema>
|
||||
<Table>UserReport</Table>
|
||||
<Name>IX_UserReport_User_Recorded</Name>
|
||||
<IndexType>3</IndexType>
|
||||
<Unique>false</Unique>
|
||||
<Primary>false</Primary>
|
||||
<Clustered>false</Clustered>
|
||||
<Nullable>false</Nullable>
|
||||
<Pages>0</Pages>
|
||||
<UniqueValues>0</UniqueValues>
|
||||
<HasColumns>false</HasColumns>
|
||||
<Columns>
|
||||
<DbDfnIndexColumn>
|
||||
<Seq>1</Seq>
|
||||
<Name>UserAccountId</Name>
|
||||
<Ascend>true</Ascend>
|
||||
</DbDfnIndexColumn>
|
||||
<DbDfnIndexColumn>
|
||||
<Seq>2</Seq>
|
||||
<Name>RecordedOn</Name>
|
||||
<Ascend>true</Ascend>
|
||||
</DbDfnIndexColumn>
|
||||
</Columns>
|
||||
</DbDfnIndex>
|
||||
</Indices>
|
||||
</DbDfnTable>
|
||||
<DbDfnTable>
|
||||
<Schema>dbo</Schema>
|
||||
<Name>UserReportComment</Name>
|
||||
<Remarks />
|
||||
<Columns>
|
||||
<DbDfnColumn>
|
||||
<Schema>dbo</Schema>
|
||||
<Table>UserReportComment</Table>
|
||||
<Pos>1</Pos>
|
||||
<Name>Id</Name>
|
||||
<DataType>BigInt</DataType>
|
||||
<DataTypeName />
|
||||
<DataTypeNative>-5</DataTypeNative>
|
||||
<DataTypeNameNative>bigint</DataTypeNameNative>
|
||||
<IsIdentity>true</IsIdentity>
|
||||
<Size>19</Size>
|
||||
<BufferLen>8</BufferLen>
|
||||
<DecimalDigits>0</DecimalDigits>
|
||||
<Nullable>NoNulls</Nullable>
|
||||
<IsNullable>false</IsNullable>
|
||||
<Remarks />
|
||||
</DbDfnColumn>
|
||||
<DbDfnColumn>
|
||||
<Schema>dbo</Schema>
|
||||
<Table>UserReportComment</Table>
|
||||
<Pos>2</Pos>
|
||||
<Name>UserReportId</Name>
|
||||
<DataType>BigInt</DataType>
|
||||
<DataTypeName />
|
||||
<DataTypeNative>-5</DataTypeNative>
|
||||
<DataTypeNameNative>bigint</DataTypeNameNative>
|
||||
<IsIdentity>false</IsIdentity>
|
||||
<Size>19</Size>
|
||||
<BufferLen>8</BufferLen>
|
||||
<DecimalDigits>0</DecimalDigits>
|
||||
<Nullable>NoNulls</Nullable>
|
||||
<IsNullable>false</IsNullable>
|
||||
<Remarks />
|
||||
</DbDfnColumn>
|
||||
<DbDfnColumn>
|
||||
<Schema>dbo</Schema>
|
||||
<Table>UserReportComment</Table>
|
||||
<Pos>3</Pos>
|
||||
<Name>RecordedAt</Name>
|
||||
<DataType>DateTime</DataType>
|
||||
<DataTypeName />
|
||||
<DataTypeNative>93</DataTypeNative>
|
||||
<DataTypeNameNative>datetime</DataTypeNameNative>
|
||||
<IsIdentity>false</IsIdentity>
|
||||
<Size>23</Size>
|
||||
<BufferLen>16</BufferLen>
|
||||
<DecimalDigits>3</DecimalDigits>
|
||||
<Nullable>Nullable</Nullable>
|
||||
<IsNullable>true</IsNullable>
|
||||
<Remarks />
|
||||
</DbDfnColumn>
|
||||
<DbDfnColumn>
|
||||
<Schema>dbo</Schema>
|
||||
<Table>UserReportComment</Table>
|
||||
<Pos>4</Pos>
|
||||
<Name>UserAccountId</Name>
|
||||
<DataType>Int</DataType>
|
||||
<DataTypeName />
|
||||
<DataTypeNative>4</DataTypeNative>
|
||||
<DataTypeNameNative>int</DataTypeNameNative>
|
||||
<IsIdentity>false</IsIdentity>
|
||||
<Size>10</Size>
|
||||
<BufferLen>4</BufferLen>
|
||||
<DecimalDigits>0</DecimalDigits>
|
||||
<Nullable>NoNulls</Nullable>
|
||||
<IsNullable>false</IsNullable>
|
||||
<Remarks />
|
||||
</DbDfnColumn>
|
||||
<DbDfnColumn>
|
||||
<Schema>dbo</Schema>
|
||||
<Table>UserReportComment</Table>
|
||||
<Pos>5</Pos>
|
||||
<Name>CommentData</Name>
|
||||
<DataType>VarChar</DataType>
|
||||
<DataTypeName />
|
||||
<DataTypeNative>-9</DataTypeNative>
|
||||
<DataTypeNameNative>nvarchar</DataTypeNameNative>
|
||||
<IsIdentity>false</IsIdentity>
|
||||
<Size>0</Size>
|
||||
<BufferLen>0</BufferLen>
|
||||
<DecimalDigits>0</DecimalDigits>
|
||||
<Nullable>NoNulls</Nullable>
|
||||
<IsNullable>false</IsNullable>
|
||||
<Remarks />
|
||||
</DbDfnColumn>
|
||||
<DbDfnColumn>
|
||||
<Schema>dbo</Schema>
|
||||
<Table>UserReportComment</Table>
|
||||
<Pos>6</Pos>
|
||||
<Name>Notes</Name>
|
||||
<DataType>VarChar</DataType>
|
||||
<DataTypeName />
|
||||
<DataTypeNative>-9</DataTypeNative>
|
||||
<DataTypeNameNative>nvarchar</DataTypeNameNative>
|
||||
<IsIdentity>false</IsIdentity>
|
||||
<Size>2000</Size>
|
||||
<BufferLen>4000</BufferLen>
|
||||
<DecimalDigits>0</DecimalDigits>
|
||||
<Nullable>NoNulls</Nullable>
|
||||
<IsNullable>false</IsNullable>
|
||||
<Remarks />
|
||||
</DbDfnColumn>
|
||||
<DbDfnColumn>
|
||||
<Schema>dbo</Schema>
|
||||
<Table>UserReportComment</Table>
|
||||
<Pos>7</Pos>
|
||||
<Name>Flags</Name>
|
||||
<DataType>SmallInt</DataType>
|
||||
<DataTypeName />
|
||||
<DataTypeNative>5</DataTypeNative>
|
||||
<DataTypeNameNative>smallint</DataTypeNameNative>
|
||||
<IsIdentity>false</IsIdentity>
|
||||
<Size>5</Size>
|
||||
<BufferLen>2</BufferLen>
|
||||
<DecimalDigits>0</DecimalDigits>
|
||||
<Nullable>NoNulls</Nullable>
|
||||
<IsNullable>false</IsNullable>
|
||||
<Remarks />
|
||||
</DbDfnColumn>
|
||||
<DbDfnColumn>
|
||||
<Schema>dbo</Schema>
|
||||
<Table>UserReportComment</Table>
|
||||
<Pos>8</Pos>
|
||||
<Name>Status</Name>
|
||||
<DataType>VarChar</DataType>
|
||||
<DataTypeName />
|
||||
<DataTypeNative>12</DataTypeNative>
|
||||
<DataTypeNameNative>varchar</DataTypeNameNative>
|
||||
<IsIdentity>false</IsIdentity>
|
||||
<Size>3</Size>
|
||||
<BufferLen>3</BufferLen>
|
||||
<DecimalDigits>0</DecimalDigits>
|
||||
<Nullable>NoNulls</Nullable>
|
||||
<IsNullable>false</IsNullable>
|
||||
<Remarks />
|
||||
</DbDfnColumn>
|
||||
<DbDfnColumn>
|
||||
<Schema>dbo</Schema>
|
||||
<Table>UserReportComment</Table>
|
||||
<Pos>9</Pos>
|
||||
<Name>CreateOn</Name>
|
||||
<DataType>DateTime</DataType>
|
||||
<DataTypeName />
|
||||
<DataTypeNative>93</DataTypeNative>
|
||||
<DataTypeNameNative>datetime</DataTypeNameNative>
|
||||
<IsIdentity>false</IsIdentity>
|
||||
<Size>23</Size>
|
||||
<BufferLen>16</BufferLen>
|
||||
<DecimalDigits>3</DecimalDigits>
|
||||
<Nullable>NoNulls</Nullable>
|
||||
<IsNullable>false</IsNullable>
|
||||
<Remarks />
|
||||
</DbDfnColumn>
|
||||
<DbDfnColumn>
|
||||
<Schema>dbo</Schema>
|
||||
<Table>UserReportComment</Table>
|
||||
<Pos>10</Pos>
|
||||
<Name>CreateBy</Name>
|
||||
<DataType>Int</DataType>
|
||||
<DataTypeName />
|
||||
<DataTypeNative>4</DataTypeNative>
|
||||
<DataTypeNameNative>int</DataTypeNameNative>
|
||||
<IsIdentity>false</IsIdentity>
|
||||
<Size>10</Size>
|
||||
<BufferLen>4</BufferLen>
|
||||
<DecimalDigits>0</DecimalDigits>
|
||||
<Nullable>NoNulls</Nullable>
|
||||
<IsNullable>false</IsNullable>
|
||||
<Remarks />
|
||||
</DbDfnColumn>
|
||||
<DbDfnColumn>
|
||||
<Schema>dbo</Schema>
|
||||
<Table>UserReportComment</Table>
|
||||
<Pos>11</Pos>
|
||||
<Name>CreateHost</Name>
|
||||
<DataType>VarChar</DataType>
|
||||
<DataTypeName />
|
||||
<DataTypeNative>12</DataTypeNative>
|
||||
<DataTypeNameNative>varchar</DataTypeNameNative>
|
||||
<IsIdentity>false</IsIdentity>
|
||||
<Size>100</Size>
|
||||
<BufferLen>100</BufferLen>
|
||||
<DecimalDigits>0</DecimalDigits>
|
||||
<Nullable>NoNulls</Nullable>
|
||||
<IsNullable>false</IsNullable>
|
||||
<Remarks />
|
||||
</DbDfnColumn>
|
||||
<DbDfnColumn>
|
||||
<Schema>dbo</Schema>
|
||||
<Table>UserReportComment</Table>
|
||||
<Pos>12</Pos>
|
||||
<Name>UpdateOn</Name>
|
||||
<DataType>DateTime</DataType>
|
||||
<DataTypeName />
|
||||
<DataTypeNative>93</DataTypeNative>
|
||||
<DataTypeNameNative>datetime</DataTypeNameNative>
|
||||
<IsIdentity>false</IsIdentity>
|
||||
<Size>23</Size>
|
||||
<BufferLen>16</BufferLen>
|
||||
<DecimalDigits>3</DecimalDigits>
|
||||
<Nullable>NoNulls</Nullable>
|
||||
<IsNullable>false</IsNullable>
|
||||
<Remarks />
|
||||
</DbDfnColumn>
|
||||
<DbDfnColumn>
|
||||
<Schema>dbo</Schema>
|
||||
<Table>UserReportComment</Table>
|
||||
<Pos>13</Pos>
|
||||
<Name>UpdateBy</Name>
|
||||
<DataType>Int</DataType>
|
||||
<DataTypeName />
|
||||
<DataTypeNative>4</DataTypeNative>
|
||||
<DataTypeNameNative>int</DataTypeNameNative>
|
||||
<IsIdentity>false</IsIdentity>
|
||||
<Size>10</Size>
|
||||
<BufferLen>4</BufferLen>
|
||||
<DecimalDigits>0</DecimalDigits>
|
||||
<Nullable>NoNulls</Nullable>
|
||||
<IsNullable>false</IsNullable>
|
||||
<Remarks />
|
||||
</DbDfnColumn>
|
||||
<DbDfnColumn>
|
||||
<Schema>dbo</Schema>
|
||||
<Table>UserReportComment</Table>
|
||||
<Pos>14</Pos>
|
||||
<Name>UpdateHost</Name>
|
||||
<DataType>VarChar</DataType>
|
||||
<DataTypeName />
|
||||
<DataTypeNative>12</DataTypeNative>
|
||||
<DataTypeNameNative>varchar</DataTypeNameNative>
|
||||
<IsIdentity>false</IsIdentity>
|
||||
<Size>100</Size>
|
||||
<BufferLen>100</BufferLen>
|
||||
<DecimalDigits>0</DecimalDigits>
|
||||
<Nullable>NoNulls</Nullable>
|
||||
<IsNullable>false</IsNullable>
|
||||
<Remarks />
|
||||
</DbDfnColumn>
|
||||
</Columns>
|
||||
<Indices>
|
||||
<DbDfnIndex>
|
||||
<Schema>dbo</Schema>
|
||||
<Table>UserReportComment</Table>
|
||||
<Name>PK_UserReportComment</Name>
|
||||
<IndexType>1</IndexType>
|
||||
<Unique>true</Unique>
|
||||
<Primary>false</Primary>
|
||||
<Clustered>false</Clustered>
|
||||
<Nullable>false</Nullable>
|
||||
<Pages>0</Pages>
|
||||
<UniqueValues>0</UniqueValues>
|
||||
<HasColumns>false</HasColumns>
|
||||
<Columns>
|
||||
<DbDfnIndexColumn>
|
||||
<Seq>1</Seq>
|
||||
<Name>Id</Name>
|
||||
<Ascend>true</Ascend>
|
||||
</DbDfnIndexColumn>
|
||||
</Columns>
|
||||
</DbDfnIndex>
|
||||
</Indices>
|
||||
</DbDfnTable>
|
||||
</Tables>
|
||||
</DbDfnDatabase>
|
||||
Reference in New Issue
Block a user