v1.2.9.1
This commit is contained in:
@@ -22,7 +22,7 @@ namespace Saxonite.Net.Standard.Base.App
|
||||
}
|
||||
public static class Activation
|
||||
{
|
||||
public static int EmailLinkExpiresMins_Default { get; } = 60;
|
||||
public static int EmailLinkExpiresMins_Default { get; } = 60 * 6;
|
||||
public static int EmailLinkExpiresMins_Min { get; } = 30;
|
||||
public static int EmailLinkExpiresMins_Max { get; } = 60 * 24;
|
||||
}
|
||||
@@ -30,7 +30,7 @@ namespace Saxonite.Net.Standard.Base.App
|
||||
{
|
||||
public static class PasswordRequest
|
||||
{
|
||||
public static int EmailLinkExpiresMins_Default { get; } = 60;
|
||||
public static int EmailLinkExpiresMins_Default { get; } = 60 * 3;
|
||||
public static int EmailLinkExpiresMins_Min { get; } = 30;
|
||||
public static int EmailLinkExpiresMins_Max { get; } = 60 * 24;
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace Saxonite.Net.Standard.Base.App
|
||||
//-------------------------------------------------------------------
|
||||
public static class Version
|
||||
{
|
||||
private static String version { get; } = "1.2.9.0";
|
||||
private static String version { get; } = "1.2.9.1";
|
||||
// Retrieve version.
|
||||
public static String GetFullVersion () { return version; }
|
||||
public static String GetAppVersion ()
|
||||
@@ -43,10 +43,12 @@ namespace Saxonite.Net.Standard.Base.App
|
||||
// 1.2.9 12-Oct-2022
|
||||
// - Online Sports Experience update bug resolved.
|
||||
// - Sports Experience Awards.
|
||||
// - Profile Sports and Organisations on separate pages.
|
||||
// - User Eligibility.
|
||||
// 1.2.8 16-Jul-2022 Online Organisations - Select Region
|
||||
// - Fix problem with selecting organisation region.
|
||||
// - Admin - Organisation associations, in progress.
|
||||
// 1.2.7 9-Jun-2022 Online Activty list images
|
||||
// 1.2.7 9-Jun-2022 Online Activity list images
|
||||
// - Organisation logo and article thumbnail in article list.
|
||||
// 1.2.6 16-May-2022 Image resizing
|
||||
// - Profile and article images resized to maximum width/height.
|
||||
|
||||
@@ -23,6 +23,7 @@ namespace Saxonite.Net.Standard.Base.App
|
||||
SportParticipation,
|
||||
SportOfficiating,
|
||||
RegionType,
|
||||
EligibilityType,
|
||||
UserRole,
|
||||
Title,
|
||||
ImageType,
|
||||
@@ -76,8 +77,9 @@ namespace Saxonite.Net.Standard.Base.App
|
||||
UserOrganisation = 102,
|
||||
UserSport = 103,
|
||||
UserSportExperience = 104,
|
||||
UserEligibility = 105,
|
||||
Organisation = 120,
|
||||
// Activty data.
|
||||
// Activity data.
|
||||
ActivityIndex = 200,
|
||||
UserActivity = 202,
|
||||
Article = 210,
|
||||
@@ -116,13 +118,26 @@ namespace Saxonite.Net.Standard.Base.App
|
||||
/// <summary>Country - self-governing political entity, eg. Country, State (not US state)</summary>
|
||||
Country = 30,
|
||||
/// <summary>Nation, eg. Home Nation.</summary>
|
||||
Nation = 70,
|
||||
Nation = 50,
|
||||
/// <summary>STate - major subdivision of country, eg. US state.</summary>
|
||||
State = 80,
|
||||
State = 70,
|
||||
/// <summary>Province - eg. GB County.</summary>
|
||||
Province = 90
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
public enum EligibilityType
|
||||
{
|
||||
Unknown = 0,
|
||||
/* Do not change the numeric values - tied to database. */
|
||||
Birth = 10,
|
||||
Naturalised = 20,
|
||||
Parent = 100,
|
||||
Grandparent = 110,
|
||||
Passport = 200,
|
||||
Visa = 210,
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
/// <summary>User roles</summary>
|
||||
public enum UserRole
|
||||
|
||||
@@ -6,7 +6,7 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// Code generated by Sarand Database Utilities Wed 12-Oct-2022 13:01:58
|
||||
// Code generated by Sarand Database Utilities Thu 13-Oct-2022 09:38:45
|
||||
//---------------------------------------------------------------------------
|
||||
namespace Saxonite.Base.App
|
||||
{
|
||||
@@ -31,6 +31,7 @@ namespace Saxonite.Base.App
|
||||
Sport,
|
||||
UserAccount,
|
||||
UserActivity,
|
||||
UserEligibility,
|
||||
UserOnline,
|
||||
UserOrganisation,
|
||||
UserRole,
|
||||
@@ -313,6 +314,21 @@ namespace Saxonite.Base.App
|
||||
UserActivity_UpdateOn,
|
||||
UserActivity_UpdateBy,
|
||||
UserActivity_UpdateHost,
|
||||
UserEligibility_Id,
|
||||
UserEligibility_UserAccountId,
|
||||
UserEligibility_RegionId,
|
||||
UserEligibility_EligibilityType,
|
||||
UserEligibility_Info,
|
||||
UserEligibility_ExpiresOn,
|
||||
UserEligibility_Notes,
|
||||
UserEligibility_Flags,
|
||||
UserEligibility_Status,
|
||||
UserEligibility_CreateOn,
|
||||
UserEligibility_CreateBy,
|
||||
UserEligibility_CreateHost,
|
||||
UserEligibility_UpdateOn,
|
||||
UserEligibility_UpdateBy,
|
||||
UserEligibility_UpdateHost,
|
||||
UserOnline_UserAccountId,
|
||||
UserOnline_OnlineAt,
|
||||
UserOrganisation_Id,
|
||||
@@ -395,8 +411,8 @@ namespace Saxonite.Base.App
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Data members.
|
||||
private static readonly int tableCount = 20;
|
||||
private static readonly int columnCount = 347;
|
||||
private static readonly int tableCount = 21;
|
||||
private static readonly int columnCount = 362;
|
||||
private static ulong maxTextLen = 0;
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
@@ -556,6 +572,7 @@ namespace Saxonite.Base.App
|
||||
"Sport",
|
||||
"UserAccount",
|
||||
"UserActivity",
|
||||
"UserEligibility",
|
||||
"UserOnline",
|
||||
"UserOrganisation",
|
||||
"UserRole",
|
||||
@@ -857,29 +874,29 @@ namespace Saxonite.Base.App
|
||||
new ColumnDfn(14,"UpdateOn",9,93,false,23),
|
||||
new ColumnDfn(14,"UpdateBy",4,4,false,10),
|
||||
new ColumnDfn(14,"UpdateHost",0,12,false,100),
|
||||
new ColumnDfn(15,"Id",5,-5,true,19),
|
||||
new ColumnDfn(15,"UserAccountId",4,4,false,10),
|
||||
new ColumnDfn(15,"OnlineAt",9,93,false,16),
|
||||
new ColumnDfn(16,"Id",5,-5,true,19),
|
||||
new ColumnDfn(15,"RegionId",4,4,false,10),
|
||||
new ColumnDfn(15,"EligibilityType",3,5,false,5),
|
||||
new ColumnDfn(15,"Info",0,-9,false,2000),
|
||||
new ColumnDfn(15,"ExpiresOn",9,93,false,16),
|
||||
new ColumnDfn(15,"Notes",0,-9,false,2000),
|
||||
new ColumnDfn(15,"Flags",3,5,false,5),
|
||||
new ColumnDfn(15,"Status",0,12,false,3),
|
||||
new ColumnDfn(15,"CreateOn",9,93,false,23),
|
||||
new ColumnDfn(15,"CreateBy",4,4,false,10),
|
||||
new ColumnDfn(15,"CreateHost",0,12,false,100),
|
||||
new ColumnDfn(15,"UpdateOn",9,93,false,23),
|
||||
new ColumnDfn(15,"UpdateBy",4,4,false,10),
|
||||
new ColumnDfn(15,"UpdateHost",0,12,false,100),
|
||||
new ColumnDfn(16,"UserAccountId",4,4,false,10),
|
||||
new ColumnDfn(16,"OrganisationId",4,4,false,10),
|
||||
new ColumnDfn(16,"OrganisationRoleCodes",0,12,false,256),
|
||||
new ColumnDfn(16,"OrganisationRoleCount",2,-6,false,3),
|
||||
new ColumnDfn(16,"AdminComment",0,-9,false,2000),
|
||||
new ColumnDfn(16,"Notes",0,-9,false,2000),
|
||||
new ColumnDfn(16,"Flags",3,5,false,5),
|
||||
new ColumnDfn(16,"Status",0,12,false,3),
|
||||
new ColumnDfn(16,"CreateOn",9,93,false,23),
|
||||
new ColumnDfn(16,"CreateBy",4,4,false,10),
|
||||
new ColumnDfn(16,"CreateHost",0,12,false,100),
|
||||
new ColumnDfn(16,"UpdateOn",9,93,false,23),
|
||||
new ColumnDfn(16,"UpdateBy",4,4,false,10),
|
||||
new ColumnDfn(16,"UpdateHost",0,12,false,100),
|
||||
new ColumnDfn(16,"OnlineAt",9,93,false,16),
|
||||
new ColumnDfn(17,"Id",5,-5,true,19),
|
||||
new ColumnDfn(17,"UserAccountId",4,4,false,10),
|
||||
new ColumnDfn(17,"UserRoleCode",0,12,false,16),
|
||||
new ColumnDfn(17,"LastLoginAt",9,93,false,16),
|
||||
new ColumnDfn(17,"LastInvalidLoginAt",9,93,false,16),
|
||||
new ColumnDfn(17,"InvalidLoginCount",3,5,false,5),
|
||||
new ColumnDfn(17,"OrganisationId",4,4,false,10),
|
||||
new ColumnDfn(17,"OrganisationRoleCodes",0,12,false,256),
|
||||
new ColumnDfn(17,"OrganisationRoleCount",2,-6,false,3),
|
||||
new ColumnDfn(17,"AdminComment",0,-9,false,2000),
|
||||
new ColumnDfn(17,"Notes",0,-9,false,2000),
|
||||
new ColumnDfn(17,"Flags",3,5,false,5),
|
||||
new ColumnDfn(17,"Status",0,12,false,3),
|
||||
@@ -889,43 +906,34 @@ namespace Saxonite.Base.App
|
||||
new ColumnDfn(17,"UpdateOn",9,93,false,23),
|
||||
new ColumnDfn(17,"UpdateBy",4,4,false,10),
|
||||
new ColumnDfn(17,"UpdateHost",0,12,false,100),
|
||||
new ColumnDfn(18,"Id",5,-5,true,19),
|
||||
new ColumnDfn(18,"UserAccountId",4,4,false,10),
|
||||
new ColumnDfn(18,"ActivityIndexIds",0,-9,false,0),
|
||||
new ColumnDfn(18,"UserSessionData",0,-9,false,0),
|
||||
new ColumnDfn(18,"UserRoleCode",0,12,false,16),
|
||||
new ColumnDfn(18,"LastLoginAt",9,93,false,16),
|
||||
new ColumnDfn(18,"LastInvalidLoginAt",9,93,false,16),
|
||||
new ColumnDfn(18,"InvalidLoginCount",3,5,false,5),
|
||||
new ColumnDfn(18,"Notes",0,-9,false,2000),
|
||||
new ColumnDfn(18,"Flags",3,5,false,5),
|
||||
new ColumnDfn(18,"Status",0,12,false,3),
|
||||
new ColumnDfn(18,"CreateOn",9,93,false,23),
|
||||
new ColumnDfn(18,"CreateBy",4,4,false,10),
|
||||
new ColumnDfn(18,"CreateHost",0,12,false,100),
|
||||
new ColumnDfn(18,"UpdateOn",9,93,false,23),
|
||||
new ColumnDfn(19,"Id",5,-5,true,19),
|
||||
new ColumnDfn(18,"UpdateBy",4,4,false,10),
|
||||
new ColumnDfn(18,"UpdateHost",0,12,false,100),
|
||||
new ColumnDfn(19,"UserAccountId",4,4,false,10),
|
||||
new ColumnDfn(19,"SportId",4,4,false,10),
|
||||
new ColumnDfn(19,"About",0,-9,false,2000),
|
||||
new ColumnDfn(19,"Participation",3,5,false,5),
|
||||
new ColumnDfn(19,"Officiating",3,5,false,5),
|
||||
new ColumnDfn(19,"UserSportData",0,-9,false,0),
|
||||
new ColumnDfn(19,"Notes",0,-9,false,2000),
|
||||
new ColumnDfn(19,"ActivityIndexIds",0,-9,false,0),
|
||||
new ColumnDfn(19,"UserSessionData",0,-9,false,0),
|
||||
new ColumnDfn(19,"Flags",3,5,false,5),
|
||||
new ColumnDfn(19,"Status",0,12,false,3),
|
||||
new ColumnDfn(19,"CreateOn",9,93,false,23),
|
||||
new ColumnDfn(19,"CreateBy",4,4,false,10),
|
||||
new ColumnDfn(19,"CreateHost",0,12,false,100),
|
||||
new ColumnDfn(19,"UpdateOn",9,93,false,23),
|
||||
new ColumnDfn(19,"UpdateBy",4,4,false,10),
|
||||
new ColumnDfn(19,"UpdateHost",0,12,false,100),
|
||||
new ColumnDfn(20,"Id",5,-5,true,19),
|
||||
new ColumnDfn(20,"UserSportId",5,-5,false,19),
|
||||
new ColumnDfn(20,"PeriodFrom",9,93,false,16),
|
||||
new ColumnDfn(20,"PeriodTo",9,93,false,16),
|
||||
new ColumnDfn(20,"OrganisationId",4,4,false,10),
|
||||
new ColumnDfn(20,"OrganisationName",0,-9,false,200),
|
||||
new ColumnDfn(20,"Summary",0,-9,false,2000),
|
||||
new ColumnDfn(20,"Team",0,-9,false,64),
|
||||
new ColumnDfn(20,"League",0,-9,false,64),
|
||||
new ColumnDfn(20,"Speciality",0,-9,false,64),
|
||||
new ColumnDfn(20,"SpecialitiesOther",0,-9,false,1000),
|
||||
new ColumnDfn(20,"RegionIdNation",4,4,false,10),
|
||||
new ColumnDfn(20,"RegionIdProvince",4,4,false,10),
|
||||
new ColumnDfn(20,"Awards",0,-9,false,2000),
|
||||
new ColumnDfn(20,"UserSportExperienceData",0,-9,false,0),
|
||||
new ColumnDfn(20,"UserAccountId",4,4,false,10),
|
||||
new ColumnDfn(20,"SportId",4,4,false,10),
|
||||
new ColumnDfn(20,"About",0,-9,false,2000),
|
||||
new ColumnDfn(20,"Participation",3,5,false,5),
|
||||
new ColumnDfn(20,"Officiating",3,5,false,5),
|
||||
new ColumnDfn(20,"UserSportData",0,-9,false,0),
|
||||
new ColumnDfn(20,"Notes",0,-9,false,2000),
|
||||
new ColumnDfn(20,"Flags",3,5,false,5),
|
||||
new ColumnDfn(20,"Status",0,12,false,3),
|
||||
@@ -935,6 +943,30 @@ namespace Saxonite.Base.App
|
||||
new ColumnDfn(20,"UpdateOn",9,93,false,23),
|
||||
new ColumnDfn(20,"UpdateBy",4,4,false,10),
|
||||
new ColumnDfn(20,"UpdateHost",0,12,false,100),
|
||||
new ColumnDfn(21,"Id",5,-5,true,19),
|
||||
new ColumnDfn(21,"UserSportId",5,-5,false,19),
|
||||
new ColumnDfn(21,"PeriodFrom",9,93,false,16),
|
||||
new ColumnDfn(21,"PeriodTo",9,93,false,16),
|
||||
new ColumnDfn(21,"OrganisationId",4,4,false,10),
|
||||
new ColumnDfn(21,"OrganisationName",0,-9,false,200),
|
||||
new ColumnDfn(21,"Summary",0,-9,false,2000),
|
||||
new ColumnDfn(21,"Team",0,-9,false,64),
|
||||
new ColumnDfn(21,"League",0,-9,false,64),
|
||||
new ColumnDfn(21,"Speciality",0,-9,false,64),
|
||||
new ColumnDfn(21,"SpecialitiesOther",0,-9,false,1000),
|
||||
new ColumnDfn(21,"RegionIdNation",4,4,false,10),
|
||||
new ColumnDfn(21,"RegionIdProvince",4,4,false,10),
|
||||
new ColumnDfn(21,"Awards",0,-9,false,2000),
|
||||
new ColumnDfn(21,"UserSportExperienceData",0,-9,false,0),
|
||||
new ColumnDfn(21,"Notes",0,-9,false,2000),
|
||||
new ColumnDfn(21,"Flags",3,5,false,5),
|
||||
new ColumnDfn(21,"Status",0,12,false,3),
|
||||
new ColumnDfn(21,"CreateOn",9,93,false,23),
|
||||
new ColumnDfn(21,"CreateBy",4,4,false,10),
|
||||
new ColumnDfn(21,"CreateHost",0,12,false,100),
|
||||
new ColumnDfn(21,"UpdateOn",9,93,false,23),
|
||||
new ColumnDfn(21,"UpdateBy",4,4,false,10),
|
||||
new ColumnDfn(21,"UpdateHost",0,12,false,100),
|
||||
};
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
|
||||
@@ -95,6 +95,7 @@ namespace Saxonite.Net.Standard.Base.App
|
||||
public List<TypeCodeDesc> SportParticipationCodes { get { return GetCodesOfType(Sax.CodeType.SportParticipation); } }
|
||||
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); } }
|
||||
public List<TypeCodeDesc> UserRoleCodes { get { return GetCodesOfType(Sax.CodeType.UserRole); } }
|
||||
public List<TypeCodeDesc> OrganisationTypeCodes { get { return GetCodesOfType(Sax.CodeType.OrganisationType); } }
|
||||
public List<TypeCodeDesc> OrganisationCategoryCodes { get { return GetCodesOfType(Sax.CodeType.OrganisationCategory); } }
|
||||
|
||||
@@ -20,6 +20,7 @@ namespace Saxonite.Net.Standard.Base.App
|
||||
private static readonly List<TypeCodeDesc> sportParticipationCodes = 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>();
|
||||
private static readonly List<TypeCodeDesc> userRoleCodes = new List<TypeCodeDesc>();
|
||||
private static readonly List<TypeCodeDesc> titleCodes = new List<TypeCodeDesc>();
|
||||
private static readonly List<TypeCodeDesc> imageTypeCodes = new List<TypeCodeDesc>();
|
||||
@@ -55,6 +56,8 @@ namespace Saxonite.Net.Standard.Base.App
|
||||
return new List<TypeCodeDesc>(sportOfficiatingCodes);
|
||||
case Sax.CodeType.RegionType:
|
||||
return new List<TypeCodeDesc>(regionTypeCodes);
|
||||
case Sax.CodeType.EligibilityType:
|
||||
return new List<TypeCodeDesc>(eligibilityTypeCodes);
|
||||
case Sax.CodeType.UserRole:
|
||||
return new List<TypeCodeDesc>(userRoleCodes);
|
||||
case Sax.CodeType.Title:
|
||||
@@ -105,7 +108,7 @@ namespace Saxonite.Net.Standard.Base.App
|
||||
dataItemTypeCodes.Add(Sax.DataItemType.UserOrganisation, "UserOrganisation", "User Organisation");
|
||||
dataItemTypeCodes.Add(Sax.DataItemType.UserSport, "UserSport", "User Sport");
|
||||
dataItemTypeCodes.Add(Sax.DataItemType.Organisation, "Organisation", "Organisation");
|
||||
// Activty data.
|
||||
// Activity data.
|
||||
dataItemTypeCodes.Add(Sax.DataItemType.ActivityIndex, "ActivityIndex", "Activity Index");
|
||||
dataItemTypeCodes.Add(Sax.DataItemType.UserActivity, "UserActivity", "User Activity");
|
||||
dataItemTypeCodes.Add(Sax.DataItemType.Article, "Article", "Article");
|
||||
@@ -155,6 +158,15 @@ namespace Saxonite.Net.Standard.Base.App
|
||||
regionTypeCodes.Add(Sax.RegionType.State, "STAT", "State");
|
||||
regionTypeCodes.Add(Sax.RegionType.Province, "PROV", "Province");
|
||||
|
||||
//---------------------------------------------------------------
|
||||
// Eligibility types.
|
||||
eligibilityTypeCodes.Add(Sax.EligibilityType.Birth, "BTH", "Birth");
|
||||
eligibilityTypeCodes.Add(Sax.EligibilityType.Naturalised, "NLD", "Naturalised");
|
||||
eligibilityTypeCodes.Add(Sax.EligibilityType.Parent, "PRT", "Parent");
|
||||
eligibilityTypeCodes.Add(Sax.EligibilityType.Grandparent, "GRD", "Grandparent");
|
||||
eligibilityTypeCodes.Add(Sax.EligibilityType.Passport, "PST", "Passport");
|
||||
eligibilityTypeCodes.Add(Sax.EligibilityType.Visa, "VSA", "Visa");
|
||||
|
||||
//---------------------------------------------------------------
|
||||
// User roles.
|
||||
userRoleCodes.Add(Sax.UserRole.Journalist, "JRNLST", "Journalist");
|
||||
|
||||
@@ -0,0 +1,323 @@
|
||||
using Sarand.Net.Standard.Base.Bus;
|
||||
using Sarand.Net.Standard.Base.Core;
|
||||
using Saxonite.Base.App;
|
||||
using Saxonite.Net.Standard.Base.App;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using static Saxonite.Net.Standard.Base.App.Sax.Config.Security;
|
||||
|
||||
namespace Saxonite.Net.Standard.Base.Bus
|
||||
{
|
||||
//=======================================================================
|
||||
// User Eligibility.
|
||||
//=======================================================================
|
||||
public abstract class SaxUserEligibility : SacsHierarchyItem
|
||||
{
|
||||
//-------------------------------------------------------------------
|
||||
// Columns.
|
||||
public enum Column
|
||||
{
|
||||
Pos,
|
||||
Id,
|
||||
// User.
|
||||
UserAccountId,
|
||||
User_EmailAddress,
|
||||
User_DisplayName,
|
||||
User_Title,
|
||||
User_FirstName,
|
||||
User_LastName,
|
||||
// Region.
|
||||
RegionId,
|
||||
Region_Type,
|
||||
Region_Type_Desc,
|
||||
Region_CountryIso2Code,
|
||||
Region_Name,
|
||||
Region_ParentId,
|
||||
// Eligibility.
|
||||
EligibilityType,
|
||||
EligibilityType_Desc,
|
||||
Info,
|
||||
ExpiresOn,
|
||||
// Associated data.
|
||||
// Common.
|
||||
Notes,
|
||||
Flags,
|
||||
Status,
|
||||
Status_Desc,
|
||||
Status_Ind,
|
||||
CreateOn_Date,
|
||||
UpdateOn_Date,
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
/// <summary>Properties other than common.</summary>
|
||||
public class DataProperties
|
||||
{
|
||||
public SysId UserAccountId { get; set; }
|
||||
public SysId RegionId { get; set; }
|
||||
public String Info { get; set; }
|
||||
public Sax.EligibilityType EligibilityType { get; set; }
|
||||
public DateTime ExpiresOn { get; set; } = DateTime.MinValue;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Data.
|
||||
public new class Data : SacsHierarchyItem.Data
|
||||
{
|
||||
// Data members.
|
||||
private readonly DataProperties data = new DataProperties();
|
||||
// Construction.
|
||||
public Data()
|
||||
{
|
||||
Status = DefaultStatus;
|
||||
}
|
||||
// Properties.
|
||||
public SysId UserAccountId
|
||||
{
|
||||
get { return data.UserAccountId; }
|
||||
set { CheckChanged(data.UserAccountId, value); data.UserAccountId = value; }
|
||||
}
|
||||
public SysId RegionId
|
||||
{
|
||||
get { return data.RegionId; }
|
||||
set { CheckChanged(data.RegionId, value); data.RegionId = value; }
|
||||
}
|
||||
public Sax.EligibilityType EligibilityType
|
||||
{
|
||||
get { return data.EligibilityType; }
|
||||
set { CheckChanged((int)data.EligibilityType, (int)value); data.EligibilityType = value; }
|
||||
}
|
||||
public String Info
|
||||
{
|
||||
get { return data.Info; }
|
||||
set { CheckChanged(data.Info, value); data.Info = value; }
|
||||
}
|
||||
public DateTime ExpiresOn
|
||||
{
|
||||
get { return data.ExpiresOn; }
|
||||
set { CheckChanged(data.ExpiresOn, value); data.ExpiresOn = value; }
|
||||
}
|
||||
// Population.
|
||||
internal void PopulateFrom(Data data)
|
||||
{
|
||||
UserAccountId = data.UserAccountId;
|
||||
RegionId = data.RegionId;
|
||||
EligibilityType = data.EligibilityType;
|
||||
Info = data.Info;
|
||||
ExpiresOn = data.ExpiresOn;
|
||||
base.PopulateFrom(data);
|
||||
}
|
||||
public Data Clone()
|
||||
{
|
||||
Data data = new Data();
|
||||
data.PopulateFrom(this);
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Error field - identify properties with validation error.
|
||||
public new class ErrField : SacsHierarchyItem.ErrField
|
||||
{
|
||||
// Identifies the field that has invalid data.
|
||||
public ValidValue UserAccountId { get; set; } = ValidValue.Valid;
|
||||
public ValidValue RegionId { get; set; } = ValidValue.Valid;
|
||||
public ValidValue EligibilityType { get; set; } = ValidValue.Valid;
|
||||
public ValidValue Info { get; set; } = ValidValue.Valid;
|
||||
public ValidValue ExpiresOn { get; set; } = ValidValue.Valid;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Data members.
|
||||
private readonly Data data = new Data();
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Construction.
|
||||
protected SaxUserEligibility(SysId id, SysId userAccountId, SysId regionId, Sax.EligibilityType eligibilityType) : base(id)
|
||||
{
|
||||
base.SetData(data);
|
||||
UserAccountId = userAccountId;
|
||||
RegionId = regionId;
|
||||
EligibilityType = eligibilityType;
|
||||
Status = DefaultStatus;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Status.
|
||||
private static readonly List<SaStatus> validStatuses = new List<SaStatus>()
|
||||
{
|
||||
SaStatus.Active,
|
||||
SaStatus.Inactive,
|
||||
SaStatus.Deleted,
|
||||
};
|
||||
public static SaStatus DefaultStatus { get { return SaStatus.Active; } }
|
||||
public static List<SaStatus> ValidStatuses { get { return new List<SaStatus>(validStatuses); } }
|
||||
public static DataValue.TriStateType GetStatusTriState(SaStatus status)
|
||||
{
|
||||
if (status == SaStatus.Active) return DataValue.TriStateType.Green;
|
||||
if (status == SaStatus.Inactive) return DataValue.TriStateType.Red;
|
||||
if (status == SaStatus.Deleted) return DataValue.TriStateType.Purple;
|
||||
return DataValue.TriStateType.Unknown;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Utilities.
|
||||
public ItemId GetItemId()
|
||||
{
|
||||
return new ItemId((short)Sax.DataItemType.UserEligibility, Id);
|
||||
}
|
||||
|
||||
/// <summary>Maximum number of instances per user, regardless of region.</summary>
|
||||
public static int GetMaxInstances(Sax.EligibilityType eligibilityType)
|
||||
{
|
||||
switch (eligibilityType)
|
||||
{
|
||||
case Sax.EligibilityType.Birth: return 1;
|
||||
case Sax.EligibilityType.Naturalised: return 1;
|
||||
case Sax.EligibilityType.Parent: return 2;
|
||||
case Sax.EligibilityType.Grandparent: return 4;
|
||||
case Sax.EligibilityType.Passport: return 9;
|
||||
case Sax.EligibilityType.Visa: return 9;
|
||||
}
|
||||
return 9;
|
||||
}
|
||||
|
||||
/// <summary>Does the eligibility allow a date range.</summary>
|
||||
public static bool AllowsApplicablePeriod(Sax.EligibilityType eligibilityType)
|
||||
{
|
||||
switch (eligibilityType)
|
||||
{
|
||||
//case Sax.EligibilityType.Birth:
|
||||
//case Sax.EligibilityType.Naturalised:
|
||||
//case Sax.EligibilityType.Parent:
|
||||
//case Sax.EligibilityType.Grandparent:
|
||||
case Sax.EligibilityType.Passport:
|
||||
case Sax.EligibilityType.Visa:
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Properties.
|
||||
public Data GetData() { return data.Clone(); }
|
||||
public void SetData(Data data)
|
||||
{
|
||||
String fn = GetType().Name + ".SetData";
|
||||
// Properties that cannot be changed if previously specified.
|
||||
if (SysId.IsValid(Id) && SysId.ToInt(Id) != SysId.ToInt(data.Id))
|
||||
throw new NotSupportedException(fn + " Id cannot be changed");
|
||||
if (SysId.IsValid(UserAccountId) && SysId.ToInt(UserAccountId) != SysId.ToInt(data.UserAccountId))
|
||||
throw new NotSupportedException(fn + " User Account Id cannot be changed");
|
||||
if (SysId.IsValid(RegionId) && SysId.ToInt(RegionId) != SysId.ToInt(data.RegionId))
|
||||
throw new NotSupportedException(fn + " Region Id cannot be changed");
|
||||
if (EligibilityType == 0 && (int)EligibilityType != (int)EligibilityType)
|
||||
throw new NotSupportedException(fn + " User Eligibility cannot be changed");
|
||||
this.data.PopulateFrom(data);
|
||||
}
|
||||
|
||||
/// <summary>User Account Id. NB Can only be set where previously invalid.</summary>
|
||||
public SysId UserAccountId
|
||||
{
|
||||
get { return data.UserAccountId; }
|
||||
set
|
||||
{
|
||||
if (SysId.IsValid(UserAccountId) && SysId.ToInt(UserAccountId) != SysId.ToInt(data.UserAccountId))
|
||||
throw new NotSupportedException("EligibilityType.UserAccountId cannot be changed");
|
||||
data.UserAccountId = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Region Id. NB Can only be set where previously invalid.</summary>
|
||||
public SysId RegionId
|
||||
{
|
||||
get { return data.RegionId; }
|
||||
set
|
||||
{
|
||||
if (SysId.IsValid(RegionId) && SysId.ToInt(RegionId) != SysId.ToInt(data.RegionId))
|
||||
throw new NotSupportedException("EligibilityType.RegionId cannot be changed");
|
||||
data.RegionId = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>User Eligibility. Can only be populated on construction.</summary>
|
||||
public Sax.EligibilityType EligibilityType
|
||||
{
|
||||
get { return data.EligibilityType; }
|
||||
protected set { data.EligibilityType = value; }
|
||||
}
|
||||
|
||||
public String Info
|
||||
{
|
||||
get { return data.Info; }
|
||||
set { data.Info = value; }
|
||||
}
|
||||
|
||||
public DateTime ExpiresOn
|
||||
{
|
||||
get { return data.ExpiresOn; }
|
||||
set { data.ExpiresOn = value; }
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Flags - positions 1-16 available.
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// A s s o c i a t e d D a t a
|
||||
//-------------------------------------------------------------------
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// P a r a m s
|
||||
//-------------------------------------------------------------------
|
||||
// List parameters.
|
||||
public enum StatusCat
|
||||
{
|
||||
Any,
|
||||
ActiveOnly,
|
||||
InactiveOnly,
|
||||
NotDeleted,
|
||||
DeletedOnly,
|
||||
}
|
||||
/// <summary>
|
||||
/// Item list parameters.
|
||||
/// </summary>
|
||||
public new class Params : SacsHierarchyItem.Params
|
||||
{
|
||||
// List filtering.
|
||||
public List<SysId> IdsIncluded { get; } = new List<SysId>();
|
||||
public List<SysId> IdsExcluded { get; } = new List<SysId>();
|
||||
public List<SysId> UserAccountIdsIncluded { get; } = new List<SysId>();
|
||||
public List<SysId> RegionIdsIncluded { get; } = new List<SysId>();
|
||||
public List<Sax.EligibilityType> EligibilityTypesIncluded { get; } = new List<Sax.EligibilityType>();
|
||||
public DateTime ValidOn { get; set; }
|
||||
// Common properties.
|
||||
public String NotesPartial { get; set; }
|
||||
public StatusCat StatusCat { get; set; } = StatusCat.NotDeleted;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
}
|
||||
//=======================================================================
|
||||
// Item list extension methods.
|
||||
public static class SaxEligibilityTypeList
|
||||
{
|
||||
//-------------------------------------------------------------------
|
||||
/// <summary>Retrieve the first entry in the list matching the specified Region.</summary>
|
||||
public static List<SaxUserEligibility> GetEligibilityTypesByStatus(this List<SaxUserEligibility> values, SysId regionId)
|
||||
{
|
||||
return values.FindAll(item => item.RegionId == regionId);
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
/// <summary>Retrieve the first entry in the list matching the specified Eligibility.</summary>
|
||||
public static SaxUserEligibility GetEligibilityTypeByEligibility(this List<SaxUserEligibility> values, Sax.EligibilityType EligibilityType)
|
||||
{
|
||||
return values.Find(item => item.EligibilityType == EligibilityType);
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
}
|
||||
@@ -80,7 +80,7 @@ namespace Saxonite.Net.Standard.Base.Consoles
|
||||
// Author.
|
||||
public SysId UserAccountIdAuthor { get; set; }
|
||||
public String Author { get; set; }
|
||||
// Activty details.
|
||||
// Activity details.
|
||||
public String Caption { get; protected set; }
|
||||
public String Blurb { get; protected set; }
|
||||
// Thumbnail.
|
||||
|
||||
@@ -0,0 +1,253 @@
|
||||
using Sarand.Net.Standard.Base.App;
|
||||
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.Base.App;
|
||||
using Saxonite.Net.Standard.Base.App;
|
||||
using Saxonite.Net.Standard.Base.Bus;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace Saxonite.Net.Standard.Base.Mgr
|
||||
{
|
||||
//=======================================================================
|
||||
partial class SaxAccountMgr
|
||||
{
|
||||
//*******************************************************************
|
||||
// Account Mgr - User Eligibility
|
||||
//*******************************************************************
|
||||
// Utilities.
|
||||
public bool UserRegionHasEligibility(SysId userAccountId, SysId regionId, DateTime validOn, SaxUserEligibility.StatusCat statusCat = SaxUserEligibility.StatusCat.ActiveOnly)
|
||||
{
|
||||
if (!SysId.IsValid(userAccountId) || !SysId.IsValid(regionId)) return false;
|
||||
SaxUserEligibility.Params prmEligibilityType = new SaxUserEligibility.Params();
|
||||
prmEligibilityType.UserAccountIdsIncluded.Add(userAccountId);
|
||||
prmEligibilityType.RegionIdsIncluded.Add(regionId);
|
||||
prmEligibilityType.ValidOn = validOn;
|
||||
prmEligibilityType.StatusCat = statusCat;
|
||||
return GetUserEligibilityCount(prmEligibilityType) > 0;
|
||||
}
|
||||
/// <summary>
|
||||
/// Retrievethe eligibility entries for the specified user.
|
||||
/// <para>- Optional region can be supplied to restrict results.</para>
|
||||
/// <para>- Optional valid on date can be supplied to restrict results.</para>
|
||||
/// <para>- Eligibility status defaults to active.</para>
|
||||
/// </summary>
|
||||
/// <param name="userAccountId">User account</param>
|
||||
/// <param name="regionId"></param>
|
||||
/// <param name="statusCat"></param>
|
||||
/// <returns></returns>
|
||||
public List<SaxUserEligibility> GetUserEligibility(SysId userAccountId, SysId regionId = null, DateTime? validOn = null, SaxUserEligibility.StatusCat statusCat = SaxUserEligibility.StatusCat.ActiveOnly)
|
||||
{
|
||||
if (!SysId.IsValid(userAccountId)) return new List<SaxUserEligibility>();
|
||||
SaxUserEligibility.Params prmEligibilityType = new SaxUserEligibility.Params();
|
||||
prmEligibilityType.UserAccountIdsIncluded.Add(userAccountId);
|
||||
if (SysId.IsValid(regionId))
|
||||
prmEligibilityType.RegionIdsIncluded.Add(regionId);
|
||||
if (DateUtil.IsValid(validOn))
|
||||
prmEligibilityType.ValidOn = (DateTime)validOn;
|
||||
prmEligibilityType.StatusCat = statusCat;
|
||||
return GetUserEligibilityList(prmEligibilityType);
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Create item.
|
||||
public abstract SaxUserEligibility CreateUserEligibility(SysId userAccountId, SysId regionId, Sax.EligibilityType userEligibility);
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Item exists.
|
||||
public bool UserEligibilityExistsById(SysId id)
|
||||
{
|
||||
ClearErrorState();
|
||||
if (!SysId.IsValid(id)) return false;
|
||||
SaxUserEligibility.Params prmEligibilityType = new SaxUserEligibility.Params();
|
||||
prmEligibilityType.IdsIncluded.Add(id);
|
||||
prmEligibilityType.StatusCat = SaxUserEligibility.StatusCat.Any;
|
||||
return GetUserEligibilityCount(prmEligibilityType) == 1;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Retrieve individual items.
|
||||
public abstract SaxUserEligibility GetUserEligibility(SaxUserEligibility.Params prmEligibilityType);
|
||||
public SaxUserEligibility GetUserEligibilityById(SysId id)
|
||||
{
|
||||
ClearErrorState();
|
||||
if (!SysId.IsValid(id)) return null;
|
||||
SaxUserEligibility.Params prmEligibilityType = new SaxUserEligibility.Params();
|
||||
prmEligibilityType.IdsIncluded.Add(id);
|
||||
prmEligibilityType.StatusCat = SaxUserEligibility.StatusCat.Any;
|
||||
return GetUserEligibility(prmEligibilityType);
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Validate item data.
|
||||
public bool IsValidUserEligibility(SaxUserEligibility userEligibility)
|
||||
{
|
||||
ClearErrorState();
|
||||
if (userEligibility == null) return SetErrorState(ErrorMessage.ItemNotSpecified);
|
||||
return IsValidUserEligibilityData(userEligibility.GetData(), new SaxUserEligibility.ErrField());
|
||||
}
|
||||
public virtual bool IsValidUserEligibilityData(SaxUserEligibility.Data data, SaxUserEligibility.ErrField errField)
|
||||
{
|
||||
ClearErrorState();
|
||||
|
||||
// User Account.
|
||||
if (errField.UserAccountId != SacsHierarchyItem.ValidValue.Ignore && !SysId.IsValid(data.UserAccountId))
|
||||
{
|
||||
errField.UserAccountId = SacsHierarchyItem.ValidValue.Invalid;
|
||||
return SetErrorState("User Account Id must be specified");
|
||||
}
|
||||
|
||||
// Region.
|
||||
if (errField.RegionId != SacsHierarchyItem.ValidValue.Ignore && !SysId.IsValid(data.RegionId))
|
||||
{
|
||||
errField.RegionId = SacsHierarchyItem.ValidValue.Invalid;
|
||||
return SetErrorState("Region Id must be specified");
|
||||
}
|
||||
|
||||
// Eligibility Type.
|
||||
if (errField.EligibilityType != SacsHierarchyItem.ValidValue.Ignore && (int)data.EligibilityType < 1)
|
||||
{
|
||||
errField.EligibilityType = SacsHierarchyItem.ValidValue.Invalid;
|
||||
return SetErrorState("User Eligibility must be specified");
|
||||
}
|
||||
|
||||
// Info.
|
||||
if (errField.Info != SacsHierarchyItem.ValidValue.Ignore && !IsValidValue(data.Info, "info", (long)SaxDbDfn_Core.GetColTextLen(SaxDbDfn_Core.ColumnIdx.UserEligibility_Info)))
|
||||
{
|
||||
errField.Info = SacsHierarchyItem.ValidValue.Invalid;
|
||||
return false;
|
||||
}
|
||||
|
||||
// Expires on.
|
||||
if (errField.ExpiresOn != SacsHierarchyItem.ValidValue.Ignore)
|
||||
{
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------
|
||||
// Common properties.
|
||||
if (errField.Notes != SacsHierarchyItem.ValidValue.Ignore && !IsValidValue(data.Notes, "notes", (long)SaxDbDfn_Core.GetColTextLen(SaxDbDfn_Core.ColumnIdx.UserEligibility_Notes)))
|
||||
{
|
||||
errField.Notes = SacsHierarchyItem.ValidValue.Invalid;
|
||||
return false;
|
||||
}
|
||||
if (errField.Status != SacsHierarchyItem.ValidValue.Ignore)
|
||||
{
|
||||
if (!IsValidValue(data.StatusCode, "status", (long)SaxDbDfn_Core.GetColTextLen(SaxDbDfn_Core.ColumnIdx.UserEligibility_Status), true, true))
|
||||
{
|
||||
errField.Status = SacsHierarchyItem.ValidValue.Invalid;
|
||||
return false;
|
||||
}
|
||||
if (!SaxUserEligibility.ValidStatuses.Contains(data.Status))
|
||||
{
|
||||
errField.Status = SacsHierarchyItem.ValidValue.Invalid;
|
||||
return SetErrorState(ErrorMessage.InvalidStatus);
|
||||
}
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------
|
||||
// User & Eligibility combination must be unique.
|
||||
if (errField.UserAccountId != SacsHierarchyItem.ValidValue.Ignore && errField.RegionId != SacsHierarchyItem.ValidValue.Ignore && errField.EligibilityType != SacsHierarchyItem.ValidValue.Ignore)
|
||||
{
|
||||
if (SysId.IsValid(data.UserAccountId) && SysId.IsValid(data.RegionId) && data.EligibilityType > 0)
|
||||
{
|
||||
SaxUserEligibility.Params prmEligibilityType = new SaxUserEligibility.Params();
|
||||
if (SysId.IsValid(data.Id))
|
||||
prmEligibilityType.IdsExcluded.Add(data.Id);
|
||||
prmEligibilityType.UserAccountIdsIncluded.Add(data.UserAccountId);
|
||||
prmEligibilityType.RegionIdsIncluded.Add(data.RegionId);
|
||||
prmEligibilityType.EligibilityTypesIncluded.Add(data.EligibilityType);
|
||||
prmEligibilityType.StatusCat = SaxUserEligibility.StatusCat.Any;
|
||||
if (GetUserEligibilityCount(prmEligibilityType) > 0)
|
||||
{
|
||||
errField.EligibilityType = SacsHierarchyItem.ValidValue.Invalid;
|
||||
return SetErrorState("Eligibility must be unique for user, region and type");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------
|
||||
return true;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Item database interface.
|
||||
public abstract bool InsertUserEligibility(SaxUserEligibility userEligibility, DbUpdateInfo dbUpdateInfo);
|
||||
public abstract bool UpdateUserEligibility(SaxUserEligibility userEligibility, DbUpdateInfo dbUpdateInfo);
|
||||
public virtual bool UserEligibilityCanBeDeleted(SaxUserEligibility userEligibility)
|
||||
{
|
||||
ClearErrorState();
|
||||
return true;
|
||||
}
|
||||
public abstract bool DeleteUserEligibility(SaxUserEligibility userEligibility, DbUpdateInfo dbUpdateInfo);
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Item list.
|
||||
public abstract ColumnDfn GetUserEligibilityColumnDfn(SaxUserEligibility.Column columnId, String caption = "", int width = 0);
|
||||
public abstract List<String> GetUserEligibilityQueryFilter(SaxUserEligibility.Params prmEligibilityType);
|
||||
public abstract long GetUserEligibilityCount(SaxUserEligibility.Params prmEligibilityType);
|
||||
public abstract List<SaxUserEligibility> GetUserEligibilityList(SaxUserEligibility.Params prmEligibilityType);
|
||||
public abstract DbResultSet ExecuteUserEligibilityQuery(List<ColumnDfn> columns, SaxUserEligibility.Params prmEligibilityType);
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
/// <summary>
|
||||
/// Extract and format result set data value where specific handling is required.
|
||||
/// <para>Where response is an invalid data value, format value using column.FormatValue(values).</para>
|
||||
/// </summary>
|
||||
public virtual DataValue GetUserEligibilityDataValue(ColumnDfn column, NamedValue.Map values)
|
||||
{
|
||||
DataValue value = new DataValue();
|
||||
switch ((SaxUserEligibility.Column)column.Id)
|
||||
{
|
||||
//-----------------------------------------------------------
|
||||
// Eligibility Type.
|
||||
case SaxUserEligibility.Column.EligibilityType_Desc:
|
||||
{
|
||||
Sax.EligibilityType eligibilityType = (Sax.EligibilityType)values.GetValue(column.DataName).AsLong();
|
||||
value = new DataValue(EligibilityTypeCodes.GetDescForType(eligibilityType));
|
||||
}
|
||||
break;
|
||||
|
||||
//-----------------------------------------------------------
|
||||
// Region Type.
|
||||
case SaxUserEligibility.Column.Region_Type_Desc:
|
||||
{
|
||||
Sax.RegionType regionType = (Sax.RegionType)values.GetValue(column.DataName).AsLong();
|
||||
value = new DataValue(RegionTypeCodes.GetDescForType(regionType));
|
||||
}
|
||||
break;
|
||||
|
||||
//-----------------------------------------------------------
|
||||
// Notes.
|
||||
case SaxUserEligibility.Column.Notes:
|
||||
{
|
||||
value = new DataValue(SacsHierarchyItem.FormatForDisplay(values.GetValue(column.DataName).ToString(), 200));
|
||||
}
|
||||
break;
|
||||
|
||||
//-----------------------------------------------------------
|
||||
// Status.
|
||||
case SaxUserEligibility.Column.Status_Desc:
|
||||
case SaxUserEligibility.Column.Status_Ind:
|
||||
{
|
||||
String statusCode = values.GetValue(column.DataName).ToString();
|
||||
SaStatus status = SacsSystem.GetStatusForCode(statusCode);
|
||||
if (column.Id == (int)SaxUserEligibility.Column.Status_Desc)
|
||||
value = new DataValue(SacsSystem.GetStatusDesc(status));
|
||||
else if (column.Id == (int)SaxUserEligibility.Column.Status_Ind)
|
||||
value = new DataValue(SaxUserEligibility.GetStatusTriState(status));
|
||||
}
|
||||
break;
|
||||
|
||||
//-----------------------------------------------------------
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
}
|
||||
//=======================================================================
|
||||
}
|
||||
@@ -71,6 +71,7 @@ namespace Saxonite.Net.Standard.Base.Mgr
|
||||
public List<TypeCodeDesc> SportParticipationCodes { get { return Internals.SportParticipationCodes; } }
|
||||
public List<TypeCodeDesc> SportOfficiatingCodes { get { return Internals.SportOfficiatingCodes; } }
|
||||
public List<TypeCodeDesc> RegionTypeCodes { get { return Internals.RegionTypeCodes; } }
|
||||
public List<TypeCodeDesc> EligibilityTypeCodes { get { return Internals.EligibilityTypeCodes; } }
|
||||
public List<TypeCodeDesc> UserRoleCodes { get { return Internals.UserRoleCodes; } }
|
||||
public List<TypeCodeDesc> OrganisationTypeCodes { get { return Internals.OrganisationTypeCodes; } }
|
||||
public List<TypeCodeDesc> OrganisationCategoryCodes { get { return Internals.OrganisationCategoryCodes; } }
|
||||
|
||||
Reference in New Issue
Block a user