Portal application - initial.

This commit is contained in:
2021-07-08 20:50:46 +01:00
parent 13c79a8da4
commit 01ae03ddfc
1208 changed files with 186342 additions and 1690 deletions
@@ -7,27 +7,23 @@ using Sarand.Net.Standard.Base.Procs;
namespace Sarand.BusinessMgr.Net.Standard.Base.Procs
{
//=======================================================================
public abstract class SbmReport_Base : SacsReport
public abstract class SbmReport_Base : SaReport_Base
{
//-------------------------------------------------------------------
// Configuration.
public new class Config : SacsReport.Config
public new class Config : SaReport_Base.Config
{
protected Config(SbmUserContext userContext, DbUpdateInfo dbUpdateInfo)
protected Config(SbmUserContext userContext)
{
UserContext = userContext;
DbUpdateInfo = dbUpdateInfo;
}
public SbmUserContext UserContext { get; }
public DbUpdateInfo DbUpdateInfo { get; }
}
//-------------------------------------------------------------------
// Data members.
private Config config;
private SbmAccountMgr accountMgr = null;
private SbmCommodityMgr commodityMgr = null;
private SbmTransactionMgr transactionMgr = null;
private SbmInternals internals = null;
//-------------------------------------------------------------------
// Construction.
@@ -39,44 +35,19 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.Procs
{
if (disposing)
{
if (accountMgr != null) accountMgr.Dispose();
if (commodityMgr != null) commodityMgr.Dispose();
if (transactionMgr != null) transactionMgr.Dispose();
if (internals != null) internals.Dispose();
}
base.Dispose(disposing);
}
//-------------------------------------------------------------------
// Properties.
protected SaCodeTypeConsole CodeTypeConsole { get { return SbmGlobals.Application.GetCodeTypeConsole(config.UserContext); } }
protected SbmAccountMgr AccountMgr
{
get
{
if (accountMgr == null)
accountMgr = SbmGlobals.System.CreateAccountMgr(config.UserContext);
return accountMgr;
}
}
protected SbmCommodityMgr CommodityMgr
{
get
{
if (commodityMgr == null)
commodityMgr = SbmGlobals.System.CreateCommodityMgr(config.UserContext);
return commodityMgr;
}
}
protected SbmTransactionMgr TransactionMgr
{
get
{
if (transactionMgr == null)
transactionMgr = SbmGlobals.System.CreateTransactionMgr(config.UserContext);
return transactionMgr;
}
}
protected DbUpdateInfo DbUpdateInfo { get { return config.DbUpdateInfo; } }
protected SbmInternals Internals { get { if (internals == null) internals = new SbmInternals(config.UserContext); return internals; } }
protected SaCodeTypeConsole CodeTypeConsole { get { return Internals.CodeTypeConsole; } }
protected SbmAccountMgr AccountMgr { get { return Internals.AccountMgr; } }
protected SbmCommodityMgr CommodityMgr { get { return Internals.CommodityMgr; } }
protected SbmTransactionMgr TransactionMgr { get { return Internals.TransactionMgr; } }
protected DbUpdateInfo DbUpdateInfo { get { return Internals.DbUpdateInfo; } }
//-------------------------------------------------------------------
}