BusinessMgr 3.0.0.7
This commit is contained in:
@@ -1,9 +1,12 @@
|
|||||||
using Sarand.Net.Standard.Base.App;
|
using Microsoft.AspNetCore.Mvc.Rendering;
|
||||||
|
using Sarand.Net.Standard.Base.App;
|
||||||
|
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.Dbas;
|
||||||
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.Linq;
|
||||||
|
|
||||||
namespace Sacs.Web.Components
|
namespace Sacs.Web.Components
|
||||||
{
|
{
|
||||||
@@ -24,16 +27,16 @@ namespace Sacs.Web.Components
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void Dispose(bool disposing)
|
protected override void Dispose(bool disposing)
|
||||||
{
|
{
|
||||||
if (disposing)
|
if (disposing)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------
|
//---------------------------------------------------------------
|
||||||
// Properties.
|
// Properties.
|
||||||
public bool DebugMode { get; } = SacsSystem.DebugMode;
|
public bool DebugMode { get; } = SacsSystem.DebugMode;
|
||||||
public bool OK { get { return !HasMessages(); } }
|
public bool OK { get { return !HasMessages(); } }
|
||||||
public virtual bool ProhibitCache { get; set; } = true;
|
public virtual bool ProhibitCache { get; set; } = true;
|
||||||
public String PageCaption { get; set; }
|
public String PageCaption { get; set; }
|
||||||
@@ -119,6 +122,15 @@ namespace Sacs.Web.Components
|
|||||||
Paging.PopulatePagingTo(resultsPaging);
|
Paging.PopulatePagingTo(resultsPaging);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//-------------------------------------------------------------------
|
||||||
|
// View data.
|
||||||
|
|
||||||
|
/// <summary>Empty list of values for dropdown.</summary>
|
||||||
|
public IEnumerable<SelectListItem> GetEmptyListForSelect()
|
||||||
|
{
|
||||||
|
return new SelectList(Enumerable.Empty<SelectListItem>());
|
||||||
|
}
|
||||||
|
|
||||||
//-------------------------------------------------------------------
|
//-------------------------------------------------------------------
|
||||||
// Messages.
|
// Messages.
|
||||||
//-------------------------------------------------------------------
|
//-------------------------------------------------------------------
|
||||||
@@ -148,7 +160,7 @@ namespace Sacs.Web.Components
|
|||||||
errorMessages.Add(message);
|
errorMessages.Add(message);
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------
|
//---------------------------------------------------------------
|
||||||
}
|
}
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -212,7 +212,7 @@ namespace Sarand.Net.Standard.Base.ReferenceData
|
|||||||
/// <summary>UOM caption - Multiple label is specified, otherwise Single label.</summary>
|
/// <summary>UOM caption - Multiple label is specified, otherwise Single label.</summary>
|
||||||
public String GetCaption()
|
public String GetCaption()
|
||||||
{
|
{
|
||||||
return StringUtil.OnBlank(Multiple, Single, Abbr, Code);
|
return StringUtil.OnBlank(Single, Multiple, Abbr, Code);
|
||||||
}
|
}
|
||||||
|
|
||||||
//-------------------------------------------------------------------
|
//-------------------------------------------------------------------
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ using Sarand.Net.Standard.Base.Dbas;
|
|||||||
using Sarand.Net.Standard.Dbas.Base;
|
using Sarand.Net.Standard.Dbas.Base;
|
||||||
using Sarand.Net.Standard.Base.Utils;
|
using Sarand.Net.Standard.Base.Utils;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
|
using Sarand.Net.Standard.Base.Security;
|
||||||
|
|
||||||
namespace Sarand.Net.Standard.Dbas.Data
|
namespace Sarand.Net.Standard.Dbas.Data
|
||||||
{
|
{
|
||||||
@@ -149,7 +150,7 @@ namespace Sarand.Net.Standard.Dbas.Data
|
|||||||
}
|
}
|
||||||
public override int GetNextIdFromTable(String objectName, String idColumn = "Id")
|
public override int GetNextIdFromTable(String objectName, String idColumn = "Id")
|
||||||
{
|
{
|
||||||
DataValue maxId = GetRowValue(objectName, "Max(" + idColumn + ")", "");
|
DataValue maxId = GetRowValue(SaSecurityDbDfn.DelimitReservedWord(objectName), "Max(" + idColumn + ")", "");
|
||||||
if (maxId != null && maxId.GetDataType() != DataValue.DataType.Unknown)
|
if (maxId != null && maxId.GetDataType() != DataValue.DataType.Unknown)
|
||||||
return Math.Max(0, (int)maxId.AsLong()) + 1;
|
return Math.Max(0, (int)maxId.AsLong()) + 1;
|
||||||
return 1;
|
return 1;
|
||||||
|
|||||||
Reference in New Issue
Block a user