3.0.0.6 Main page layouts. Demo account registration.
This commit is contained in:
@@ -15,7 +15,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.App
|
||||
//-------------------------------------------------------------------
|
||||
public static class Version
|
||||
{
|
||||
private static String version { get; } = "3.0.0.5";
|
||||
private static String version { get; } = "3.0.0.6";
|
||||
// Retrieve version.
|
||||
public static String GetFullVersion() { return version; }
|
||||
public static String GetAppVersion()
|
||||
@@ -44,6 +44,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.App
|
||||
// 3.0.0.3 10-Feb-25 Osie feedback #1. Control Repository Schema, Logs.
|
||||
// 3.0.0.4 11-Feb-25 Portal Commodity Sales properties. Control Index population.
|
||||
// 3.0.0.5 12-Feb-25 Portal Security forms tidy. Default Commodity type. Code Types and Codes.
|
||||
// 3.0.0.6 13-Feb-25 Main page layouts. Demo Account registration.
|
||||
//-------------------------------------------------------------------
|
||||
}
|
||||
//=======================================================================
|
||||
|
||||
@@ -6,7 +6,7 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// Code generated by Sarand Database Utilities Thu 6-Feb-2025 13:02:19
|
||||
// Code generated by Sarand Database Utilities Thu 13-Feb-2025 11:12:01
|
||||
//---------------------------------------------------------------------------
|
||||
namespace Sarand.BusinessMgr.Net.Standard.Base.App
|
||||
{
|
||||
@@ -35,7 +35,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.App
|
||||
AccountRegistration_LastName,
|
||||
AccountRegistration_PhoneMain,
|
||||
AccountRegistration_PhoneAlt,
|
||||
AccountRegistration_InstanceContext,
|
||||
AccountRegistration_RepositoryContext,
|
||||
AccountRegistration_RequestAccountAt,
|
||||
AccountRegistration_RegisterAccountToken,
|
||||
AccountRegistration_RegisterAccountAt,
|
||||
@@ -342,7 +342,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.App
|
||||
new ColumnDfn(1,"LastName",0,-9,false,100),
|
||||
new ColumnDfn(1,"PhoneMain",0,-9,false,100),
|
||||
new ColumnDfn(1,"PhoneAlt",0,-9,false,100),
|
||||
new ColumnDfn(1,"InstanceContext",0,-9,false,100),
|
||||
new ColumnDfn(1,"RepositoryContext",0,-9,false,100),
|
||||
new ColumnDfn(1,"RequestAccountAt",9,93,false,23),
|
||||
new ColumnDfn(1,"RegisterAccountToken",10,-11,false,36),
|
||||
new ColumnDfn(1,"RegisterAccountAt",9,93,false,23),
|
||||
|
||||
@@ -29,7 +29,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.Bus.Control
|
||||
LastName,
|
||||
PhoneMain,
|
||||
PhoneAlt,
|
||||
InstanceContext,
|
||||
RepositoryContext,
|
||||
RequestAccountAt,
|
||||
RegisterAccountToken,
|
||||
RegisterAccountAt,
|
||||
@@ -52,7 +52,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.Bus.Control
|
||||
public String LastName { get; set; } = "";
|
||||
public String PhoneMain { get; set; } = "";
|
||||
public String PhoneAlt { get; set; } = "";
|
||||
public String InstanceContext { get; set; } = "";
|
||||
public String RepositoryContext { get; set; } = "";
|
||||
public DateTime RequestAccountAt { get; set; }
|
||||
public Guid RegisterAccountToken { get; set; }
|
||||
public DateTime? RegisterAccountAt { get; set; }
|
||||
@@ -96,10 +96,10 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.Bus.Control
|
||||
get { return data.PhoneAlt; }
|
||||
set { CheckChanged(data.PhoneAlt, value); data.PhoneAlt = value; }
|
||||
}
|
||||
public String InstanceContext
|
||||
public String RepositoryContext
|
||||
{
|
||||
get { return data.InstanceContext; }
|
||||
set { CheckChanged(data.InstanceContext, value); data.InstanceContext = value; }
|
||||
get { return data.RepositoryContext; }
|
||||
set { CheckChanged(data.RepositoryContext, value); data.RepositoryContext = value; }
|
||||
}
|
||||
public DateTime RequestAccountAt
|
||||
{
|
||||
@@ -134,7 +134,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.Bus.Control
|
||||
FirstName = data.FirstName;
|
||||
PhoneMain = data.PhoneMain;
|
||||
PhoneAlt = data.PhoneAlt;
|
||||
InstanceContext = data.InstanceContext;
|
||||
RepositoryContext = data.RepositoryContext;
|
||||
RequestAccountAt = data.RequestAccountAt;
|
||||
RegisterAccountToken = data.RegisterAccountToken;
|
||||
RegisterAccountAt = data.RegisterAccountAt;
|
||||
@@ -157,7 +157,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.Bus.Control
|
||||
public ValidValue LastName { get; set; } = ValidValue.Valid;
|
||||
public ValidValue PhoneMain { get; set; } = ValidValue.Valid;
|
||||
public ValidValue PhoneAlt { get; set; } = ValidValue.Valid;
|
||||
public ValidValue InstanceContext { get; set; } = ValidValue.Valid;
|
||||
public ValidValue RepositoryContext { get; set; } = ValidValue.Valid;
|
||||
public ValidValue RequestAccountAt { get; set; } = ValidValue.Valid;
|
||||
public ValidValue RegisterAccountToken { get; set; } = ValidValue.Valid;
|
||||
public ValidValue RegisterAccountAt { get; set; } = ValidValue.Valid;
|
||||
@@ -276,10 +276,10 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.Bus.Control
|
||||
|
||||
// Registration.
|
||||
|
||||
public String InstanceContext
|
||||
public String RepositoryContext
|
||||
{
|
||||
get { return data.InstanceContext; }
|
||||
set { data.InstanceContext = value; }
|
||||
get { return data.RepositoryContext; }
|
||||
set { data.RepositoryContext = value; }
|
||||
}
|
||||
public DateTime RequestAccountAt
|
||||
{
|
||||
|
||||
@@ -493,6 +493,20 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.Consoles
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
|
||||
/// <summary>
|
||||
/// Check whether User Account already exists, ie. Security Item with matching code/email.
|
||||
/// </summary>
|
||||
public bool UserAccountExists(SbmRepositoryPopulationData.UserAccount userAccount)
|
||||
{
|
||||
String userCode = StringUtil.OnBlank(userAccount.UserCode, userAccount.Email);
|
||||
SaSecurityItem securityItemUser = SecurityConsole.GetSecurityItemByCode(SaSecurity.ItemType.User, userCode);
|
||||
if (securityItemUser != null)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
|
||||
/// <summary>
|
||||
/// Add User Account.
|
||||
/// </summary>
|
||||
|
||||
@@ -117,6 +117,15 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.Consoles
|
||||
//-------------------------------------------------------------------
|
||||
// User Accounts.
|
||||
|
||||
/// <summary>
|
||||
/// Check whether User Account already exists, ie. Security Item with matching code/email.
|
||||
/// </summary>
|
||||
public bool UserAccountExists(SbmRepositoryPopulationData.UserAccount userAccount)
|
||||
{
|
||||
ClearErrorState();
|
||||
return InstanceConsole.UserAccountExists(userAccount);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Add User Account.
|
||||
/// </summary>
|
||||
|
||||
@@ -47,6 +47,13 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.Core
|
||||
/// </summary>
|
||||
bool InitialiseRepository(SbmRepositoryInitialisationData initData);
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
|
||||
/// <summary>
|
||||
/// Check whether User Account already exists, ie. Security Item with matching code/email.
|
||||
/// </summary>
|
||||
abstract bool UserAccountExists(SbmRepositoryPopulationData.UserAccount userAccount);
|
||||
|
||||
/// <summary>
|
||||
/// Add User Account.
|
||||
/// </summary>
|
||||
|
||||
@@ -42,6 +42,14 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.Core
|
||||
/// </summary>
|
||||
abstract bool PopulateRepository(SbmRepositoryPopulationData data);
|
||||
|
||||
/// <summary>
|
||||
/// Get Affiliate Owner Ids for Internal Associations.
|
||||
/// </summary>
|
||||
abstract HashSet<SysId> GetInternalAssociationAffiliateIdsOwner();
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// User Security.
|
||||
|
||||
public enum SecurityGroup { Standard, Super }
|
||||
/// <summary>
|
||||
/// Security Group codes - as set up during initialisation.
|
||||
@@ -49,9 +57,9 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.Core
|
||||
abstract String GetSecurityGroupCode(SecurityGroup group);
|
||||
|
||||
/// <summary>
|
||||
/// Get Affiliate Owner Ids for Internal Associations.
|
||||
/// Check whether User Account already exists, ie. Security Item with matching code/email.
|
||||
/// </summary>
|
||||
abstract HashSet<SysId> GetInternalAssociationAffiliateIdsOwner();
|
||||
abstract bool UserAccountExists(SbmRepositoryPopulationData.UserAccount userAccount);
|
||||
|
||||
/// <summary>
|
||||
/// Add User Account.
|
||||
|
||||
@@ -121,6 +121,11 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.Mgr.Control
|
||||
}
|
||||
|
||||
// Registration.
|
||||
if (errField.RepositoryContext != SacsHierarchyItem.ValidValue.Ignore && !IsValidValue(data.RepositoryContext, "context", (long)SbmDbDfn_Control.GetColTextLen(SbmDbDfn_Control.ColumnIdx.AccountRegistration_RepositoryContext)))
|
||||
{
|
||||
errField.RepositoryContext = SacsHierarchyItem.ValidValue.Invalid;
|
||||
return false;
|
||||
}
|
||||
if (errField.RequestAccountAt != SacsHierarchyItem.ValidValue.Ignore && !DateUtil.IsValid(data.RequestAccountAt))
|
||||
{
|
||||
errField.AccountPasswordSalt = SacsHierarchyItem.ValidValue.Invalid;
|
||||
|
||||
@@ -49,12 +49,12 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.Mgr.Control
|
||||
prmRepository.StatusCat = SbmcRepository.StatusCat.Any;
|
||||
return GetRepository(prmRepository);
|
||||
}
|
||||
public SbmcRepository GetRepositoryByContext(String context)
|
||||
public SbmcRepository GetRepositoryByContext(String repositoryContext)
|
||||
{
|
||||
ClearErrorState();
|
||||
if (StringUtil.IsBlank(context)) return null;
|
||||
if (StringUtil.IsBlank(repositoryContext)) return null;
|
||||
SbmcRepository.Params prmRepository = new SbmcRepository.Params();
|
||||
prmRepository.ContextsIncluded.Add(context);
|
||||
prmRepository.ContextsIncluded.Add(repositoryContext);
|
||||
prmRepository.StatusCat = SbmcRepository.StatusCat.Any;
|
||||
return GetRepository(prmRepository);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user