v1.2.9.2
This commit is contained in:
@@ -78,6 +78,7 @@ namespace Saxonite.Net.Standard.Base.Bus
|
||||
public String PhoneMain { get; set; } = String.Empty;
|
||||
public String PhoneMobile { get; set; } = String.Empty;
|
||||
public Sax.Gender Gender { get; set; }
|
||||
public String GenderOther { get; set; }
|
||||
public byte DateOfBirthDay { get; set; }
|
||||
public byte DateOfBirthMonth { get; set; }
|
||||
public short DateOfBirthYear { get; set; }
|
||||
@@ -151,6 +152,11 @@ namespace Saxonite.Net.Standard.Base.Bus
|
||||
get { return data.Gender; }
|
||||
set { CheckChanged((int)data.Gender, (int)value); data.Gender = value; }
|
||||
}
|
||||
public String GenderOther
|
||||
{
|
||||
get { return data.GenderOther; }
|
||||
set { CheckChanged(data.GenderOther, value); data.GenderOther = value; }
|
||||
}
|
||||
public byte DateOfBirthDay
|
||||
{
|
||||
get { return data.DateOfBirthDay; }
|
||||
@@ -230,6 +236,7 @@ namespace Saxonite.Net.Standard.Base.Bus
|
||||
PhoneMain = data.PhoneMain;
|
||||
PhoneMobile = data.PhoneMobile;
|
||||
Gender = data.Gender;
|
||||
GenderOther = data.GenderOther;
|
||||
DateOfBirthDay = data.DateOfBirthDay;
|
||||
DateOfBirthMonth = data.DateOfBirthMonth;
|
||||
DateOfBirthYear = data.DateOfBirthYear;
|
||||
@@ -268,6 +275,7 @@ namespace Saxonite.Net.Standard.Base.Bus
|
||||
public ValidValue PhoneMain { get; set; } = ValidValue.Valid;
|
||||
public ValidValue PhoneMobile { get; set; } = ValidValue.Valid;
|
||||
public ValidValue Gender { get; set; } = ValidValue.Valid;
|
||||
public ValidValue GenderOther { get; set; } = ValidValue.Valid;
|
||||
public ValidValue DateOfBirthDay { get; set; } = ValidValue.Valid;
|
||||
public ValidValue DateOfBirthMonth { get; set; } = ValidValue.Valid;
|
||||
public ValidValue DateOfBirthYear { get; set; } = ValidValue.Valid;
|
||||
@@ -393,6 +401,11 @@ namespace Saxonite.Net.Standard.Base.Bus
|
||||
get { return data.Gender; }
|
||||
set { data.Gender = value; }
|
||||
}
|
||||
public String GenderOther
|
||||
{
|
||||
get { return data.GenderOther; }
|
||||
set { data.GenderOther = value; }
|
||||
}
|
||||
public byte DateOfBirthDay
|
||||
{
|
||||
get { return data.DateOfBirthDay; }
|
||||
|
||||
@@ -0,0 +1,181 @@
|
||||
using Sarand.Net.Standard.Base.Bus;
|
||||
using Sarand.Net.Standard.Base.Core;
|
||||
using Saxonite.Net.Standard.Base.App;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using static Saxonite.Net.Standard.Base.App.Sax;
|
||||
|
||||
namespace Saxonite.Net.Standard.Base.Bus
|
||||
{
|
||||
//=======================================================================
|
||||
// User Config.
|
||||
//=======================================================================
|
||||
/// <summary>
|
||||
/// User Config - parameters to control application behaviour.
|
||||
/// </summary>
|
||||
public abstract partial class SaxUserConfig : SacsHierarchyItem
|
||||
{
|
||||
//-------------------------------------------------------------------
|
||||
// Columns.
|
||||
public enum Column
|
||||
{
|
||||
Pos,
|
||||
Id,
|
||||
// User.
|
||||
UserAccountId,
|
||||
User_EmailAddress,
|
||||
User_DisplayName,
|
||||
User_Title,
|
||||
User_FirstName,
|
||||
User_LastName,
|
||||
// Configuration.
|
||||
ConfigType,
|
||||
// Associated data.
|
||||
// Common.
|
||||
//Flags,
|
||||
CreateOn_Date,
|
||||
UpdateOn_Date,
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
/// <summary>Properties other than common.</summary>
|
||||
public class DataProperties
|
||||
{
|
||||
public SysId UserAccountId { get; set; }
|
||||
public Sax.UserConfigType ConfigType { get; set; }
|
||||
public String ConfigData { get; set; }
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Data.
|
||||
public new class Data : SacsHierarchyItem.Data
|
||||
{
|
||||
// Data members.
|
||||
private readonly DataProperties data = new DataProperties();
|
||||
// Construction.
|
||||
public Data()
|
||||
{
|
||||
}
|
||||
// Properties.
|
||||
public SysId UserAccountId
|
||||
{
|
||||
get { return data.UserAccountId; }
|
||||
set { CheckChanged(data.UserAccountId, value); data.UserAccountId = value; }
|
||||
}
|
||||
public Sax.UserConfigType ConfigType
|
||||
{
|
||||
get { return data.ConfigType; }
|
||||
set { CheckChanged((int)data.ConfigType, (int)value); data.ConfigType = value; }
|
||||
}
|
||||
public String ConfigData
|
||||
{
|
||||
get { return data.ConfigData; }
|
||||
set { CheckChanged(data.ConfigData, value); data.ConfigData = value; }
|
||||
}
|
||||
// Population.
|
||||
internal void PopulateFrom(Data data)
|
||||
{
|
||||
UserAccountId = data.UserAccountId;
|
||||
ConfigType = data.ConfigType;
|
||||
ConfigData = data.ConfigData;
|
||||
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 ConfigType { get; set; } = ValidValue.Valid;
|
||||
public ValidValue ConfigData { get; set; } = ValidValue.Valid;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Data members.
|
||||
private readonly Data data = new Data();
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Construction.
|
||||
protected SaxUserConfig(SysId id, SysId userAccountId, Sax.UserConfigType configType) : base(id)
|
||||
{
|
||||
base.SetData(data);
|
||||
UserAccountId = userAccountId;
|
||||
ConfigType = configType;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Utilities.
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Properties.
|
||||
public static String ActivityIndexDelim { get; } = ",";
|
||||
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 (ConfigType != data.ConfigType)
|
||||
throw new NotSupportedException(fn + " Config Type cannot be changed");
|
||||
this.data.PopulateFrom(data);
|
||||
}
|
||||
public SysId UserAccountId
|
||||
{
|
||||
get { return data.UserAccountId; }
|
||||
protected set { data.UserAccountId = value; }
|
||||
}
|
||||
public Sax.UserConfigType ConfigType
|
||||
{
|
||||
get { return data.ConfigType; }
|
||||
protected set { data.ConfigType = value; }
|
||||
}
|
||||
public String ConfigData
|
||||
{
|
||||
get { return data.ConfigData; }
|
||||
set { data.ConfigData = 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.
|
||||
/// <summary>
|
||||
/// Item list parameters.
|
||||
/// </summary>
|
||||
public new class Params : SacsHierarchyItem.Params
|
||||
{
|
||||
// List filtering.
|
||||
public List<SysId> UserAccountIdsIncluded { get; } = new List<SysId>();
|
||||
public Sax.UserConfigType ConfigType { get; set; }
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
}
|
||||
//=======================================================================
|
||||
// Item list extension methods.
|
||||
public static class SaxUserConfigList
|
||||
{
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
}
|
||||
@@ -221,7 +221,7 @@ namespace Saxonite.Net.Standard.Base.Bus
|
||||
public SysId UserAccountId
|
||||
{
|
||||
get { return data.UserAccountId; }
|
||||
set
|
||||
protected set
|
||||
{
|
||||
if (SysId.IsValid(UserAccountId) && SysId.ToInt(UserAccountId) != SysId.ToInt(data.UserAccountId))
|
||||
throw new NotSupportedException("EligibilityType.UserAccountId cannot be changed");
|
||||
@@ -245,7 +245,7 @@ namespace Saxonite.Net.Standard.Base.Bus
|
||||
public Sax.EligibilityType EligibilityType
|
||||
{
|
||||
get { return data.EligibilityType; }
|
||||
protected set { data.EligibilityType = value; }
|
||||
set { data.EligibilityType = value; }
|
||||
}
|
||||
|
||||
public String Info
|
||||
|
||||
Reference in New Issue
Block a user