BusinessMgr

This commit is contained in:
Andy Howard
2024-10-29 08:41:11 +00:00
parent 45b3069ce7
commit a7ae1c1762
12 changed files with 434 additions and 232 deletions
+2 -2
View File
@@ -53,7 +53,7 @@ namespace Sacs.Web.Components
//-------------------------------------------------------------------
// Culture.
private CultureInfo sessionCulture;
private CultureInfo RequestCulture { get { return Request.HttpContext.Features.Get<IRequestCultureFeature>().RequestCulture.Culture ?? CultureInfo.InvariantCulture; } }
private CultureInfo RequestCulture { get { return Request.HttpContext.Features.Get<IRequestCultureFeature>()?.RequestCulture?.Culture ?? CultureInfo.InvariantCulture; } }
public CultureInfo SessionCulture
{
get
@@ -258,7 +258,7 @@ namespace Sacs.Web.Components
// Common item properties.
public String Id { get; set; } = null;
private String notes;
public String Notes { get { return StringUtil.OnBlank(notes, null); } set { notes = StringUtil.EmptyOnNull(value).Trim(); } }
public String Notes { get { return StringUtil.IsBlank(notes) ? null : notes; } set { notes = StringUtil.EmptyOnNull(value).Trim(); } }
public String StatusCode { get; set; } = null;
public String StatusDesc { get; set; } = null;
// Flags for common status values.
+14 -6
View File
@@ -1,4 +1,5 @@
using Sarand.Net.Standard.Base.App;
using Sarand.Net.Standard.Base.Core;
using Sarand.Net.Standard.Base.Dbas;
using Sarand.Net.Standard.Base.Utils;
using System;
@@ -11,7 +12,7 @@ using static Sarand.Net.Standard.Base.Bus.SaErrorStateItem;
namespace Sacs.Web.Components
{
//=======================================================================
public class SaModel
public class SaModel : SacsDisposable
{
//-------------------------------------------------------------------
// Data members.
@@ -27,9 +28,16 @@ namespace Sacs.Web.Components
{
}
//---------------------------------------------------------------
// Properties.
public bool DebugMode { get; } = SacsSystem.DebugMode;
protected override void Dispose(bool disposing)
{
if (disposing)
{
}
}
//---------------------------------------------------------------
// Properties.
public bool DebugMode { get; } = SacsSystem.DebugMode;
public bool OK { get { return !HasMessages(); } }
public virtual bool ProhibitCache { get; set; } = true;
public String PageCaption { get; set; }
@@ -144,7 +152,7 @@ namespace Sacs.Web.Components
errorMessages.Add(message);
}
//---------------------------------------------------------------
}
//---------------------------------------------------------------
}
//=======================================================================
}