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);
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ using System.Data.Common;
|
||||
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.Dbas.Internal.Control
|
||||
{
|
||||
@@ -26,7 +26,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Dbas.Internal.Control
|
||||
public ColumnDataString _LastName { get; } = new ColumnDataString("LastName");
|
||||
public ColumnDataString _PhoneMain { get; } = new ColumnDataString("PhoneMain");
|
||||
public ColumnDataString _PhoneAlt { get; } = new ColumnDataString("PhoneAlt");
|
||||
public ColumnDataString _InstanceContext { get; } = new ColumnDataString("InstanceContext");
|
||||
public ColumnDataString _RepositoryContext { get; } = new ColumnDataString("RepositoryContext");
|
||||
public ColumnDataDateTime _RequestAccountAt { get; } = new ColumnDataDateTime("RequestAccountAt");
|
||||
public ColumnDataGuid _RegisterAccountToken { get; } = new ColumnDataGuid("RegisterAccountToken");
|
||||
public ColumnDataDateTimeNullable _RegisterAccountAt { get; } = new ColumnDataDateTimeNullable("RegisterAccountAt");
|
||||
@@ -53,7 +53,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Dbas.Internal.Control
|
||||
"LastName",
|
||||
"PhoneMain",
|
||||
"PhoneAlt",
|
||||
"InstanceContext",
|
||||
"RepositoryContext",
|
||||
"RequestAccountAt",
|
||||
"RegisterAccountToken",
|
||||
"RegisterAccountAt",
|
||||
@@ -114,7 +114,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Dbas.Internal.Control
|
||||
public String _LastName { get { return Cols._LastName.Value; } set { Cols._LastName.Value = value; } }
|
||||
public String _PhoneMain { get { return Cols._PhoneMain.Value; } set { Cols._PhoneMain.Value = value; } }
|
||||
public String _PhoneAlt { get { return Cols._PhoneAlt.Value; } set { Cols._PhoneAlt.Value = value; } }
|
||||
public String _InstanceContext { get { return Cols._InstanceContext.Value; } set { Cols._InstanceContext.Value = value; } }
|
||||
public String _RepositoryContext { get { return Cols._RepositoryContext.Value; } set { Cols._RepositoryContext.Value = value; } }
|
||||
public DateTime _RequestAccountAt { get { return Cols._RequestAccountAt.Value; } set { Cols._RequestAccountAt.Value = value; } }
|
||||
public Guid _RegisterAccountToken { get { return Cols._RegisterAccountToken.Value; } set { Cols._RegisterAccountToken.Value = value; } }
|
||||
public DateTime? _RegisterAccountAt { get { return Cols._RegisterAccountAt.Value; } set { Cols._RegisterAccountAt.Value = value; } }
|
||||
@@ -157,7 +157,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Dbas.Internal.Control
|
||||
_LastName = GetFieldString(dbDataReader, "LastName", _LastName);
|
||||
_PhoneMain = GetFieldString(dbDataReader, "PhoneMain", _PhoneMain);
|
||||
_PhoneAlt = GetFieldString(dbDataReader, "PhoneAlt", _PhoneAlt);
|
||||
_InstanceContext = GetFieldString(dbDataReader, "InstanceContext", _InstanceContext);
|
||||
_RepositoryContext = GetFieldString(dbDataReader, "RepositoryContext", _RepositoryContext);
|
||||
_RequestAccountAt = GetFieldDateTime(dbDataReader, "RequestAccountAt", _RequestAccountAt);
|
||||
_RegisterAccountToken = GetFieldGuid(dbDataReader, "RegisterAccountToken", _RegisterAccountToken);
|
||||
_RegisterAccountAt = GetFieldDateTimeNullable(dbDataReader, "RegisterAccountAt", _RegisterAccountAt);
|
||||
@@ -198,7 +198,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Dbas.Internal.Control
|
||||
if (columnNames.ContainsCI("LastName")) AddCommandParameter(dbCommand, "@LastName", _LastName);
|
||||
if (columnNames.ContainsCI("PhoneMain")) AddCommandParameter(dbCommand, "@PhoneMain", _PhoneMain);
|
||||
if (columnNames.ContainsCI("PhoneAlt")) AddCommandParameter(dbCommand, "@PhoneAlt", _PhoneAlt);
|
||||
if (columnNames.ContainsCI("InstanceContext")) AddCommandParameter(dbCommand, "@InstanceContext", _InstanceContext);
|
||||
if (columnNames.ContainsCI("RepositoryContext")) AddCommandParameter(dbCommand, "@RepositoryContext", _RepositoryContext);
|
||||
if (columnNames.ContainsCI("RequestAccountAt")) AddCommandParameter(dbCommand, "@RequestAccountAt", _RequestAccountAt);
|
||||
if (columnNames.ContainsCI("RegisterAccountToken")) AddCommandParameter(dbCommand, "@RegisterAccountToken", _RegisterAccountToken);
|
||||
if (columnNames.ContainsCI("RegisterAccountAt")) AddCommandParameter(dbCommand, "@RegisterAccountAt", _RegisterAccountAt);
|
||||
@@ -259,7 +259,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Dbas.Internal.Control
|
||||
if (columnNames.ContainsCI("LastName")) AddCommandParameter(dbCommand, "@LastName", _LastName);
|
||||
if (columnNames.ContainsCI("PhoneMain")) AddCommandParameter(dbCommand, "@PhoneMain", _PhoneMain);
|
||||
if (columnNames.ContainsCI("PhoneAlt")) AddCommandParameter(dbCommand, "@PhoneAlt", _PhoneAlt);
|
||||
if (columnNames.ContainsCI("InstanceContext")) AddCommandParameter(dbCommand, "@InstanceContext", _InstanceContext);
|
||||
if (columnNames.ContainsCI("RepositoryContext")) AddCommandParameter(dbCommand, "@RepositoryContext", _RepositoryContext);
|
||||
if (columnNames.ContainsCI("RequestAccountAt")) AddCommandParameter(dbCommand, "@RequestAccountAt", _RequestAccountAt);
|
||||
if (columnNames.ContainsCI("RegisterAccountToken")) AddCommandParameter(dbCommand, "@RegisterAccountToken", _RegisterAccountToken);
|
||||
if (columnNames.ContainsCI("RegisterAccountAt")) AddCommandParameter(dbCommand, "@RegisterAccountAt", _RegisterAccountAt);
|
||||
|
||||
@@ -10,7 +10,7 @@ using System.Data.Common;
|
||||
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.Dbas.Internal.Control
|
||||
{
|
||||
|
||||
@@ -10,7 +10,7 @@ using System.Data.Common;
|
||||
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.Dbas.Internal.Control
|
||||
{
|
||||
|
||||
@@ -10,7 +10,7 @@ using System.Data.Common;
|
||||
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.Dbas.Internal.Control
|
||||
{
|
||||
|
||||
@@ -10,7 +10,7 @@ using System.Data.Common;
|
||||
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.Dbas.Internal.Control
|
||||
{
|
||||
|
||||
@@ -207,7 +207,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Dbas.Mgr
|
||||
dbAccountRegistration._PhoneMain = accountRegistration.PhoneMain;
|
||||
dbAccountRegistration._PhoneAlt = accountRegistration.PhoneAlt;
|
||||
// Registration.
|
||||
dbAccountRegistration._InstanceContext = accountRegistration.InstanceContext;
|
||||
dbAccountRegistration._RepositoryContext = accountRegistration.RepositoryContext;
|
||||
dbAccountRegistration._RequestAccountAt = accountRegistration.RequestAccountAt;
|
||||
dbAccountRegistration._RegisterAccountToken = accountRegistration.RegisterAccountToken;
|
||||
dbAccountRegistration._RegisterAccountAt = accountRegistration.RegisterAccountAt;
|
||||
@@ -238,7 +238,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Dbas.Mgr
|
||||
accountRegistration.PhoneMain = dbAccountRegistration._PhoneMain;
|
||||
accountRegistration.PhoneAlt = dbAccountRegistration._PhoneAlt;
|
||||
// Registration.
|
||||
accountRegistration.InstanceContext = dbAccountRegistration._InstanceContext;
|
||||
accountRegistration.RepositoryContext = dbAccountRegistration._RepositoryContext;
|
||||
accountRegistration.RequestAccountAt = dbAccountRegistration._RequestAccountAt;
|
||||
//accountRegistration.RegisterAccountToken = dbAccountRegistration._RegisterAccountToken;
|
||||
accountRegistration.RegisterAccountAt = dbAccountRegistration._RegisterAccountAt;
|
||||
@@ -304,8 +304,8 @@ namespace Sarand.BusinessMgr.Net.Standard.Dbas.Mgr
|
||||
break;
|
||||
|
||||
// Registration.
|
||||
case SbmcAccountRegistration.Column.InstanceContext:
|
||||
SetAccountRegistrationColDfn(columnDfn, "Instance context", 100, SbmDbDfn_Control.ColumnIdx.AccountRegistration_InstanceContext);
|
||||
case SbmcAccountRegistration.Column.RepositoryContext:
|
||||
SetAccountRegistrationColDfn(columnDfn, "Repository context", 100, SbmDbDfn_Control.ColumnIdx.AccountRegistration_RepositoryContext);
|
||||
columnDfn.ReadOnly = true;
|
||||
break;
|
||||
case SbmcAccountRegistration.Column.RequestAccountAt:
|
||||
@@ -539,8 +539,8 @@ namespace Sarand.BusinessMgr.Net.Standard.Dbas.Mgr
|
||||
query.Columns.Add(SbmDbDfn_Control.GetColumnNameQual(SbmDbDfn_Control.ColumnIdx.AccountRegistration_PhoneAlt, aliasAccountRegistration));
|
||||
|
||||
// Registration.
|
||||
if (columns.HasId(SbmcAccountRegistration.Column.InstanceContext))
|
||||
query.Columns.Add(SbmDbDfn_Control.GetColumnNameQual(SbmDbDfn_Control.ColumnIdx.AccountRegistration_InstanceContext, aliasAccountRegistration));
|
||||
if (columns.HasId(SbmcAccountRegistration.Column.RepositoryContext))
|
||||
query.Columns.Add(SbmDbDfn_Control.GetColumnNameQual(SbmDbDfn_Control.ColumnIdx.AccountRegistration_RepositoryContext, aliasAccountRegistration));
|
||||
if (columns.HasId(SbmcAccountRegistration.Column.RequestAccountAt))
|
||||
query.Columns.Add(SbmDbDfn_Control.GetColumnNameQual(SbmDbDfn_Control.ColumnIdx.AccountRegistration_RequestAccountAt, aliasAccountRegistration));
|
||||
if (columns.HasId(SbmcAccountRegistration.Column.RegisterAccountToken))
|
||||
|
||||
@@ -112,7 +112,7 @@
|
||||
<Schema>dbo</Schema>
|
||||
<Table>AccountRegistration</Table>
|
||||
<Pos>7</Pos>
|
||||
<Name>InstanceContext</Name>
|
||||
<Name>RepositoryContext</Name>
|
||||
<DataType>VarChar</DataType>
|
||||
<DataTypeName />
|
||||
<DataTypeNative>-9</DataTypeNative>
|
||||
@@ -375,7 +375,7 @@
|
||||
<Clustered>false</Clustered>
|
||||
<Nullable>false</Nullable>
|
||||
<Pages>1</Pages>
|
||||
<UniqueValues>1</UniqueValues>
|
||||
<UniqueValues>3</UniqueValues>
|
||||
<HasColumns>false</HasColumns>
|
||||
<Columns>
|
||||
<DbDfnIndexColumn>
|
||||
@@ -1386,7 +1386,7 @@
|
||||
<Clustered>false</Clustered>
|
||||
<Nullable>false</Nullable>
|
||||
<Pages>1</Pages>
|
||||
<UniqueValues>7</UniqueValues>
|
||||
<UniqueValues>8</UniqueValues>
|
||||
<HasColumns>false</HasColumns>
|
||||
<Columns>
|
||||
<DbDfnIndexColumn>
|
||||
|
||||
@@ -71,12 +71,12 @@ namespace Sarand.BusinessMgr.Test.Web.Control.App
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Core Instance Console.
|
||||
protected SbmCoreInstanceConsole_Control CreateCoreInstanceConsole(String instanceContext)
|
||||
protected SbmCoreInstanceConsole_Control CreateCoreInstanceConsole(String repositoryContext)
|
||||
{
|
||||
// Record disposable items as they are created so all can be disposed when needed.
|
||||
using (DisposableCollection<SacsDisposable> disposables = new DisposableCollection<SacsDisposable>())
|
||||
{
|
||||
SbmcRepository repository = Internals_Control.ControlInstanceMgr.GetRepositoryByContext(instanceContext);
|
||||
SbmcRepository repository = Internals_Control.ControlInstanceMgr.GetRepositoryByContext(repositoryContext);
|
||||
disposables.Add(repository);
|
||||
return new SbmCoreInstanceConsole_Control(SessionData_Control, repository);
|
||||
}
|
||||
|
||||
@@ -70,9 +70,9 @@ namespace Sarand.BusinessMgr.Test.Web.Portal.App
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Session Context.
|
||||
protected SbmSessionContext GetCoreSessionContext(String instanceContext)
|
||||
protected SbmSessionContext GetCoreSessionContext(String repositoryContext)
|
||||
{
|
||||
return AppPortal.GetControlSessionContextByRepositoryContext(instanceContext);
|
||||
return AppPortal.GetControlSessionContextByRepositoryContext(repositoryContext);
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
|
||||
@@ -34,7 +34,7 @@ namespace Sarand.BusinessMgr.Web.Control.App
|
||||
{
|
||||
//-------------------------------------------------------------------
|
||||
// Processing indicators.
|
||||
private bool generateDatabaseDefinitions_Control = false;
|
||||
private bool generateDatabaseDefinitions_Control = true;
|
||||
private bool generateDatabaseDefinitions_BusMgr = false;
|
||||
private bool generateDatabaseDefinitions_Security = false;
|
||||
private bool generateDatabaseDefinitions_CodeTypes = false;
|
||||
|
||||
@@ -113,8 +113,8 @@ namespace Sarand.BusinessMgr.Web.Control.App
|
||||
// Common filter.
|
||||
public class FilterData
|
||||
{
|
||||
/// <summary>Id for currently selected Association.</summary>
|
||||
public String InstanceContext { get; set; }
|
||||
/// <summary>Currently selected Repository Context</summary>
|
||||
public String RepositoryContext { get; set; }
|
||||
}
|
||||
/// <summary>
|
||||
/// Common filter properties.
|
||||
|
||||
@@ -329,6 +329,7 @@ namespace Sarand.BusinessMgr.Web.Control.Controllers.Account
|
||||
SaLogger.Warn($"{SysUtil.Fn} Failed to insert user: " + ControlAccountMgr.ErrorStateMessage);
|
||||
return Json(responseData.SetMessage(messageTitle, Localiser["msg.error.item.insert.failed"] + "\n\n" + ControlAccountMgr.ErrorStateMessage));
|
||||
}
|
||||
responseData.SetNotification(messageTitle, Localiser["msg.item.created"]);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -337,6 +338,7 @@ namespace Sarand.BusinessMgr.Web.Control.Controllers.Account
|
||||
SaLogger.Warn($"{SysUtil.Fn} Failed to update user [Id:" + SysId.ToString(user.Id) + "]: " + ControlAccountMgr.ErrorStateMessage);
|
||||
return Json(responseData.SetMessage(messageTitle, Localiser["msg.error.item.update.failed"] + "\n\n" + ControlAccountMgr.ErrorStateMessage));
|
||||
}
|
||||
responseData.SetNotification(messageTitle, Localiser["msg.item.updated"]);
|
||||
}
|
||||
|
||||
// Construct response.
|
||||
|
||||
@@ -264,6 +264,7 @@ namespace Sarand.BusinessMgr.Web.Control.Controllers.Instance
|
||||
SaLogger.Warn($"{SysUtil.Fn} Failed to insert owner: " + ControlInstanceMgr.ErrorStateMessage);
|
||||
return Json(responseData.SetMessage(messageTitle, Localiser["msg.error.item.insert.failed"] + "\n\n" + ControlInstanceMgr.ErrorStateMessage));
|
||||
}
|
||||
responseData.SetNotification(messageTitle, Localiser["msg.item.created"]);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -272,6 +273,7 @@ namespace Sarand.BusinessMgr.Web.Control.Controllers.Instance
|
||||
SaLogger.Warn($"{SysUtil.Fn} Failed to update owner [Id:" + SysId.ToString(owner.Id) + "]: " + ControlInstanceMgr.ErrorStateMessage);
|
||||
return Json(responseData.SetMessage(messageTitle, Localiser["msg.error.item.update.failed"] + "\n\n" + ControlInstanceMgr.ErrorStateMessage));
|
||||
}
|
||||
responseData.SetNotification(messageTitle, Localiser["msg.item.updated"]);
|
||||
}
|
||||
|
||||
// Construct response.
|
||||
|
||||
@@ -362,6 +362,7 @@ namespace Sarand.BusinessMgr.Web.Control.Controllers.Instance
|
||||
SaLogger.Warn($"{SysUtil.Fn} Failed to insert repository: " + ControlInstanceMgr.ErrorStateMessage);
|
||||
return Json(responseData.SetMessage(messageTitle, Localiser["msg.error.item.insert.failed"] + "\n\n" + ControlInstanceMgr.ErrorStateMessage));
|
||||
}
|
||||
responseData.SetNotification(messageTitle, Localiser["msg.item.created"]);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -370,6 +371,7 @@ namespace Sarand.BusinessMgr.Web.Control.Controllers.Instance
|
||||
SaLogger.Warn($"{SysUtil.Fn} Failed to update repository [Id:" + SysId.ToString(repository.Id) + "]: " + ControlInstanceMgr.ErrorStateMessage);
|
||||
return Json(responseData.SetMessage(messageTitle, Localiser["msg.error.item.update.failed"] + "\n\n" + ControlInstanceMgr.ErrorStateMessage));
|
||||
}
|
||||
responseData.SetNotification(messageTitle, Localiser["msg.item.updated"]);
|
||||
}
|
||||
|
||||
// Construct response.
|
||||
|
||||
+4
-4
@@ -63,10 +63,10 @@ namespace Sarand.BusinessMgr.Web.Control.Controllers.Instance
|
||||
{
|
||||
|
||||
// Validate Repository.
|
||||
SessionData_Control.Profile.Filter.InstanceContext = model.DatabaseFilter.Context;
|
||||
SessionData_Control.Profile.Filter.RepositoryContext = model.DatabaseFilter.Context;
|
||||
if (StringUtil.IsBlank(model.DatabaseFilter.Context))
|
||||
{
|
||||
SaLogger.Warn($"{SysUtil.Fn} Instance Context not supplied.");
|
||||
SaLogger.Warn($"{SysUtil.Fn} Repository Context not supplied.");
|
||||
return Json(responseData.SetMessage(messageTitle, Localiser["msg.error.system"]));
|
||||
}
|
||||
SbmcRepository repository = ControlInstanceMgr.GetRepositoryByContext(model.DatabaseFilter.Context);
|
||||
@@ -169,10 +169,10 @@ namespace Sarand.BusinessMgr.Web.Control.Controllers.Instance
|
||||
{
|
||||
|
||||
// Validate Repository.
|
||||
SessionData_Control.Profile.Filter.InstanceContext = model.DatabaseFilter.Context;
|
||||
SessionData_Control.Profile.Filter.RepositoryContext = model.DatabaseFilter.Context;
|
||||
if (StringUtil.IsBlank(model.DatabaseFilter.Context))
|
||||
{
|
||||
SaLogger.Warn($"{SysUtil.Fn} Instance Context not supplied.");
|
||||
SaLogger.Warn($"{SysUtil.Fn} Repository Context not supplied.");
|
||||
return Json(responseData.SetMessage(messageTitle, Localiser["msg.error.system"]));
|
||||
}
|
||||
SbmcRepository repository = ControlInstanceMgr.GetRepositoryByContext(model.DatabaseFilter.Context);
|
||||
|
||||
+2
-2
@@ -36,7 +36,7 @@ namespace Sarand.BusinessMgr.Web.Control.Controllers.Instance
|
||||
|
||||
// Refresh model.
|
||||
RefreshModel(model);
|
||||
model.DatabaseFilter.Context = SessionData_Control.Profile.Filter.InstanceContext;
|
||||
model.DatabaseFilter.Context = SessionData_Control.Profile.Filter.RepositoryContext;
|
||||
|
||||
// Core Database view.
|
||||
return View("Views/Instance/Repository/Database/Tables.cshtml", model);
|
||||
@@ -59,7 +59,7 @@ namespace Sarand.BusinessMgr.Web.Control.Controllers.Instance
|
||||
// Refresh model.
|
||||
Model_System model = new Model_System(Localiser);
|
||||
RefreshModel(model);
|
||||
model.DatabaseFilter.Instance = SessionData_Control.Profile.Filter.InstanceContext;
|
||||
model.DatabaseFilter.Context = SessionData_Control.Profile.Filter.RepositoryContext;
|
||||
|
||||
// Core Database view.
|
||||
return View("Views/Instance/Repository/Database/Schema.cshtml", model);
|
||||
|
||||
@@ -414,6 +414,7 @@ namespace Sarand.BusinessMgr.Web.Control.Controllers.Param
|
||||
SaLogger.Warn($"{SysUtil.Fn} Failed to insert Item Param: " + ControlItemMgr.ErrorStateMessage);
|
||||
return Json(responseData.SetMessage(messageTitle, Localiser["msg.error.item.insert.failed"] + "\n\n" + ControlItemMgr.ErrorStateMessage));
|
||||
}
|
||||
responseData.SetNotification(messageTitle, Localiser["msg.item.created"]);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -422,6 +423,7 @@ namespace Sarand.BusinessMgr.Web.Control.Controllers.Param
|
||||
SaLogger.Warn($"{SysUtil.Fn} Failed to update Item Param [Id:" + SysId.ToString(itemParam.Id) + "]: " + ControlItemMgr.ErrorStateMessage);
|
||||
return Json(responseData.SetMessage(messageTitle, Localiser["msg.error.item.update.failed"] + "\n\n" + ControlItemMgr.ErrorStateMessage));
|
||||
}
|
||||
responseData.SetNotification(messageTitle, Localiser["msg.item.updated"]);
|
||||
}
|
||||
|
||||
// Construct response.
|
||||
|
||||
+3
-3
@@ -147,11 +147,11 @@ namespace Sarand.BusinessMgr.Web.Control.Controllers.System
|
||||
return null;
|
||||
}
|
||||
/// <summary>
|
||||
/// Get database by Instance Context.
|
||||
/// Get database by Repository Context.
|
||||
/// </summary>
|
||||
private ISacsDatabase GetDatabaseByContext(String instanceContext)
|
||||
private ISacsDatabase GetDatabaseByContext(String repositoryContext)
|
||||
{
|
||||
SbmcRepository repository = ControlInstanceMgr.GetRepositoryByContext(instanceContext);
|
||||
SbmcRepository repository = ControlInstanceMgr.GetRepositoryByContext(repositoryContext);
|
||||
if (repository != null)
|
||||
{
|
||||
SacsDatabaseConsole.OdbcConfig config = SbmCoreInstanceConsole_Dbas.GetRepositoryOdbcConfig(repository);
|
||||
|
||||
@@ -543,4 +543,10 @@
|
||||
<data name="caption.repository.database" xml:space="preserve">
|
||||
<value>Repository Database</value>
|
||||
</data>
|
||||
<data name="msg.item.updated" xml:space="preserve">
|
||||
<value>Item updated.</value>
|
||||
</data>
|
||||
<data name="msg.item.created" xml:space="preserve">
|
||||
<value>Item created.</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -93,11 +93,11 @@
|
||||
<body>
|
||||
|
||||
@* Header *@
|
||||
<header id="sbc-page-header">
|
||||
<header id="sbc-page-header" class="bg-white border-bottom">
|
||||
<div class="container">
|
||||
|
||||
@* Navigation bar *@
|
||||
<nav class="navbar navbar-expand-sm navbar-toggleable-sm navbar-light bg-white border-bottom">
|
||||
<div class="container">
|
||||
@* Navigation bar *@
|
||||
<nav class="navbar navbar-expand-sm navbar-toggleable-sm navbar-light">
|
||||
<a class="navbar-brand" asp-area="" asp-controller="Home" asp-action="Index">SBM Control</a>
|
||||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target=".navbar-collapse" aria-controls="navbarSupportedContent"
|
||||
aria-expanded="false" aria-label="Toggle navigation">
|
||||
@@ -170,13 +170,13 @@
|
||||
}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
</nav>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
@* Page body *@
|
||||
<div id="sbc-page-body">
|
||||
<main role="main" class="container pt-2 pb-2 fullheight">
|
||||
<main role="main" class="container fullheight">
|
||||
@RenderBody()
|
||||
</main>
|
||||
</div>
|
||||
|
||||
@@ -150,12 +150,21 @@ ul.nav.sbc-burger .dropdown:hover
|
||||
opacity: .75;
|
||||
}
|
||||
|
||||
.navbar-light .navbar-toggler-icon {
|
||||
background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3e%3cpath stroke='rgba(0, 0, 0, 0.8)' stroke-width='4' stroke-linecap='round' stroke-miterlimit='10' d='M4 6h22M4 14h22M4 22h22'/%3e%3c/svg%3e");
|
||||
}
|
||||
|
||||
ul.nav.sbc-burger.navbar-light .dropdown:hover
|
||||
{
|
||||
background-color: #f8f8f8;
|
||||
border-color: #606060;
|
||||
}
|
||||
|
||||
ul.nav.sbc-burger.navbar-dark .navbar-toggler-icon
|
||||
{
|
||||
background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3e%3cpath stroke='rgba(255, 255, 255, 1.0)' stroke-width='4' stroke-linecap='round' stroke-miterlimit='10' d='M4 6h22M4 14h22M4 22h22'/%3e%3c/svg%3e");
|
||||
}
|
||||
|
||||
ul.nav.sbc-burger.navbar-dark .dropdown:hover
|
||||
{
|
||||
border-color: #c0c0c0;
|
||||
|
||||
@@ -51,12 +51,12 @@ body
|
||||
{
|
||||
html
|
||||
{
|
||||
height: 100vh;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
body.sbc-layout-flex
|
||||
{
|
||||
height: 100vh;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
@@ -69,7 +69,18 @@ body
|
||||
}
|
||||
}
|
||||
|
||||
/* Responsive */
|
||||
/* Page layout */
|
||||
|
||||
#sbc-page-body
|
||||
{
|
||||
background-color: #f8ffff;
|
||||
}
|
||||
|
||||
#sbc-page-body main.container
|
||||
{
|
||||
position: relative;
|
||||
padding: 4px 4px;
|
||||
}
|
||||
|
||||
#sbc-page-body > .container, header > .container, footer > .container
|
||||
{
|
||||
@@ -106,13 +117,26 @@ body
|
||||
{
|
||||
}
|
||||
|
||||
a.navbar-brand
|
||||
.navbar
|
||||
{
|
||||
padding: 6px 2px;
|
||||
}
|
||||
|
||||
.navbar a.navbar-brand
|
||||
{
|
||||
padding-top: 0.3rem;
|
||||
padding-bottom: 0.1rem;
|
||||
white-space: normal;
|
||||
text-align: center;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
.navbar li.nav-item a.nav-link
|
||||
{
|
||||
padding-top: 0.3rem;
|
||||
padding-bottom: 0.1rem;
|
||||
}
|
||||
|
||||
.border-top
|
||||
{
|
||||
border-top: 1px solid #e5e5e5;
|
||||
@@ -145,7 +169,7 @@ button.accept-policy
|
||||
|
||||
#sbc-page-footer
|
||||
{
|
||||
padding: 4px 0;
|
||||
padding: 3px 0;
|
||||
}
|
||||
|
||||
#sbc-page-footer, #sbc-page-footer div
|
||||
@@ -250,11 +274,10 @@ a:focus
|
||||
#sbc-notification
|
||||
{
|
||||
display: none;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
right: 0;
|
||||
position: absolute;
|
||||
top: 7px;
|
||||
right: 48px;
|
||||
min-width: 180px;
|
||||
margin-right: 12px;
|
||||
z-index: 1000;
|
||||
border: 1px solid #808080;
|
||||
border-bottom-left-radius: 4px;
|
||||
|
||||
@@ -313,25 +313,21 @@
|
||||
win.clearTimeout(sbc.toNotification);
|
||||
var $win = $(win);
|
||||
var $not = $('#sbc-notification').hide();
|
||||
var $main = $('#sbc-page-body main');
|
||||
if (!$not.length)
|
||||
{
|
||||
$not = $('<div id="sbc-notification"><div class="content"><div class="heading"><div class="close" onclick="sbc.hideNotification()">✖</div><div class="title"></div></div><div class="message"></div></div></div>');
|
||||
$('body').append($not);
|
||||
($main.length ? $main : $('body')).append($not);
|
||||
}
|
||||
var $hdr = $('.heading', $not).css({ 'background-color': 'rgba(247,217,0,0.7)' });
|
||||
$('.title', $not).html(title);
|
||||
$('.message', $not).html(msg);
|
||||
var $bdy = $('#sbc-page-body');
|
||||
//sbc.debug(sbc.topMargin($bdy));
|
||||
var fbr = $bdy[0].getBoundingClientRect();
|
||||
var fn = function () { $hdr.delay(1500).animate({ backgroundColor: '#f0f0f0' }, 500); };
|
||||
$not.css({ 'top': Math.max(0, fbr.top - sbc.topMargin($bdy)), 'right': $win.width() - fbr.right }).slideDown(500, fn);
|
||||
$not.find('.title').html(title).end().find('.message').html(msg);
|
||||
$not.show(500, function () { $hdr.delay(1500).animate({ backgroundColor: '#f0f0f0' }, 500); });
|
||||
sbc.toNotification = setTimeout(sbc.hideNotification, 4000);
|
||||
}
|
||||
sbc.hideNotification = function ()
|
||||
{
|
||||
win.clearTimeout(sbc.toNotification);
|
||||
$('#sbc-notification').slideUp(500);
|
||||
$('#sbc-notification').hide(500);
|
||||
}
|
||||
sbc.doPleaseWait = function ()
|
||||
{
|
||||
|
||||
+10316
-7446
File diff suppressed because it is too large
Load Diff
@@ -336,8 +336,8 @@
|
||||
<data name="msg.item.deleted" xml:space="preserve">
|
||||
<value>Item deleted.</value>
|
||||
</data>
|
||||
<data name="msg.item.removed" xml:space="preserve">
|
||||
<value>Item removed.</value>
|
||||
<data name="msg.item.updated" xml:space="preserve">
|
||||
<value>Item updated.</value>
|
||||
</data>
|
||||
<data name="msg.item.updated" xml:space="preserve">
|
||||
<value>Item updated.</value>
|
||||
@@ -720,11 +720,11 @@
|
||||
<data name="label.count" xml:space="preserve">
|
||||
<value>Count</value>
|
||||
</data>
|
||||
<data name="caption.register.demo.account" xml:space="preserve">
|
||||
<value>Register Demo Account</value>
|
||||
<data name="caption.demo.account.register" xml:space="preserve">
|
||||
<value>Demo Account Registration</value>
|
||||
</data>
|
||||
<data name="caption.request.demo.account" xml:space="preserve">
|
||||
<value>Request Demo Account</value>
|
||||
<data name="caption.demo.account.request" xml:space="preserve">
|
||||
<value>Demo Account Request</value>
|
||||
</data>
|
||||
<data name="label.register" xml:space="preserve">
|
||||
<value>Register</value>
|
||||
|
||||
@@ -43,7 +43,7 @@ namespace Sarand.BusinessMgr.Web.Portal.Controllers.Home
|
||||
public IActionResult Ajax_DemoAccountRequest(Model_Demo model)
|
||||
{
|
||||
AjaxResponse_DemoAccountRequest responseData = new AjaxResponse_DemoAccountRequest(model);
|
||||
String messageTitle = Localiser["caption.request.demo.account"];
|
||||
String messageTitle = Localiser["caption.demo.account.request"];
|
||||
|
||||
// Validate session and referrer.
|
||||
if (ValidUserSession) return Json(responseData.SetMessage(messageTitle, Localiser["msg.error.system"]));
|
||||
@@ -59,6 +59,7 @@ namespace Sarand.BusinessMgr.Web.Portal.Controllers.Home
|
||||
if (accountRegistration == null)
|
||||
{
|
||||
accountRegistration = ControlAccountMgr.CreateAccountRegistration(model.EmailAddress, Guid.NewGuid());
|
||||
accountRegistration.RepositoryContext = Sbm.RepositoryContext_Demo;
|
||||
if (!ControlAccountMgr.InsertAccountRegistration(accountRegistration, new DbUpdateInfo(null, "Registration", SacsSystem.ComputerName)))
|
||||
{
|
||||
SaLogger.Warn($"{SysUtil.Fn} Failed to insert Account Registration - {ControlAccountMgr.ErrorStateMessage.TrimEnd('.')}.");
|
||||
@@ -83,7 +84,7 @@ namespace Sarand.BusinessMgr.Web.Portal.Controllers.Home
|
||||
SaEmailData emailData = new SaEmailData();
|
||||
emailData.Config = App.EmailConfig;
|
||||
emailData.AddressesTo.Add(model.EmailAddress);
|
||||
emailData.Subject = $"BusinessMgr - {Localiser["caption.register.demo.account"]}";
|
||||
emailData.Subject = $"BusinessMgr - {Localiser["caption.demo.account.request"]}";
|
||||
emailData.MessageBody = SbmResourceHelper.GetResourceText(SbmResourceHelper.TextResource.Email_DemoAccountRequest_Html);
|
||||
emailData.HtmlBody = true;
|
||||
emailConsole.ReplaceDynamicEmailBodyTags(emailData, null);
|
||||
@@ -116,7 +117,7 @@ namespace Sarand.BusinessMgr.Web.Portal.Controllers.Home
|
||||
public IActionResult Ajax_DemoAccountRegister(Model_Demo model)
|
||||
{
|
||||
AjaxResponse_DemoAccountRegister responseData = new AjaxResponse_DemoAccountRegister(model);
|
||||
String messageTitle = Localiser["caption.register.demo.account"];
|
||||
String messageTitle = Localiser["caption.demo.account.register"];
|
||||
|
||||
// Validate session and referrer.
|
||||
if (ValidUserSession) return Json(responseData.SetMessage(messageTitle, Localiser["msg.error.system"]));
|
||||
@@ -187,7 +188,8 @@ namespace Sarand.BusinessMgr.Web.Portal.Controllers.Home
|
||||
return Json(responseData.SetMessage(messageTitle, Localiser["msg.error.system"]));
|
||||
}
|
||||
|
||||
// Create User Account.
|
||||
|
||||
// Check that User Account doesn't already exist.
|
||||
SbmRepositoryPopulationData.UserAccount userAccount = new UserAccount()
|
||||
{
|
||||
AffiliateIdOwner = demoData.AffiliateIdOrganisation,
|
||||
@@ -199,6 +201,13 @@ namespace Sarand.BusinessMgr.Web.Portal.Controllers.Home
|
||||
Password = model.Password,
|
||||
SecurityGroupCode = demoInstanceConsole.GetSecurityGroupCode(Net.Standard.Base.Core.ISbmDemoInstanceConsole.SecurityGroup.Standard)
|
||||
};
|
||||
if (demoInstanceConsole.UserAccountExists(userAccount))
|
||||
{
|
||||
SaLogger.Warn($"{SysUtil.Fn} Demo User Account already exists. {model.EmailAddress}.");
|
||||
return Json(responseData.SetControlError(Model_Demo.GetFieldName(Model_Demo.ItemField.EmailAddress), Localiser["msg.validation.duplicate.value"]));
|
||||
}
|
||||
|
||||
// Create User Account.
|
||||
if (!SysId.IsValid(userAccount.AffiliateIdOwner))
|
||||
{
|
||||
// Owner Affiliate Id not populated as Demo Repository previously initlialised.
|
||||
@@ -216,6 +225,18 @@ namespace Sarand.BusinessMgr.Web.Portal.Controllers.Home
|
||||
return Json(responseData.SetMessage(messageTitle, Localiser["msg.error.system"]));
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------
|
||||
// Update Account Registration details.
|
||||
accountRegistration.FirstName = model.FirstName;
|
||||
accountRegistration.LastName = model.LastName;
|
||||
accountRegistration.RegisterAccountAt = DateTime.Now;
|
||||
accountRegistration.Status = SaStatus.Completed;
|
||||
if (!ControlAccountMgr.UpdateAccountRegistration(accountRegistration, DbUpdateInfo))
|
||||
{
|
||||
// Not critical but log problem.
|
||||
SaLogger.Warn($"{SysUtil.Fn} Failed to update Account Registration. {ControlAccountMgr.ErrorStateMessage.TrimEnd('.')}.");
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------
|
||||
// Construct email.
|
||||
SbmEmailConsole emailConsole = SbmApplication_Portal.Instance.CreateEmailConsole();
|
||||
@@ -224,7 +245,7 @@ namespace Sarand.BusinessMgr.Web.Portal.Controllers.Home
|
||||
SaEmailData emailData = new SaEmailData();
|
||||
emailData.Config = App.EmailConfig;
|
||||
emailData.AddressesTo.Add(model.EmailAddress);
|
||||
emailData.Subject = $"BusinessMgr - {Localiser["caption.register.demo.account"]}";
|
||||
emailData.Subject = $"BusinessMgr - {Localiser["caption.demo.account.register"]}";
|
||||
emailData.MessageBody = SbmResourceHelper.GetResourceText(SbmResourceHelper.TextResource.Email_DemoAccountRegister_Html);
|
||||
emailData.HtmlBody = true;
|
||||
emailConsole.ReplaceDynamicEmailBodyTags(emailData, null);
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
<div class="sbm-panel-form DemoRegister">
|
||||
|
||||
<div class="sbm-header"><div class="sbm-caption">@Localiser["caption.register.demo.account"]</div></div>
|
||||
<div class="sbm-header"><div class="sbm-caption">@Localiser["caption.demo.account.register"]</div></div>
|
||||
|
||||
<div class="sbm-content" style="max-height:none;">
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
<div class="sbm-panel-form DemoRequest">
|
||||
|
||||
<div class="sbm-header"><div class="sbm-caption">@Localiser["caption.request.demo.account"]</div></div>
|
||||
<div class="sbm-header"><div class="sbm-caption">@Localiser["caption.demo.account.request"]</div></div>
|
||||
|
||||
<div class="sbm-content" style="max-height:none;">
|
||||
|
||||
|
||||
@@ -161,12 +161,21 @@ ul.nav.sbm-burger .dropdown:hover
|
||||
opacity: .75;
|
||||
}
|
||||
|
||||
.navbar-light .navbar-toggler-icon {
|
||||
background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3e%3cpath stroke='rgba(0, 0, 0, 0.8)' stroke-width='4' stroke-linecap='round' stroke-miterlimit='10' d='M4 6h22M4 14h22M4 22h22'/%3e%3c/svg%3e");
|
||||
}
|
||||
|
||||
ul.nav.sbm-burger.navbar-light .dropdown:hover
|
||||
{
|
||||
background-color: #f8f8f8;
|
||||
border-color: #606060;
|
||||
}
|
||||
|
||||
ul.nav.sbm-burger.navbar-dark .navbar-toggler-icon
|
||||
{
|
||||
background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3e%3cpath stroke='rgba(255, 255, 255, 1.0)' stroke-width='4' stroke-linecap='round' stroke-miterlimit='10' d='M4 6h22M4 14h22M4 22h22'/%3e%3c/svg%3e");
|
||||
}
|
||||
|
||||
ul.nav.sbm-burger.navbar-dark .dropdown:hover
|
||||
{
|
||||
border-color: #c0c0c0;
|
||||
|
||||
@@ -34,12 +34,12 @@ body
|
||||
{
|
||||
html
|
||||
{
|
||||
height: 100vh;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
body.sbm-layout-flex
|
||||
{
|
||||
height: 100vh;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
@@ -259,10 +259,9 @@ a:focus
|
||||
{
|
||||
display: none;
|
||||
position: absolute;
|
||||
top: 2px;
|
||||
top: 7px;
|
||||
right: 48px;
|
||||
min-width: 180px;
|
||||
margin-top: 6px;
|
||||
z-index: 1000;
|
||||
border: 1px solid #808080;
|
||||
border-bottom-left-radius: 4px;
|
||||
|
||||
+10316
-7446
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user