General tidy.
This commit is contained in:
@@ -364,7 +364,6 @@ namespace Sarand.BusinessMgr.Net.Core.Procs.Interfaces
|
|||||||
//-------------------------------------------------------------------
|
//-------------------------------------------------------------------
|
||||||
private bool ExportCommodityData_Csv()
|
private bool ExportCommodityData_Csv()
|
||||||
{
|
{
|
||||||
String fn = this.GetFn("ExportCommodityData_Csv");
|
|
||||||
if (!OK) return false;
|
if (!OK) return false;
|
||||||
|
|
||||||
String progressPrefix = "Exporting data to CSV file";
|
String progressPrefix = "Exporting data to CSV file";
|
||||||
@@ -415,7 +414,7 @@ namespace Sarand.BusinessMgr.Net.Core.Procs.Interfaces
|
|||||||
}
|
}
|
||||||
catch (Exception exc)
|
catch (Exception exc)
|
||||||
{
|
{
|
||||||
SaLogger.Warn(fn + " " + ExceptionUtil.GetLogMessage(exc));
|
SaLogger.Warn($"{SysUtil.Fn} " + ExceptionUtil.GetLogMessage(exc));
|
||||||
return AddErrorMessage(ExceptionUtil.GetErrorStateMessage(exc));
|
return AddErrorMessage(ExceptionUtil.GetErrorStateMessage(exc));
|
||||||
}
|
}
|
||||||
return OK;
|
return OK;
|
||||||
@@ -426,7 +425,6 @@ namespace Sarand.BusinessMgr.Net.Core.Procs.Interfaces
|
|||||||
//-------------------------------------------------------------------
|
//-------------------------------------------------------------------
|
||||||
private bool ExportCommodityData_Excel()
|
private bool ExportCommodityData_Excel()
|
||||||
{
|
{
|
||||||
String fn = this.GetFn("ExportCommodityData_Excel");
|
|
||||||
if (!OK) return false;
|
if (!OK) return false;
|
||||||
|
|
||||||
String progressPrefix = "Exporting data to Excel";
|
String progressPrefix = "Exporting data to Excel";
|
||||||
@@ -488,7 +486,7 @@ namespace Sarand.BusinessMgr.Net.Core.Procs.Interfaces
|
|||||||
}
|
}
|
||||||
catch (Exception exc)
|
catch (Exception exc)
|
||||||
{
|
{
|
||||||
SaLogger.Warn(fn + " " + ExceptionUtil.GetLogMessage(exc));
|
SaLogger.Warn($"{SysUtil.Fn} " + ExceptionUtil.GetLogMessage(exc));
|
||||||
return AddErrorMessage(ExceptionUtil.GetErrorStateMessage(exc));
|
return AddErrorMessage(ExceptionUtil.GetErrorStateMessage(exc));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -62,7 +62,6 @@ namespace Sarand.BusinessMgr.Net.Core.Procs.Procs
|
|||||||
// Test connection.
|
// Test connection.
|
||||||
protected bool TestFtpConnection (FtpConfig ftpConfig)
|
protected bool TestFtpConnection (FtpConfig ftpConfig)
|
||||||
{
|
{
|
||||||
String fn = GetType().Name + ".TestFtpConnection";
|
|
||||||
WebResponse response = null;
|
WebResponse response = null;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@@ -75,12 +74,12 @@ namespace Sarand.BusinessMgr.Net.Core.Procs.Procs
|
|||||||
using (StreamReader reader = new StreamReader(responseStream))
|
using (StreamReader reader = new StreamReader(responseStream))
|
||||||
{
|
{
|
||||||
String responseData = reader.ReadToEnd();
|
String responseData = reader.ReadToEnd();
|
||||||
SaLogger.Debug(fn + ": Items in root: " + responseData.ReplaceAll("\r\n", ", "));
|
SaLogger.Debug($"{SysUtil.Fn} Items in root: " + responseData.ReplaceAll("\r\n", ", "));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception exc)
|
catch (Exception exc)
|
||||||
{
|
{
|
||||||
SaLogger.Warn(fn + " " + exc.GetType().Name + ": " + exc.Message, true);
|
SaLogger.Warn($"{SysUtil.Fn} " + exc.GetType().Name + ": " + exc.Message, true);
|
||||||
return AddErrorMessage("Unable to connect to FTP host");
|
return AddErrorMessage("Unable to connect to FTP host");
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
@@ -110,7 +109,6 @@ namespace Sarand.BusinessMgr.Net.Core.Procs.Procs
|
|||||||
//-------------------------------------------------------------------
|
//-------------------------------------------------------------------
|
||||||
protected bool FtpFolderExists (FtpConfig ftpConfig, String folder)
|
protected bool FtpFolderExists (FtpConfig ftpConfig, String folder)
|
||||||
{
|
{
|
||||||
String fn = GetType().Name + ".FtpFolderExists";
|
|
||||||
WebResponse response = null;
|
WebResponse response = null;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@@ -137,7 +135,7 @@ namespace Sarand.BusinessMgr.Net.Core.Procs.Procs
|
|||||||
}
|
}
|
||||||
catch (Exception exc)
|
catch (Exception exc)
|
||||||
{
|
{
|
||||||
SaLogger.Warn(fn + " " + exc.GetType().Name + ": " + exc.Message, true);
|
SaLogger.Warn($"{SysUtil.Fn} " + exc.GetType().Name + ": " + exc.Message, true);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
@@ -156,7 +154,6 @@ namespace Sarand.BusinessMgr.Net.Core.Procs.Procs
|
|||||||
/// <summary>Get list of items in remote FTP folder.</summary>
|
/// <summary>Get list of items in remote FTP folder.</summary>
|
||||||
protected List<FtpUtil.FtpDirectoryItem> GetFtpItems (FtpConfig ftpConfig, String folder)
|
protected List<FtpUtil.FtpDirectoryItem> GetFtpItems (FtpConfig ftpConfig, String folder)
|
||||||
{
|
{
|
||||||
String fn = this.GetType().Name + ".GetFtpItems";
|
|
||||||
List<FtpUtil.FtpDirectoryItem> files = new List<FtpUtil.FtpDirectoryItem>();
|
List<FtpUtil.FtpDirectoryItem> files = new List<FtpUtil.FtpDirectoryItem>();
|
||||||
WebResponse response = null;
|
WebResponse response = null;
|
||||||
try
|
try
|
||||||
@@ -183,7 +180,7 @@ namespace Sarand.BusinessMgr.Net.Core.Procs.Procs
|
|||||||
}
|
}
|
||||||
catch (Exception exc)
|
catch (Exception exc)
|
||||||
{
|
{
|
||||||
SaLogger.Warn(fn + " " + exc.GetType().Name + ": " + exc.Message, true);
|
SaLogger.Warn($"{SysUtil.Fn} " + exc.GetType().Name + ": " + exc.Message, true);
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
@@ -195,7 +192,6 @@ namespace Sarand.BusinessMgr.Net.Core.Procs.Procs
|
|||||||
//-------------------------------------------------------------------
|
//-------------------------------------------------------------------
|
||||||
protected String GetFtpFileData (FtpConfig ftpConfig, String folder, String filename)
|
protected String GetFtpFileData (FtpConfig ftpConfig, String folder, String filename)
|
||||||
{
|
{
|
||||||
String fn = GetType() + ".GetFtpFileData";
|
|
||||||
WebClient ftpClient = null;
|
WebClient ftpClient = null;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@@ -206,7 +202,7 @@ namespace Sarand.BusinessMgr.Net.Core.Procs.Procs
|
|||||||
}
|
}
|
||||||
catch (Exception exc)
|
catch (Exception exc)
|
||||||
{
|
{
|
||||||
SaLogger.Warn(fn + " " + exc.GetType().Name + ": " + exc.Message, true);
|
SaLogger.Warn($"{SysUtil.Fn} " + exc.GetType().Name + ": " + exc.Message, true);
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
@@ -218,7 +214,6 @@ namespace Sarand.BusinessMgr.Net.Core.Procs.Procs
|
|||||||
//-------------------------------------------------------------------
|
//-------------------------------------------------------------------
|
||||||
protected bool WriteDataToFtpFile (FtpConfig ftpConfig, String folder, String filename, String data)
|
protected bool WriteDataToFtpFile (FtpConfig ftpConfig, String folder, String filename, String data)
|
||||||
{
|
{
|
||||||
String fn = GetType() + ".WriteDataToFtpFile";
|
|
||||||
bool dataWrittenToFile = false;
|
bool dataWrittenToFile = false;
|
||||||
FtpWebResponse response = null;
|
FtpWebResponse response = null;
|
||||||
try
|
try
|
||||||
@@ -235,7 +230,7 @@ namespace Sarand.BusinessMgr.Net.Core.Procs.Procs
|
|||||||
}
|
}
|
||||||
catch (Exception exc)
|
catch (Exception exc)
|
||||||
{
|
{
|
||||||
SaLogger.Warn(fn + " " + exc.GetType().Name + ": " + exc.Message, true);
|
SaLogger.Warn($"{SysUtil.Fn} " + exc.GetType().Name + ": " + exc.Message, true);
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
@@ -247,7 +242,6 @@ namespace Sarand.BusinessMgr.Net.Core.Procs.Procs
|
|||||||
//-------------------------------------------------------------------
|
//-------------------------------------------------------------------
|
||||||
protected bool DeleteFtpFile (FtpConfig ftpConfig, String folder, String filename)
|
protected bool DeleteFtpFile (FtpConfig ftpConfig, String folder, String filename)
|
||||||
{
|
{
|
||||||
String fn = GetType() + ".DeleteFtpData";
|
|
||||||
bool fileDeleted = false;
|
bool fileDeleted = false;
|
||||||
FtpWebResponse response = null;
|
FtpWebResponse response = null;
|
||||||
try
|
try
|
||||||
@@ -261,7 +255,7 @@ namespace Sarand.BusinessMgr.Net.Core.Procs.Procs
|
|||||||
}
|
}
|
||||||
catch (Exception exc)
|
catch (Exception exc)
|
||||||
{
|
{
|
||||||
SaLogger.Warn(fn + " " + exc.GetType().Name + ": " + exc.Message, true);
|
SaLogger.Warn($"{SysUtil.Fn} " + exc.GetType().Name + ": " + exc.Message, true);
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -272,7 +272,6 @@ namespace Sarand.BusinessMgr.Net.Core.Procs.Procs
|
|||||||
private bool ExportData()
|
private bool ExportData()
|
||||||
{
|
{
|
||||||
if (!OK) return false;
|
if (!OK) return false;
|
||||||
String fn = this.GetFn("ExportData");
|
|
||||||
String progressPrefix = "Preparing worksheet";
|
String progressPrefix = "Preparing worksheet";
|
||||||
|
|
||||||
//String saveFolder = ""; //GetOption_SaveFolder();
|
//String saveFolder = ""; //GetOption_SaveFolder();
|
||||||
@@ -314,7 +313,7 @@ namespace Sarand.BusinessMgr.Net.Core.Procs.Procs
|
|||||||
}
|
}
|
||||||
catch (Exception exc)
|
catch (Exception exc)
|
||||||
{
|
{
|
||||||
SaLogger.Error(fn + " " + ExceptionUtil.GetLogMessage(exc));
|
SaLogger.Error($"{SysUtil.Fn} " + ExceptionUtil.GetLogMessage(exc));
|
||||||
return AddErrorMessage(exc.GetType().Name + " exporting data to Excel.");
|
return AddErrorMessage(exc.GetType().Name + " exporting data to Excel.");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -587,7 +586,6 @@ namespace Sarand.BusinessMgr.Net.Core.Procs.Procs
|
|||||||
private bool ExportCommoditiesToExcel(SaMsSpreadsheet spreadsheet)
|
private bool ExportCommoditiesToExcel(SaMsSpreadsheet spreadsheet)
|
||||||
{
|
{
|
||||||
if (!OK) return false;
|
if (!OK) return false;
|
||||||
String fn = this.GetFn("ExportCommoditiesToExcel");
|
|
||||||
String progressPrefix = "Exporting commodities";
|
String progressPrefix = "Exporting commodities";
|
||||||
SetProgressInfo(progressPrefix + " - Preparing data");
|
SetProgressInfo(progressPrefix + " - Preparing data");
|
||||||
|
|
||||||
|
|||||||
@@ -233,8 +233,7 @@ namespace Sarand.BusinessMgr.Net.Core.Procs.Reports
|
|||||||
//-------------------------------------------------------------------
|
//-------------------------------------------------------------------
|
||||||
public virtual void BeginPrint(PrintAction printAction, int pageNumberFrom = 0, int pageNumberTo = 0)
|
public virtual void BeginPrint(PrintAction printAction, int pageNumberFrom = 0, int pageNumberTo = 0)
|
||||||
{
|
{
|
||||||
String fn = GetType().Name + ".BeginPrint";
|
if (DebugMode) SaLogger.Debug($"{SysUtil.Fn} PrintAction: " + printAction + ". Page range: " + pageNumberFrom + "-" + pageNumberTo + ". Page count: " + PageCount);
|
||||||
if (DebugMode) SaLogger.Debug(fn + " PrintAction: " + printAction + ". Page range: " + pageNumberFrom + "-" + pageNumberTo + ". Page count: " + PageCount);
|
|
||||||
PageNumberFrom = PageNumberFrom;
|
PageNumberFrom = PageNumberFrom;
|
||||||
PageNumberTo = pageNumberTo;
|
PageNumberTo = pageNumberTo;
|
||||||
PageNumber = Math.Max(1, pageNumberFrom) - 1;
|
PageNumber = Math.Max(1, pageNumberFrom) - 1;
|
||||||
@@ -246,7 +245,6 @@ namespace Sarand.BusinessMgr.Net.Core.Procs.Reports
|
|||||||
public virtual void QueryPageSettings(PageSettings pageSettings, PrintAction printAction) { }
|
public virtual void QueryPageSettings(PageSettings pageSettings, PrintAction printAction) { }
|
||||||
public PrintPageResult PrintPage(Graphics graphics, PageSettings pageSettings, Rectangle pageBounds, Rectangle marginBounds)
|
public PrintPageResult PrintPage(Graphics graphics, PageSettings pageSettings, Rectangle pageBounds, Rectangle marginBounds)
|
||||||
{
|
{
|
||||||
String fn = GetType().Name + ".PrintPage";
|
|
||||||
PageNumber++;
|
PageNumber++;
|
||||||
|
|
||||||
// Configure graphics for printing document.
|
// Configure graphics for printing document.
|
||||||
@@ -266,7 +264,7 @@ namespace Sarand.BusinessMgr.Net.Core.Procs.Reports
|
|||||||
cfg.PosY = marginBounds.Top;
|
cfg.PosY = marginBounds.Top;
|
||||||
cfg.PosYBodyTop = marginBounds.Top;
|
cfg.PosYBodyTop = marginBounds.Top;
|
||||||
cfg.PosYBodyBottom = marginBounds.Bottom;
|
cfg.PosYBodyBottom = marginBounds.Bottom;
|
||||||
if (DebugMode) SaLogger.Debug(fn + " Page: " + PageNumber);
|
if (DebugMode) SaLogger.Debug($"{SysUtil.Fn} Page: " + PageNumber);
|
||||||
SwitchPrintMode(PrintMode.Physical, cfg);
|
SwitchPrintMode(PrintMode.Physical, cfg);
|
||||||
|
|
||||||
// Log print configuration.
|
// Log print configuration.
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ namespace Sarand.BusinessMgr.Net.Core.Web.App
|
|||||||
LocalizedString text = MainProperties.GetString(key, parameters);
|
LocalizedString text = MainProperties.GetString(key, parameters);
|
||||||
if (text.ResourceNotFound)
|
if (text.ResourceNotFound)
|
||||||
{
|
{
|
||||||
SaLogger.Debug(GetType().Name + ".GetText Key not found: " + key);
|
SaLogger.Debug($"{SysUtil.Fn} Key not found: {key}");
|
||||||
// Look up key in alternative property files.
|
// Look up key in alternative property files.
|
||||||
foreach (IStringLocalizer properties in AlternativeProperties ?? new List<IStringLocalizer>())
|
foreach (IStringLocalizer properties in AlternativeProperties ?? new List<IStringLocalizer>())
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -110,8 +110,9 @@ namespace Sarand.BusinessMgr.Net.Core.Web.App
|
|||||||
LanguageViewLocationExpanderFormat.Suffix,
|
LanguageViewLocationExpanderFormat.Suffix,
|
||||||
opts => { opts.ResourcesPath = resourcesPath; })
|
opts => { opts.ResourcesPath = resourcesPath; })
|
||||||
.AddDataAnnotationsLocalization()
|
.AddDataAnnotationsLocalization()
|
||||||
// Ignore null values during object serisliation.
|
// Ignore null values during object serialiation.
|
||||||
.AddJsonOptions(options => { options.JsonSerializerOptions.IgnoreNullValues = true; });
|
.AddJsonOptions(options => { options.JsonSerializerOptions.DefaultIgnoreCondition = System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull; });
|
||||||
|
// Jun24 Was: .AddJsonOptions(options => { options.JsonSerializerOptions.IgnoreNullValues = true; });
|
||||||
|
|
||||||
// Configure localisation middleware.
|
// Configure localisation middleware.
|
||||||
config.services.Configure<RequestLocalizationOptions>
|
config.services.Configure<RequestLocalizationOptions>
|
||||||
|
|||||||
@@ -1,4 +1,7 @@
|
|||||||
using Sarand.BusinessMgr.Net.Standard.Base.App;
|
using Sarand.BusinessMgr.Net.Standard.Base.App;
|
||||||
|
using Sarand.BusinessMgr.Net.Standard.Base.Bus;
|
||||||
|
using Sarand.Net.Standard.Base.Bus;
|
||||||
|
using Sarand.Net.Standard.Base.Security;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
@@ -20,6 +23,13 @@ namespace Sarand.BusinessMgr.Net.Core.Web.App
|
|||||||
//-------------------------------------------------------------------
|
//-------------------------------------------------------------------
|
||||||
// Properties.
|
// Properties.
|
||||||
|
|
||||||
|
//-------------------------------------------------------------------
|
||||||
|
// Modify properties - internal only.
|
||||||
|
public void RefreshUser(SaSecurityItem securityItemUser, SbmAffiliate affiliateUser, List<SysIdString> supervisedOwners)
|
||||||
|
{
|
||||||
|
base.SetUserData(securityItemUser, affiliateUser, supervisedOwners);
|
||||||
|
}
|
||||||
|
|
||||||
//-------------------------------------------------------------------
|
//-------------------------------------------------------------------
|
||||||
}
|
}
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
|
|||||||
@@ -1,14 +1,7 @@
|
|||||||
using Microsoft.AspNetCore.Http;
|
using Microsoft.AspNetCore.Mvc.Filters;
|
||||||
using Microsoft.AspNetCore.Localization;
|
using Microsoft.Extensions.Logging.Abstractions;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
|
||||||
using Microsoft.AspNetCore.Mvc.Filters;
|
|
||||||
using Microsoft.AspNetCore.Routing;
|
|
||||||
using Microsoft.Net.Http.Headers;
|
|
||||||
using Newtonsoft.Json;
|
|
||||||
using Newtonsoft.Json.Serialization;
|
|
||||||
using Sacs.Web.Components;
|
using Sacs.Web.Components;
|
||||||
using Sarand.BusinessMgr.Net.Core.Web.App;
|
using Sarand.BusinessMgr.Net.Core.Web.App;
|
||||||
using Sarand.BusinessMgr.Net.Core.Web.Models;
|
|
||||||
using Sarand.BusinessMgr.Net.Standard.Base.App;
|
using Sarand.BusinessMgr.Net.Standard.Base.App;
|
||||||
using Sarand.BusinessMgr.Net.Standard.Base.Bus;
|
using Sarand.BusinessMgr.Net.Standard.Base.Bus;
|
||||||
using Sarand.BusinessMgr.Net.Standard.Base.Consoles;
|
using Sarand.BusinessMgr.Net.Standard.Base.Consoles;
|
||||||
@@ -17,10 +10,8 @@ using Sarand.BusinessMgr.Net.Standard.Base.Mgr;
|
|||||||
using Sarand.Net.Standard.Base.App;
|
using Sarand.Net.Standard.Base.App;
|
||||||
using Sarand.Net.Standard.Base.CodeTypes;
|
using Sarand.Net.Standard.Base.CodeTypes;
|
||||||
using Sarand.Net.Standard.Base.Core;
|
using Sarand.Net.Standard.Base.Core;
|
||||||
using Sarand.Net.Standard.Base.Dbas;
|
|
||||||
using Sarand.Net.Standard.Base.Diary;
|
using Sarand.Net.Standard.Base.Diary;
|
||||||
using Sarand.Net.Standard.Base.Email;
|
using Sarand.Net.Standard.Base.Email;
|
||||||
using Sarand.Net.Standard.Base.Helpers;
|
|
||||||
using Sarand.Net.Standard.Base.Interfaces;
|
using Sarand.Net.Standard.Base.Interfaces;
|
||||||
using Sarand.Net.Standard.Base.ItemData;
|
using Sarand.Net.Standard.Base.ItemData;
|
||||||
using Sarand.Net.Standard.Base.ItemDocs;
|
using Sarand.Net.Standard.Base.ItemDocs;
|
||||||
@@ -31,12 +22,9 @@ using Sarand.Net.Standard.Base.UpdateLog;
|
|||||||
using Sarand.Net.Standard.Base.Utils;
|
using Sarand.Net.Standard.Base.Utils;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Collections.Specialized;
|
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Reflection;
|
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Text.RegularExpressions;
|
using System.Threading.Tasks;
|
||||||
using System.Web;
|
|
||||||
|
|
||||||
namespace Sarand.BusinessMgr.Net.Core.Web.Controllers
|
namespace Sarand.BusinessMgr.Net.Core.Web.Controllers
|
||||||
{
|
{
|
||||||
@@ -46,6 +34,7 @@ namespace Sarand.BusinessMgr.Net.Core.Web.Controllers
|
|||||||
//-------------------------------------------------------------------
|
//-------------------------------------------------------------------
|
||||||
// Data members.
|
// Data members.
|
||||||
private SbmInternals internals;
|
private SbmInternals internals;
|
||||||
|
private SbmSysParamCache sysParamCache = null;
|
||||||
|
|
||||||
//-------------------------------------------------------------------
|
//-------------------------------------------------------------------
|
||||||
// Protected construction.
|
// Protected construction.
|
||||||
@@ -56,25 +45,30 @@ namespace Sarand.BusinessMgr.Net.Core.Web.Controllers
|
|||||||
// Initialise console (debug) logging listener.
|
// Initialise console (debug) logging listener.
|
||||||
//if (Directory.Exists(App.LoggingRootFolder) && SbmSystem.DebugMode)
|
//if (Directory.Exists(App.LoggingRootFolder) && SbmSystem.DebugMode)
|
||||||
// SbmConsoleListener.ConfigureDebugListener(App.LoggingRootFolder);
|
// SbmConsoleListener.ConfigureDebugListener(App.LoggingRootFolder);
|
||||||
if (DebugMode) SaLogger.Trace(GetType().Name + ".CTR");
|
if (DebugMode) SaLogger.Trace($"{GetType().Name}.CTR");
|
||||||
}
|
}
|
||||||
protected override void Dispose(bool disposing)
|
protected override void Dispose(bool disposing)
|
||||||
{
|
{
|
||||||
if (disposing)
|
if (disposing)
|
||||||
{
|
{
|
||||||
|
if (sysParamCache != null) sysParamCache.Dispose();
|
||||||
|
sysParamCache = null;
|
||||||
|
if (internals != null) internals.Dispose();
|
||||||
|
internals = null;
|
||||||
}
|
}
|
||||||
base.Dispose(disposing);
|
base.Dispose(disposing);
|
||||||
}
|
}
|
||||||
|
|
||||||
//-------------------------------------------------------------------
|
//-------------------------------------------------------------------
|
||||||
// Properties.
|
// Properties.
|
||||||
|
protected SbmLocaliser Localiser { get; }
|
||||||
protected SbmApplication_Web App { get { return SbmGlobals_Web.Application; } }
|
protected SbmApplication_Web App { get { return SbmGlobals_Web.Application; } }
|
||||||
public SbmAppConfig AppConfig { get { return App.AppConfig; } }
|
public SbmAppConfig AppConfig { get { return App.AppConfig; } }
|
||||||
public SbmSessionContext SessionContext { get { return SessionData?.SessionContext ?? null; } }
|
public abstract SbmSessionContext SessionContext { get; }
|
||||||
public ISbmUserContext UserContext { get { return SessionData; } }
|
public abstract ISbmUserContext UserContext { get; }
|
||||||
protected SbmLocaliser Localiser { get; }
|
|
||||||
// Business components.
|
// Business components.
|
||||||
public SbmInternals Internals { get { if (internals == null) internals = new SbmInternals(UserContext); return internals; } }
|
public SbmInternals Internals { get { if (internals == null) internals = new SbmInternals(UserContext); return internals; } }
|
||||||
|
protected SbmSysParamCache SysParamCache { get { if (sysParamCache == null) sysParamCache = new SbmSysParamCache(UserContext); return sysParamCache; } }
|
||||||
// Managers.
|
// Managers.
|
||||||
public SbmAccountMgr AccountMgr { get { return Internals.AccountMgr; } }
|
public SbmAccountMgr AccountMgr { get { return Internals.AccountMgr; } }
|
||||||
public SbmAssetMgr AssetMgr { get { return Internals.AssetMgr; } }
|
public SbmAssetMgr AssetMgr { get { return Internals.AssetMgr; } }
|
||||||
@@ -109,152 +103,27 @@ namespace Sarand.BusinessMgr.Net.Core.Web.Controllers
|
|||||||
//-------------------------------------------------------------------
|
//-------------------------------------------------------------------
|
||||||
public override void OnActionExecuting(ActionExecutingContext filterContext)
|
public override void OnActionExecuting(ActionExecutingContext filterContext)
|
||||||
{
|
{
|
||||||
if (DebugMode) SaLogger.Debug(GetType().Name + ".OnActionExecuting" + (ViewData.Model != null ? " Model: " + ViewData.Model : ""));
|
if (DebugMode) SaLogger.Debug($"{SysUtil.Fn}" + (ViewData.Model != null ? " Model: " + ViewData.Model : ""));
|
||||||
|
|
||||||
// Refreh model properties.
|
|
||||||
SbmModel_Base baseModel = ViewData.Model as SbmModel_Base;
|
|
||||||
RefreshModel(baseModel);
|
|
||||||
|
|
||||||
base.OnActionExecuting(filterContext);
|
base.OnActionExecuting(filterContext);
|
||||||
}
|
}
|
||||||
public override void OnActionExecuted(ActionExecutedContext filterContext)
|
public override void OnActionExecuted(ActionExecutedContext filterContext)
|
||||||
{
|
{
|
||||||
if (DebugMode) SaLogger.Debug(GetType().Name + ".OnActionExecuted" + (ViewData.Model != null ? " Model: " + ViewData.Model : ""));
|
if (DebugMode) SaLogger.Debug($"{SysUtil.Fn}" + (ViewData.Model != null ? " Model: " + ViewData.Model : ""));
|
||||||
|
|
||||||
// Refreh model properties.
|
// ToDo Store system params.
|
||||||
SbmModel_Base baseModel = ViewData.Model as SbmModel_Base;
|
if (sysParamCache != null)
|
||||||
RefreshModel(baseModel);
|
|
||||||
|
|
||||||
// Store session data if present - as potentially modfied.
|
|
||||||
if (SessionData != null)
|
|
||||||
{
|
{
|
||||||
// Most actions will store the session data in case it's been modified.
|
if (sysParamCache.Modified)
|
||||||
// Some actions (eg. score password) don't need to.
|
|
||||||
if (StoreSessionData)
|
|
||||||
{
|
{
|
||||||
String sessionDataJson = JsonConvert.SerializeObject(SessionData);
|
sysParamCache.Store();
|
||||||
HttpContext.Session.Set(SessionStorage.SessionKey_SessionData, SessionStorage.sessionDataEncoding.GetBytes(sessionDataJson));
|
SaLogger.Info($"{SysUtil.Fn} User params stored.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else HttpContext.Session.Remove(SessionStorage.SessionKey_SessionData);
|
|
||||||
|
|
||||||
// Response headers.
|
|
||||||
if (baseModel != null && baseModel.ProhibitCache)
|
|
||||||
{
|
|
||||||
if (Response.Headers.ContainsKey(HeaderNames.CacheControl))
|
|
||||||
Response.Headers.Remove(HeaderNames.CacheControl);
|
|
||||||
Response.Headers.Add(HeaderNames.CacheControl, "no-cache, no-store, must-revalidate");
|
|
||||||
Response.Headers.Add(HeaderNames.Pragma, "no-cache");
|
|
||||||
Response.Headers.Add(HeaderNames.Expires, "0");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
base.OnActionExecuted(filterContext);
|
base.OnActionExecuted(filterContext);
|
||||||
}
|
}
|
||||||
|
|
||||||
//-------------------------------------------------------------------
|
|
||||||
// Model.
|
|
||||||
//-------------------------------------------------------------------
|
|
||||||
protected void RefreshModel(SbmModel_Base model)
|
|
||||||
{
|
|
||||||
if (model == null) return;
|
|
||||||
|
|
||||||
// Session data.
|
|
||||||
model.Controller = this;
|
|
||||||
model.SessionData_Web = SessionData;
|
|
||||||
|
|
||||||
// Redirect locations.
|
|
||||||
model.RedirectLocation.Base = GetRedirectLocation(RedirectLocation.WebAppBase);
|
|
||||||
model.RedirectLocation.Home = GetRedirectLocation(RedirectLocation.WebAppHome);
|
|
||||||
model.RedirectLocation.Home_SessionExpired = GetRedirectLocation(RedirectLocation.WebAppHome_SessionExpired);
|
|
||||||
}
|
|
||||||
|
|
||||||
//-------------------------------------------------------------------
|
|
||||||
// Session.
|
|
||||||
//-------------------------------------------------------------------
|
|
||||||
public bool ValidUserSession { get { return SessionData?.ValidUserSession ?? false; } }
|
|
||||||
public DbUpdateInfo DbUpdateInfo { get { return SessionData?.DbUpdateInfo ?? new DbUpdateInfo(null, "", SbmSystem.ComputerName); } }
|
|
||||||
// Referrer.
|
|
||||||
public String Referer { get { return Request.Headers["Referer"].ToString(); } }
|
|
||||||
public bool ValidReferer { get { return !StringUtil.IsEmpty(Referer); } }
|
|
||||||
/// <summary>Store session data, eg. to start a new user session on sign-in.</summary>
|
|
||||||
protected bool SetSessionData(SbmSessionData_Web sessionData)
|
|
||||||
{
|
|
||||||
if (sessionStorage.SessionData != null) return false;
|
|
||||||
sessionStorage.SessionData = sessionData;
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
protected void ClearSessionData()
|
|
||||||
{
|
|
||||||
if (HttpContext.Session.IsAvailable)
|
|
||||||
HttpContext.Session.Clear();
|
|
||||||
sessionStorage.SessionData = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
//-------------------------------------------------------------------
|
|
||||||
// Session storage.
|
|
||||||
public class SessionStorage
|
|
||||||
{
|
|
||||||
public SbmSessionData_Web SessionData { get; set; }
|
|
||||||
public static String SessionKey_SessionData { get; } = "SbmSessionData";
|
|
||||||
public static Encoding sessionDataEncoding { get; } = Encoding.UTF8;
|
|
||||||
//JSON Serialisation.
|
|
||||||
public class SbmSessionDataContractResolver : DefaultContractResolver
|
|
||||||
{
|
|
||||||
// To allow private properties to be deserialised.
|
|
||||||
// NB Only applies to top level properties in the serialised object.
|
|
||||||
protected override List<MemberInfo> GetSerializableMembers(Type objectType)
|
|
||||||
{
|
|
||||||
var flags = BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic;
|
|
||||||
MemberInfo[] fields = objectType.GetFields(flags);
|
|
||||||
return fields
|
|
||||||
.Concat(objectType.GetProperties(flags).Where(propInfo => propInfo.CanWrite))
|
|
||||||
.ToList();
|
|
||||||
}
|
|
||||||
protected override IList<JsonProperty> CreateProperties(Type type, MemberSerialization memberSerialization)
|
|
||||||
{
|
|
||||||
return base.CreateProperties(type, MemberSerialization.Fields);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
public static JsonSerializerSettings JsonDeserialisationSettings = new JsonSerializerSettings
|
|
||||||
{
|
|
||||||
ContractResolver = new SbmSessionDataContractResolver(),
|
|
||||||
// Force all deserialised objects to be replaced - to avoid proxy lists not populating.
|
|
||||||
ObjectCreationHandling = ObjectCreationHandling.Replace
|
|
||||||
};
|
|
||||||
}
|
|
||||||
private readonly SessionStorage sessionStorage = new SessionStorage();
|
|
||||||
public static JsonSerializerSettings SbmSessionDataJsonSerializerSettings { get { return SessionStorage.JsonDeserialisationSettings; } }
|
|
||||||
|
|
||||||
//-------------------------------------------------------------------
|
|
||||||
public SbmSessionData_Web SessionData
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
// Retrieve session data if not already in controller.
|
|
||||||
if (sessionStorage.SessionData == null)
|
|
||||||
{
|
|
||||||
byte[] sessionDataBytes = null;
|
|
||||||
HttpContext.Session.TryGetValue(SessionStorage.SessionKey_SessionData, out sessionDataBytes);
|
|
||||||
if (sessionDataBytes != null)
|
|
||||||
{
|
|
||||||
String sessionDataJson = SessionStorage.sessionDataEncoding.GetString(sessionDataBytes);
|
|
||||||
sessionStorage.SessionData = DeserializeSessionData(sessionDataJson);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return sessionStorage.SessionData;
|
|
||||||
}
|
|
||||||
catch (Exception exc)
|
|
||||||
{
|
|
||||||
SaLogger.Warn(GetType().Name + ".SessionData " + exc.GetType().Name + " - " + exc.Message + exc.GetStackEntries().Concat("", "\n\t"));
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
protected abstract SbmSessionData_Web DeserializeSessionData(String sessionDataJson);
|
|
||||||
|
|
||||||
//-------------------------------------------------------------------
|
//-------------------------------------------------------------------
|
||||||
}
|
}
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
|
|||||||
@@ -0,0 +1,225 @@
|
|||||||
|
using Microsoft.AspNetCore.Http;
|
||||||
|
using Microsoft.AspNetCore.Localization;
|
||||||
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
using Microsoft.AspNetCore.Mvc.Filters;
|
||||||
|
using Microsoft.AspNetCore.Routing;
|
||||||
|
using Microsoft.Net.Http.Headers;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
using Newtonsoft.Json.Serialization;
|
||||||
|
using Sacs.Web.Components;
|
||||||
|
using Sarand.BusinessMgr.Net.Core.Web.App;
|
||||||
|
using Sarand.BusinessMgr.Net.Core.Web.Models;
|
||||||
|
using Sarand.BusinessMgr.Net.Standard.Base.App;
|
||||||
|
using Sarand.BusinessMgr.Net.Standard.Base.Bus;
|
||||||
|
using Sarand.BusinessMgr.Net.Standard.Base.Consoles;
|
||||||
|
using Sarand.BusinessMgr.Net.Standard.Base.Core;
|
||||||
|
using Sarand.BusinessMgr.Net.Standard.Base.Mgr;
|
||||||
|
using Sarand.Net.Standard.Base.App;
|
||||||
|
using Sarand.Net.Standard.Base.CodeTypes;
|
||||||
|
using Sarand.Net.Standard.Base.Core;
|
||||||
|
using Sarand.Net.Standard.Base.Dbas;
|
||||||
|
using Sarand.Net.Standard.Base.Diary;
|
||||||
|
using Sarand.Net.Standard.Base.Email;
|
||||||
|
using Sarand.Net.Standard.Base.Helpers;
|
||||||
|
using Sarand.Net.Standard.Base.Interfaces;
|
||||||
|
using Sarand.Net.Standard.Base.ItemData;
|
||||||
|
using Sarand.Net.Standard.Base.ItemDocs;
|
||||||
|
using Sarand.Net.Standard.Base.ItemOptions;
|
||||||
|
using Sarand.Net.Standard.Base.ReferenceData;
|
||||||
|
using Sarand.Net.Standard.Base.Security;
|
||||||
|
using Sarand.Net.Standard.Base.UpdateLog;
|
||||||
|
using Sarand.Net.Standard.Base.Utils;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Collections.Specialized;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Reflection;
|
||||||
|
using System.Text;
|
||||||
|
using System.Text.RegularExpressions;
|
||||||
|
using System.Web;
|
||||||
|
|
||||||
|
namespace Sarand.BusinessMgr.Net.Core.Web.Controllers
|
||||||
|
{
|
||||||
|
//=======================================================================
|
||||||
|
public abstract class SbmController_Web : SbmController_Base
|
||||||
|
{
|
||||||
|
//-------------------------------------------------------------------
|
||||||
|
// Data members.
|
||||||
|
|
||||||
|
//-------------------------------------------------------------------
|
||||||
|
// Protected construction.
|
||||||
|
protected SbmController_Web(SbmLocaliser localiser) : base(localiser)
|
||||||
|
{
|
||||||
|
// Initialise console (debug) logging listener.
|
||||||
|
//if (Directory.Exists(App.LoggingRootFolder) && SbmSystem.DebugMode)
|
||||||
|
// SbmConsoleListener.ConfigureDebugListener(App.LoggingRootFolder);
|
||||||
|
if (DebugMode) SaLogger.Trace($"{GetType().Name}.CTR");
|
||||||
|
}
|
||||||
|
protected override void Dispose(bool disposing)
|
||||||
|
{
|
||||||
|
if (disposing)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
base.Dispose(disposing);
|
||||||
|
}
|
||||||
|
|
||||||
|
//-------------------------------------------------------------------
|
||||||
|
// Properties.
|
||||||
|
public override SbmSessionContext SessionContext { get { return SessionData?.SessionContext ?? null; } }
|
||||||
|
public override ISbmUserContext UserContext { get { return SessionData; } }
|
||||||
|
|
||||||
|
//-------------------------------------------------------------------
|
||||||
|
// Action execution events.
|
||||||
|
//-------------------------------------------------------------------
|
||||||
|
public override void OnActionExecuting(ActionExecutingContext filterContext)
|
||||||
|
{
|
||||||
|
if (DebugMode) SaLogger.Debug($"{SysUtil.Fn}" + (ViewData.Model != null ? " Model: " + ViewData.Model : ""));
|
||||||
|
|
||||||
|
// Refreh model properties.
|
||||||
|
SbmModel_Base baseModel = ViewData.Model as SbmModel_Base;
|
||||||
|
RefreshModel(baseModel);
|
||||||
|
|
||||||
|
base.OnActionExecuting(filterContext);
|
||||||
|
}
|
||||||
|
public override void OnActionExecuted(ActionExecutedContext filterContext)
|
||||||
|
{
|
||||||
|
if (DebugMode) SaLogger.Debug($"{SysUtil.Fn}" + (ViewData.Model != null ? " Model: " + ViewData.Model : ""));
|
||||||
|
|
||||||
|
// Refreh model properties.
|
||||||
|
SbmModel_Base baseModel = ViewData.Model as SbmModel_Base;
|
||||||
|
RefreshModel(baseModel);
|
||||||
|
|
||||||
|
// Store session data if present - as potentially modfied.
|
||||||
|
if (SessionData != null)
|
||||||
|
{
|
||||||
|
// Most actions will store the session data in case it's been modified.
|
||||||
|
// Some actions (eg. score password) don't need to.
|
||||||
|
if (StoreSessionData)
|
||||||
|
{
|
||||||
|
String sessionDataJson = JsonConvert.SerializeObject(SessionData);
|
||||||
|
HttpContext.Session.Set(SessionStorage.SessionKey_SessionData, SessionStorage.sessionDataEncoding.GetBytes(sessionDataJson));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else HttpContext.Session.Remove(SessionStorage.SessionKey_SessionData);
|
||||||
|
|
||||||
|
// Response headers.
|
||||||
|
if (baseModel != null && baseModel.ProhibitCache)
|
||||||
|
{
|
||||||
|
if (Response.Headers.ContainsKey(HeaderNames.CacheControl))
|
||||||
|
Response.Headers.Remove(HeaderNames.CacheControl);
|
||||||
|
Response.Headers.Add(HeaderNames.CacheControl, "no-cache, no-store, must-revalidate");
|
||||||
|
Response.Headers.Add(HeaderNames.Pragma, "no-cache");
|
||||||
|
Response.Headers.Add(HeaderNames.Expires, "0");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
base.OnActionExecuted(filterContext);
|
||||||
|
}
|
||||||
|
|
||||||
|
//-------------------------------------------------------------------
|
||||||
|
// Model.
|
||||||
|
//-------------------------------------------------------------------
|
||||||
|
protected void RefreshModel(SbmModel_Base model)
|
||||||
|
{
|
||||||
|
if (model == null) return;
|
||||||
|
|
||||||
|
// Session data.
|
||||||
|
model.Controller = this;
|
||||||
|
model.SessionData_Web = SessionData;
|
||||||
|
|
||||||
|
// Redirect locations.
|
||||||
|
model.RedirectLocation.Base = GetRedirectLocation(RedirectLocation.WebAppBase);
|
||||||
|
model.RedirectLocation.Home = GetRedirectLocation(RedirectLocation.WebAppHome);
|
||||||
|
model.RedirectLocation.Home_SessionExpired = GetRedirectLocation(RedirectLocation.WebAppHome_SessionExpired);
|
||||||
|
}
|
||||||
|
|
||||||
|
//-------------------------------------------------------------------
|
||||||
|
// Session.
|
||||||
|
//-------------------------------------------------------------------
|
||||||
|
public bool ValidUserSession { get { return SessionData?.ValidUserSession ?? false; } }
|
||||||
|
public DbUpdateInfo DbUpdateInfo { get { return SessionData?.DbUpdateInfo ?? new DbUpdateInfo(null, "", SbmSystem.ComputerName); } }
|
||||||
|
// Referrer.
|
||||||
|
public String Referer { get { return Request.Headers["Referer"].ToString(); } }
|
||||||
|
public bool ValidReferer { get { return !StringUtil.IsEmpty(Referer); } }
|
||||||
|
/// <summary>Store session data, eg. to start a new user session on sign-in.</summary>
|
||||||
|
protected bool SetSessionData(SbmSessionData_Web sessionData)
|
||||||
|
{
|
||||||
|
if (sessionStorage.SessionData != null) return false;
|
||||||
|
sessionStorage.SessionData = sessionData;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
protected void ClearSessionData()
|
||||||
|
{
|
||||||
|
if (HttpContext.Session.IsAvailable)
|
||||||
|
HttpContext.Session.Clear();
|
||||||
|
sessionStorage.SessionData = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
//-------------------------------------------------------------------
|
||||||
|
// Session storage.
|
||||||
|
public class SessionStorage
|
||||||
|
{
|
||||||
|
public SbmSessionData_Web SessionData { get; set; }
|
||||||
|
public static String SessionKey_SessionData { get; } = "SbmSessionData";
|
||||||
|
public static Encoding sessionDataEncoding { get; } = Encoding.UTF8;
|
||||||
|
//JSON Serialisation.
|
||||||
|
public class SbmSessionDataContractResolver : DefaultContractResolver
|
||||||
|
{
|
||||||
|
// To allow private properties to be deserialised.
|
||||||
|
// NB Only applies to top level properties in the serialised object.
|
||||||
|
protected override List<MemberInfo> GetSerializableMembers(Type objectType)
|
||||||
|
{
|
||||||
|
var flags = BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic;
|
||||||
|
MemberInfo[] fields = objectType.GetFields(flags);
|
||||||
|
return fields
|
||||||
|
.Concat(objectType.GetProperties(flags).Where(propInfo => propInfo.CanWrite))
|
||||||
|
.ToList();
|
||||||
|
}
|
||||||
|
protected override IList<JsonProperty> CreateProperties(Type type, MemberSerialization memberSerialization)
|
||||||
|
{
|
||||||
|
return base.CreateProperties(type, MemberSerialization.Fields);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
public static JsonSerializerSettings JsonDeserialisationSettings = new JsonSerializerSettings
|
||||||
|
{
|
||||||
|
ContractResolver = new SbmSessionDataContractResolver(),
|
||||||
|
// Force all deserialised objects to be replaced - to avoid proxy lists not populating.
|
||||||
|
ObjectCreationHandling = ObjectCreationHandling.Replace
|
||||||
|
};
|
||||||
|
}
|
||||||
|
private readonly SessionStorage sessionStorage = new SessionStorage();
|
||||||
|
public static JsonSerializerSettings SbmSessionDataJsonSerializerSettings { get { return SessionStorage.JsonDeserialisationSettings; } }
|
||||||
|
|
||||||
|
//-------------------------------------------------------------------
|
||||||
|
public SbmSessionData_Web SessionData
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
// Retrieve session data if not already in controller.
|
||||||
|
if (sessionStorage.SessionData == null)
|
||||||
|
{
|
||||||
|
byte[] sessionDataBytes = null;
|
||||||
|
HttpContext.Session.TryGetValue(SessionStorage.SessionKey_SessionData, out sessionDataBytes);
|
||||||
|
if (sessionDataBytes != null)
|
||||||
|
{
|
||||||
|
String sessionDataJson = SessionStorage.sessionDataEncoding.GetString(sessionDataBytes);
|
||||||
|
sessionStorage.SessionData = DeserializeSessionData(sessionDataJson);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return sessionStorage.SessionData;
|
||||||
|
}
|
||||||
|
catch (Exception exc)
|
||||||
|
{
|
||||||
|
SaLogger.Warn($"{SysUtil.Fn} {exc.GetType().Name} - {exc.Message}{exc.GetStackEntries().Concat("", "\n\t")}");
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
protected abstract SbmSessionData_Web DeserializeSessionData(String sessionDataJson);
|
||||||
|
|
||||||
|
//-------------------------------------------------------------------
|
||||||
|
}
|
||||||
|
//=======================================================================
|
||||||
|
}
|
||||||
@@ -10,12 +10,15 @@ using System.Reflection.PortableExecutable;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
|
|
||||||
|
// Ignore obsolete warning on ComplexTypeModelBinder.
|
||||||
|
#pragma warning disable 0618
|
||||||
|
|
||||||
namespace Sarand.BusinessMgr.Net.Core.Web.Middleware
|
namespace Sarand.BusinessMgr.Net.Core.Web.Middleware
|
||||||
{
|
{
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Maps a browser request to a data object. Default class provides a base implementation of a model binder.
|
/// Maps a browser request to a data object. Default class provides a base implementation of a model binder.
|
||||||
/// <para>Overridden to trim whitespace from input values.</para>
|
/// <para>- Overridden to trim whitespace from input values.</para>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class SbmModelBinder : ComplexTypeModelBinder
|
public class SbmModelBinder : ComplexTypeModelBinder
|
||||||
{
|
{
|
||||||
@@ -54,13 +57,12 @@ namespace Sarand.BusinessMgr.Net.Core.Web.Middleware
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
protected override void SetProperty(ModelBindingContext bindingContext, string modelName, ModelMetadata propertyMetadata, ModelBindingResult result)
|
protected override void SetProperty(ModelBindingContext bindingContext, string modelName, ModelMetadata propertyMetadata, ModelBindingResult result)
|
||||||
{
|
{
|
||||||
string fn = GetType().Name + ".SetProperty";
|
//if (SbmSystem.DebugMode) Logger.Debug($"{SysUtil.Fn} Form property " + modelName + ": '" + result.Model.ToString() + ".");
|
||||||
//if (SbmSystem.DebugMode) Logger.Debug(fn + " Form property " + modelName + ": '" + result.Model.ToString() + ".");
|
|
||||||
object originalValue = result.Model;
|
object originalValue = result.Model;
|
||||||
// Anything that looks like a password will be left as is.
|
// Anything that looks like a password will be left as is.
|
||||||
bool password = modelName.ContainsCI("Password");
|
bool password = modelName.ContainsCI("Password");
|
||||||
// Exclude properties that retain leading/trailing whitespace.
|
// Exclude properties that retain leading/trailing whitespace.
|
||||||
if (result.Model is string)
|
if (result.Model is string)
|
||||||
{
|
{
|
||||||
if (!password)
|
if (!password)
|
||||||
{
|
{
|
||||||
@@ -92,16 +94,16 @@ namespace Sarand.BusinessMgr.Net.Core.Web.Middleware
|
|||||||
result = ModelBindingResult.Success(value);
|
result = ModelBindingResult.Success(value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Log property details.
|
// Log property details.
|
||||||
if (result.Model != null && SbmSystem.DebugMode &&
|
if (result.Model != null && SbmSystem.DebugMode &&
|
||||||
// Ignore passwords.
|
// Ignore passwords.
|
||||||
!password &&
|
!password &&
|
||||||
// Ignore items that correspond with objects in the model rather than values.
|
// Ignore items that correspond with objects in the model rather than values.
|
||||||
!result.Model.ToString().Equals(result.Model.GetType().FullName) &&
|
!result.Model.ToString().Equals(result.Model.GetType().FullName) &&
|
||||||
// Ignore form files.
|
// Ignore form files.
|
||||||
!result.Model.ToString().ContainsCI("Microsoft.AspNetCore.Http.IFormFile"))
|
!result.Model.ToString().ContainsCI("Microsoft.AspNetCore.Http.IFormFile"))
|
||||||
SaLogger.Debug(SysUtil.Fn + " Form property " + modelName + ": '" + result.Model.ToString() + "'." + (originalValue != null && !originalValue.Equals(result.Model) ? " Original value: '" + originalValue.ToString() + "'" : ""));
|
SaLogger.Debug(SysUtil.Fn + " Form property " + modelName + ": '" + result.Model.ToString() + "'." + (originalValue != null && !originalValue.Equals(result.Model) ? " Original value: '" + originalValue.ToString() + "'" : ""));
|
||||||
base.SetProperty(bindingContext, modelName, propertyMetadata, result);
|
base.SetProperty(bindingContext, modelName, propertyMetadata, result);
|
||||||
}
|
}
|
||||||
|
|
||||||
//-------------------------------------------------------------------
|
//-------------------------------------------------------------------
|
||||||
|
|||||||
@@ -41,11 +41,9 @@ namespace Sarand.BusinessMgr.Net.Core.Web.Middleware
|
|||||||
|
|
||||||
public async Task Invoke(HttpContext context)
|
public async Task Invoke(HttpContext context)
|
||||||
{
|
{
|
||||||
String fn = GetType().Name + ".Invoke";
|
|
||||||
|
|
||||||
// Log action.
|
// Log action.
|
||||||
//String rawTarget = context.Features.Get<IHttpRequestFeature>().RawTarget;
|
//String rawTarget = context.Features.Get<IHttpRequestFeature>().RawTarget;
|
||||||
if (SbmSystem.DebugMode) SaLogger.Debug(fn + " Action: '" + Regex.Replace(context.Request.Path.ToString(), "^/", "") + "'. Method: " + context.Request.Method);
|
if (SbmSystem.DebugMode) SaLogger.Debug($"{SysUtil.Fn} Action: '" + Regex.Replace(context.Request.Path.ToString(), "^/", "") + "'. Method: " + context.Request.Method);
|
||||||
|
|
||||||
// Intercept POST requests and apply anti-forgery test.
|
// Intercept POST requests and apply anti-forgery test.
|
||||||
if (HttpMethods.IsPost(context.Request.Method))
|
if (HttpMethods.IsPost(context.Request.Method))
|
||||||
@@ -59,7 +57,7 @@ namespace Sarand.BusinessMgr.Net.Core.Web.Middleware
|
|||||||
}
|
}
|
||||||
catch (Exception exc)
|
catch (Exception exc)
|
||||||
{
|
{
|
||||||
SaLogger.Warn(fn + " " + ExceptionUtil.GetLogMessage(exc));
|
SaLogger.Warn($"{SysUtil.Fn} " + ExceptionUtil.GetLogMessage(exc));
|
||||||
throw;
|
throw;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ namespace Sarand.BusinessMgr.Net.Core.Web.Models
|
|||||||
public DbUpdateInfo DbUpdateInfo { get { return SessionData?.DbUpdateInfo ?? new DbUpdateInfo(null, "", SbmSystem.ComputerName); } }
|
public DbUpdateInfo DbUpdateInfo { get { return SessionData?.DbUpdateInfo ?? new DbUpdateInfo(null, "", SbmSystem.ComputerName); } }
|
||||||
public SbmLocaliser Localiser { get; }
|
public SbmLocaliser Localiser { get; }
|
||||||
// Request properties.
|
// Request properties.
|
||||||
public SbmController_Base Controller { get; set; }
|
public SbmController_Web Controller { get; set; }
|
||||||
public CultureInfo SessionCulture { get { return Controller?.SessionCulture ?? CultureInfo.InvariantCulture; } }
|
public CultureInfo SessionCulture { get { return Controller?.SessionCulture ?? CultureInfo.InvariantCulture; } }
|
||||||
|
|
||||||
//-------------------------------------------------------------------
|
//-------------------------------------------------------------------
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
using Sarand.Net.Standard.Base.App;
|
using Sarand.Net.Standard.Base.App;
|
||||||
using Sarand.Net.Standard.Base.Dbas;
|
using Sarand.Net.Standard.Base.Dbas;
|
||||||
using Sarand.Net.Standard.Base.Interfaces;
|
using Sarand.Net.Standard.Base.Interfaces;
|
||||||
|
using Sarand.Net.Standard.Base.Utils;
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace Sarand.BusinessMgr.Net.Standard.Base.App
|
namespace Sarand.BusinessMgr.Net.Standard.Base.App
|
||||||
@@ -265,7 +266,6 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.App
|
|||||||
//-------------------------------------------------------------------
|
//-------------------------------------------------------------------
|
||||||
public static bool IsMenuOptionApplicable(ISbmUserContext userContext, SbmConfigConsole configConsole, Sbm.MenuOption menuOption)
|
public static bool IsMenuOptionApplicable(ISbmUserContext userContext, SbmConfigConsole configConsole, Sbm.MenuOption menuOption)
|
||||||
{
|
{
|
||||||
String fn = ClassName + ".IsMenuOptionApplicable";
|
|
||||||
if (!userContext.ValidUser)
|
if (!userContext.ValidUser)
|
||||||
{
|
{
|
||||||
// ToDo Only Login menu option available.
|
// ToDo Only Login menu option available.
|
||||||
@@ -295,7 +295,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.App
|
|||||||
return configConsole.AllowOption(userContext, Sbm.ConfigOption.TimeRecording);
|
return configConsole.AllowOption(userContext, Sbm.ConfigOption.TimeRecording);
|
||||||
//-----------------------------------------------------------
|
//-----------------------------------------------------------
|
||||||
}
|
}
|
||||||
SaLogger.Warn(fn + " Unsupport menu option - " + menuOption.ToString());
|
SaLogger.Warn($"{SysUtil.Fn} Unsupport menu option - {menuOption.ToString()}");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -101,8 +101,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.App
|
|||||||
//-------------------------------------------------------------------
|
//-------------------------------------------------------------------
|
||||||
public static SbmConfigConsole CreateConsole(SbmSessionContext sessionContext)
|
public static SbmConfigConsole CreateConsole(SbmSessionContext sessionContext)
|
||||||
{
|
{
|
||||||
String fn = "SbmConfigConsole.CreateConsole";
|
SaLogger.Warn($"{SysUtil.Fn} Creating default configuration console.");
|
||||||
SaLogger.Warn(fn + ".CreateConsole Creating default configuration console.");
|
|
||||||
// Default console.
|
// Default console.
|
||||||
SbmVersion consoleVersion = new SbmVersion("Standard", Sbm.Version.GetFullVersion(), SbmSystem.AssemblyBuildAt);
|
SbmVersion consoleVersion = new SbmVersion("Standard", Sbm.Version.GetFullVersion(), SbmSystem.AssemblyBuildAt);
|
||||||
return new SbmConfigConsole(Sbm.ConfigConsole.Generic, consoleVersion, sessionContext);
|
return new SbmConfigConsole(Sbm.ConfigConsole.Generic, consoleVersion, sessionContext);
|
||||||
@@ -186,8 +185,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.App
|
|||||||
// Application events.
|
// Application events.
|
||||||
public virtual void OnOpenDatabase()
|
public virtual void OnOpenDatabase()
|
||||||
{
|
{
|
||||||
String fn = GetType().Name + ".OnOpenDatabase";
|
SaLogger.Trace($"{SysUtil.Fn}");
|
||||||
SaLogger.Trace(fn);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//-------------------------------------------------------------------
|
//-------------------------------------------------------------------
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ using System.Collections.Generic;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
// Code generated by Sarand Database Utilities Sat 10-Jul-2021 16:26:30
|
// Code generated by Sarand Database Utilities Thu 6-Jun-2024 17:06:27
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
namespace Sarand.BusinessMgr.Net.Standard.Base.App
|
namespace Sarand.BusinessMgr.Net.Standard.Base.App
|
||||||
{
|
{
|
||||||
@@ -1159,10 +1159,19 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.App
|
|||||||
{
|
{
|
||||||
int tableIdx = (int)table - 1;
|
int tableIdx = (int)table - 1;
|
||||||
if (tableIdx < 0 || tableIdx >= tableCount) return String.Empty;
|
if (tableIdx < 0 || tableIdx >= tableCount) return String.Empty;
|
||||||
String tableName = tables[(int)tableIdx];
|
String tableName = tables[(int)tableIdx].Name;
|
||||||
if (delimitReservedWords) tableName = DelimitReservedWord(tableName);
|
if (delimitReservedWords) tableName = DelimitReservedWord(tableName);
|
||||||
return tableName;
|
return tableName;
|
||||||
}
|
}
|
||||||
|
public static String GetTableNameQual (TableIdx table, bool delimitReservedWords = true)
|
||||||
|
{
|
||||||
|
int tableIdx = (int)table - 1;
|
||||||
|
if (tableIdx < 0 || tableIdx >= tableCount) return String.Empty;
|
||||||
|
String schemaName = tables[(int)tableIdx].Schema;
|
||||||
|
String tableName = tables[(int)tableIdx].Name;
|
||||||
|
if (delimitReservedWords) { schemaName = DelimitReservedWord(schemaName); tableName = DelimitReservedWord(tableName); }
|
||||||
|
return (StringUtil.IsBlank(schemaName) ? "" : schemaName + ".") + tableName;
|
||||||
|
}
|
||||||
|
|
||||||
//-------------------------------------------------------------------
|
//-------------------------------------------------------------------
|
||||||
// Identify the table that corresponds with the specified column.
|
// Identify the table that corresponds with the specified column.
|
||||||
@@ -1212,8 +1221,15 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.App
|
|||||||
}
|
}
|
||||||
public static String DelimitReservedWord (String word)
|
public static String DelimitReservedWord (String word)
|
||||||
{
|
{
|
||||||
if (!IsReservedWord(word)) return word;
|
return IsReservedWord(word) ? DelimitWord(word) : word;
|
||||||
switch (reservedWordDelim)
|
}
|
||||||
|
public static String DelimitWord (String word)
|
||||||
|
{
|
||||||
|
return DelimitWord(word, reservedWordDelim);
|
||||||
|
}
|
||||||
|
public static String DelimitWord (String word, DbReservedWordDelim wordDelim)
|
||||||
|
{
|
||||||
|
switch (wordDelim)
|
||||||
{
|
{
|
||||||
case DbReservedWordDelim.None:
|
case DbReservedWordDelim.None:
|
||||||
break;
|
break;
|
||||||
@@ -1290,52 +1306,62 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.App
|
|||||||
|
|
||||||
//-------------------------------------------------------------------
|
//-------------------------------------------------------------------
|
||||||
// Table definitions.
|
// Table definitions.
|
||||||
private static readonly String[] tables =
|
private class TableDfn
|
||||||
{
|
{
|
||||||
"Address",
|
internal String Schema { get; set; }
|
||||||
"Affiliate",
|
internal String Name { get; set; }
|
||||||
"Association",
|
internal TableDfn (String schema, String name)
|
||||||
"Commodity",
|
{
|
||||||
"CommodityCustomer",
|
this.Schema= schema;
|
||||||
"CommoditySupplier",
|
this.Name = name;
|
||||||
"Constituent",
|
}
|
||||||
"Container",
|
}
|
||||||
"ContainerItem",
|
private static readonly TableDfn[] tables =
|
||||||
"Currency",
|
{
|
||||||
"IndexDefragLog",
|
new TableDfn("dbo","Address"),
|
||||||
"Interface",
|
new TableDfn("dbo","Affiliate"),
|
||||||
"InterfaceDataItem",
|
new TableDfn("dbo","Association"),
|
||||||
"InterfaceProcess",
|
new TableDfn("dbo","Commodity"),
|
||||||
"InterfaceProcessDataItem",
|
new TableDfn("dbo","CommodityCustomer"),
|
||||||
"InterfaceProcessMessage",
|
new TableDfn("dbo","CommoditySupplier"),
|
||||||
"ItemBatch",
|
new TableDfn("dbo","Constituent"),
|
||||||
"ItemLink",
|
new TableDfn("dbo","Container"),
|
||||||
"Language",
|
new TableDfn("dbo","ContainerItem"),
|
||||||
"Location",
|
new TableDfn("dbo","Currency"),
|
||||||
"Movement",
|
new TableDfn("dbo","IndexDefragLog"),
|
||||||
"PortfolioItem",
|
new TableDfn("dbo","Interface"),
|
||||||
"Process",
|
new TableDfn("dbo","InterfaceDataItem"),
|
||||||
"Region",
|
new TableDfn("dbo","InterfaceProcess"),
|
||||||
"Requirement",
|
new TableDfn("dbo","InterfaceProcessDataItem"),
|
||||||
"SaAsset",
|
new TableDfn("dbo","InterfaceProcessMessage"),
|
||||||
"SaAssetCategory",
|
new TableDfn("dbo","ItemBatch"),
|
||||||
"SaAssetProcess",
|
new TableDfn("dbo","ItemLink"),
|
||||||
"SaDiaryEntry",
|
new TableDfn("dbo","Language"),
|
||||||
"SaDiaryLink",
|
new TableDfn("dbo","Location"),
|
||||||
"SaPrice",
|
new TableDfn("dbo","Movement"),
|
||||||
"SaPriceSet",
|
new TableDfn("dbo","PortfolioItem"),
|
||||||
"SaVehicle",
|
new TableDfn("dbo","Process"),
|
||||||
"SaVehicleClass",
|
new TableDfn("dbo","Region"),
|
||||||
"SaVehicleEvent",
|
new TableDfn("dbo","Requirement"),
|
||||||
"SaVehicleFeature",
|
new TableDfn("dbo","SaAsset"),
|
||||||
"StockLevel",
|
new TableDfn("dbo","SaAssetCategory"),
|
||||||
"SysParam",
|
new TableDfn("dbo","SaAssetProcess"),
|
||||||
"SystemAccount",
|
new TableDfn("dbo","SaDiaryEntry"),
|
||||||
"SystemAccountUser",
|
new TableDfn("dbo","SaDiaryLink"),
|
||||||
"SystemUser",
|
new TableDfn("dbo","SaPrice"),
|
||||||
"TaxCode",
|
new TableDfn("dbo","SaPriceSet"),
|
||||||
"Transaction",
|
new TableDfn("dbo","SaVehicle"),
|
||||||
"UnitMeasure",
|
new TableDfn("dbo","SaVehicleClass"),
|
||||||
|
new TableDfn("dbo","SaVehicleEvent"),
|
||||||
|
new TableDfn("dbo","SaVehicleFeature"),
|
||||||
|
new TableDfn("dbo","StockLevel"),
|
||||||
|
new TableDfn("dbo","SysParam"),
|
||||||
|
new TableDfn("dbo","SystemAccount"),
|
||||||
|
new TableDfn("dbo","SystemAccountUser"),
|
||||||
|
new TableDfn("dbo","SystemUser"),
|
||||||
|
new TableDfn("dbo","TaxCode"),
|
||||||
|
new TableDfn("dbo","Transaction"),
|
||||||
|
new TableDfn("dbo","UnitMeasure"),
|
||||||
};
|
};
|
||||||
|
|
||||||
//-------------------------------------------------------------------
|
//-------------------------------------------------------------------
|
||||||
@@ -1358,8 +1384,6 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.App
|
|||||||
this.DataLen = dataLen;
|
this.DataLen = dataLen;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//-------------------------------------------------------------------
|
|
||||||
private static readonly ColumnDfn[] columns =
|
private static readonly ColumnDfn[] columns =
|
||||||
{
|
{
|
||||||
new ColumnDfn(1,"Id",4,4,false,10),
|
new ColumnDfn(1,"Id",4,4,false,10),
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ using System.Collections.Generic;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
// Code generated by Sarand Database Utilities Sat 10-Jul-2021 16:26:28
|
// Code generated by Sarand Database Utilities Thu 6-Jun-2024 17:06:27
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
namespace Sarand.BusinessMgr.Net.Standard.Base.App
|
namespace Sarand.BusinessMgr.Net.Standard.Base.App
|
||||||
{
|
{
|
||||||
@@ -98,10 +98,19 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.App
|
|||||||
{
|
{
|
||||||
int tableIdx = (int)table - 1;
|
int tableIdx = (int)table - 1;
|
||||||
if (tableIdx < 0 || tableIdx >= tableCount) return String.Empty;
|
if (tableIdx < 0 || tableIdx >= tableCount) return String.Empty;
|
||||||
String tableName = tables[(int)tableIdx];
|
String tableName = tables[(int)tableIdx].Name;
|
||||||
if (delimitReservedWords) tableName = DelimitReservedWord(tableName);
|
if (delimitReservedWords) tableName = DelimitReservedWord(tableName);
|
||||||
return tableName;
|
return tableName;
|
||||||
}
|
}
|
||||||
|
public static String GetTableNameQual (TableIdx table, bool delimitReservedWords = true)
|
||||||
|
{
|
||||||
|
int tableIdx = (int)table - 1;
|
||||||
|
if (tableIdx < 0 || tableIdx >= tableCount) return String.Empty;
|
||||||
|
String schemaName = tables[(int)tableIdx].Schema;
|
||||||
|
String tableName = tables[(int)tableIdx].Name;
|
||||||
|
if (delimitReservedWords) { schemaName = DelimitReservedWord(schemaName); tableName = DelimitReservedWord(tableName); }
|
||||||
|
return (StringUtil.IsBlank(schemaName) ? "" : schemaName + ".") + tableName;
|
||||||
|
}
|
||||||
|
|
||||||
//-------------------------------------------------------------------
|
//-------------------------------------------------------------------
|
||||||
// Identify the table that corresponds with the specified column.
|
// Identify the table that corresponds with the specified column.
|
||||||
@@ -151,8 +160,15 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.App
|
|||||||
}
|
}
|
||||||
public static String DelimitReservedWord (String word)
|
public static String DelimitReservedWord (String word)
|
||||||
{
|
{
|
||||||
if (!IsReservedWord(word)) return word;
|
return IsReservedWord(word) ? DelimitWord(word) : word;
|
||||||
switch (reservedWordDelim)
|
}
|
||||||
|
public static String DelimitWord (String word)
|
||||||
|
{
|
||||||
|
return DelimitWord(word, reservedWordDelim);
|
||||||
|
}
|
||||||
|
public static String DelimitWord (String word, DbReservedWordDelim wordDelim)
|
||||||
|
{
|
||||||
|
switch (wordDelim)
|
||||||
{
|
{
|
||||||
case DbReservedWordDelim.None:
|
case DbReservedWordDelim.None:
|
||||||
break;
|
break;
|
||||||
@@ -229,11 +245,21 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.App
|
|||||||
|
|
||||||
//-------------------------------------------------------------------
|
//-------------------------------------------------------------------
|
||||||
// Table definitions.
|
// Table definitions.
|
||||||
private static readonly String[] tables =
|
private class TableDfn
|
||||||
{
|
{
|
||||||
"Database",
|
internal String Schema { get; set; }
|
||||||
"DatabaseAccount",
|
internal String Name { get; set; }
|
||||||
"UserAccount",
|
internal TableDfn (String schema, String name)
|
||||||
|
{
|
||||||
|
this.Schema= schema;
|
||||||
|
this.Name = name;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
private static readonly TableDfn[] tables =
|
||||||
|
{
|
||||||
|
new TableDfn("dbo","Database"),
|
||||||
|
new TableDfn("dbo","DatabaseAccount"),
|
||||||
|
new TableDfn("dbo","UserAccount"),
|
||||||
};
|
};
|
||||||
|
|
||||||
//-------------------------------------------------------------------
|
//-------------------------------------------------------------------
|
||||||
@@ -256,8 +282,6 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.App
|
|||||||
this.DataLen = dataLen;
|
this.DataLen = dataLen;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//-------------------------------------------------------------------
|
|
||||||
private static readonly ColumnDfn[] columns =
|
private static readonly ColumnDfn[] columns =
|
||||||
{
|
{
|
||||||
new ColumnDfn(1,"Id",4,4,true,10),
|
new ColumnDfn(1,"Id",4,4,true,10),
|
||||||
|
|||||||
@@ -1,116 +0,0 @@
|
|||||||
using Sarand.Net.Standard.Base.Helpers;
|
|
||||||
using Sarand.Net.Standard.Base.Utils;
|
|
||||||
using System;
|
|
||||||
using System.Reflection;
|
|
||||||
|
|
||||||
namespace Sarand.BusinessMgr.Net.Standard.Base.App
|
|
||||||
{
|
|
||||||
//=======================================================================
|
|
||||||
public static class SbmResourceConsole
|
|
||||||
{
|
|
||||||
//----------------------------------------------------------------------
|
|
||||||
// Definitions.
|
|
||||||
public enum TextResource
|
|
||||||
{
|
|
||||||
SaBaseCss,
|
|
||||||
SaBaseJs,
|
|
||||||
SbmBaseCss,
|
|
||||||
SbmBaseJs,
|
|
||||||
JQueryJs,
|
|
||||||
JQueryUiCss,
|
|
||||||
JQueryUiJs,
|
|
||||||
}
|
|
||||||
public enum ImageResource
|
|
||||||
{
|
|
||||||
// Sapphire icons.
|
|
||||||
sapphire01_side_32_png,
|
|
||||||
sapphire01_side_40_png,
|
|
||||||
sapphire01_side_64_png,
|
|
||||||
// Menu icons.
|
|
||||||
arrow_down_black_16_png,
|
|
||||||
arrow_down_black_24_png,
|
|
||||||
arrow_up_black_16_png,
|
|
||||||
arrow_up_black_24_png,
|
|
||||||
star_amber_16_png,
|
|
||||||
}
|
|
||||||
|
|
||||||
//-------------------------------------------------------------------
|
|
||||||
// Properties.
|
|
||||||
public static Assembly Assembly { get { return typeof(SacsResourceHelper).GetTypeInfo().Assembly; } }
|
|
||||||
|
|
||||||
//-------------------------------------------------------------------
|
|
||||||
public static String GetTextResource(TextResource textResource)
|
|
||||||
{
|
|
||||||
switch (textResource)
|
|
||||||
{
|
|
||||||
case TextResource.SaBaseCss:
|
|
||||||
return SacsResourceHelper.GetResourceText(SacsResourceHelper.TextResource.SaBaseCss);
|
|
||||||
case TextResource.SaBaseJs:
|
|
||||||
return SacsResourceHelper.GetResourceText(SacsResourceHelper.TextResource.SaBaseJs);
|
|
||||||
case TextResource.SbmBaseCss:
|
|
||||||
return SacsResourceHelper.GetResourceText(SacsResourceHelper.TextResource.SaBaseCss) + SacsResourceHelper.GetManifestResourceAsText(Assembly, "", "sbm_base.css");
|
|
||||||
case TextResource.SbmBaseJs:
|
|
||||||
return SacsResourceHelper.GetResourceText(SacsResourceHelper.TextResource.SaBaseJs) + SacsResourceHelper.GetManifestResourceAsText(Assembly, "", "sbm_base.js");
|
|
||||||
|
|
||||||
case TextResource.JQueryJs:
|
|
||||||
return SacsResourceHelper.GetResourceText(SacsResourceHelper.TextResource.JQueryJs);
|
|
||||||
case TextResource.JQueryUiCss:
|
|
||||||
return SacsResourceHelper.GetResourceText(SacsResourceHelper.TextResource.JQueryUiCss);
|
|
||||||
case TextResource.JQueryUiJs:
|
|
||||||
return SacsResourceHelper.GetResourceText(SacsResourceHelper.TextResource.JQueryUiJs);
|
|
||||||
}
|
|
||||||
return "";
|
|
||||||
}
|
|
||||||
|
|
||||||
//-------------------------------------------------------------------
|
|
||||||
public static byte[] GetImageResource(ImageResource imageResource)
|
|
||||||
{
|
|
||||||
String partialPath = "";
|
|
||||||
String resourceFilename = "";
|
|
||||||
switch (imageResource)
|
|
||||||
{
|
|
||||||
// Sapphire icons.
|
|
||||||
case ImageResource.sapphire01_side_32_png:
|
|
||||||
partialPath = "sapphire";
|
|
||||||
resourceFilename = "sapphire01-side-32.png";
|
|
||||||
break;
|
|
||||||
case ImageResource.sapphire01_side_40_png:
|
|
||||||
partialPath = "sapphire";
|
|
||||||
resourceFilename = "sapphire01-side-40.png";
|
|
||||||
break;
|
|
||||||
case ImageResource.sapphire01_side_64_png:
|
|
||||||
partialPath = "sapphire";
|
|
||||||
resourceFilename = "sapphire01-side-64.png";
|
|
||||||
break;
|
|
||||||
|
|
||||||
// Menu icons.
|
|
||||||
case ImageResource.arrow_down_black_16_png:
|
|
||||||
resourceFilename = "arrow-down-black-16.png";
|
|
||||||
break;
|
|
||||||
case ImageResource.arrow_down_black_24_png:
|
|
||||||
resourceFilename = "arrow-down-black-24.png";
|
|
||||||
break;
|
|
||||||
case ImageResource.arrow_up_black_16_png:
|
|
||||||
resourceFilename = "arrow-up-black-16.png";
|
|
||||||
break;
|
|
||||||
case ImageResource.arrow_up_black_24_png:
|
|
||||||
resourceFilename = "arrow-up-black-24.png";
|
|
||||||
break;
|
|
||||||
case ImageResource.star_amber_16_png:
|
|
||||||
resourceFilename = "star-amber-16.png";
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
if (!StringUtil.IsEmpty(resourceFilename))
|
|
||||||
{
|
|
||||||
var assembly = typeof(SbmResourceConsole).GetTypeInfo().Assembly;
|
|
||||||
byte[] resourceData = SacsResourceHelper.GetManifestResourceAsBinary(assembly, partialPath, resourceFilename);
|
|
||||||
if (resourceData != null)
|
|
||||||
return resourceData;
|
|
||||||
}
|
|
||||||
return new byte[0];
|
|
||||||
}
|
|
||||||
|
|
||||||
//-------------------------------------------------------------------
|
|
||||||
}
|
|
||||||
//=======================================================================
|
|
||||||
}
|
|
||||||
@@ -44,7 +44,6 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.App
|
|||||||
// Refresh profile.
|
// Refresh profile.
|
||||||
public void RefreshProfile(SbmConfigConsole configConsole, SaSecurityConsole securityConsole, SysId userId, List<TypeCodeDesc> securityRights)
|
public void RefreshProfile(SbmConfigConsole configConsole, SaSecurityConsole securityConsole, SysId userId, List<TypeCodeDesc> securityRights)
|
||||||
{
|
{
|
||||||
String fn = GetType().Name + ".RefreshProfile";
|
|
||||||
ClearErrorState();
|
ClearErrorState();
|
||||||
|
|
||||||
// Make a note of the security right.
|
// Make a note of the security right.
|
||||||
@@ -63,7 +62,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.App
|
|||||||
if (hostSecurityProfile == null && includeHostSecurityProfile)
|
if (hostSecurityProfile == null && includeHostSecurityProfile)
|
||||||
hostSecurityProfile = securityConsole.GetHostSecurityProfile();
|
hostSecurityProfile = securityConsole.GetHostSecurityProfile();
|
||||||
}
|
}
|
||||||
SaLogger.Debug(fn + " User: '" + UserDisplayName + "' [Id: " + UserId + "]" + (SysId.IsValid(previousUserId) ? ". Previous UserId: " + SysId.ToString(previousUserId) : ""));
|
SaLogger.Debug($"{SysUtil.Fn} User: '{UserDisplayName}' [Id: {UserId}]" + (SysId.IsValid(previousUserId) ? ". Previous UserId: " + SysId.ToString(previousUserId) : ""));
|
||||||
|
|
||||||
RefreshProfileSettings(configConsole);
|
RefreshProfileSettings(configConsole);
|
||||||
|
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ using Sarand.Net.Standard.Base.Core;
|
|||||||
using Sarand.Net.Standard.Base.Dbas;
|
using Sarand.Net.Standard.Base.Dbas;
|
||||||
using Sarand.Net.Standard.Base.ItemOptions;
|
using Sarand.Net.Standard.Base.ItemOptions;
|
||||||
using Sarand.Net.Standard.Base.Security;
|
using Sarand.Net.Standard.Base.Security;
|
||||||
|
using Sarand.Net.Standard.Base.Utils;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
namespace Sarand.BusinessMgr.Net.Standard.Base.App
|
namespace Sarand.BusinessMgr.Net.Standard.Base.App
|
||||||
@@ -96,7 +97,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.App
|
|||||||
SbmAffiliate affiliateUser = accountMgr.GetAffiliateByUserId(userId);
|
SbmAffiliate affiliateUser = accountMgr.GetAffiliateByUserId(userId);
|
||||||
if (affiliateUser == null)
|
if (affiliateUser == null)
|
||||||
{
|
{
|
||||||
SaLogger.Warn(GetType().Name + ".StartUserSession Unable to retrieve affiliate for UserId: " + SysId.ToString(userId));
|
SaLogger.Warn($"{SysUtil.Fn} Unable to retrieve affiliate for UserId: {SysId.ToString(userId)}");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
List<SysIdString> userSupervisedOwners = accountMgr.GetAffiliatesSupervisedBy(affiliateUser.Id);
|
List<SysIdString> userSupervisedOwners = accountMgr.GetAffiliatesSupervisedBy(affiliateUser.Id);
|
||||||
|
|||||||
@@ -1,52 +1,139 @@
|
|||||||
using Sarand.BusinessMgr.Net.Standard.Base.Bus;
|
using Org.BouncyCastle.Asn1.IsisMtt;
|
||||||
|
using Sarand.BusinessMgr.Net.Standard.Base.Bus;
|
||||||
using Sarand.BusinessMgr.Net.Standard.Base.Core;
|
using Sarand.BusinessMgr.Net.Standard.Base.Core;
|
||||||
using Sarand.BusinessMgr.Net.Standard.Base.Mgr;
|
using Sarand.BusinessMgr.Net.Standard.Base.Mgr;
|
||||||
using Sarand.Net.Standard.Base.App;
|
using Sarand.Net.Standard.Base.App;
|
||||||
using Sarand.Net.Standard.Base.Bus;
|
using Sarand.Net.Standard.Base.Bus;
|
||||||
|
using Sarand.Net.Standard.Base.Core;
|
||||||
using Sarand.Net.Standard.Base.Utils;
|
using Sarand.Net.Standard.Base.Utils;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Xml.Linq;
|
||||||
|
|
||||||
namespace Sarand.BusinessMgr.Net.Standard.Base.App
|
namespace Sarand.BusinessMgr.Net.Standard.Base.App
|
||||||
{
|
{
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
public class SbmSysParamCache
|
public class SbmSysParamCache : SacsDisposable
|
||||||
{
|
{
|
||||||
|
//-------------------------------------------------------------------
|
||||||
|
// Definitions.
|
||||||
|
public enum ParamName
|
||||||
|
{
|
||||||
|
/// <summary>User's selected organisation.</summary>
|
||||||
|
SelectedCompany,
|
||||||
|
SelectedOwner = SelectedCompany,
|
||||||
|
DefaultView,
|
||||||
|
ApplicationSize,
|
||||||
|
LeftPanelWidth,
|
||||||
|
SelectedAssociation,
|
||||||
|
SelectedTransaction,
|
||||||
|
SelectedPortfolio,
|
||||||
|
SelectedPortfolioItem,
|
||||||
|
SelectedCommodity,
|
||||||
|
AssocMaintTab,
|
||||||
|
}
|
||||||
|
public static String ParamName_SelectedCompany = "SelectedCompany";
|
||||||
|
public static String ParamName_DefaultView = "DefaultView";
|
||||||
|
public static String ParamName_ApplicationSize = "AppSize";
|
||||||
|
public static String ParamName_LeftPanelWidth = "LeftPanelWidth";
|
||||||
|
public static String ParamName_SelectedAssociation = "SelectedAssociation";
|
||||||
|
public static String ParamName_SelectedTransaction = "SelectedTransaction";
|
||||||
|
public static String ParamName_SelectedPortfolio = "SelectedPortfolio";
|
||||||
|
public static String ParamName_SelectedPortfolioItem = "SelectedPortfolioItem";
|
||||||
|
public static String ParamName_SelectedCommodity = "SelectedCommodity";
|
||||||
|
public static String ParamName_AssocMaintTab = "AssocMaintTab";
|
||||||
|
|
||||||
//-------------------------------------------------------------------
|
//-------------------------------------------------------------------
|
||||||
// Data members.
|
// Data members.
|
||||||
protected readonly List<SbmSysParam> userSysParams = new List<SbmSysParam>();
|
protected readonly List<SbmSysParam> userSysParams = new List<SbmSysParam>();
|
||||||
|
|
||||||
//-------------------------------------------------------------------
|
//-------------------------------------------------------------------
|
||||||
// Protected Construction - use derived objects.
|
// Construction.
|
||||||
public SbmSysParamCache(ISbmUserContext userContext)
|
public SbmSysParamCache(ISbmUserContext userContext)
|
||||||
{
|
{
|
||||||
this.UserContext = userContext;
|
this.UserContext = userContext;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected override void Dispose(bool disposing)
|
||||||
|
{
|
||||||
|
if (disposing)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//-------------------------------------------------------------------
|
//-------------------------------------------------------------------
|
||||||
// Properties.
|
// Properties.
|
||||||
public ISbmUserContext UserContext { get; }
|
public ISbmUserContext UserContext { get; }
|
||||||
public SysId AffiliateIdUser { get; private set; }
|
public SysId AffiliateIdUser { get { return UserContext.User.AffiliateId; } }
|
||||||
|
public bool Modified { get; private set; }
|
||||||
|
|
||||||
//-------------------------------------------------------------------
|
//-------------------------------------------------------------------
|
||||||
|
// Utilities.
|
||||||
|
public static String GetParamName(ParamName paramName)
|
||||||
|
{
|
||||||
|
switch (paramName)
|
||||||
|
{
|
||||||
|
case ParamName.SelectedCompany:
|
||||||
|
return ParamName_SelectedCompany;
|
||||||
|
case ParamName.DefaultView:
|
||||||
|
return ParamName_DefaultView;
|
||||||
|
case ParamName.ApplicationSize:
|
||||||
|
return ParamName_ApplicationSize;
|
||||||
|
case ParamName.LeftPanelWidth:
|
||||||
|
return ParamName_LeftPanelWidth;
|
||||||
|
case ParamName.SelectedAssociation:
|
||||||
|
return ParamName_SelectedAssociation;
|
||||||
|
case ParamName.SelectedTransaction:
|
||||||
|
return ParamName_SelectedTransaction;
|
||||||
|
case ParamName.SelectedPortfolio:
|
||||||
|
return ParamName_SelectedPortfolio;
|
||||||
|
case ParamName.SelectedPortfolioItem:
|
||||||
|
return ParamName_SelectedPortfolioItem;
|
||||||
|
case ParamName.SelectedCommodity:
|
||||||
|
return ParamName_SelectedCommodity;
|
||||||
|
case ParamName.AssocMaintTab:
|
||||||
|
return ParamName_AssocMaintTab;
|
||||||
|
}
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
//-------------------------------------------------------------------
|
||||||
|
|
||||||
/// <summary>Retrieve the value for the user parameter.</summary>
|
/// <summary>Retrieve the value for the user parameter.</summary>
|
||||||
public String GetParamValue(String name, SysId affiliateIdTarget = null, SysId associationId = null)
|
public String GetUserParamValue(ParamName paramName, SysId affiliateIdTarget = null, SysId associationId = null)
|
||||||
|
{
|
||||||
|
return GetUserParamValue(GetParamName(paramName), affiliateIdTarget, associationId);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>Retrieve the value for the user parameter.</summary>
|
||||||
|
public String GetUserParamValue(String name, SysId affiliateIdTarget = null, SysId associationId = null)
|
||||||
{
|
{
|
||||||
if (!SysId.IsValid(UserContext.User.AffiliateId)) return "";
|
if (!SysId.IsValid(UserContext.User.AffiliateId)) return "";
|
||||||
return GetParam(name, affiliateIdTarget, associationId)?.Value ?? "";
|
return GetParam(name, affiliateIdTarget, associationId)?.Value ?? "";
|
||||||
}
|
}
|
||||||
|
|
||||||
//-------------------------------------------------------------------
|
//-------------------------------------------------------------------
|
||||||
|
|
||||||
/// <summary>Store value against user parameter.</summary>
|
/// <summary>Store value against user parameter.</summary>
|
||||||
public bool SetSessionParam(String name, String value, SysId affiliateIdTarget = null, SysId associationId = null)
|
public bool SetUserParamValue(ParamName paramName, String value, SysId affiliateIdTarget = null, SysId associationId = null)
|
||||||
|
{
|
||||||
|
return SetUserParamValue(GetParamName(paramName), value, affiliateIdTarget, associationId);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>Store value against user parameter.</summary>
|
||||||
|
public bool SetUserParamValue(String name, String value, SysId affiliateIdTarget = null, SysId associationId = null)
|
||||||
{
|
{
|
||||||
bool success = false;
|
bool success = false;
|
||||||
if (!SysId.IsValid(UserContext.User.AffiliateId)) return false;
|
if (!SysId.IsValid(UserContext.User.AffiliateId)) return false;
|
||||||
SbmSysParam sysParam = GetParam(name, affiliateIdTarget, associationId);
|
SbmSysParam sysParam = GetParam(name, affiliateIdTarget, associationId);
|
||||||
if (sysParam != null)
|
if (sysParam != null)
|
||||||
{
|
{
|
||||||
// Update the value.
|
if (!sysParam.Value.Equals(value))
|
||||||
sysParam.Value = value;
|
{
|
||||||
|
// Update the value.
|
||||||
|
sysParam.Value = value;
|
||||||
|
Modified = true;
|
||||||
|
}
|
||||||
success = true;
|
success = true;
|
||||||
}
|
}
|
||||||
return success;
|
return success;
|
||||||
@@ -98,7 +185,6 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.App
|
|||||||
/// <summary>Store the params cached for the current user.</summary>
|
/// <summary>Store the params cached for the current user.</summary>
|
||||||
public bool Store()
|
public bool Store()
|
||||||
{
|
{
|
||||||
String fn = GetType().Name + ".Store";
|
|
||||||
bool success = true;
|
bool success = true;
|
||||||
using (SbmAccountMgr accountMgr = CreateAccountMgr())
|
using (SbmAccountMgr accountMgr = CreateAccountMgr())
|
||||||
{
|
{
|
||||||
@@ -110,7 +196,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.App
|
|||||||
if (!accountMgr.InsertSysParam(sysParam, UserContext.DbUpdateInfo))
|
if (!accountMgr.InsertSysParam(sysParam, UserContext.DbUpdateInfo))
|
||||||
{
|
{
|
||||||
success = false;
|
success = false;
|
||||||
SaLogger.Warn(fn + " Failed to add parameter - " + accountMgr.ErrorStateMessage);
|
SaLogger.Warn($"{SysUtil.Fn} Failed to add parameter - {accountMgr.ErrorStateMessage}");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -119,11 +205,12 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.App
|
|||||||
if (!accountMgr.UpdateSysParam(sysParam, UserContext.DbUpdateInfo))
|
if (!accountMgr.UpdateSysParam(sysParam, UserContext.DbUpdateInfo))
|
||||||
{
|
{
|
||||||
success = false;
|
success = false;
|
||||||
SaLogger.Warn(fn + " Failed to update parameter - " + accountMgr.ErrorStateMessage);
|
SaLogger.Warn($"{SysUtil.Fn} Failed to update parameter - {accountMgr.ErrorStateMessage}");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (success) Modified = false;
|
||||||
return success;
|
return success;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -131,8 +218,8 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.App
|
|||||||
/// <summary>Clear the params cached for the current user.</summary>
|
/// <summary>Clear the params cached for the current user.</summary>
|
||||||
public void Clear()
|
public void Clear()
|
||||||
{
|
{
|
||||||
AffiliateIdUser = null;
|
|
||||||
ListUtil.ClearAndDispose(userSysParams);
|
ListUtil.ClearAndDispose(userSysParams);
|
||||||
|
Modified = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
//-------------------------------------------------------------------
|
//-------------------------------------------------------------------
|
||||||
|
|||||||
@@ -130,7 +130,6 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.App
|
|||||||
SessionContext = sessionContext;
|
SessionContext = sessionContext;
|
||||||
organisationData = new OrganisationData_Internal();
|
organisationData = new OrganisationData_Internal();
|
||||||
securityProfile = new SbmSecurityProfile(this, true);
|
securityProfile = new SbmSecurityProfile(this, true);
|
||||||
DbUpdateInfo = new DbUpdateInfo(User.AffiliateId, User.DisplayName, SacsSystem.ComputerName);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//-------------------------------------------------------------------
|
//-------------------------------------------------------------------
|
||||||
@@ -139,7 +138,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.App
|
|||||||
public ISbmUserContext.IUserData User { get { return userData; } }
|
public ISbmUserContext.IUserData User { get { return userData; } }
|
||||||
public bool ValidUser { get { return SysId.IsValid(userData.SecurityItemId) && SysId.IsValid(userData.AffiliateId); } }
|
public bool ValidUser { get { return SysId.IsValid(userData.SecurityItemId) && SysId.IsValid(userData.AffiliateId); } }
|
||||||
public ISbmUserContext.IOrganisationData Organisation { get { return organisationData; } }
|
public ISbmUserContext.IOrganisationData Organisation { get { return organisationData; } }
|
||||||
public DbUpdateInfo DbUpdateInfo { get; private set; }
|
public DbUpdateInfo DbUpdateInfo { get { return new DbUpdateInfo(User?.AffiliateId, User?.DisplayName ?? "", SacsSystem.ComputerName); } }
|
||||||
|
|
||||||
//-------------------------------------------------------------------
|
//-------------------------------------------------------------------
|
||||||
// Security profile.
|
// Security profile.
|
||||||
@@ -283,19 +282,15 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.App
|
|||||||
protected void SetUserData(SaSecurityItem securityItemUser, SbmAffiliate affiliateUser, List<SysIdString> supervisedOwners)
|
protected void SetUserData(SaSecurityItem securityItemUser, SbmAffiliate affiliateUser, List<SysIdString> supervisedOwners)
|
||||||
{
|
{
|
||||||
userData.Refresh(securityItemUser, affiliateUser, supervisedOwners);
|
userData.Refresh(securityItemUser, affiliateUser, supervisedOwners);
|
||||||
DbUpdateInfo = new DbUpdateInfo(User.AffiliateId, User.DisplayName, SacsSystem.ComputerName);
|
|
||||||
}
|
}
|
||||||
protected void ClearUserData()
|
protected void ClearUserData()
|
||||||
{
|
{
|
||||||
userData.Clear();
|
userData.Clear();
|
||||||
organisationData.Clear();
|
organisationData.Clear();
|
||||||
SetSecurityProfile(new SbmSecurityProfile(this, true));
|
SetSecurityProfile(new SbmSecurityProfile(this, true));
|
||||||
DbUpdateInfo = new DbUpdateInfo(User.AffiliateId, User.DisplayName, SacsSystem.ComputerName);
|
|
||||||
}
|
}
|
||||||
protected void SetOrganisationData(SysId affiliateIdOrganisation)
|
protected void SetOrganisationData(SysId affiliateIdOrganisation)
|
||||||
{
|
{
|
||||||
String fn = GetType().Name + ".SetOrganisationData";
|
|
||||||
|
|
||||||
// Interface context for selected organisation.
|
// Interface context for selected organisation.
|
||||||
String interfaceContext = SbmAccountMgr.GetInterfaceContext(affiliateIdOrganisation);
|
String interfaceContext = SbmAccountMgr.GetInterfaceContext(affiliateIdOrganisation);
|
||||||
|
|
||||||
@@ -329,7 +324,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.App
|
|||||||
// Retrieve the options for this association.
|
// Retrieve the options for this association.
|
||||||
organisationData.configOptionsCache.Reset(associationItemId_Owner, affiliateItemId_Owner);
|
organisationData.configOptionsCache.Reset(associationItemId_Owner, affiliateItemId_Owner);
|
||||||
organisationData.configOptionsCache.ItemOptions.AddRange(itemOptionConsole.GetItemOptionsForItem(associationItemId_Owner));
|
organisationData.configOptionsCache.ItemOptions.AddRange(itemOptionConsole.GetItemOptionsForItem(associationItemId_Owner));
|
||||||
SaLogger.Debug(fn + " Populated organisation options: " + organisationData.configOptionsCache.ItemOptions.Count);
|
SaLogger.Debug($"{SysUtil.Fn} Populated organisation options: {organisationData.configOptionsCache.ItemOptions.Count}.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -444,17 +444,16 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.Bus
|
|||||||
public Data GetData() { return data.Clone(); }
|
public Data GetData() { return data.Clone(); }
|
||||||
public void SetData(Data data)
|
public void SetData(Data data)
|
||||||
{
|
{
|
||||||
String fn = GetType().Name + ".SetData";
|
|
||||||
// Properties that cannot be changed if previously specified.
|
// Properties that cannot be changed if previously specified.
|
||||||
// Id.
|
// Id.
|
||||||
if (SysId.IsValid(Id) && SysId.ToInt(Id) != SysId.ToInt(data.Id))
|
if (SysId.IsValid(Id) && SysId.ToInt(Id) != SysId.ToInt(data.Id))
|
||||||
throw new NotSupportedException(fn + " Id cannot be changed");
|
throw new NotSupportedException($"{SysUtil.Fn} Id cannot be changed");
|
||||||
// Item type.
|
// Item type.
|
||||||
if ((int)ItemType > 1 && ItemType != data.ItemType)
|
if ((int)ItemType > 1 && ItemType != data.ItemType)
|
||||||
throw new NotSupportedException(fn + " Item Type cannot be changed");
|
throw new NotSupportedException($"{SysUtil.Fn} Item Type cannot be changed");
|
||||||
// Item Id.
|
// Item Id.
|
||||||
if (SysId.IsValid(ItemId) && SysId.ToInt(ItemId) != SysId.ToInt(data.ItemId))
|
if (SysId.IsValid(ItemId) && SysId.ToInt(ItemId) != SysId.ToInt(data.ItemId))
|
||||||
throw new NotSupportedException(fn + " Item Id cannot be changed");
|
throw new NotSupportedException($"{SysUtil.Fn} Item Id cannot be changed");
|
||||||
// Populate individual properties to ensure that 'Changed' indicator is kept up to date.
|
// Populate individual properties to ensure that 'Changed' indicator is kept up to date.
|
||||||
this.data.PopulateFrom(data);
|
this.data.PopulateFrom(data);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -471,10 +471,9 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.Bus
|
|||||||
public Data GetData() { return data.Clone(); }
|
public Data GetData() { return data.Clone(); }
|
||||||
public void SetData(Data data)
|
public void SetData(Data data)
|
||||||
{
|
{
|
||||||
String fn = GetType().Name + ".SetData";
|
|
||||||
// Properties that cannot be changed if previously specified.
|
// Properties that cannot be changed if previously specified.
|
||||||
if (SysId.IsValid(Id) && SysId.ToInt(Id) != SysId.ToInt(data.Id))
|
if (SysId.IsValid(Id) && SysId.ToInt(Id) != SysId.ToInt(data.Id))
|
||||||
throw new NotSupportedException(fn + " Id cannot be changed");
|
throw new NotSupportedException($"{SysUtil.Fn} Id cannot be changed");
|
||||||
// Populate individual properties to ensure that 'Changed' indicator is kept up to date.
|
// Populate individual properties to ensure that 'Changed' indicator is kept up to date.
|
||||||
this.data.PopulateFrom(data);
|
this.data.PopulateFrom(data);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -416,10 +416,9 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.Bus
|
|||||||
public Data GetData() { return data.Clone(); }
|
public Data GetData() { return data.Clone(); }
|
||||||
public void SetData(Data data)
|
public void SetData(Data data)
|
||||||
{
|
{
|
||||||
String fn = GetType().Name + ".SetData";
|
|
||||||
// Properties that cannot be changed if previously specified.
|
// Properties that cannot be changed if previously specified.
|
||||||
if (SysId.IsValid(Id) && SysId.ToInt(Id) != SysId.ToInt(data.Id))
|
if (SysId.IsValid(Id) && SysId.ToInt(Id) != SysId.ToInt(data.Id))
|
||||||
throw new NotSupportedException(fn + " Id cannot be changed");
|
throw new NotSupportedException($"{SysUtil.Fn} Id cannot be changed");
|
||||||
// Populate individual properties to ensure that 'Changed' indicator is kept up to date.
|
// Populate individual properties to ensure that 'Changed' indicator is kept up to date.
|
||||||
this.data.PopulateFrom(data);
|
this.data.PopulateFrom(data);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -256,10 +256,9 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.Bus
|
|||||||
public Data GetData() { return data.Clone(); }
|
public Data GetData() { return data.Clone(); }
|
||||||
public void SetData(Data data)
|
public void SetData(Data data)
|
||||||
{
|
{
|
||||||
String fn = GetType().Name + ".SetData";
|
|
||||||
// Properties that cannot be changed if previously specified.
|
// Properties that cannot be changed if previously specified.
|
||||||
if (SysId.IsValid(Id) && SysId.ToInt(Id) != SysId.ToInt(data.Id))
|
if (SysId.IsValid(Id) && SysId.ToInt(Id) != SysId.ToInt(data.Id))
|
||||||
throw new NotSupportedException(fn + " Id cannot be changed");
|
throw new NotSupportedException($"{SysUtil.Fn} Id cannot be changed");
|
||||||
// Populate individual properties to ensure that 'Changed' indicator is kept up to date.
|
// Populate individual properties to ensure that 'Changed' indicator is kept up to date.
|
||||||
this.data.PopulateFrom(data);
|
this.data.PopulateFrom(data);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
using Sarand.BusinessMgr.Net.Standard.Base.Core;
|
using Sarand.BusinessMgr.Net.Standard.Base.Core;
|
||||||
using Sarand.Net.Standard.Base.Bus;
|
using Sarand.Net.Standard.Base.Bus;
|
||||||
using Sarand.Net.Standard.Base.Core;
|
using Sarand.Net.Standard.Base.Core;
|
||||||
|
using Sarand.Net.Standard.Base.Utils;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
@@ -164,10 +165,9 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.Bus
|
|||||||
public Data GetData() { return data.Clone(); }
|
public Data GetData() { return data.Clone(); }
|
||||||
public void SetData(Data data)
|
public void SetData(Data data)
|
||||||
{
|
{
|
||||||
String fn = GetType().Name + ".SetData";
|
|
||||||
// Properties that cannot be changed if previously specified.
|
// Properties that cannot be changed if previously specified.
|
||||||
if (SysId.IsValid(Id) && SysId.ToInt(Id) != SysId.ToInt(data.Id))
|
if (SysId.IsValid(Id) && SysId.ToInt(Id) != SysId.ToInt(data.Id))
|
||||||
throw new NotSupportedException(fn + " Id cannot be changed");
|
throw new NotSupportedException($"{SysUtil.Fn} Id cannot be changed");
|
||||||
// Populate individual properties to ensure that 'Changed' indicator is kept up to date.
|
// Populate individual properties to ensure that 'Changed' indicator is kept up to date.
|
||||||
this.data.PopulateFrom(data);
|
this.data.PopulateFrom(data);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -587,10 +587,9 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.Bus
|
|||||||
public Data GetData() { return data.Clone(); }
|
public Data GetData() { return data.Clone(); }
|
||||||
public void SetData(Data data)
|
public void SetData(Data data)
|
||||||
{
|
{
|
||||||
String fn = GetType().Name + ".SetData";
|
|
||||||
// Properties that cannot be changed if previously specified.
|
// Properties that cannot be changed if previously specified.
|
||||||
if (SysId.IsValid(Id) && SysId.ToInt(Id) != SysId.ToInt(data.Id))
|
if (SysId.IsValid(Id) && SysId.ToInt(Id) != SysId.ToInt(data.Id))
|
||||||
throw new NotSupportedException(fn + " Id cannot be changed");
|
throw new NotSupportedException($"{SysUtil.Fn} Id cannot be changed");
|
||||||
// Populate individual properties to ensure that 'Changed' indicator is kept up to date.
|
// Populate individual properties to ensure that 'Changed' indicator is kept up to date.
|
||||||
this.data.PopulateFrom(data);
|
this.data.PopulateFrom(data);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1130,10 +1130,9 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.Bus
|
|||||||
public Data GetData() { return data.Clone(); }
|
public Data GetData() { return data.Clone(); }
|
||||||
public void SetData(Data data)
|
public void SetData(Data data)
|
||||||
{
|
{
|
||||||
String fn = GetType().Name + ".SetData";
|
|
||||||
// Properties that cannot be changed if previously specified.
|
// Properties that cannot be changed if previously specified.
|
||||||
if (SysId.IsValid(Id) && SysId.ToInt(Id) != SysId.ToInt(data.Id))
|
if (SysId.IsValid(Id) && SysId.ToInt(Id) != SysId.ToInt(data.Id))
|
||||||
throw new NotSupportedException(fn + " Id cannot be changed");
|
throw new NotSupportedException($"{SysUtil.Fn} Id cannot be changed");
|
||||||
// Populate individual properties to ensure that 'Changed' indicator is kept up to date.
|
// Populate individual properties to ensure that 'Changed' indicator is kept up to date.
|
||||||
this.data.PopulateFrom(data);
|
this.data.PopulateFrom(data);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -169,10 +169,9 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.Bus
|
|||||||
public Data GetData() { return data.Clone(); }
|
public Data GetData() { return data.Clone(); }
|
||||||
public void SetData(Data data)
|
public void SetData(Data data)
|
||||||
{
|
{
|
||||||
String fn = GetType().Name + ".SetData";
|
|
||||||
// Properties that cannot be changed if previously specified.
|
// Properties that cannot be changed if previously specified.
|
||||||
if (SysId.IsValid(Id) && SysId.ToInt(Id) != SysId.ToInt(data.Id))
|
if (SysId.IsValid(Id) && SysId.ToInt(Id) != SysId.ToInt(data.Id))
|
||||||
throw new NotSupportedException(fn + " Id cannot be changed");
|
throw new NotSupportedException($"{SysUtil.Fn} Id cannot be changed");
|
||||||
// Populate individual properties to ensure that 'Changed' indicator is kept up to date.
|
// Populate individual properties to ensure that 'Changed' indicator is kept up to date.
|
||||||
this.data.PopulateFrom(data);
|
this.data.PopulateFrom(data);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
using Sarand.BusinessMgr.Net.Standard.Base.Core;
|
using Sarand.BusinessMgr.Net.Standard.Base.Core;
|
||||||
using Sarand.Net.Standard.Base.Bus;
|
using Sarand.Net.Standard.Base.Bus;
|
||||||
using Sarand.Net.Standard.Base.Core;
|
using Sarand.Net.Standard.Base.Core;
|
||||||
|
using Sarand.Net.Standard.Base.Utils;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
@@ -162,10 +163,9 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.Bus
|
|||||||
public Data GetData() { return data.Clone(); }
|
public Data GetData() { return data.Clone(); }
|
||||||
public void SetData(Data data)
|
public void SetData(Data data)
|
||||||
{
|
{
|
||||||
String fn = GetType().Name + ".SetData";
|
|
||||||
// Properties that cannot be changed if previously specified.
|
// Properties that cannot be changed if previously specified.
|
||||||
if (SysId.IsValid(Id) && SysId.ToInt(Id) != SysId.ToInt(data.Id))
|
if (SysId.IsValid(Id) && SysId.ToInt(Id) != SysId.ToInt(data.Id))
|
||||||
throw new NotSupportedException(fn + " Id cannot be changed");
|
throw new NotSupportedException($"{SysUtil.Fn} Id cannot be changed");
|
||||||
// Populate individual properties to ensure that 'Changed' indicator is kept up to date.
|
// Populate individual properties to ensure that 'Changed' indicator is kept up to date.
|
||||||
this.data.PopulateFrom(data);
|
this.data.PopulateFrom(data);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
using Sarand.BusinessMgr.Net.Standard.Base.Core;
|
using Sarand.BusinessMgr.Net.Standard.Base.Core;
|
||||||
using Sarand.Net.Standard.Base.Bus;
|
using Sarand.Net.Standard.Base.Bus;
|
||||||
using Sarand.Net.Standard.Base.Core;
|
using Sarand.Net.Standard.Base.Core;
|
||||||
|
using Sarand.Net.Standard.Base.Utils;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
@@ -441,10 +442,9 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.Bus
|
|||||||
public Data GetData() { return data.Clone(); }
|
public Data GetData() { return data.Clone(); }
|
||||||
public void SetData(Data data)
|
public void SetData(Data data)
|
||||||
{
|
{
|
||||||
String fn = GetType().Name + ".SetData";
|
|
||||||
// Properties that cannot be changed if previously specified.
|
// Properties that cannot be changed if previously specified.
|
||||||
if (SysId.IsValid(Id) && SysId.ToInt(Id) != SysId.ToInt(data.Id))
|
if (SysId.IsValid(Id) && SysId.ToInt(Id) != SysId.ToInt(data.Id))
|
||||||
throw new NotSupportedException(fn + " Id cannot be changed");
|
throw new NotSupportedException($"{SysUtil.Fn} Id cannot be changed");
|
||||||
// Populate individual properties to ensure that 'Changed' indicator is kept up to date.
|
// Populate individual properties to ensure that 'Changed' indicator is kept up to date.
|
||||||
this.data.PopulateFrom(data);
|
this.data.PopulateFrom(data);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
using Sarand.BusinessMgr.Net.Standard.Base.Core;
|
using Sarand.BusinessMgr.Net.Standard.Base.Core;
|
||||||
using Sarand.Net.Standard.Base.Bus;
|
using Sarand.Net.Standard.Base.Bus;
|
||||||
using Sarand.Net.Standard.Base.Core;
|
using Sarand.Net.Standard.Base.Core;
|
||||||
|
using Sarand.Net.Standard.Base.Utils;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
@@ -202,10 +203,9 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.Bus
|
|||||||
public Data GetData() { return data.Clone(); }
|
public Data GetData() { return data.Clone(); }
|
||||||
public void SetData(Data data)
|
public void SetData(Data data)
|
||||||
{
|
{
|
||||||
String fn = GetType().Name + ".SetData";
|
|
||||||
// Properties that cannot be changed if previously specified.
|
// Properties that cannot be changed if previously specified.
|
||||||
if (SysId.IsValid(Id) && SysId.ToInt(Id) != SysId.ToInt(data.Id))
|
if (SysId.IsValid(Id) && SysId.ToInt(Id) != SysId.ToInt(data.Id))
|
||||||
throw new NotSupportedException(fn + " Id cannot be changed");
|
throw new NotSupportedException($"{SysUtil.Fn} Id cannot be changed");
|
||||||
// Populate individual properties to ensure that 'Changed' indicator is kept up to date.
|
// Populate individual properties to ensure that 'Changed' indicator is kept up to date.
|
||||||
this.data.PopulateFrom(data);
|
this.data.PopulateFrom(data);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
using Sarand.BusinessMgr.Net.Standard.Base.Core;
|
using Sarand.BusinessMgr.Net.Standard.Base.Core;
|
||||||
using Sarand.Net.Standard.Base.Bus;
|
using Sarand.Net.Standard.Base.Bus;
|
||||||
using Sarand.Net.Standard.Base.Core;
|
using Sarand.Net.Standard.Base.Core;
|
||||||
|
using Sarand.Net.Standard.Base.Utils;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
@@ -203,10 +204,9 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.Bus
|
|||||||
public Data GetData() { return data.Clone(); }
|
public Data GetData() { return data.Clone(); }
|
||||||
public void SetData(Data data)
|
public void SetData(Data data)
|
||||||
{
|
{
|
||||||
String fn = GetType().Name + ".SetData";
|
|
||||||
// Properties that cannot be changed if previously specified.
|
// Properties that cannot be changed if previously specified.
|
||||||
if (SysId.IsValid(Id) && SysId.ToInt(Id) != SysId.ToInt(data.Id))
|
if (SysId.IsValid(Id) && SysId.ToInt(Id) != SysId.ToInt(data.Id))
|
||||||
throw new NotSupportedException(fn + " Id cannot be changed");
|
throw new NotSupportedException($"{SysUtil.Fn} Id cannot be changed");
|
||||||
// Populate individual properties to ensure that 'Changed' indicator is kept up to date.
|
// Populate individual properties to ensure that 'Changed' indicator is kept up to date.
|
||||||
this.data.PopulateFrom(data);
|
this.data.PopulateFrom(data);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -291,10 +291,9 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.Bus
|
|||||||
public Data GetData() { return data.Clone(); }
|
public Data GetData() { return data.Clone(); }
|
||||||
public void SetData(Data data)
|
public void SetData(Data data)
|
||||||
{
|
{
|
||||||
String fn = GetType().Name + ".SetData";
|
|
||||||
// Properties that cannot be changed if previously specified.
|
// Properties that cannot be changed if previously specified.
|
||||||
if (SysId.IsValid(Id) && SysId.ToInt(Id) != SysId.ToInt(data.Id))
|
if (SysId.IsValid(Id) && SysId.ToInt(Id) != SysId.ToInt(data.Id))
|
||||||
throw new NotSupportedException(fn + " Id cannot be changed");
|
throw new NotSupportedException($"{SysUtil.Fn} Id cannot be changed");
|
||||||
// Populate individual properties to ensure that 'Changed' indicator is kept up to date.
|
// Populate individual properties to ensure that 'Changed' indicator is kept up to date.
|
||||||
this.data.PopulateFrom(data);
|
this.data.PopulateFrom(data);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
using Sarand.BusinessMgr.Net.Standard.Base.Core;
|
using Sarand.BusinessMgr.Net.Standard.Base.Core;
|
||||||
using Sarand.Net.Standard.Base.Bus;
|
using Sarand.Net.Standard.Base.Bus;
|
||||||
using Sarand.Net.Standard.Base.Core;
|
using Sarand.Net.Standard.Base.Core;
|
||||||
|
using Sarand.Net.Standard.Base.Utils;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
@@ -165,10 +166,9 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.Bus
|
|||||||
public Data GetData() { return data.Clone(); }
|
public Data GetData() { return data.Clone(); }
|
||||||
public void SetData(Data data)
|
public void SetData(Data data)
|
||||||
{
|
{
|
||||||
String fn = GetType().Name + ".SetData";
|
|
||||||
// Properties that cannot be changed if previously specified.
|
// Properties that cannot be changed if previously specified.
|
||||||
if (SysId.IsValid(Id) && SysId.ToInt(Id) != SysId.ToInt(data.Id))
|
if (SysId.IsValid(Id) && SysId.ToInt(Id) != SysId.ToInt(data.Id))
|
||||||
throw new NotSupportedException(fn + " Id cannot be changed");
|
throw new NotSupportedException($"{SysUtil.Fn} Id cannot be changed");
|
||||||
// Populate individual properties to ensure that 'Changed' indicator is kept up to date.
|
// Populate individual properties to ensure that 'Changed' indicator is kept up to date.
|
||||||
this.data.PopulateFrom(data);
|
this.data.PopulateFrom(data);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -202,10 +202,9 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.Bus
|
|||||||
public Data GetData() { return data.Clone(); }
|
public Data GetData() { return data.Clone(); }
|
||||||
public void SetData(Data data)
|
public void SetData(Data data)
|
||||||
{
|
{
|
||||||
String fn = GetType().Name + ".SetData";
|
|
||||||
// Properties that cannot be changed if previously specified.
|
// Properties that cannot be changed if previously specified.
|
||||||
if (SysId.IsValid(Id) && SysId.ToInt(Id) != SysId.ToInt(data.Id))
|
if (SysId.IsValid(Id) && SysId.ToInt(Id) != SysId.ToInt(data.Id))
|
||||||
throw new NotSupportedException(fn + " Id cannot be changed");
|
throw new NotSupportedException($"{SysUtil.Fn} Id cannot be changed");
|
||||||
// Populate individual properties to ensure that 'Changed' indicator is kept up to date.
|
// Populate individual properties to ensure that 'Changed' indicator is kept up to date.
|
||||||
this.data.PopulateFrom(data);
|
this.data.PopulateFrom(data);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -164,10 +164,9 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.Bus
|
|||||||
public Data GetData() { return data.Clone(); }
|
public Data GetData() { return data.Clone(); }
|
||||||
public void SetData(Data data)
|
public void SetData(Data data)
|
||||||
{
|
{
|
||||||
String fn = GetType().Name + ".SetData";
|
|
||||||
// Properties that cannot be changed if previously specified.
|
// Properties that cannot be changed if previously specified.
|
||||||
if (SysId.IsValid(Id) && SysId.ToInt(Id) != SysId.ToInt(data.Id))
|
if (SysId.IsValid(Id) && SysId.ToInt(Id) != SysId.ToInt(data.Id))
|
||||||
throw new NotSupportedException(fn + " Id cannot be changed");
|
throw new NotSupportedException($"{SysUtil.Fn} Id cannot be changed");
|
||||||
// Populate individual properties to ensure that 'Changed' indicator is kept up to date.
|
// Populate individual properties to ensure that 'Changed' indicator is kept up to date.
|
||||||
this.data.PopulateFrom(data);
|
this.data.PopulateFrom(data);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ using Sarand.BusinessMgr.Net.Standard.Base.Core;
|
|||||||
using Sarand.Net.Standard.Base.App;
|
using Sarand.Net.Standard.Base.App;
|
||||||
using Sarand.Net.Standard.Base.Bus;
|
using Sarand.Net.Standard.Base.Bus;
|
||||||
using Sarand.Net.Standard.Base.Core;
|
using Sarand.Net.Standard.Base.Core;
|
||||||
|
using Sarand.Net.Standard.Base.Utils;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
@@ -232,10 +233,9 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.Bus
|
|||||||
public Data GetData() { return data.Clone(); }
|
public Data GetData() { return data.Clone(); }
|
||||||
public void SetData(Data data)
|
public void SetData(Data data)
|
||||||
{
|
{
|
||||||
String fn = GetType().Name + ".SetData";
|
|
||||||
// Properties that cannot be changed if previously specified.
|
// Properties that cannot be changed if previously specified.
|
||||||
if (SysId.IsValid(Id) && SysId.ToInt(Id) != SysId.ToInt(data.Id))
|
if (SysId.IsValid(Id) && SysId.ToInt(Id) != SysId.ToInt(data.Id))
|
||||||
throw new NotSupportedException(fn + " Id cannot be changed");
|
throw new NotSupportedException($"{SysUtil.Fn} Id cannot be changed");
|
||||||
// Populate individual properties to ensure that 'Changed' indicator is kept up to date.
|
// Populate individual properties to ensure that 'Changed' indicator is kept up to date.
|
||||||
this.data.PopulateFrom(data);
|
this.data.PopulateFrom(data);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
using Sarand.BusinessMgr.Net.Standard.Base.Core;
|
using Sarand.BusinessMgr.Net.Standard.Base.Core;
|
||||||
using Sarand.Net.Standard.Base.Bus;
|
using Sarand.Net.Standard.Base.Bus;
|
||||||
using Sarand.Net.Standard.Base.Core;
|
using Sarand.Net.Standard.Base.Core;
|
||||||
|
using Sarand.Net.Standard.Base.Utils;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
@@ -153,10 +154,9 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.Bus
|
|||||||
public Data GetData() { return data.Clone(); }
|
public Data GetData() { return data.Clone(); }
|
||||||
public void SetData(Data data)
|
public void SetData(Data data)
|
||||||
{
|
{
|
||||||
String fn = GetType().Name + ".SetData";
|
|
||||||
// Properties that cannot be changed if previously specified.
|
// Properties that cannot be changed if previously specified.
|
||||||
if (SysId.IsValid(Id) && SysId.ToInt(Id) != SysId.ToInt(data.Id))
|
if (SysId.IsValid(Id) && SysId.ToInt(Id) != SysId.ToInt(data.Id))
|
||||||
throw new NotSupportedException(fn + " Id cannot be changed");
|
throw new NotSupportedException($"{SysUtil.Fn} Id cannot be changed");
|
||||||
// Populate individual properties to ensure that 'Changed' indicator is kept up to date.
|
// Populate individual properties to ensure that 'Changed' indicator is kept up to date.
|
||||||
this.data.PopulateFrom(data);
|
this.data.PopulateFrom(data);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -215,10 +215,9 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.Bus
|
|||||||
public Data GetData() { return data.Clone(); }
|
public Data GetData() { return data.Clone(); }
|
||||||
public void SetData(Data data)
|
public void SetData(Data data)
|
||||||
{
|
{
|
||||||
String fn = GetType().Name + ".SetData";
|
|
||||||
// Properties that cannot be changed if previously specified.
|
// Properties that cannot be changed if previously specified.
|
||||||
if (SysId.IsValid(Id) && SysId.ToInt(Id) != SysId.ToInt(data.Id))
|
if (SysId.IsValid(Id) && SysId.ToInt(Id) != SysId.ToInt(data.Id))
|
||||||
throw new NotSupportedException(fn + " Id cannot be changed");
|
throw new NotSupportedException($"{SysUtil.Fn} Id cannot be changed");
|
||||||
// Populate individual properties to ensure that 'Changed' indicator is kept up to date.
|
// Populate individual properties to ensure that 'Changed' indicator is kept up to date.
|
||||||
this.data.PopulateFrom(data);
|
this.data.PopulateFrom(data);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
using Sarand.BusinessMgr.Net.Standard.Base.Core;
|
using Sarand.BusinessMgr.Net.Standard.Base.Core;
|
||||||
using Sarand.Net.Standard.Base.Bus;
|
using Sarand.Net.Standard.Base.Bus;
|
||||||
using Sarand.Net.Standard.Base.Core;
|
using Sarand.Net.Standard.Base.Core;
|
||||||
|
using Sarand.Net.Standard.Base.Utils;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
@@ -226,10 +227,9 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.Bus
|
|||||||
public Data GetData() { return data.Clone(); }
|
public Data GetData() { return data.Clone(); }
|
||||||
public void SetData(Data data)
|
public void SetData(Data data)
|
||||||
{
|
{
|
||||||
String fn = GetType().Name + ".SetData";
|
|
||||||
// Properties that cannot be changed if previously specified.
|
// Properties that cannot be changed if previously specified.
|
||||||
if (SysId.IsValid(Id) && SysId.ToInt(Id) != SysId.ToInt(data.Id))
|
if (SysId.IsValid(Id) && SysId.ToInt(Id) != SysId.ToInt(data.Id))
|
||||||
throw new NotSupportedException(fn + " Id cannot be changed");
|
throw new NotSupportedException($"{SysUtil.Fn} Id cannot be changed");
|
||||||
// Populate individual properties to ensure that 'Changed' indicator is kept up to date.
|
// Populate individual properties to ensure that 'Changed' indicator is kept up to date.
|
||||||
this.data.PopulateFrom(data);
|
this.data.PopulateFrom(data);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
using Sarand.BusinessMgr.Net.Standard.Base.Core;
|
using Sarand.BusinessMgr.Net.Standard.Base.Core;
|
||||||
using Sarand.Net.Standard.Base.Bus;
|
using Sarand.Net.Standard.Base.Bus;
|
||||||
using Sarand.Net.Standard.Base.Core;
|
using Sarand.Net.Standard.Base.Core;
|
||||||
|
using Sarand.Net.Standard.Base.Utils;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
@@ -203,12 +204,11 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.Bus
|
|||||||
public Data GetData() { return data.Clone(); }
|
public Data GetData() { return data.Clone(); }
|
||||||
public void SetData(Data data)
|
public void SetData(Data data)
|
||||||
{
|
{
|
||||||
String fn = GetType().Name + ".SetData";
|
|
||||||
// Properties that cannot be changed if previously specified.
|
// Properties that cannot be changed if previously specified.
|
||||||
if (SysId.IsValid(PriceSetId) && SysId.ToInt(PriceSetId) != SysId.ToInt(data.PriceSetId))
|
if (SysId.IsValid(PriceSetId) && SysId.ToInt(PriceSetId) != SysId.ToInt(data.PriceSetId))
|
||||||
throw new NotSupportedException(fn + "Price set Id cannot be changed");
|
throw new NotSupportedException($"{SysUtil.Fn} Price set Id cannot be changed");
|
||||||
if (SysId.IsValid(CommodityId) && SysId.ToInt(CommodityId) != SysId.ToInt(data.CommodityId))
|
if (SysId.IsValid(CommodityId) && SysId.ToInt(CommodityId) != SysId.ToInt(data.CommodityId))
|
||||||
throw new NotSupportedException(fn + "Commodity Id cannot be changed");
|
throw new NotSupportedException($"{SysUtil.Fn} Commodity Id cannot be changed");
|
||||||
// Populate individual properties to ensure that 'Changed' indicator is kept up to date.
|
// Populate individual properties to ensure that 'Changed' indicator is kept up to date.
|
||||||
this.data.PopulateFrom(data);
|
this.data.PopulateFrom(data);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
using Sarand.BusinessMgr.Net.Standard.Base.Core;
|
using Sarand.BusinessMgr.Net.Standard.Base.Core;
|
||||||
using Sarand.Net.Standard.Base.Bus;
|
using Sarand.Net.Standard.Base.Bus;
|
||||||
using Sarand.Net.Standard.Base.Core;
|
using Sarand.Net.Standard.Base.Core;
|
||||||
|
using Sarand.Net.Standard.Base.Utils;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
@@ -164,10 +165,9 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.Bus
|
|||||||
public Data GetData() { return data.Clone(); }
|
public Data GetData() { return data.Clone(); }
|
||||||
public void SetData(Data data)
|
public void SetData(Data data)
|
||||||
{
|
{
|
||||||
String fn = GetType().Name + ".SetData";
|
|
||||||
// Properties that cannot be changed if previously specified.
|
// Properties that cannot be changed if previously specified.
|
||||||
if (SysId.IsValid(Id) && SysId.ToInt(Id) != SysId.ToInt(data.Id))
|
if (SysId.IsValid(Id) && SysId.ToInt(Id) != SysId.ToInt(data.Id))
|
||||||
throw new NotSupportedException(fn + " Id cannot be changed");
|
throw new NotSupportedException($"{SysUtil.Fn} Id cannot be changed");
|
||||||
// Populate individual properties to ensure that 'Changed' indicator is kept up to date.
|
// Populate individual properties to ensure that 'Changed' indicator is kept up to date.
|
||||||
this.data.PopulateFrom(data);
|
this.data.PopulateFrom(data);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
using Sarand.BusinessMgr.Net.Standard.Base.Core;
|
using Sarand.BusinessMgr.Net.Standard.Base.Core;
|
||||||
using Sarand.Net.Standard.Base.Bus;
|
using Sarand.Net.Standard.Base.Bus;
|
||||||
using Sarand.Net.Standard.Base.Core;
|
using Sarand.Net.Standard.Base.Core;
|
||||||
|
using Sarand.Net.Standard.Base.Utils;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
@@ -171,10 +172,9 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.Bus
|
|||||||
public Data GetData() { return data.Clone(); }
|
public Data GetData() { return data.Clone(); }
|
||||||
public void SetData(Data data)
|
public void SetData(Data data)
|
||||||
{
|
{
|
||||||
String fn = GetType().Name + ".SetData";
|
|
||||||
// Properties that cannot be changed if previously specified.
|
// Properties that cannot be changed if previously specified.
|
||||||
if (SysId.IsValid(Id) && SysId.ToInt(Id) != SysId.ToInt(data.Id))
|
if (SysId.IsValid(Id) && SysId.ToInt(Id) != SysId.ToInt(data.Id))
|
||||||
throw new NotSupportedException(fn + " Id cannot be changed");
|
throw new NotSupportedException($"{SysUtil.Fn} Id cannot be changed");
|
||||||
// Populate individual properties to ensure that 'Changed' indicator is kept up to date.
|
// Populate individual properties to ensure that 'Changed' indicator is kept up to date.
|
||||||
this.data.PopulateFrom(data);
|
this.data.PopulateFrom(data);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -768,10 +768,9 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.Bus
|
|||||||
public Data GetData() { return data.Clone(); }
|
public Data GetData() { return data.Clone(); }
|
||||||
public void SetData(Data data)
|
public void SetData(Data data)
|
||||||
{
|
{
|
||||||
String fn = GetType().Name + ".SetData";
|
|
||||||
// Properties that cannot be changed if previously specified.
|
// Properties that cannot be changed if previously specified.
|
||||||
if (SysId.IsValid(Id) && SysId.ToInt(Id) != SysId.ToInt(data.Id))
|
if (SysId.IsValid(Id) && SysId.ToInt(Id) != SysId.ToInt(data.Id))
|
||||||
throw new NotSupportedException(fn + " Id cannot be changed");
|
throw new NotSupportedException($"{SysUtil.Fn} Id cannot be changed");
|
||||||
// Populate individual properties to ensure that 'Changed' indicator is kept up to date.
|
// Populate individual properties to ensure that 'Changed' indicator is kept up to date.
|
||||||
this.data.PopulateFrom(data);
|
this.data.PopulateFrom(data);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
using Sarand.BusinessMgr.Net.Standard.Base.Core;
|
using Sarand.BusinessMgr.Net.Standard.Base.Core;
|
||||||
using Sarand.Net.Standard.Base.Bus;
|
using Sarand.Net.Standard.Base.Bus;
|
||||||
using Sarand.Net.Standard.Base.Core;
|
using Sarand.Net.Standard.Base.Core;
|
||||||
|
using Sarand.Net.Standard.Base.Utils;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
@@ -203,10 +204,9 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.Bus
|
|||||||
public Data GetData() { return data.Clone(); }
|
public Data GetData() { return data.Clone(); }
|
||||||
public void SetData(Data data)
|
public void SetData(Data data)
|
||||||
{
|
{
|
||||||
String fn = GetType().Name + ".SetData";
|
|
||||||
// Properties that cannot be changed if previously specified.
|
// Properties that cannot be changed if previously specified.
|
||||||
if (SysId.IsValid(Id) && SysId.ToInt(Id) != SysId.ToInt(data.Id))
|
if (SysId.IsValid(Id) && SysId.ToInt(Id) != SysId.ToInt(data.Id))
|
||||||
throw new NotSupportedException(fn + " Id cannot be changed");
|
throw new NotSupportedException($"{SysUtil.Fn} Id cannot be changed");
|
||||||
// Populate individual properties to ensure that 'Changed' indicator is kept up to date.
|
// Populate individual properties to ensure that 'Changed' indicator is kept up to date.
|
||||||
this.data.PopulateFrom(data);
|
this.data.PopulateFrom(data);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
using Sarand.BusinessMgr.Net.Standard.Base.Core;
|
using Sarand.BusinessMgr.Net.Standard.Base.Core;
|
||||||
using Sarand.Net.Standard.Base.Bus;
|
using Sarand.Net.Standard.Base.Bus;
|
||||||
using Sarand.Net.Standard.Base.Core;
|
using Sarand.Net.Standard.Base.Core;
|
||||||
|
using Sarand.Net.Standard.Base.Utils;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
@@ -169,10 +170,9 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.Bus
|
|||||||
public Data GetData() { return data.Clone(); }
|
public Data GetData() { return data.Clone(); }
|
||||||
public void SetData(Data data)
|
public void SetData(Data data)
|
||||||
{
|
{
|
||||||
String fn = GetType().Name + ".SetData";
|
|
||||||
// Properties that cannot be changed if previously specified.
|
// Properties that cannot be changed if previously specified.
|
||||||
if (SysId.IsValid(Id) && SysId.ToInt(Id) != SysId.ToInt(data.Id))
|
if (SysId.IsValid(Id) && SysId.ToInt(Id) != SysId.ToInt(data.Id))
|
||||||
throw new NotSupportedException(fn + " Id cannot be changed");
|
throw new NotSupportedException($"{SysUtil.Fn} Id cannot be changed");
|
||||||
// Populate individual properties to ensure that 'Changed' indicator is kept up to date.
|
// Populate individual properties to ensure that 'Changed' indicator is kept up to date.
|
||||||
this.data.PopulateFrom(data);
|
this.data.PopulateFrom(data);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
using Sarand.BusinessMgr.Net.Standard.Base.Core;
|
using Sarand.BusinessMgr.Net.Standard.Base.Core;
|
||||||
using Sarand.Net.Standard.Base.Bus;
|
using Sarand.Net.Standard.Base.Bus;
|
||||||
using Sarand.Net.Standard.Base.Core;
|
using Sarand.Net.Standard.Base.Core;
|
||||||
|
using Sarand.Net.Standard.Base.Utils;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
@@ -179,10 +180,9 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.Bus
|
|||||||
public Data GetData() { return data.Clone(); }
|
public Data GetData() { return data.Clone(); }
|
||||||
public void SetData(Data data)
|
public void SetData(Data data)
|
||||||
{
|
{
|
||||||
String fn = GetType().Name + ".SetData";
|
|
||||||
// Properties that cannot be changed if previously specified.
|
// Properties that cannot be changed if previously specified.
|
||||||
if (SysId.IsValid(Id) && SysId.ToInt(Id) != SysId.ToInt(data.Id))
|
if (SysId.IsValid(Id) && SysId.ToInt(Id) != SysId.ToInt(data.Id))
|
||||||
throw new NotSupportedException(fn + " Id cannot be changed");
|
throw new NotSupportedException($"{SysUtil.Fn} Id cannot be changed");
|
||||||
// Populate individual properties to ensure that 'Changed' indicator is kept up to date.
|
// Populate individual properties to ensure that 'Changed' indicator is kept up to date.
|
||||||
this.data.PopulateFrom(data);
|
this.data.PopulateFrom(data);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
using Sarand.BusinessMgr.Net.Standard.Base.Core;
|
using Sarand.BusinessMgr.Net.Standard.Base.Core;
|
||||||
using Sarand.Net.Standard.Base.Bus;
|
using Sarand.Net.Standard.Base.Bus;
|
||||||
using Sarand.Net.Standard.Base.Core;
|
using Sarand.Net.Standard.Base.Core;
|
||||||
|
using Sarand.Net.Standard.Base.Utils;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
namespace Sarand.BusinessMgr.Net.Standard.Base.Bus
|
namespace Sarand.BusinessMgr.Net.Standard.Base.Bus
|
||||||
@@ -133,10 +134,9 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.Bus
|
|||||||
public Data GetData() { return data.Clone(); }
|
public Data GetData() { return data.Clone(); }
|
||||||
public void SetData(Data data)
|
public void SetData(Data data)
|
||||||
{
|
{
|
||||||
String fn = GetType().Name + ".SetData";
|
|
||||||
// Properties that cannot be changed if previously specified.
|
// Properties that cannot be changed if previously specified.
|
||||||
if (SysId.IsValid(Id) && SysId.ToInt(Id) != SysId.ToInt(data.Id))
|
if (SysId.IsValid(Id) && SysId.ToInt(Id) != SysId.ToInt(data.Id))
|
||||||
throw new NotSupportedException(fn + " Id cannot be changed");
|
throw new NotSupportedException($"{SysUtil.Fn} Id cannot be changed");
|
||||||
// Populate individual properties to ensure that 'Changed' indicator is kept up to date.
|
// Populate individual properties to ensure that 'Changed' indicator is kept up to date.
|
||||||
this.data.PopulateFrom(data);
|
this.data.PopulateFrom(data);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
using Sarand.BusinessMgr.Net.Standard.Base.Core;
|
using Sarand.BusinessMgr.Net.Standard.Base.Core;
|
||||||
using Sarand.Net.Standard.Base.Bus;
|
using Sarand.Net.Standard.Base.Bus;
|
||||||
using Sarand.Net.Standard.Base.Core;
|
using Sarand.Net.Standard.Base.Core;
|
||||||
|
using Sarand.Net.Standard.Base.Utils;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
namespace Sarand.BusinessMgr.Net.Standard.Base.Bus
|
namespace Sarand.BusinessMgr.Net.Standard.Base.Bus
|
||||||
@@ -160,10 +161,9 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.Bus
|
|||||||
public Data GetData() { return data.Clone(); }
|
public Data GetData() { return data.Clone(); }
|
||||||
public void SetData(Data data)
|
public void SetData(Data data)
|
||||||
{
|
{
|
||||||
String fn = GetType().Name + ".SetData";
|
|
||||||
// Properties that cannot be changed if previously specified.
|
// Properties that cannot be changed if previously specified.
|
||||||
if (SysId.IsValid(Id) && SysId.ToInt(Id) != SysId.ToInt(data.Id))
|
if (SysId.IsValid(Id) && SysId.ToInt(Id) != SysId.ToInt(data.Id))
|
||||||
throw new NotSupportedException(fn + " Id cannot be changed");
|
throw new NotSupportedException($"{SysUtil.Fn} Id cannot be changed");
|
||||||
// Populate individual properties to ensure that 'Changed' indicator is kept up to date.
|
// Populate individual properties to ensure that 'Changed' indicator is kept up to date.
|
||||||
this.data.PopulateFrom(data);
|
this.data.PopulateFrom(data);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1060,10 +1060,9 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.Bus
|
|||||||
public Data GetData() { return data.Clone(); }
|
public Data GetData() { return data.Clone(); }
|
||||||
public void SetData(Data data)
|
public void SetData(Data data)
|
||||||
{
|
{
|
||||||
String fn = GetType().Name + ".SetData";
|
|
||||||
// Properties that cannot be changed if previously specified.
|
// Properties that cannot be changed if previously specified.
|
||||||
if (SysId.IsValid(Id) && SysId.ToInt(Id) != SysId.ToInt(data.Id))
|
if (SysId.IsValid(Id) && SysId.ToInt(Id) != SysId.ToInt(data.Id))
|
||||||
throw new NotSupportedException(fn + " Id cannot be changed");
|
throw new NotSupportedException($"{SysUtil.Fn} Id cannot be changed");
|
||||||
// Populate individual properties to ensure that 'Changed' indicator is kept up to date.
|
// Populate individual properties to ensure that 'Changed' indicator is kept up to date.
|
||||||
this.data.PopulateFrom(data);
|
this.data.PopulateFrom(data);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -162,10 +162,9 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.Bus
|
|||||||
public Data GetData() { return data.Clone(); }
|
public Data GetData() { return data.Clone(); }
|
||||||
public void SetData(Data data)
|
public void SetData(Data data)
|
||||||
{
|
{
|
||||||
String fn = GetType().Name + ".SetData";
|
|
||||||
// Properties that cannot be changed if previously specified.
|
// Properties that cannot be changed if previously specified.
|
||||||
if (SysId.IsValid(Id) && SysId.ToInt(Id) != SysId.ToInt(data.Id))
|
if (SysId.IsValid(Id) && SysId.ToInt(Id) != SysId.ToInt(data.Id))
|
||||||
throw new NotSupportedException(fn + " Id cannot be changed");
|
throw new NotSupportedException($"{SysUtil.Fn} Id cannot be changed");
|
||||||
// Populate individual properties to ensure that 'Changed' indicator is kept up to date.
|
// Populate individual properties to ensure that 'Changed' indicator is kept up to date.
|
||||||
this.data.PopulateFrom(data);
|
this.data.PopulateFrom(data);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
using Sarand.BusinessMgr.Net.Standard.Base.Core;
|
using Sarand.BusinessMgr.Net.Standard.Base.Core;
|
||||||
using Sarand.Net.Standard.Base.Bus;
|
using Sarand.Net.Standard.Base.Bus;
|
||||||
using Sarand.Net.Standard.Base.Core;
|
using Sarand.Net.Standard.Base.Core;
|
||||||
|
using Sarand.Net.Standard.Base.Utils;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
@@ -374,10 +375,9 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.Bus
|
|||||||
public Data GetData() { return data.Clone(); }
|
public Data GetData() { return data.Clone(); }
|
||||||
public void SetData(Data data)
|
public void SetData(Data data)
|
||||||
{
|
{
|
||||||
String fn = GetType().Name + ".SetData";
|
|
||||||
// Properties that cannot be changed if previously specified.
|
// Properties that cannot be changed if previously specified.
|
||||||
if (SysId.IsValid(Id) && SysId.ToInt(Id) != SysId.ToInt(data.Id))
|
if (SysId.IsValid(Id) && SysId.ToInt(Id) != SysId.ToInt(data.Id))
|
||||||
throw new NotSupportedException(fn + " Id cannot be changed");
|
throw new NotSupportedException($"{SysUtil.Fn} Id cannot be changed");
|
||||||
// Populate individual properties to ensure that 'Changed' indicator is kept up to date.
|
// Populate individual properties to ensure that 'Changed' indicator is kept up to date.
|
||||||
this.data.PopulateFrom(data);
|
this.data.PopulateFrom(data);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
using Sarand.BusinessMgr.Net.Standard.Base.Core;
|
using Sarand.BusinessMgr.Net.Standard.Base.Core;
|
||||||
using Sarand.Net.Standard.Base.Bus;
|
using Sarand.Net.Standard.Base.Bus;
|
||||||
using Sarand.Net.Standard.Base.Core;
|
using Sarand.Net.Standard.Base.Core;
|
||||||
|
using Sarand.Net.Standard.Base.Utils;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
@@ -296,10 +297,9 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.Bus
|
|||||||
public Data GetData() { return data.Clone(); }
|
public Data GetData() { return data.Clone(); }
|
||||||
public void SetData(Data data)
|
public void SetData(Data data)
|
||||||
{
|
{
|
||||||
String fn = GetType().Name + ".SetData";
|
|
||||||
// Properties that cannot be changed if previously specified.
|
// Properties that cannot be changed if previously specified.
|
||||||
if (SysId.IsValid(Id) && SysId.ToInt(Id) != SysId.ToInt(data.Id))
|
if (SysId.IsValid(Id) && SysId.ToInt(Id) != SysId.ToInt(data.Id))
|
||||||
throw new NotSupportedException(fn + " Id cannot be changed");
|
throw new NotSupportedException($"{SysUtil.Fn} Id cannot be changed");
|
||||||
// Populate individual properties to ensure that 'Changed' indicator is kept up to date.
|
// Populate individual properties to ensure that 'Changed' indicator is kept up to date.
|
||||||
this.data.PopulateFrom(data);
|
this.data.PopulateFrom(data);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
using Sarand.BusinessMgr.Net.Standard.Base.Core;
|
using Sarand.BusinessMgr.Net.Standard.Base.Core;
|
||||||
using Sarand.Net.Standard.Base.Bus;
|
using Sarand.Net.Standard.Base.Bus;
|
||||||
using Sarand.Net.Standard.Base.Core;
|
using Sarand.Net.Standard.Base.Core;
|
||||||
|
using Sarand.Net.Standard.Base.Utils;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
@@ -227,10 +228,9 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.Bus
|
|||||||
public Data GetData() { return data.Clone(); }
|
public Data GetData() { return data.Clone(); }
|
||||||
public void SetData(Data data)
|
public void SetData(Data data)
|
||||||
{
|
{
|
||||||
String fn = GetType().Name + ".SetData";
|
|
||||||
// Properties that cannot be changed if previously specified.
|
// Properties that cannot be changed if previously specified.
|
||||||
if (SysId.IsValid(Id) && SysId.ToInt(Id) != SysId.ToInt(data.Id))
|
if (SysId.IsValid(Id) && SysId.ToInt(Id) != SysId.ToInt(data.Id))
|
||||||
throw new NotSupportedException(fn + " Id cannot be changed");
|
throw new NotSupportedException($"{SysUtil.Fn} Id cannot be changed");
|
||||||
// Populate individual properties to ensure that 'Changed' indicator is kept up to date.
|
// Populate individual properties to ensure that 'Changed' indicator is kept up to date.
|
||||||
this.data.PopulateFrom(data);
|
this.data.PopulateFrom(data);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
using Sarand.BusinessMgr.Net.Standard.Base.Core;
|
using Sarand.BusinessMgr.Net.Standard.Base.Core;
|
||||||
using Sarand.Net.Standard.Base.Bus;
|
using Sarand.Net.Standard.Base.Bus;
|
||||||
using Sarand.Net.Standard.Base.Core;
|
using Sarand.Net.Standard.Base.Core;
|
||||||
|
using Sarand.Net.Standard.Base.Utils;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
@@ -234,10 +235,9 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.Bus
|
|||||||
public Data GetData() { return data.Clone(); }
|
public Data GetData() { return data.Clone(); }
|
||||||
public void SetData(Data data)
|
public void SetData(Data data)
|
||||||
{
|
{
|
||||||
String fn = GetType().Name + ".SetData";
|
|
||||||
// Properties that cannot be changed if previously specified.
|
// Properties that cannot be changed if previously specified.
|
||||||
if (SysId.IsValid(Id) && SysId.ToInt(Id) != SysId.ToInt(data.Id))
|
if (SysId.IsValid(Id) && SysId.ToInt(Id) != SysId.ToInt(data.Id))
|
||||||
throw new NotSupportedException(fn + " Id cannot be changed");
|
throw new NotSupportedException($"{SysUtil.Fn} Id cannot be changed");
|
||||||
// Populate individual properties to ensure that 'Changed' indicator is kept up to date.
|
// Populate individual properties to ensure that 'Changed' indicator is kept up to date.
|
||||||
this.data.PopulateFrom(data);
|
this.data.PopulateFrom(data);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,8 +45,6 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.Helpers
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public static int GetPasswordStrength(String password)
|
public static int GetPasswordStrength(String password)
|
||||||
{
|
{
|
||||||
String fn = "PasswordHelper.GetPasswordStrength";
|
|
||||||
|
|
||||||
// 0 - Blank.
|
// 0 - Blank.
|
||||||
if (StringUtil.IsEmpty(password)) return 0;
|
if (StringUtil.IsEmpty(password)) return 0;
|
||||||
|
|
||||||
@@ -61,7 +59,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.Helpers
|
|||||||
}
|
}
|
||||||
catch (Exception exc)
|
catch (Exception exc)
|
||||||
{
|
{
|
||||||
SaLogger.Debug(fn + " " + ExceptionUtil.GetLogMessage(exc));
|
SaLogger.Debug($"{SysUtil.Fn} {ExceptionUtil.GetLogMessage(exc)}");
|
||||||
}
|
}
|
||||||
int passwordLength = StringUtil.GetLength(password);
|
int passwordLength = StringUtil.GetLength(password);
|
||||||
|
|
||||||
|
|||||||
@@ -14,6 +14,14 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.Helpers
|
|||||||
// Definitions.
|
// Definitions.
|
||||||
public enum TextResource
|
public enum TextResource
|
||||||
{
|
{
|
||||||
|
// Base text resources.
|
||||||
|
SaBaseCss,
|
||||||
|
SaBaseJs,
|
||||||
|
SbmBaseCss,
|
||||||
|
SbmBaseJs,
|
||||||
|
JQueryJs,
|
||||||
|
JQueryUiCss,
|
||||||
|
JQueryUiJs,
|
||||||
// Email stylesheets.
|
// Email stylesheets.
|
||||||
Email_Main_Css,
|
Email_Main_Css,
|
||||||
// Email partial content.
|
// Email partial content.
|
||||||
@@ -26,8 +34,22 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.Helpers
|
|||||||
public enum ImageResource
|
public enum ImageResource
|
||||||
{
|
{
|
||||||
BusinessMgr_logo_h75_png,
|
BusinessMgr_logo_h75_png,
|
||||||
|
// Sapphire icons.
|
||||||
|
sapphire01_side_32_png,
|
||||||
|
sapphire01_side_40_png,
|
||||||
|
sapphire01_side_64_png,
|
||||||
|
// Menu icons.
|
||||||
|
arrow_down_black_16_png,
|
||||||
|
arrow_down_black_24_png,
|
||||||
|
arrow_up_black_16_png,
|
||||||
|
arrow_up_black_24_png,
|
||||||
|
star_amber_16_png,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//-------------------------------------------------------------------
|
||||||
|
// Properties.
|
||||||
|
public static Assembly Assembly { get { return typeof(SacsResourceHelper).GetTypeInfo().Assembly; } }
|
||||||
|
|
||||||
//-------------------------------------------------------------------
|
//-------------------------------------------------------------------
|
||||||
// Text resources.
|
// Text resources.
|
||||||
public static String GetTextResource(TextResource textResource)
|
public static String GetTextResource(TextResource textResource)
|
||||||
@@ -36,6 +58,22 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.Helpers
|
|||||||
String resourceFilename = "";
|
String resourceFilename = "";
|
||||||
switch (textResource)
|
switch (textResource)
|
||||||
{
|
{
|
||||||
|
// Base text resources.
|
||||||
|
case TextResource.SaBaseCss:
|
||||||
|
return SacsResourceHelper.GetResourceText(SacsResourceHelper.TextResource.SaBaseCss);
|
||||||
|
case TextResource.SaBaseJs:
|
||||||
|
return SacsResourceHelper.GetResourceText(SacsResourceHelper.TextResource.SaBaseJs);
|
||||||
|
case TextResource.SbmBaseCss:
|
||||||
|
return SacsResourceHelper.GetResourceText(SacsResourceHelper.TextResource.SaBaseCss) + SacsResourceHelper.GetManifestResourceAsText(Assembly, "", "sbm_base.css");
|
||||||
|
case TextResource.SbmBaseJs:
|
||||||
|
return SacsResourceHelper.GetResourceText(SacsResourceHelper.TextResource.SaBaseJs) + SacsResourceHelper.GetManifestResourceAsText(Assembly, "", "sbm_base.js");
|
||||||
|
case TextResource.JQueryJs:
|
||||||
|
return SacsResourceHelper.GetResourceText(SacsResourceHelper.TextResource.JQueryJs);
|
||||||
|
case TextResource.JQueryUiCss:
|
||||||
|
return SacsResourceHelper.GetResourceText(SacsResourceHelper.TextResource.JQueryUiCss);
|
||||||
|
case TextResource.JQueryUiJs:
|
||||||
|
return SacsResourceHelper.GetResourceText(SacsResourceHelper.TextResource.JQueryUiJs);
|
||||||
|
|
||||||
// Email stylesheet.
|
// Email stylesheet.
|
||||||
case TextResource.Email_Main_Css:
|
case TextResource.Email_Main_Css:
|
||||||
resourceFilename = "sbm-email-main.css";
|
resourceFilename = "sbm-email-main.css";
|
||||||
@@ -55,8 +93,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.Helpers
|
|||||||
}
|
}
|
||||||
if (!StringUtil.IsEmpty(resourceFilename))
|
if (!StringUtil.IsEmpty(resourceFilename))
|
||||||
{
|
{
|
||||||
var assembly = typeof(SbmResourceHelper).GetTypeInfo().Assembly;
|
String resourceText = SacsResourceHelper.GetManifestResourceAsText(Assembly, partialPath, resourceFilename);
|
||||||
String resourceText = SacsResourceHelper.GetManifestResourceAsText(assembly, partialPath, resourceFilename);
|
|
||||||
if (!StringUtil.IsEmpty(resourceText))
|
if (!StringUtil.IsEmpty(resourceText))
|
||||||
return resourceText;
|
return resourceText;
|
||||||
}
|
}
|
||||||
@@ -74,11 +111,41 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.Helpers
|
|||||||
case ImageResource.BusinessMgr_logo_h75_png:
|
case ImageResource.BusinessMgr_logo_h75_png:
|
||||||
resourceFilename = "BusinessMgr-logo-h75.png";
|
resourceFilename = "BusinessMgr-logo-h75.png";
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
// Sapphire icons.
|
||||||
|
case ImageResource.sapphire01_side_32_png:
|
||||||
|
partialPath = "sapphire";
|
||||||
|
resourceFilename = "sapphire01-side-32.png";
|
||||||
|
break;
|
||||||
|
case ImageResource.sapphire01_side_40_png:
|
||||||
|
partialPath = "sapphire";
|
||||||
|
resourceFilename = "sapphire01-side-40.png";
|
||||||
|
break;
|
||||||
|
case ImageResource.sapphire01_side_64_png:
|
||||||
|
partialPath = "sapphire";
|
||||||
|
resourceFilename = "sapphire01-side-64.png";
|
||||||
|
break;
|
||||||
|
|
||||||
|
// Menu icons.
|
||||||
|
case ImageResource.arrow_down_black_16_png:
|
||||||
|
resourceFilename = "arrow-down-black-16.png";
|
||||||
|
break;
|
||||||
|
case ImageResource.arrow_down_black_24_png:
|
||||||
|
resourceFilename = "arrow-down-black-24.png";
|
||||||
|
break;
|
||||||
|
case ImageResource.arrow_up_black_16_png:
|
||||||
|
resourceFilename = "arrow-up-black-16.png";
|
||||||
|
break;
|
||||||
|
case ImageResource.arrow_up_black_24_png:
|
||||||
|
resourceFilename = "arrow-up-black-24.png";
|
||||||
|
break;
|
||||||
|
case ImageResource.star_amber_16_png:
|
||||||
|
resourceFilename = "star-amber-16.png";
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
if (!StringUtil.IsEmpty(resourceFilename))
|
if (!StringUtil.IsEmpty(resourceFilename))
|
||||||
{
|
{
|
||||||
var assembly = typeof(SbmResourceHelper).GetTypeInfo().Assembly;
|
byte[] resourceData = SacsResourceHelper.GetManifestResourceAsBinary(Assembly, partialPath, resourceFilename);
|
||||||
byte[] resourceData = SacsResourceHelper.GetManifestResourceAsBinary(assembly, partialPath, resourceFilename);
|
|
||||||
if (resourceData != null)
|
if (resourceData != null)
|
||||||
return resourceData;
|
return resourceData;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -280,13 +280,13 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.Mgr
|
|||||||
private CodeTypeCache codeTypeCache;
|
private CodeTypeCache codeTypeCache;
|
||||||
public bool CodeTypeHasCodes(Sbm.ApplCodeType codeType)
|
public bool CodeTypeHasCodes(Sbm.ApplCodeType codeType)
|
||||||
{
|
{
|
||||||
if (DebugMode && !SupportedCodeTypes.Contains(codeType)) throw new NotSupportedException(GetType().Name + ".CodeTypeHasCodes Unsupported code type: " + codeType);
|
if (DebugMode && !SupportedCodeTypes.Contains(codeType)) throw new NotSupportedException($"{SysUtil.Fn} Unsupported code type: {codeType}");
|
||||||
PopulateCodeTypes();
|
PopulateCodeTypes();
|
||||||
return codeTypeCache.CodeTypeHasCodes(codeType);
|
return codeTypeCache.CodeTypeHasCodes(codeType);
|
||||||
}
|
}
|
||||||
public String GetCodeTypeCodeDesc(Sbm.ApplCodeType codeType, String code, bool defaultToCode = true)
|
public String GetCodeTypeCodeDesc(Sbm.ApplCodeType codeType, String code, bool defaultToCode = true)
|
||||||
{
|
{
|
||||||
if (DebugMode && !SupportedCodeTypes.Contains(codeType)) throw new NotSupportedException(GetType().Name + ".GetCodeTypeCodeDesc Unsupported code type: " + codeType);
|
if (DebugMode && !SupportedCodeTypes.Contains(codeType)) throw new NotSupportedException($"{SysUtil.Fn} Unsupported code type: {codeType}");
|
||||||
PopulateCodeTypes();
|
PopulateCodeTypes();
|
||||||
List<SaCode> codes = codeTypeCache.GetCodesForCodeType(codeType, false);
|
List<SaCode> codes = codeTypeCache.GetCodesForCodeType(codeType, false);
|
||||||
if (codes != null)
|
if (codes != null)
|
||||||
@@ -295,13 +295,13 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.Mgr
|
|||||||
}
|
}
|
||||||
public List<SaCode> GetCodesForCodeType(Sbm.ApplCodeType codeType, bool activeOnly = true)
|
public List<SaCode> GetCodesForCodeType(Sbm.ApplCodeType codeType, bool activeOnly = true)
|
||||||
{
|
{
|
||||||
if (DebugMode && !SupportedCodeTypes.Contains(codeType)) throw new NotSupportedException(GetType().Name + ".GetCodesForCodeType Unsupported code type: " + codeType);
|
if (DebugMode && !SupportedCodeTypes.Contains(codeType)) throw new NotSupportedException($"{SysUtil.Fn} Unsupported code type: {codeType}");
|
||||||
PopulateCodeTypes();
|
PopulateCodeTypes();
|
||||||
return codeTypeCache.GetCodesForCodeType(codeType, activeOnly);
|
return codeTypeCache.GetCodesForCodeType(codeType, activeOnly);
|
||||||
}
|
}
|
||||||
public List<CodeDesc> GetCodeDescsForCodeType(Sbm.ApplCodeType codeType, bool activeOnly = true)
|
public List<CodeDesc> GetCodeDescsForCodeType(Sbm.ApplCodeType codeType, bool activeOnly = true)
|
||||||
{
|
{
|
||||||
if (DebugMode && !SupportedCodeTypes.Contains(codeType)) throw new NotSupportedException(GetType().Name + ".GetCodeDescsForCodeType Unsupported code type: " + codeType);
|
if (DebugMode && !SupportedCodeTypes.Contains(codeType)) throw new NotSupportedException($"{SysUtil.Fn} Unsupported code type: {codeType}");
|
||||||
PopulateCodeTypes();
|
PopulateCodeTypes();
|
||||||
return codeTypeCache.GetCodeDescsForCodeType(codeType, activeOnly);
|
return codeTypeCache.GetCodeDescsForCodeType(codeType, activeOnly);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -57,7 +57,6 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.WebService
|
|||||||
//-------------------------------------------------------------------
|
//-------------------------------------------------------------------
|
||||||
public async Task<bool> RequestIsAlive(SbmWebServiceInstanceDefinition instanceDefinition)
|
public async Task<bool> RequestIsAlive(SbmWebServiceInstanceDefinition instanceDefinition)
|
||||||
{
|
{
|
||||||
String fn = GetType().Name + ".IsAlive";
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
RequestData requestData = new RequestData(instanceDefinition);
|
RequestData requestData = new RequestData(instanceDefinition);
|
||||||
@@ -65,7 +64,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.WebService
|
|||||||
if (serviceResponse.ResponseData.EqualsCI(SbmWebServiceDfn.IsAliveResponse))
|
if (serviceResponse.ResponseData.EqualsCI(SbmWebServiceDfn.IsAliveResponse))
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
catch (Exception exc) { SaLogger.Warn(fn + " " + exc.GetLogMessage()); }
|
catch (Exception exc) { SaLogger.Warn($"{SysUtil.Fn} " + exc.GetLogMessage()); }
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -79,7 +78,6 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.WebService
|
|||||||
}
|
}
|
||||||
public async Task<ItemCountResponseData> RequestItemCount(SbmWebServiceRequest.Config configRequest, Dictionary<String, String> filters, SacsTaskData taskData)
|
public async Task<ItemCountResponseData> RequestItemCount(SbmWebServiceRequest.Config configRequest, Dictionary<String, String> filters, SacsTaskData taskData)
|
||||||
{
|
{
|
||||||
String fn = GetType().Name + ".GetItemCount";
|
|
||||||
if (SacsSystem.DebugMode && configRequest.RequestType != SbmWebServiceRequest.RequestType.Count) Debugger.Break();
|
if (SacsSystem.DebugMode && configRequest.RequestType != SbmWebServiceRequest.RequestType.Count) Debugger.Break();
|
||||||
|
|
||||||
// Service Request.
|
// Service Request.
|
||||||
@@ -133,7 +131,6 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.WebService
|
|||||||
}
|
}
|
||||||
public async Task<QueryListResponseData> RequestQueryList(SbmWebServiceRequest.Config configRequest, Dictionary<String, String> filters, List<string> columns, List<String> sortColumns, SacsTaskData taskData)
|
public async Task<QueryListResponseData> RequestQueryList(SbmWebServiceRequest.Config configRequest, Dictionary<String, String> filters, List<string> columns, List<String> sortColumns, SacsTaskData taskData)
|
||||||
{
|
{
|
||||||
String fn = GetType().Name + ".GetItemList";
|
|
||||||
if (SacsSystem.DebugMode && configRequest.RequestType != SbmWebServiceRequest.RequestType.QueryList) Debugger.Break();
|
if (SacsSystem.DebugMode && configRequest.RequestType != SbmWebServiceRequest.RequestType.QueryList) Debugger.Break();
|
||||||
|
|
||||||
// Service Request.
|
// Service Request.
|
||||||
@@ -147,7 +144,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.WebService
|
|||||||
requestData.Data = serviceRequestData.GenerateRequestData();
|
requestData.Data = serviceRequestData.GenerateRequestData();
|
||||||
SbmWebServiceResponse serviceResponse = await DoWebServiceRequest(requestData);
|
SbmWebServiceResponse serviceResponse = await DoWebServiceRequest(requestData);
|
||||||
QueryListResponseData responseData = new QueryListResponseData(serviceResponse);
|
QueryListResponseData responseData = new QueryListResponseData(serviceResponse);
|
||||||
//if (SacsSystem.DebugMode && responseData.ResponseElement != null) SaLogger.Debug(fn + " Response:\n\n" + responseData.ResponseElement.FormatXml() + "\n");
|
//if (SacsSystem.DebugMode && responseData.ResponseElement != null) SaLogger.Debug($"{SysUtil.Fn} Response:\n\n" + responseData.ResponseElement.FormatXml() + "\n");
|
||||||
|
|
||||||
// Interpret response.
|
// Interpret response.
|
||||||
if (serviceResponse.ResponseElement != null && !taskData.IsCancellationRequested)
|
if (serviceResponse.ResponseElement != null && !taskData.IsCancellationRequested)
|
||||||
@@ -209,7 +206,6 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.WebService
|
|||||||
}
|
}
|
||||||
public async Task<ItemListResponseData> RequestItemList(SbmWebServiceRequest.Config configRequest, Dictionary<String, String> filters, List<String> sortColumns, SacsTaskData taskData)
|
public async Task<ItemListResponseData> RequestItemList(SbmWebServiceRequest.Config configRequest, Dictionary<String, String> filters, List<String> sortColumns, SacsTaskData taskData)
|
||||||
{
|
{
|
||||||
String fn = GetType().Name + ".GetItemList";
|
|
||||||
if (SacsSystem.DebugMode && configRequest.RequestType != SbmWebServiceRequest.RequestType.ItemList) Debugger.Break();
|
if (SacsSystem.DebugMode && configRequest.RequestType != SbmWebServiceRequest.RequestType.ItemList) Debugger.Break();
|
||||||
|
|
||||||
// Service Request.
|
// Service Request.
|
||||||
@@ -222,7 +218,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.WebService
|
|||||||
requestData.Data = serviceRequestData.GenerateRequestData();
|
requestData.Data = serviceRequestData.GenerateRequestData();
|
||||||
SbmWebServiceResponse serviceResponse = await DoWebServiceRequest(requestData);
|
SbmWebServiceResponse serviceResponse = await DoWebServiceRequest(requestData);
|
||||||
ItemListResponseData responseData = new ItemListResponseData(serviceResponse);
|
ItemListResponseData responseData = new ItemListResponseData(serviceResponse);
|
||||||
//if (SacsSystem.DebugMode && responseData.ResponseElement != null) SaLogger.Debug(fn + " Response:\n\n" + responseData.ResponseElement.FormatXml() + "\n");
|
//if (SacsSystem.DebugMode && responseData.ResponseElement != null) SaLogger.Debug($"{SysUtil.Fn} Response:\n\n" + responseData.ResponseElement.FormatXml() + "\n");
|
||||||
|
|
||||||
// Interpret response.
|
// Interpret response.
|
||||||
if (serviceResponse.ResponseElement != null && !taskData.IsCancellationRequested)
|
if (serviceResponse.ResponseElement != null && !taskData.IsCancellationRequested)
|
||||||
@@ -272,7 +268,6 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.WebService
|
|||||||
}
|
}
|
||||||
public async Task<ItemDataResponseData> RequestItemData(SbmWebServiceRequest.Config configRequest, Dictionary<String, String> filters, SacsTaskData taskData)
|
public async Task<ItemDataResponseData> RequestItemData(SbmWebServiceRequest.Config configRequest, Dictionary<String, String> filters, SacsTaskData taskData)
|
||||||
{
|
{
|
||||||
String fn = GetType().Name + ".GetItemData";
|
|
||||||
if (SacsSystem.DebugMode && configRequest.RequestType != SbmWebServiceRequest.RequestType.Item) Debugger.Break();
|
if (SacsSystem.DebugMode && configRequest.RequestType != SbmWebServiceRequest.RequestType.Item) Debugger.Break();
|
||||||
|
|
||||||
// Service Request.
|
// Service Request.
|
||||||
@@ -349,7 +344,6 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.WebService
|
|||||||
}
|
}
|
||||||
public async Task<StoreItemResponseData> StoreItem(SbmWebServiceRequest.Config configRequest, XElement itemElement, SacsTaskData taskData)
|
public async Task<StoreItemResponseData> StoreItem(SbmWebServiceRequest.Config configRequest, XElement itemElement, SacsTaskData taskData)
|
||||||
{
|
{
|
||||||
String fn = GetType().Name + ".StoreItem";
|
|
||||||
if (SacsSystem.DebugMode && configRequest.RequestType != SbmWebServiceRequest.RequestType.Store) Debugger.Break();
|
if (SacsSystem.DebugMode && configRequest.RequestType != SbmWebServiceRequest.RequestType.Store) Debugger.Break();
|
||||||
|
|
||||||
// Service Request.
|
// Service Request.
|
||||||
@@ -374,18 +368,17 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.WebService
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public async Task<SbmWebServiceResponse> DoWebServiceRequest(RequestData requestData)
|
public async Task<SbmWebServiceResponse> DoWebServiceRequest(RequestData requestData)
|
||||||
{
|
{
|
||||||
String fn = GetType().Name + ".DoWebServiceRequest";
|
|
||||||
SbmWebServiceResponse serviceResponse = null;
|
SbmWebServiceResponse serviceResponse = null;
|
||||||
// Throw canceled exception if task has been cancelled - invoke at regular intervals.
|
// Throw canceled exception if task has been cancelled - invoke at regular intervals.
|
||||||
requestData.ThrowIfCancellationRequested();
|
requestData.ThrowIfCancellationRequested();
|
||||||
|
|
||||||
// Log request.
|
// Log request.
|
||||||
//if (SacsSystem.DebugMode) SaLogger.Debug(fn + " Request URL:" + requestData.InstanceDefinition.URL);
|
//if (SacsSystem.DebugMode) SaLogger.Debug($"{SysUtil.Fn} Request URL:" + requestData.InstanceDefinition.URL);
|
||||||
if (requestData.Debug)
|
if (requestData.Debug)
|
||||||
{
|
{
|
||||||
if (requestData.Data.Length < 512)
|
if (requestData.Data.Length < 512)
|
||||||
SaLogger.Debug(fn + " Request:\n\t" + requestData.Data);
|
SaLogger.Debug($"{SysUtil.Fn} Request:\n\t" + requestData.Data);
|
||||||
else SaLogger.Debug(fn + " Request length:" + requestData.Data.Length);
|
else SaLogger.Debug($"{SysUtil.Fn} Request length:" + requestData.Data.Length);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Configure the request.
|
// Configure the request.
|
||||||
@@ -418,8 +411,8 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.WebService
|
|||||||
if (requestData.Debug)
|
if (requestData.Debug)
|
||||||
{
|
{
|
||||||
if (serviceResponse.ResponseData.Length < 1024)
|
if (serviceResponse.ResponseData.Length < 1024)
|
||||||
SaLogger.Debug(fn + " Response: " + serviceResponse.ResponseData);
|
SaLogger.Debug($"{SysUtil.Fn} Response: " + serviceResponse.ResponseData);
|
||||||
else SaLogger.Debug(fn + " Response size: " + serviceResponse.ResponseData.Length);
|
else SaLogger.Debug($"{SysUtil.Fn} Response size: " + serviceResponse.ResponseData.Length);
|
||||||
}
|
}
|
||||||
return serviceResponse;
|
return serviceResponse;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ using System.Data.Common;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
// Code generated by Sarand Database Utilities Sat 10-Jul-2021 16:26:30
|
// Code generated by Sarand Database Utilities Thu 6-Jun-2024 17:06:27
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
namespace Sarand.BusinessMgr.Net.Standard.Dbas.Internal
|
namespace Sarand.BusinessMgr.Net.Standard.Dbas.Internal
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ using System.Data.Common;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
// Code generated by Sarand Database Utilities Sat 10-Jul-2021 16:26:30
|
// Code generated by Sarand Database Utilities Thu 6-Jun-2024 17:06:27
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
namespace Sarand.BusinessMgr.Net.Standard.Dbas.Internal
|
namespace Sarand.BusinessMgr.Net.Standard.Dbas.Internal
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ using System.Data.Common;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
// Code generated by Sarand Database Utilities Sat 10-Jul-2021 16:26:30
|
// Code generated by Sarand Database Utilities Thu 6-Jun-2024 17:06:27
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
namespace Sarand.BusinessMgr.Net.Standard.Dbas.Internal
|
namespace Sarand.BusinessMgr.Net.Standard.Dbas.Internal
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ using System.Data.Common;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
// Code generated by Sarand Database Utilities Sat 10-Jul-2021 16:26:30
|
// Code generated by Sarand Database Utilities Thu 6-Jun-2024 17:06:27
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
namespace Sarand.BusinessMgr.Net.Standard.Dbas.Internal
|
namespace Sarand.BusinessMgr.Net.Standard.Dbas.Internal
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ using System.Data.Common;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
// Code generated by Sarand Database Utilities Sat 10-Jul-2021 16:26:30
|
// Code generated by Sarand Database Utilities Thu 6-Jun-2024 17:06:27
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
namespace Sarand.BusinessMgr.Net.Standard.Dbas.Internal
|
namespace Sarand.BusinessMgr.Net.Standard.Dbas.Internal
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ using System.Data.Common;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
// Code generated by Sarand Database Utilities Sat 10-Jul-2021 16:26:30
|
// Code generated by Sarand Database Utilities Thu 6-Jun-2024 17:06:27
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
namespace Sarand.BusinessMgr.Net.Standard.Dbas.Internal
|
namespace Sarand.BusinessMgr.Net.Standard.Dbas.Internal
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ using System.Data.Common;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
// Code generated by Sarand Database Utilities Sat 10-Jul-2021 16:26:30
|
// Code generated by Sarand Database Utilities Thu 6-Jun-2024 17:06:27
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
namespace Sarand.BusinessMgr.Net.Standard.Dbas.Internal
|
namespace Sarand.BusinessMgr.Net.Standard.Dbas.Internal
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ using System.Data.Common;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
// Code generated by Sarand Database Utilities Sat 10-Jul-2021 16:26:30
|
// Code generated by Sarand Database Utilities Thu 6-Jun-2024 17:06:27
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
namespace Sarand.BusinessMgr.Net.Standard.Dbas.Internal
|
namespace Sarand.BusinessMgr.Net.Standard.Dbas.Internal
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ using System.Data.Common;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
// Code generated by Sarand Database Utilities Sat 10-Jul-2021 16:26:30
|
// Code generated by Sarand Database Utilities Thu 6-Jun-2024 17:06:27
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
namespace Sarand.BusinessMgr.Net.Standard.Dbas.Internal
|
namespace Sarand.BusinessMgr.Net.Standard.Dbas.Internal
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ using System.Data.Common;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
// Code generated by Sarand Database Utilities Sat 10-Jul-2021 16:26:28
|
// Code generated by Sarand Database Utilities Thu 6-Jun-2024 17:06:27
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
namespace Sarand.BusinessMgr.Net.Standard.Dbas.Internal.Control
|
namespace Sarand.BusinessMgr.Net.Standard.Dbas.Internal.Control
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ using System.Data.Common;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
// Code generated by Sarand Database Utilities Sat 10-Jul-2021 16:26:28
|
// Code generated by Sarand Database Utilities Thu 6-Jun-2024 17:06:27
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
namespace Sarand.BusinessMgr.Net.Standard.Dbas.Internal.Control
|
namespace Sarand.BusinessMgr.Net.Standard.Dbas.Internal.Control
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ using System.Data.Common;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
// Code generated by Sarand Database Utilities Sat 10-Jul-2021 16:26:28
|
// Code generated by Sarand Database Utilities Thu 6-Jun-2024 17:06:27
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
namespace Sarand.BusinessMgr.Net.Standard.Dbas.Internal.Control
|
namespace Sarand.BusinessMgr.Net.Standard.Dbas.Internal.Control
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ using System.Data.Common;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
// Code generated by Sarand Database Utilities Sat 10-Jul-2021 16:26:30
|
// Code generated by Sarand Database Utilities Thu 6-Jun-2024 17:06:27
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
namespace Sarand.BusinessMgr.Net.Standard.Dbas.Internal
|
namespace Sarand.BusinessMgr.Net.Standard.Dbas.Internal
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ using System.Data.Common;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
// Code generated by Sarand Database Utilities Sat 10-Jul-2021 16:26:30
|
// Code generated by Sarand Database Utilities Thu 6-Jun-2024 17:06:27
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
namespace Sarand.BusinessMgr.Net.Standard.Dbas.Internal
|
namespace Sarand.BusinessMgr.Net.Standard.Dbas.Internal
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ using System.Data.Common;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
// Code generated by Sarand Database Utilities Sat 10-Jul-2021 16:26:30
|
// Code generated by Sarand Database Utilities Thu 6-Jun-2024 17:06:27
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
namespace Sarand.BusinessMgr.Net.Standard.Dbas.Internal
|
namespace Sarand.BusinessMgr.Net.Standard.Dbas.Internal
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ using System.Data.Common;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
// Code generated by Sarand Database Utilities Sat 10-Jul-2021 16:26:30
|
// Code generated by Sarand Database Utilities Thu 6-Jun-2024 17:06:27
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
namespace Sarand.BusinessMgr.Net.Standard.Dbas.Internal
|
namespace Sarand.BusinessMgr.Net.Standard.Dbas.Internal
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ using System.Data.Common;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
// Code generated by Sarand Database Utilities Sat 10-Jul-2021 16:26:30
|
// Code generated by Sarand Database Utilities Thu 6-Jun-2024 17:06:27
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
namespace Sarand.BusinessMgr.Net.Standard.Dbas.Internal
|
namespace Sarand.BusinessMgr.Net.Standard.Dbas.Internal
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ using System.Data.Common;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
// Code generated by Sarand Database Utilities Sat 10-Jul-2021 16:26:30
|
// Code generated by Sarand Database Utilities Thu 6-Jun-2024 17:06:27
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
namespace Sarand.BusinessMgr.Net.Standard.Dbas.Internal
|
namespace Sarand.BusinessMgr.Net.Standard.Dbas.Internal
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ using System.Data.Common;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
// Code generated by Sarand Database Utilities Sat 10-Jul-2021 16:26:30
|
// Code generated by Sarand Database Utilities Thu 6-Jun-2024 17:06:27
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
namespace Sarand.BusinessMgr.Net.Standard.Dbas.Internal
|
namespace Sarand.BusinessMgr.Net.Standard.Dbas.Internal
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ using System.Data.Common;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
// Code generated by Sarand Database Utilities Sat 10-Jul-2021 16:26:30
|
// Code generated by Sarand Database Utilities Thu 6-Jun-2024 17:06:27
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
namespace Sarand.BusinessMgr.Net.Standard.Dbas.Internal
|
namespace Sarand.BusinessMgr.Net.Standard.Dbas.Internal
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ using System.Data.Common;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
// Code generated by Sarand Database Utilities Sat 10-Jul-2021 16:26:30
|
// Code generated by Sarand Database Utilities Thu 6-Jun-2024 17:06:27
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
namespace Sarand.BusinessMgr.Net.Standard.Dbas.Internal
|
namespace Sarand.BusinessMgr.Net.Standard.Dbas.Internal
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ using System.Data.Common;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
// Code generated by Sarand Database Utilities Sat 10-Jul-2021 16:26:30
|
// Code generated by Sarand Database Utilities Thu 6-Jun-2024 17:06:27
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
namespace Sarand.BusinessMgr.Net.Standard.Dbas.Internal
|
namespace Sarand.BusinessMgr.Net.Standard.Dbas.Internal
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ using System.Data.Common;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
// Code generated by Sarand Database Utilities Sat 10-Jul-2021 16:26:30
|
// Code generated by Sarand Database Utilities Thu 6-Jun-2024 17:06:27
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
namespace Sarand.BusinessMgr.Net.Standard.Dbas.Internal
|
namespace Sarand.BusinessMgr.Net.Standard.Dbas.Internal
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ using System.Data.Common;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
// Code generated by Sarand Database Utilities Sat 10-Jul-2021 16:26:30
|
// Code generated by Sarand Database Utilities Thu 6-Jun-2024 17:06:27
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
namespace Sarand.BusinessMgr.Net.Standard.Dbas.Internal
|
namespace Sarand.BusinessMgr.Net.Standard.Dbas.Internal
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ using System.Data.Common;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
// Code generated by Sarand Database Utilities Sat 10-Jul-2021 16:26:30
|
// Code generated by Sarand Database Utilities Thu 6-Jun-2024 17:06:27
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
namespace Sarand.BusinessMgr.Net.Standard.Dbas.Internal
|
namespace Sarand.BusinessMgr.Net.Standard.Dbas.Internal
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ using System.Data.Common;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
// Code generated by Sarand Database Utilities Sat 10-Jul-2021 16:26:30
|
// Code generated by Sarand Database Utilities Thu 6-Jun-2024 17:06:27
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
namespace Sarand.BusinessMgr.Net.Standard.Dbas.Internal
|
namespace Sarand.BusinessMgr.Net.Standard.Dbas.Internal
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ using System.Data.Common;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
// Code generated by Sarand Database Utilities Sat 10-Jul-2021 16:26:30
|
// Code generated by Sarand Database Utilities Thu 6-Jun-2024 17:06:27
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
namespace Sarand.BusinessMgr.Net.Standard.Dbas.Internal
|
namespace Sarand.BusinessMgr.Net.Standard.Dbas.Internal
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ using System.Data.Common;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
// Code generated by Sarand Database Utilities Sat 10-Jul-2021 16:26:30
|
// Code generated by Sarand Database Utilities Thu 6-Jun-2024 17:06:27
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
namespace Sarand.BusinessMgr.Net.Standard.Dbas.Internal
|
namespace Sarand.BusinessMgr.Net.Standard.Dbas.Internal
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ using System.Data.Common;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
// Code generated by Sarand Database Utilities Sat 10-Jul-2021 16:26:30
|
// Code generated by Sarand Database Utilities Thu 6-Jun-2024 17:06:27
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
namespace Sarand.BusinessMgr.Net.Standard.Dbas.Internal
|
namespace Sarand.BusinessMgr.Net.Standard.Dbas.Internal
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ using System.Data.Common;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
// Code generated by Sarand Database Utilities Sat 10-Jul-2021 16:26:30
|
// Code generated by Sarand Database Utilities Thu 6-Jun-2024 17:06:27
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
namespace Sarand.BusinessMgr.Net.Standard.Dbas.Internal
|
namespace Sarand.BusinessMgr.Net.Standard.Dbas.Internal
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ using System.Data.Common;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
// Code generated by Sarand Database Utilities Sat 10-Jul-2021 16:26:30
|
// Code generated by Sarand Database Utilities Thu 6-Jun-2024 17:06:27
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
namespace Sarand.BusinessMgr.Net.Standard.Dbas.Internal
|
namespace Sarand.BusinessMgr.Net.Standard.Dbas.Internal
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ using System.Data.Common;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
// Code generated by Sarand Database Utilities Sat 10-Jul-2021 16:26:30
|
// Code generated by Sarand Database Utilities Thu 6-Jun-2024 17:06:27
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
namespace Sarand.BusinessMgr.Net.Standard.Dbas.Internal
|
namespace Sarand.BusinessMgr.Net.Standard.Dbas.Internal
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ using System.Data.Common;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
// Code generated by Sarand Database Utilities Sat 10-Jul-2021 16:26:30
|
// Code generated by Sarand Database Utilities Thu 6-Jun-2024 17:06:27
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
namespace Sarand.BusinessMgr.Net.Standard.Dbas.Internal
|
namespace Sarand.BusinessMgr.Net.Standard.Dbas.Internal
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ using System.Data.Common;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
// Code generated by Sarand Database Utilities Sat 10-Jul-2021 16:26:30
|
// Code generated by Sarand Database Utilities Thu 6-Jun-2024 17:06:27
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
namespace Sarand.BusinessMgr.Net.Standard.Dbas.Internal
|
namespace Sarand.BusinessMgr.Net.Standard.Dbas.Internal
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ using System.Data.Common;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
// Code generated by Sarand Database Utilities Sat 10-Jul-2021 16:26:30
|
// Code generated by Sarand Database Utilities Thu 6-Jun-2024 17:06:27
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
namespace Sarand.BusinessMgr.Net.Standard.Dbas.Internal
|
namespace Sarand.BusinessMgr.Net.Standard.Dbas.Internal
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ using System.Data.Common;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
// Code generated by Sarand Database Utilities Sat 10-Jul-2021 16:26:30
|
// Code generated by Sarand Database Utilities Thu 6-Jun-2024 17:06:27
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
namespace Sarand.BusinessMgr.Net.Standard.Dbas.Internal
|
namespace Sarand.BusinessMgr.Net.Standard.Dbas.Internal
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ using System.Data.Common;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
// Code generated by Sarand Database Utilities Sat 10-Jul-2021 16:26:30
|
// Code generated by Sarand Database Utilities Thu 6-Jun-2024 17:06:27
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
namespace Sarand.BusinessMgr.Net.Standard.Dbas.Internal
|
namespace Sarand.BusinessMgr.Net.Standard.Dbas.Internal
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ using System.Data.Common;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
// Code generated by Sarand Database Utilities Sat 10-Jul-2021 16:26:30
|
// Code generated by Sarand Database Utilities Thu 6-Jun-2024 17:06:27
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
namespace Sarand.BusinessMgr.Net.Standard.Dbas.Internal
|
namespace Sarand.BusinessMgr.Net.Standard.Dbas.Internal
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ using System.Data.Common;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
// Code generated by Sarand Database Utilities Sat 10-Jul-2021 16:26:30
|
// Code generated by Sarand Database Utilities Thu 6-Jun-2024 17:06:27
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
namespace Sarand.BusinessMgr.Net.Standard.Dbas.Internal
|
namespace Sarand.BusinessMgr.Net.Standard.Dbas.Internal
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ using System.Data.Common;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
// Code generated by Sarand Database Utilities Sat 10-Jul-2021 16:26:30
|
// Code generated by Sarand Database Utilities Thu 6-Jun-2024 17:06:27
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
namespace Sarand.BusinessMgr.Net.Standard.Dbas.Internal
|
namespace Sarand.BusinessMgr.Net.Standard.Dbas.Internal
|
||||||
{
|
{
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user