BusinessMgr
This commit is contained in:
@@ -4,10 +4,6 @@ using Sarand.Net.Standard.Base.Dbas;
|
||||
using Sarand.Net.Standard.Base.Utils;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using static Sarand.Net.Standard.Base.Bus.SaErrorStateItem;
|
||||
|
||||
namespace Sacs.Web.Components
|
||||
{
|
||||
|
||||
@@ -3,6 +3,7 @@ using Sarand.Net.Standard.Base.Core;
|
||||
using Sarand.Net.Standard.Base.Utils;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace Sarand.Net.Standard.Base.CodeTypes
|
||||
{
|
||||
@@ -56,7 +57,7 @@ namespace Sarand.Net.Standard.Base.CodeTypes
|
||||
// Data members.
|
||||
private readonly DataProperties data = new DataProperties();
|
||||
// Construction.
|
||||
public Data ()
|
||||
public Data()
|
||||
{
|
||||
Status = DefaultStatus;
|
||||
}
|
||||
@@ -87,7 +88,7 @@ namespace Sarand.Net.Standard.Base.CodeTypes
|
||||
set { CheckChanged(data.DataValue, value); data.DataValue = value; }
|
||||
}
|
||||
// Population.
|
||||
internal void PopulateFrom (Data data)
|
||||
internal void PopulateFrom(Data data)
|
||||
{
|
||||
CodeTypeId = data.CodeTypeId;
|
||||
Code = data.Code;
|
||||
@@ -96,7 +97,7 @@ namespace Sarand.Net.Standard.Base.CodeTypes
|
||||
DataValue = data.DataValue;
|
||||
base.PopulateFrom(data);
|
||||
}
|
||||
public Data Clone ()
|
||||
public Data Clone()
|
||||
{
|
||||
Data data = new Data();
|
||||
data.PopulateFrom(this);
|
||||
@@ -123,7 +124,7 @@ namespace Sarand.Net.Standard.Base.CodeTypes
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Construction.
|
||||
public SaCode (SysId id, SysId codeTypeId, string code) :
|
||||
public SaCode(SysId id, SysId codeTypeId, string code) :
|
||||
base(id)
|
||||
{
|
||||
base.SetData(data);
|
||||
@@ -143,7 +144,7 @@ namespace Sarand.Net.Standard.Base.CodeTypes
|
||||
public static SaStatus ActiveStatus { get { return SaStatus.Current; } }
|
||||
public static SaStatus InactiveStatus { get { return SaStatus.Redundant; } }
|
||||
public static List<SaStatus> ValidStatuses { get { return new List<SaStatus>(validStatuses); } }
|
||||
public static DataValue.TriStateType GetStatusTriState (SaStatus status)
|
||||
public static DataValue.TriStateType GetStatusTriState(SaStatus status)
|
||||
{
|
||||
switch (status)
|
||||
{
|
||||
@@ -159,8 +160,8 @@ namespace Sarand.Net.Standard.Base.CodeTypes
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Properties.
|
||||
public Data GetData () { return data.Clone(); }
|
||||
public void SetData (Data data)
|
||||
public Data GetData() { return data.Clone(); }
|
||||
public void SetData(Data data)
|
||||
{
|
||||
// Properties that cannot be changed if previously specified.
|
||||
if (SysId.IsValid(Id) && SysId.ToInt(Id) != SysId.ToInt(data.Id))
|
||||
@@ -218,7 +219,7 @@ namespace Sarand.Net.Standard.Base.CodeTypes
|
||||
public HashSet<SysId> CodeTypeIds { get; } = new HashSet<SysId>();
|
||||
public HashSet<String> CodeTypeCodes { get; } = new HashSet<string>();
|
||||
/// <summary>Generic search - code, description etc.</summary>
|
||||
public string Search{ get; set; }
|
||||
public string Search { get; set; }
|
||||
public string Code { get; set; }
|
||||
public string CodePartial { get; set; }
|
||||
public string Desc { get; set; }
|
||||
@@ -233,24 +234,24 @@ namespace Sarand.Net.Standard.Base.CodeTypes
|
||||
public static class SaCodeList
|
||||
{
|
||||
// Contents.
|
||||
public static bool ContainsCode (this List<SaCode> codes, String code, bool currentOnly = true)
|
||||
public static bool ContainsCode(this List<SaCode> codes, String code, bool currentOnly = true)
|
||||
{
|
||||
if (StringUtil.IsEmpty(code)) return false;
|
||||
return codes.Exists(item => item.Code.EqualsCI(code) && (!currentOnly || item.IsStatusCurrent));
|
||||
return codes.Any(item => item.Code.EqualsCI(code) && (!currentOnly || item.IsStatusCurrent));
|
||||
}
|
||||
|
||||
// Retrieve code.
|
||||
public static SaCode GetCodeById (this List<SaCode> codes, SysId id)
|
||||
public static SaCode GetCodeById(this List<SaCode> codes, SysId id)
|
||||
{
|
||||
return codes.Find(item => item.Id.Equals(id));
|
||||
}
|
||||
public static SaCode GetCodeByCode (this List<SaCode> codes, string code)
|
||||
public static SaCode GetCodeByCode(this List<SaCode> codes, string code)
|
||||
{
|
||||
return codes.Find(item => item.Code.EqualsCI(code));
|
||||
}
|
||||
|
||||
// Retrieve code's description.
|
||||
public static string GetDescForCode (this List<SaCode> codes, string code, String defaultDesc = "")
|
||||
public static string GetDescForCode(this List<SaCode> codes, string code, String defaultDesc = "")
|
||||
{
|
||||
SaCode saCode = codes.Find(item => item.Code.EqualsCI(code));
|
||||
if (saCode != null)
|
||||
|
||||
@@ -225,11 +225,11 @@ namespace Sarand.Net.Standard.Base.Interfaces
|
||||
/// </summary>
|
||||
public new class Params : SacsHierarchyItem.Params
|
||||
{
|
||||
public List<SysId> IncludedIds { get; } = new List<SysId>();
|
||||
public List<SysId> ExcludedIds { get; } = new List<SysId>();
|
||||
public HashSet<SysId> IdsIncluded { get; } = new HashSet<SysId>();
|
||||
public HashSet<SysId> IdsExcluded { get; } = new HashSet<SysId>();
|
||||
public String Context { get; set; }
|
||||
public SaInterfaceCategory InterfaceCategory { get; set; } = SaInterfaceCategory.Unknown;
|
||||
public List<short> IncludedInterfaceTypes { get; } = new List<short>();
|
||||
public HashSet<short> InterfaceTypesIncluded { get; } = new HashSet<short>();
|
||||
/// <summary>Exact code match</summary>
|
||||
public String Code { get; set; }
|
||||
public String CaptionPartial { get; set; }
|
||||
|
||||
@@ -349,12 +349,12 @@ namespace Sarand.Net.Standard.Base.Interfaces
|
||||
/// </summary>
|
||||
public new class Params : SacsHierarchyItem.Params
|
||||
{
|
||||
public List<SysId> IncludedIds { get; } = new List<SysId>();
|
||||
public List<SysId> ExcludedIds { get; } = new List<SysId>();
|
||||
public HashSet<SysId> IdsIncluded { get; } = new HashSet<SysId>();
|
||||
public HashSet<SysId> IdsExcluded { get; } = new HashSet<SysId>();
|
||||
public SysId InterfaceId { get; set; }
|
||||
public SaInterfaceProcessDirection Direction { get; set; } = SaInterfaceProcessDirection.Unknown;
|
||||
public short ItemType { get; set; }
|
||||
public List<ItemId> IncludedItemIds { get; } = new List<ItemId>();
|
||||
public HashSet<ItemId> ItemIdsIncluded { get; } = new HashSet<ItemId>();
|
||||
public String ExternalReference { get; set; }
|
||||
public ProcessStatusCat ProcessStatusCat { get; set; } = ProcessStatusCat.Any;
|
||||
public ItemStatusCat ItemStatusCat { get; set; } = ItemStatusCat.Any;
|
||||
|
||||
@@ -72,7 +72,7 @@ namespace Sarand.Net.Standard.Base.Interfaces
|
||||
// Data members.
|
||||
private readonly DataProperties data = new DataProperties();
|
||||
// Construction.
|
||||
public Data ()
|
||||
public Data()
|
||||
{
|
||||
Status = DefaultStatus;
|
||||
}
|
||||
@@ -113,7 +113,7 @@ namespace Sarand.Net.Standard.Base.Interfaces
|
||||
set { CheckChanged(data.ElapseSecs, value); data.ElapseSecs = value; }
|
||||
}
|
||||
// Population.
|
||||
internal void PopulateFrom (Data data)
|
||||
internal void PopulateFrom(Data data)
|
||||
{
|
||||
InterfaceId = data.InterfaceId;
|
||||
Direction = data.Direction;
|
||||
@@ -124,7 +124,7 @@ namespace Sarand.Net.Standard.Base.Interfaces
|
||||
ElapseSecs = data.ElapseSecs;
|
||||
base.PopulateFrom(data);
|
||||
}
|
||||
public Data Clone ()
|
||||
public Data Clone()
|
||||
{
|
||||
Data data = new Data();
|
||||
data.PopulateFrom(this);
|
||||
@@ -154,7 +154,7 @@ namespace Sarand.Net.Standard.Base.Interfaces
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Construction.
|
||||
public SaInterfaceProcess (SysId id, SysId interfaceId, SaInterfaceProcessDirection direction, String reference, int sequence) :
|
||||
public SaInterfaceProcess(SysId id, SysId interfaceId, SaInterfaceProcessDirection direction, String reference, int sequence) :
|
||||
base(id)
|
||||
{
|
||||
base.SetData(data);
|
||||
@@ -180,7 +180,7 @@ namespace Sarand.Net.Standard.Base.Interfaces
|
||||
public static SaStatus CompletedStatus { get { return SaStatus.Completed; } }
|
||||
public static SaStatus CancelledStatus { get { return SaStatus.Cancelled; } }
|
||||
public static List<SaStatus> ValidStatuses { get { return new List<SaStatus>(validStatuses); } }
|
||||
public static DataValue.TriStateType GetStatusTriState (SaStatus status)
|
||||
public static DataValue.TriStateType GetStatusTriState(SaStatus status)
|
||||
{
|
||||
switch (status)
|
||||
{
|
||||
@@ -200,8 +200,8 @@ namespace Sarand.Net.Standard.Base.Interfaces
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Properties.
|
||||
public Data GetData () { return data.Clone(); }
|
||||
public void SetData (Data data)
|
||||
public Data GetData() { return data.Clone(); }
|
||||
public void SetData(Data data)
|
||||
{
|
||||
// Properties that cannot be changed if previously specified.
|
||||
if (SysId.IsValid(Id) && SysId.ToInt(Id) != SysId.ToInt(data.Id))
|
||||
@@ -270,18 +270,18 @@ namespace Sarand.Net.Standard.Base.Interfaces
|
||||
/// </summary>
|
||||
public new class Params : SacsHierarchyItem.Params
|
||||
{
|
||||
public List<SysId> IncludedIds { get; } = new List<SysId>();
|
||||
public List<SysId> ExcludedIds { get; } = new List<SysId>();
|
||||
public SysId InterfaceId { get; set; }
|
||||
public HashSet<SysId> IdsIncluded { get; } = new HashSet<SysId>();
|
||||
public HashSet<SysId> IdsExcluded { get; } = new HashSet<SysId>();
|
||||
public SysId InterfaceId { get; set; }
|
||||
public SaInterfaceProcessDirection Direction { get; set; } = SaInterfaceProcessDirection.Unknown;
|
||||
public String Reference { get; set; }
|
||||
public String ReferencePartial { get; set; }
|
||||
public DateTime ProcessedOn { get; set; } = DateTime.MinValue;
|
||||
public DateTime ProcessedFrom { get; set; } = DateTime.MinValue;
|
||||
public DateTime ProcessedTo { get; set; } = DateTime.MinValue;
|
||||
public String MessageText { get; set; }
|
||||
public String MessageTextPartial { get; set; }
|
||||
public StatusCat StatusCat { get; set; } = StatusCat.Any;
|
||||
public String Reference { get; set; }
|
||||
public String ReferencePartial { get; set; }
|
||||
public DateTime ProcessedOn { get; set; } = DateTime.MinValue;
|
||||
public DateTime ProcessedFrom { get; set; } = DateTime.MinValue;
|
||||
public DateTime ProcessedTo { get; set; } = DateTime.MinValue;
|
||||
public String MessageText { get; set; }
|
||||
public String MessageTextPartial { get; set; }
|
||||
public StatusCat StatusCat { get; set; } = StatusCat.Any;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
|
||||
@@ -181,10 +181,10 @@ namespace Sarand.Net.Standard.Base.Interfaces
|
||||
/// </summary>
|
||||
public new class Params : SacsHierarchyItem.Params
|
||||
{
|
||||
public List<SysId> IncludedIds { get; } = new List<SysId>();
|
||||
public List<SysId> ExcludedIds { get; } = new List<SysId>();
|
||||
public HashSet<SysId> IdsIncluded { get; } = new HashSet<SysId>();
|
||||
public HashSet<SysId> IdsExcluded { get; } = new HashSet<SysId>();
|
||||
public SysId InterfaceProcessId { get; } = null;
|
||||
public List<ItemId> IncludedItemIds { get; } = new List<ItemId>();
|
||||
public HashSet<ItemId> ItemIdsIncluded { get; } = new HashSet<ItemId>();
|
||||
public StatusCat StatusCat { get; set; } = StatusCat.Any;
|
||||
}
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@ namespace Sarand.Net.Standard.Base.Interfaces
|
||||
// Data members.
|
||||
private readonly DataProperties data = new DataProperties();
|
||||
// Construction.
|
||||
public Data ()
|
||||
public Data()
|
||||
{
|
||||
Status = DefaultStatus;
|
||||
}
|
||||
@@ -91,7 +91,7 @@ namespace Sarand.Net.Standard.Base.Interfaces
|
||||
set { if (value == null) value = new ItemId(); CheckChanged(data.ItemId, value); data.ItemId = value; }
|
||||
}
|
||||
// Population.
|
||||
internal void PopulateFrom (Data data)
|
||||
internal void PopulateFrom(Data data)
|
||||
{
|
||||
InterfaceProcessId = data.InterfaceProcessId;
|
||||
Level = data.Level;
|
||||
@@ -101,7 +101,7 @@ namespace Sarand.Net.Standard.Base.Interfaces
|
||||
ItemId = data.ItemId;
|
||||
base.PopulateFrom(data);
|
||||
}
|
||||
public Data Clone ()
|
||||
public Data Clone()
|
||||
{
|
||||
Data data = new Data();
|
||||
data.PopulateFrom(this);
|
||||
@@ -130,7 +130,7 @@ namespace Sarand.Net.Standard.Base.Interfaces
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Construction.
|
||||
public SaInterfaceProcessMessage (SysId id, SysId interfaceProcessId) :
|
||||
public SaInterfaceProcessMessage(SysId id, SysId interfaceProcessId) :
|
||||
base(id)
|
||||
{
|
||||
base.SetData(data);
|
||||
@@ -147,7 +147,7 @@ namespace Sarand.Net.Standard.Base.Interfaces
|
||||
public static SaStatus DefaultStatus { get { return CompletedStatus; } }
|
||||
public static SaStatus CompletedStatus { get { return SaStatus.Completed; } }
|
||||
public static List<SaStatus> ValidStatuses { get { return new List<SaStatus>(validStatuses); } }
|
||||
public static DataValue.TriStateType GetStatusTriState (SaStatus status)
|
||||
public static DataValue.TriStateType GetStatusTriState(SaStatus status)
|
||||
{
|
||||
switch (status)
|
||||
{
|
||||
@@ -161,8 +161,8 @@ namespace Sarand.Net.Standard.Base.Interfaces
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Properties.
|
||||
public Data GetData () { return data.Clone(); }
|
||||
public void SetData (Data data)
|
||||
public Data GetData() { return data.Clone(); }
|
||||
public void SetData(Data data)
|
||||
{
|
||||
// Properties that cannot be changed if previously specified.
|
||||
if (SysId.IsValid(Id) && SysId.ToInt(Id) != SysId.ToInt(data.Id))
|
||||
@@ -218,10 +218,10 @@ namespace Sarand.Net.Standard.Base.Interfaces
|
||||
/// </summary>
|
||||
public new class Params : SacsHierarchyItem.Params
|
||||
{
|
||||
public List<SysId> IncludedIds { get; } = new List<SysId>();
|
||||
public List<SysId> ExcludedIds { get; } = new List<SysId>();
|
||||
public SysId InterfaceProcessId { get; set; } = new SysId();
|
||||
public List<ItemId> IncludedItemIds { get; } = new List<ItemId>();
|
||||
public HashSet<SysId> IdsIncluded { get; } = new HashSet<SysId>();
|
||||
public HashSet<SysId> IdsExcluded { get; } = new HashSet<SysId>();
|
||||
public SysId InterfaceProcessId { get; set; } = new SysId();
|
||||
public HashSet<ItemId> ItemIdsIncluded { get; } = new HashSet<ItemId>();
|
||||
public StatusCat StatusCat { get; set; } = StatusCat.Any;
|
||||
}
|
||||
|
||||
|
||||
@@ -193,10 +193,10 @@ namespace Sarand.Net.Standard.Base.ItemData
|
||||
/// </summary>
|
||||
public new class Params : SacsHierarchyItem.Params
|
||||
{
|
||||
public List<SysId> IncludedIds { get; } = new List<SysId>();
|
||||
public List<SysId> ExcludedIds { get; } = new List<SysId>();
|
||||
public List<ItemId> IncludedItemIds { get; } = new List<ItemId>();
|
||||
public List<String> IncludedDataTypes { get; } = new List<String>();
|
||||
public HashSet<SysId> IdsIncluded { get; } = new HashSet<SysId>();
|
||||
public HashSet<SysId> IdsExcluded { get; } = new HashSet<SysId>();
|
||||
public HashSet<ItemId> ItemIdsIncluded { get; } = new HashSet<ItemId>();
|
||||
public HashSet<String> DataTypesIncluded { get; } = new HashSet<String>();
|
||||
public StatusCat StatusCat { get; set; } = StatusCat.NotDeleted;
|
||||
}
|
||||
|
||||
|
||||
@@ -277,9 +277,9 @@ namespace Sarand.Net.Standard.Base.ItemDocs
|
||||
/// </summary>
|
||||
public new class Params : SacsHierarchyItem.Params
|
||||
{
|
||||
public List<SysId> IncludedIds { get; } = new List<SysId>();
|
||||
public List<SysId> ExcludedIds { get; } = new List<SysId>();
|
||||
public List<ItemId> IncludedItemIds { get; } = new List<ItemId>();
|
||||
public HashSet<SysId> IdsIncluded { get; } = new HashSet<SysId>();
|
||||
public HashSet<SysId> IdsExcluded { get; } = new HashSet<SysId>();
|
||||
public HashSet<ItemId> ItemIdsIncluded { get; } = new HashSet<ItemId>();
|
||||
public SaItemDocConsole.Category Category { get; set; }
|
||||
public String DocType { get; set; }
|
||||
public String DescBriefPartial { get; set; }
|
||||
|
||||
@@ -1,15 +1,11 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.Extensions.Logging.Abstractions;
|
||||
using Sarand.Net.Standard.Base.App;
|
||||
using Sarand.Net.Standard.Base.App;
|
||||
using Sarand.Net.Standard.Base.Core;
|
||||
using Sarand.Net.Standard.Base.Tasks;
|
||||
using Sarand.Net.Standard.Base.Utils;
|
||||
using static Sarand.Net.Standard.Base.Procs.SaProcess_Base;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Sarand.Net.Standard.Base.Procs
|
||||
{
|
||||
|
||||
@@ -263,8 +263,8 @@ namespace Sarand.Net.Standard.Base.ReferenceData
|
||||
public new class Params : SacsHierarchyItem.Params
|
||||
{
|
||||
// List filtering.
|
||||
public List<SysId> IdsIncluded { get; } = new List<SysId>();
|
||||
public List<SysId> IdsExcluded { get; } = new List<SysId>();
|
||||
public HashSet<SysId> IdsIncluded { get; } = new HashSet<SysId>();
|
||||
public HashSet<SysId> IdsExcluded { get; } = new HashSet<SysId>();
|
||||
// Currency.
|
||||
public String Code { get; set; }
|
||||
public String CodePartial { get; set; }
|
||||
|
||||
@@ -185,8 +185,8 @@ namespace Sarand.Net.Standard.Base.ReferenceData
|
||||
public new class Params : SacsHierarchyItem.Params
|
||||
{
|
||||
// List filtering.
|
||||
public List<SysId> IdsIncluded { get; } = new List<SysId>();
|
||||
public List<SysId> IdsExcluded { get; } = new List<SysId>();
|
||||
public HashSet<SysId> IdsIncluded { get; } = new HashSet<SysId>();
|
||||
public HashSet<SysId> IdsExcluded { get; } = new HashSet<SysId>();
|
||||
// Item properties.
|
||||
public String Code { get; set; }
|
||||
public String CodePartial { get; set; }
|
||||
|
||||
@@ -7,12 +7,11 @@ using System.Text;
|
||||
|
||||
namespace Sarand.Net.Standard.Base.ReferenceData
|
||||
{
|
||||
//=======================================================================
|
||||
// Reference Data Console - Currencies.
|
||||
//=======================================================================
|
||||
partial class SaReferenceDataConsole
|
||||
{
|
||||
//*******************************************************************
|
||||
// C u r r e n c i e s
|
||||
//*******************************************************************
|
||||
// Properties.
|
||||
public abstract short CurrencyItemType { get; }
|
||||
public abstract String TableName_Currency { get; }
|
||||
|
||||
@@ -7,12 +7,11 @@ using System.Text;
|
||||
|
||||
namespace Sarand.Net.Standard.Base.ReferenceData
|
||||
{
|
||||
//=======================================================================
|
||||
// Reference Data Console - Languages.
|
||||
//=======================================================================
|
||||
partial class SaReferenceDataConsole
|
||||
{
|
||||
//*******************************************************************
|
||||
// L a n g u a g e s
|
||||
//*******************************************************************
|
||||
// Properties.
|
||||
public abstract short LanguageItemType { get; }
|
||||
public abstract String TableName_Language { get; }
|
||||
|
||||
@@ -7,20 +7,29 @@ using System.Text;
|
||||
|
||||
namespace Sarand.Net.Standard.Base.ReferenceData
|
||||
{
|
||||
//=======================================================================
|
||||
// Reference Data Console - Regions.
|
||||
//=======================================================================
|
||||
partial class SaReferenceDataConsole
|
||||
{
|
||||
//*******************************************************************
|
||||
// R e g i o n s
|
||||
//*******************************************************************
|
||||
// Definitions.
|
||||
public class RegionInitData
|
||||
{
|
||||
public SaRegionType Type { get; set; } = SaRegionType.Unknown;
|
||||
public String Name { get; set; } = "";
|
||||
public String CurrencyCode { get; set; } = "";
|
||||
public SaRegionType ParentType { get; set; } = SaRegionType.Unknown;
|
||||
public String ParentName { get; set; } = "";
|
||||
}
|
||||
|
||||
// Utilities.
|
||||
/// <summary>Return the valid parent type for the specified Region type.</summary>
|
||||
public static SaRegionType ParentTypeFor (SaRegionType regionType)
|
||||
public static SaRegionType ParentTypeFor(SaRegionType regionType)
|
||||
{
|
||||
return SaReferenceDataMgr.ParentTypeFor(regionType);
|
||||
}
|
||||
/// <summary>Return the valid subordinate Region type for the specified Region type.</summary>
|
||||
public static SaRegionType SubordinateTypeFor (SaRegionType regionType)
|
||||
public static SaRegionType SubordinateTypeFor(SaRegionType regionType)
|
||||
{
|
||||
return SaReferenceDataMgr.SubordinateTypeFor(regionType);
|
||||
}
|
||||
@@ -31,15 +40,15 @@ namespace Sarand.Net.Standard.Base.ReferenceData
|
||||
public abstract bool DatabaseIsValid_Region { get; }
|
||||
|
||||
// Retrieve Region.
|
||||
public abstract SaRegion GetRegion (SaRegion.Params prmRegion);
|
||||
public abstract SaRegion GetRegion(SaRegion.Params prmRegion);
|
||||
|
||||
// Region list.
|
||||
public abstract ColumnDfn GetRegionColumnDfn (SaRegion.Column columnId, String caption = "", int width = 0);
|
||||
public abstract List<String> GetRegionQueryFilter (SaRegion.Params prm);
|
||||
public abstract long GetRegionCount (SaRegion.Params prmRegion);
|
||||
public abstract List<SaRegion> GetRegionList (SaRegion.Params prmRegion);
|
||||
public abstract DbResultSet ExecuteRegionQuery (List<ColumnDfn> columns, SaRegion.Params prm);
|
||||
public abstract DataValue GetRegionDataValue (ColumnDfn column, NamedValue.Map values);
|
||||
public abstract ColumnDfn GetRegionColumnDfn(SaRegion.Column columnId, String caption = "", int width = 0);
|
||||
public abstract List<String> GetRegionQueryFilter(SaRegion.Params prm);
|
||||
public abstract long GetRegionCount(SaRegion.Params prmRegion);
|
||||
public abstract List<SaRegion> GetRegionList(SaRegion.Params prmRegion);
|
||||
public abstract DbResultSet ExecuteRegionQuery(List<ColumnDfn> columns, SaRegion.Params prm);
|
||||
public abstract DataValue GetRegionDataValue(ColumnDfn column, NamedValue.Map values);
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
}
|
||||
|
||||
@@ -7,12 +7,11 @@ using System.Text;
|
||||
|
||||
namespace Sarand.Net.Standard.Base.ReferenceData
|
||||
{
|
||||
//=======================================================================
|
||||
// Reference Data Console - Tax codes.
|
||||
//=======================================================================
|
||||
partial class SaReferenceDataConsole
|
||||
{
|
||||
//*******************************************************************
|
||||
// T a x C o d e s
|
||||
//*******************************************************************
|
||||
// Utilities.
|
||||
public static String GetTaxCode (SaTaxCodeType taxCode)
|
||||
{
|
||||
|
||||
@@ -7,12 +7,11 @@ using System.Text;
|
||||
|
||||
namespace Sarand.Net.Standard.Base.ReferenceData
|
||||
{
|
||||
//=======================================================================
|
||||
// Reference Data Console - Units of Measure.
|
||||
//=======================================================================
|
||||
partial class SaReferenceDataConsole
|
||||
{
|
||||
//*******************************************************************
|
||||
// U n i t s o f M e a s u r e
|
||||
//*******************************************************************
|
||||
// Properties.
|
||||
public abstract short UnitMeasureItemType { get; }
|
||||
public abstract String TableName_UnitMeasure { get; }
|
||||
|
||||
@@ -178,8 +178,8 @@ namespace Sarand.Net.Standard.Base.ReferenceData
|
||||
public new class Params : SacsHierarchyItem.Params
|
||||
{
|
||||
// List filtering.
|
||||
public List<SysId> IdsIncluded { get; } = new List<SysId>();
|
||||
public List<SysId> IdsExcluded { get; } = new List<SysId>();
|
||||
public HashSet<SysId> IdsIncluded { get; } = new HashSet<SysId>();
|
||||
public HashSet<SysId> IdsExcluded { get; } = new HashSet<SysId>();
|
||||
// Region.
|
||||
public SaRegionType RegionType { get; set; } = SaRegionType.Unknown;
|
||||
public String Name { get; set; }
|
||||
|
||||
@@ -279,8 +279,8 @@ namespace Sarand.Net.Standard.Base.ReferenceData
|
||||
public new class Params : SacsHierarchyItem.Params
|
||||
{
|
||||
// List filtering.
|
||||
public List<SysId> IdsIncluded { get; } = new List<SysId>();
|
||||
public List<SysId> IdsExcluded { get; } = new List<SysId>();
|
||||
public HashSet<SysId> IdsIncluded { get; } = new HashSet<SysId>();
|
||||
public HashSet<SysId> IdsExcluded { get; } = new HashSet<SysId>();
|
||||
// Tax Code properties.
|
||||
public String Code { get; set; }
|
||||
public String CodePartial { get; set; }
|
||||
|
||||
@@ -319,8 +319,8 @@ namespace Sarand.Net.Standard.Base.ReferenceData
|
||||
public new class Params : SacsHierarchyItem.Params
|
||||
{
|
||||
// List filtering.
|
||||
public List<SysId> IdsIncluded { get; } = new List<SysId>();
|
||||
public List<SysId> IdsExcluded { get; } = new List<SysId>();
|
||||
public HashSet<SysId> IdsIncluded { get; } = new HashSet<SysId>();
|
||||
public HashSet<SysId> IdsExcluded { get; } = new HashSet<SysId>();
|
||||
// UnitMeasure.
|
||||
public SaUomCategory Category { get; set; }
|
||||
public SaUomType UnitType { get; set; }
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Sarand.Net.Standard.Base.Bus;
|
||||
using Sarand.Net.Standard.Base.Core;
|
||||
using Sarand.Net.Standard.Base.Bus;
|
||||
using Sarand.Net.Standard.Base.Dbas;
|
||||
using Sarand.Net.Standard.Base.UpdateLog;
|
||||
using static Sarand.Net.Standard.Base.Security.SaSecurityMgr;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Sarand.Net.Standard.Base.Security
|
||||
{
|
||||
|
||||
@@ -224,11 +224,11 @@ namespace Sarand.Net.Standard.Base.Security
|
||||
/// </summary>
|
||||
public new class Params : SacsHierarchyItem.Params
|
||||
{
|
||||
public readonly List<SysId> includedItemIdsOwner = new List<SysId>();
|
||||
public readonly HashSet<SysId> ItemIdsOwnerIncluded = new HashSet<SysId>();
|
||||
public SaSecurity.ItemType OwnerItemType { get; set; } = SaSecurity.ItemType.Unknown;
|
||||
public readonly List<SysId> includedItemIdsTarget = new List<SysId>();
|
||||
public readonly HashSet<SysId> ItemIdsTargetIncluded = new HashSet<SysId>();
|
||||
public SaSecurity.ItemType TargetItemType { get; set; } = SaSecurity.ItemType.Unknown;
|
||||
public readonly List<SysId> includedItemIdsContext = new List<SysId>();
|
||||
public readonly HashSet<SysId> ItemIdsContextIncluded = new HashSet<SysId>();
|
||||
public StatusCat StatusCat { get; set; } = StatusCat.Any;
|
||||
}
|
||||
|
||||
|
||||
@@ -106,7 +106,7 @@ namespace Sarand.Net.Standard.Dbas.Interfaces
|
||||
SaInterface.Params prmInterface = new SaInterface.Params();
|
||||
prmInterface.Context = context;
|
||||
prmInterface.InterfaceCategory = interfaceCategory;
|
||||
prmInterface.IncludedInterfaceTypes.Add(interfaceType);
|
||||
prmInterface.InterfaceTypesIncluded.Add(interfaceType);
|
||||
prmInterface.ActiveOnly = false;
|
||||
prmInterface.StatusCat = SaInterface.StatusCat.Any;
|
||||
SaInterface interfaceObj = interfaceMgr.GetInterface(prmInterface);
|
||||
@@ -247,7 +247,7 @@ namespace Sarand.Net.Standard.Dbas.Interfaces
|
||||
{
|
||||
ClearErrorState();
|
||||
SaInterfaceDataItem.Params prmInterfaceDataItem = new SaInterfaceDataItem.Params();
|
||||
prmInterfaceDataItem.IncludedItemIds.Add(itemId);
|
||||
prmInterfaceDataItem.ItemIdsIncluded.Add(itemId);
|
||||
return (interfaceMgr.GetInterfaceDataItemCount(prmInterfaceDataItem) > 0);
|
||||
}
|
||||
public override bool InterfaceDataItemExistsByRef (SysId interfaceId, SaInterfaceProcessDirection processDirection, short itemType, String externalReference)
|
||||
@@ -276,7 +276,7 @@ namespace Sarand.Net.Standard.Dbas.Interfaces
|
||||
SaInterfaceDataItem.Params prmInterfaceDataItem = new SaInterfaceDataItem.Params();
|
||||
prmInterfaceDataItem.InterfaceId = interfaceId;
|
||||
prmInterfaceDataItem.Direction = processDirection;
|
||||
prmInterfaceDataItem.IncludedItemIds.Add(itemId);
|
||||
prmInterfaceDataItem.ItemIdsIncluded.Add(itemId);
|
||||
prmInterfaceDataItem.ExternalReference = externalReference;
|
||||
return interfaceMgr.GetInterfaceDataItem(prmInterfaceDataItem);
|
||||
}
|
||||
@@ -298,7 +298,7 @@ namespace Sarand.Net.Standard.Dbas.Interfaces
|
||||
SaInterfaceDataItem.Params prmInterfaceDataItem = new SaInterfaceDataItem.Params();
|
||||
prmInterfaceDataItem.InterfaceId = interfaceId;
|
||||
prmInterfaceDataItem.Direction = processDirection;
|
||||
prmInterfaceDataItem.IncludedItemIds.Add(itemId);
|
||||
prmInterfaceDataItem.ItemIdsIncluded.Add(itemId);
|
||||
return interfaceMgr.GetInterfaceDataItem(prmInterfaceDataItem);
|
||||
}
|
||||
public override List<SaInterfaceDataItem> GetInterfaceDataItemsByItem (SysId interfaceId, SaInterfaceProcessDirection processDirection, ItemId itemId)
|
||||
@@ -307,7 +307,7 @@ namespace Sarand.Net.Standard.Dbas.Interfaces
|
||||
SaInterfaceDataItem.Params prmInterfaceDataItem = new SaInterfaceDataItem.Params();
|
||||
prmInterfaceDataItem.InterfaceId = interfaceId;
|
||||
prmInterfaceDataItem.Direction = processDirection;
|
||||
prmInterfaceDataItem.IncludedItemIds.Add(itemId);
|
||||
prmInterfaceDataItem.ItemIdsIncluded.Add(itemId);
|
||||
return interfaceMgr.GetInterfaceDataItemList(prmInterfaceDataItem);
|
||||
}
|
||||
public override List<SaInterfaceDataItem> GetInterfaceDataItemsByRef (SysId interfaceId, SaInterfaceProcessDirection processDirection, short itemType, String externalReference)
|
||||
@@ -357,7 +357,7 @@ namespace Sarand.Net.Standard.Dbas.Interfaces
|
||||
{
|
||||
ClearErrorState();
|
||||
SaInterfaceDataItem.Params prmInterfaceDataItem = new SaInterfaceDataItem.Params();
|
||||
prmInterfaceDataItem.IncludedItemIds.Add(itemId);
|
||||
prmInterfaceDataItem.ItemIdsIncluded.Add(itemId);
|
||||
foreach (SaInterfaceDataItem interfaceDataItem in interfaceMgr.GetInterfaceDataItemList(prmInterfaceDataItem))
|
||||
{
|
||||
if (!ClearInterfaceDataItem(interfaceDataItem, dbUpdateInfo))
|
||||
|
||||
@@ -395,10 +395,10 @@ namespace Sarand.Net.Standard.Dbas.Interfaces
|
||||
|
||||
// Item Id.
|
||||
String colSaInterfaceDataItem_Id = SaInterfaceDbDfn.GetColumnNameQual(SaInterfaceDbDfn.ColumnIdx.SaInterfaceDataItem_Id, aliasInterfaceDataItem);
|
||||
String includedIds = prm.IncludedIds.Concat(",");
|
||||
String includedIds = prm.IdsIncluded.Concat(",");
|
||||
if (!includedIds.IsEmpty())
|
||||
filter.Add(colSaInterfaceDataItem_Id + " IN (" + includedIds + ")");
|
||||
String excludedIds = prm.ExcludedIds.Concat(",");
|
||||
String excludedIds = prm.IdsExcluded.Concat(",");
|
||||
if (!excludedIds.IsEmpty())
|
||||
filter.Add(colSaInterfaceDataItem_Id + " NOT IN (" + excludedIds + ")");
|
||||
|
||||
@@ -420,7 +420,7 @@ namespace Sarand.Net.Standard.Dbas.Interfaces
|
||||
// Item ids.
|
||||
String colSaInterfaceDataItem_ItemId = SaInterfaceDbDfn.GetColumnNameQual(SaInterfaceDbDfn.ColumnIdx.SaInterfaceDataItem_ItemId, aliasInterfaceDataItem);
|
||||
List<String> filterItemIds = new List<string>();
|
||||
foreach (ItemId itemId in prm.IncludedItemIds)
|
||||
foreach (ItemId itemId in prm.ItemIdsIncluded)
|
||||
filter.Add(colSaInterfaceDataItem_ItemType + "=" + itemId.Type.ToString() + " And " + colSaInterfaceDataItem_ItemId + "=" + SysId.ToString(itemId.Id));
|
||||
if (filterItemIds.Count > 0)
|
||||
filter.Add(filterItemIds.Concat(" Or ", "(", ")"));
|
||||
@@ -603,7 +603,7 @@ namespace Sarand.Net.Standard.Dbas.Interfaces
|
||||
// Populate filter.
|
||||
query.Filters.AddRange(GetInterfaceDataItemQueryFilter(prm));
|
||||
|
||||
if (prm.IncludedIds.Count != 1)
|
||||
if (prm.IdsIncluded.Count != 1)
|
||||
{
|
||||
// Configure sort sequence.
|
||||
foreach (String sortColumn in GetInterfaceDataItemSortColumns(prm))
|
||||
|
||||
@@ -312,10 +312,10 @@ namespace Sarand.Net.Standard.Dbas.Interfaces
|
||||
|
||||
// Interface ProcessMessage Id.
|
||||
String colId = SaInterfaceDbDfn.GetColumnNameQual(SaInterfaceDbDfn.ColumnIdx.SaInterfaceProcessMessage_Id, aliasInterfaceProcessMessage);
|
||||
String includedIds = prm.IncludedIds.Concat(",");
|
||||
String includedIds = prm.IdsIncluded.Concat(",");
|
||||
if (!includedIds.IsEmpty())
|
||||
filter.Add(colId + " IN (" + includedIds + ")");
|
||||
String excludedIds = prm.ExcludedIds.Concat(",");
|
||||
String excludedIds = prm.IdsExcluded.Concat(",");
|
||||
if (!excludedIds.IsEmpty())
|
||||
filter.Add(colId + " NOT IN (" + excludedIds + ")");
|
||||
|
||||
@@ -328,7 +328,7 @@ namespace Sarand.Net.Standard.Dbas.Interfaces
|
||||
String colItemType = SaInterfaceDbDfn.GetColumnNameQual(SaInterfaceDbDfn.ColumnIdx.SaInterfaceProcessMessage_ItemType, aliasInterfaceProcessMessage);
|
||||
String colItemId = SaInterfaceDbDfn.GetColumnNameQual(SaInterfaceDbDfn.ColumnIdx.SaInterfaceProcessMessage_ItemId, aliasInterfaceProcessMessage);
|
||||
List<String> filterItemIds = new List<string>();
|
||||
foreach (ItemId itemId in prm.IncludedItemIds)
|
||||
foreach (ItemId itemId in prm.ItemIdsIncluded)
|
||||
filter.Add(colItemType + "=" + itemId.Type.ToString() + " And " + colItemId + "=" + SysId.ToString(itemId.Id));
|
||||
if (filterItemIds.Count > 0)
|
||||
filter.Add(filterItemIds.Concat(" Or ", "(", ")"));
|
||||
@@ -469,7 +469,7 @@ namespace Sarand.Net.Standard.Dbas.Interfaces
|
||||
// Populate filter.
|
||||
query.Filters.AddRange(GetInterfaceProcessMessageQueryFilter(prm));
|
||||
|
||||
if (prm.IncludedIds.Count != 1)
|
||||
if (prm.IdsIncluded.Count != 1)
|
||||
{
|
||||
// Configure sort sequence.
|
||||
foreach (String sortColumn in GetInterfaceProcessMessageSortColumns(prm))
|
||||
|
||||
@@ -480,10 +480,10 @@ namespace Sarand.Net.Standard.Dbas.Interfaces
|
||||
|
||||
// Interface Process Id.
|
||||
String colInterfaceProcess_Id = SaInterfaceDbDfn.GetColumnNameQual(SaInterfaceDbDfn.ColumnIdx.SaInterfaceProcess_Id, aliasInterfaceProcess);
|
||||
String includedIds = prm.IncludedIds.Concat(",");
|
||||
String includedIds = prm.IdsIncluded.Concat(",");
|
||||
if (!includedIds.IsEmpty())
|
||||
filter.Add(colInterfaceProcess_Id + " IN (" + includedIds + ")");
|
||||
String excludedIds = prm.ExcludedIds.Concat(",");
|
||||
String excludedIds = prm.IdsExcluded.Concat(",");
|
||||
if (!excludedIds.IsEmpty())
|
||||
filter.Add(colInterfaceProcess_Id + " NOT IN (" + excludedIds + ")");
|
||||
|
||||
@@ -813,7 +813,7 @@ namespace Sarand.Net.Standard.Dbas.Interfaces
|
||||
// Populate filter.
|
||||
query.Filters.AddRange(GetInterfaceProcessQueryFilter(prm));
|
||||
|
||||
if (prm.IncludedIds.Count != 1)
|
||||
if (prm.IdsIncluded.Count != 1)
|
||||
{
|
||||
// Configure sort sequence.
|
||||
foreach (String sortColumn in GetInterfaceProcessSortColumns(prm))
|
||||
|
||||
@@ -365,10 +365,10 @@ namespace Sarand.Net.Standard.Dbas.Interfaces
|
||||
|
||||
// Interface Id.
|
||||
String colId = SaInterfaceDbDfn.GetColumnNameQual(SaInterfaceDbDfn.ColumnIdx.SaInterface_Id, aliasInterface);
|
||||
String includedIds = prm.IncludedIds.Concat(",");
|
||||
String includedIds = prm.IdsIncluded.Concat(",");
|
||||
if (!includedIds.IsEmpty())
|
||||
filter.Add(colId + " IN (" + includedIds + ")");
|
||||
String excludedIds = prm.ExcludedIds.Concat(",");
|
||||
String excludedIds = prm.IdsExcluded.Concat(",");
|
||||
if (!excludedIds.IsEmpty())
|
||||
filter.Add(colId + " NOT IN (" + excludedIds + ")");
|
||||
|
||||
@@ -384,8 +384,8 @@ namespace Sarand.Net.Standard.Dbas.Interfaces
|
||||
|
||||
// Type.
|
||||
String colType = SaInterfaceDbDfn.GetColumnNameQual(SaInterfaceDbDfn.ColumnIdx.SaInterface_Type, aliasInterface);
|
||||
if (prm.IncludedInterfaceTypes.Count > 0)
|
||||
filter.Add(colType + " In (" + String.Join(",", prm.IncludedInterfaceTypes) + ")");
|
||||
if (prm.InterfaceTypesIncluded.Count > 0)
|
||||
filter.Add(colType + " In (" + String.Join(",", prm.InterfaceTypesIncluded) + ")");
|
||||
|
||||
// Code.
|
||||
String colCode = SaInterfaceDbDfn.GetColumnNameQual(SaInterfaceDbDfn.ColumnIdx.SaInterface_Code, aliasInterface);
|
||||
@@ -562,7 +562,7 @@ namespace Sarand.Net.Standard.Dbas.Interfaces
|
||||
// Populate filter.
|
||||
query.Filters.AddRange(GetInterfaceQueryFilter(prm));
|
||||
|
||||
if (prm.IncludedIds.Count != 1)
|
||||
if (prm.IdsIncluded.Count != 1)
|
||||
{
|
||||
// Configure sort sequence.
|
||||
foreach (String sortColumn in GetInterfaceSortColumns(prm))
|
||||
|
||||
@@ -54,7 +54,7 @@ namespace Sarand.Net.Standard.Dbas.ItemData
|
||||
ClearErrorState();
|
||||
if (!ItemId.IsValid(itemId)) return false;
|
||||
SaItemData.Params prmItemData = new SaItemData.Params();
|
||||
prmItemData.IncludedItemIds.Add(itemId);
|
||||
prmItemData.ItemIdsIncluded.Add(itemId);
|
||||
prmItemData.StatusCat = (ignoreDeleted ? SaItemData.StatusCat.NotDeleted : SaItemData.StatusCat.Any);
|
||||
return (GetItemDataCount(prmItemData) > 0);
|
||||
}
|
||||
@@ -64,8 +64,8 @@ namespace Sarand.Net.Standard.Dbas.ItemData
|
||||
if (!ItemId.IsValid(itemId)) return false;
|
||||
if (StringUtil.IsEmpty(dataType)) return false;
|
||||
SaItemData.Params prmItemData = new SaItemData.Params();
|
||||
prmItemData.IncludedItemIds.Add(itemId);
|
||||
prmItemData.IncludedDataTypes.Add(dataType);
|
||||
prmItemData.ItemIdsIncluded.Add(itemId);
|
||||
prmItemData.DataTypesIncluded.Add(dataType);
|
||||
prmItemData.StatusCat = (ignoreDeleted ? SaItemData.StatusCat.NotDeleted : SaItemData.StatusCat.Any);
|
||||
return (GetItemDataCount(prmItemData) > 0);
|
||||
}
|
||||
@@ -98,7 +98,7 @@ namespace Sarand.Net.Standard.Dbas.ItemData
|
||||
ClearErrorState();
|
||||
if (!SysId.IsValid(id)) return false;
|
||||
SaItemData.Params prmItemData = new SaItemData.Params();
|
||||
prmItemData.IncludedIds.Add(id);
|
||||
prmItemData.IdsIncluded.Add(id);
|
||||
prmItemData.StatusCat = SaItemData.StatusCat.Any;
|
||||
return (GetItemDataCount(prmItemData) > 0);
|
||||
}
|
||||
@@ -108,8 +108,8 @@ namespace Sarand.Net.Standard.Dbas.ItemData
|
||||
if (!ItemId.IsValid(itemId)) return false;
|
||||
if (StringUtil.IsEmpty(dataType)) return false;
|
||||
SaItemData.Params prmItemData = new SaItemData.Params();
|
||||
prmItemData.IncludedItemIds.Add(itemId);
|
||||
prmItemData.IncludedDataTypes.Add(dataType);
|
||||
prmItemData.ItemIdsIncluded.Add(itemId);
|
||||
prmItemData.DataTypesIncluded.Add(dataType);
|
||||
prmItemData.StatusCat = (ignoreDeleted ? SaItemData.StatusCat.NotDeleted : SaItemData.StatusCat.Any);
|
||||
return (GetItemDataCount(prmItemData) > 0);
|
||||
}
|
||||
@@ -121,7 +121,7 @@ namespace Sarand.Net.Standard.Dbas.ItemData
|
||||
ClearErrorState();
|
||||
if (!SysId.IsValid(id)) return null;
|
||||
SaItemData.Params prmItemData = new SaItemData.Params();
|
||||
prmItemData.IncludedIds.Add(id);
|
||||
prmItemData.IdsIncluded.Add(id);
|
||||
prmItemData.StatusCat = SaItemData.StatusCat.Any;
|
||||
return GetItemData(prmItemData);
|
||||
}
|
||||
@@ -131,8 +131,8 @@ namespace Sarand.Net.Standard.Dbas.ItemData
|
||||
if (!ItemId.IsValid(itemId)) return null;
|
||||
if (StringUtil.IsEmpty(dataType)) return null;
|
||||
SaItemData.Params prmItemData = new SaItemData.Params();
|
||||
prmItemData.IncludedItemIds.Add(itemId);
|
||||
prmItemData.IncludedDataTypes.Add(dataType);
|
||||
prmItemData.ItemIdsIncluded.Add(itemId);
|
||||
prmItemData.DataTypesIncluded.Add(dataType);
|
||||
prmItemData.StatusCat = SaItemData.StatusCat.Any;
|
||||
return GetItemData(prmItemData);
|
||||
}
|
||||
@@ -401,10 +401,10 @@ namespace Sarand.Net.Standard.Dbas.ItemData
|
||||
|
||||
// Item Data Id.
|
||||
String colId = SaItemDataDbDfn.GetColumnNameQual(SaItemDataDbDfn.ColumnIdx.SaItemData_Id, aliasItemData);
|
||||
String includedIds = prm.IncludedIds.Concat(",");
|
||||
String includedIds = prm.IdsIncluded.Concat(",");
|
||||
if (!includedIds.IsEmpty())
|
||||
filter.Add(colId + " IN (" + includedIds + ")");
|
||||
String excludedIds = prm.ExcludedIds.Concat(",");
|
||||
String excludedIds = prm.IdsExcluded.Concat(",");
|
||||
if (!excludedIds.IsEmpty())
|
||||
filter.Add(colId + " NOT IN (" + excludedIds + ")");
|
||||
|
||||
@@ -412,7 +412,7 @@ namespace Sarand.Net.Standard.Dbas.ItemData
|
||||
List<String> filterItemId = new List<String>();
|
||||
String colItemType = SaItemDataDbDfn.GetColumnNameQual(SaItemDataDbDfn.ColumnIdx.SaItemData_ItemType, aliasItemData);
|
||||
String colItemId = SaItemDataDbDfn.GetColumnNameQual(SaItemDataDbDfn.ColumnIdx.SaItemData_ItemId, aliasItemData);
|
||||
foreach (ItemId itemId in prm.IncludedItemIds)
|
||||
foreach (ItemId itemId in prm.ItemIdsIncluded)
|
||||
{
|
||||
filterItemId.Add(colItemType + "=" + itemId.Type.ToString() + " And " + colItemId + "=" + SysId.ToString(itemId.Id));
|
||||
}
|
||||
@@ -422,7 +422,7 @@ namespace Sarand.Net.Standard.Dbas.ItemData
|
||||
// Included Data Types.
|
||||
List<String> dataTypeFilter = new List<string>();
|
||||
String colDataType = SaItemDataDbDfn.GetColumnNameQual(SaItemDataDbDfn.ColumnIdx.SaItemData_DataType, aliasItemData);
|
||||
foreach (String dataType in prm.IncludedDataTypes)
|
||||
foreach (String dataType in prm.DataTypesIncluded)
|
||||
{
|
||||
dataTypeFilter.Add(colDataType + "='" + DbQuery.FormatForCondition(dataType) + "'");
|
||||
}
|
||||
|
||||
@@ -27,13 +27,13 @@ namespace Sarand.Net.Standard.Dbas.ItemDocs
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Static initialisation.
|
||||
static SaItemDocConsole_Dbas ()
|
||||
static SaItemDocConsole_Dbas()
|
||||
{
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Construction.
|
||||
protected SaItemDocConsole_Dbas (ISacsDatabase database)
|
||||
protected SaItemDocConsole_Dbas(ISacsDatabase database)
|
||||
{
|
||||
Database = database;
|
||||
itemDocMgr = new SaItemDocMgr_Dbas(this);
|
||||
@@ -49,7 +49,7 @@ namespace Sarand.Net.Standard.Dbas.ItemDocs
|
||||
// I t e m D o c s
|
||||
//-------------------------------------------------------------------
|
||||
// Category codes.
|
||||
public override List<TypeCodeDesc> GetCategoryCodes ()
|
||||
public override List<TypeCodeDesc> GetCategoryCodes()
|
||||
{
|
||||
if (categories.Count < 1)
|
||||
{
|
||||
@@ -61,7 +61,7 @@ namespace Sarand.Net.Standard.Dbas.ItemDocs
|
||||
return categories;
|
||||
}
|
||||
/// <summary>eg. for 'Image' documents.</summary>
|
||||
public override List<CodeDesc> GetCategoryTypeCodes (Category category)
|
||||
public override List<CodeDesc> GetCategoryTypeCodes(Category category)
|
||||
{
|
||||
return new List<CodeDesc>();
|
||||
}
|
||||
@@ -69,18 +69,18 @@ namespace Sarand.Net.Standard.Dbas.ItemDocs
|
||||
//-------------------------------------------------------------------
|
||||
// 'Recent' and 'Favourite' folders - to populate drop-down list when selecting folder:
|
||||
/// <summary>How many recent foldes to retain? [default:5]</summary>
|
||||
public override int GetMaxRecentFolderCount ()
|
||||
public override int GetMaxRecentFolderCount()
|
||||
{
|
||||
return 5;
|
||||
}
|
||||
/// <summary>List of favourites to always include in dropdown.</summary>
|
||||
public override void SetFavouriteFolders (List<String> folders)
|
||||
public override void SetFavouriteFolders(List<String> folders)
|
||||
{
|
||||
favouriteFolders.Clear();
|
||||
favouriteFolders.AddRange(folders);
|
||||
}
|
||||
/// <summary>Mix of recent and favourites.</summary>
|
||||
public override List<String> GetSuggestedFolders ()
|
||||
public override List<String> GetSuggestedFolders()
|
||||
{
|
||||
List<String> folders = new List<string>();
|
||||
folders.AddRange(favouriteFolders);
|
||||
@@ -92,12 +92,12 @@ namespace Sarand.Net.Standard.Dbas.ItemDocs
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Retrieve list of docs that match the specified params.
|
||||
public override bool ItemDocsExist (SaItemDoc.Params prmItemDoc)
|
||||
public override bool ItemDocsExist(SaItemDoc.Params prmItemDoc)
|
||||
{
|
||||
ClearErrorState();
|
||||
return (itemDocMgr.GetItemDocCount(prmItemDoc) > 0);
|
||||
}
|
||||
public override List<SaItemDoc> GetItemDocs (SaItemDoc.Params prmItemDoc)
|
||||
public override List<SaItemDoc> GetItemDocs(SaItemDoc.Params prmItemDoc)
|
||||
{
|
||||
ClearErrorState();
|
||||
return itemDocMgr.GetItemDocList(prmItemDoc);
|
||||
@@ -105,7 +105,7 @@ namespace Sarand.Net.Standard.Dbas.ItemDocs
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Create a new document.
|
||||
public override SaItemDoc CreateItemDoc (ItemId itemId, Category category)
|
||||
public override SaItemDoc CreateItemDoc(ItemId itemId, Category category)
|
||||
{
|
||||
ClearErrorState();
|
||||
return itemDocMgr.CreateItemDoc(itemId, category);
|
||||
@@ -113,7 +113,7 @@ namespace Sarand.Net.Standard.Dbas.ItemDocs
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Store documents:
|
||||
public override bool StoreItemDoc (SaItemDoc itemDoc, DbUpdateInfo dbUpdateInfo)
|
||||
public override bool StoreItemDoc(SaItemDoc itemDoc, DbUpdateInfo dbUpdateInfo)
|
||||
{
|
||||
ClearErrorState();
|
||||
if (!SysId.IsValid(itemDoc.Id))
|
||||
@@ -136,7 +136,7 @@ namespace Sarand.Net.Standard.Dbas.ItemDocs
|
||||
}
|
||||
return !HasErrorState();
|
||||
}
|
||||
public override bool StoreItemDocs (List<SaItemDoc> itemDocs, DbUpdateInfo dbUpdateInfo)
|
||||
public override bool StoreItemDocs(List<SaItemDoc> itemDocs, DbUpdateInfo dbUpdateInfo)
|
||||
{
|
||||
ClearErrorState();
|
||||
foreach (SaItemDoc itemDoc in itemDocs)
|
||||
@@ -145,19 +145,19 @@ namespace Sarand.Net.Standard.Dbas.ItemDocs
|
||||
}
|
||||
return true;
|
||||
}
|
||||
public override bool RemoveItemDoc (SaItemDoc itemDoc, DbUpdateInfo dbUpdateInfo)
|
||||
public override bool RemoveItemDoc(SaItemDoc itemDoc, DbUpdateInfo dbUpdateInfo)
|
||||
{
|
||||
ClearErrorState();
|
||||
if (!itemDocMgr.DeleteItemDoc(itemDoc, dbUpdateInfo))
|
||||
return SetErrorState(itemDocMgr.ErrorStateMessage);
|
||||
return !HasErrorState();
|
||||
}
|
||||
public override bool ClearItemDocs (ItemId itemId, Category category, DbUpdateInfo dbUpdateInfo)
|
||||
public override bool ClearItemDocs(ItemId itemId, Category category, DbUpdateInfo dbUpdateInfo)
|
||||
{
|
||||
ClearErrorState();
|
||||
if (!ItemId.IsValid(itemId)) return SetErrorState("Item must be specified");
|
||||
SaItemDoc.Params prmItemDoc = new SaItemDoc.Params();
|
||||
prmItemDoc.IncludedItemIds.Add(itemId);
|
||||
prmItemDoc.ItemIdsIncluded.Add(itemId);
|
||||
prmItemDoc.Category = category;
|
||||
foreach (SaItemDoc itemDoc in itemDocMgr.GetItemDocList(prmItemDoc))
|
||||
{
|
||||
@@ -172,7 +172,7 @@ namespace Sarand.Net.Standard.Dbas.ItemDocs
|
||||
// The master items define 'auto-assign' docs for the item's type.
|
||||
// The 'File part' defines the filename excluding the extension.
|
||||
// If the extension list is empty, any extension is matched.
|
||||
public override bool AutoAssignDocs (ItemId itemId, List<ItemId> masterItemIds, String filePart, List<String> extension, DbUpdateInfo dbUpdateInfo)
|
||||
public override bool AutoAssignDocs(ItemId itemId, List<ItemId> masterItemIds, String filePart, List<String> extension, DbUpdateInfo dbUpdateInfo)
|
||||
{
|
||||
ClearErrorState();
|
||||
if (!ItemId.IsValid(itemId)) return SetErrorState("Item must be specified");
|
||||
@@ -180,13 +180,13 @@ namespace Sarand.Net.Standard.Dbas.ItemDocs
|
||||
|
||||
// Retrieve docs for this item:
|
||||
SaItemDoc.Params prmItemDoc = new SaItemDoc.Params();
|
||||
prmItemDoc.IncludedItemIds.Add(itemId);
|
||||
prmItemDoc.ItemIdsIncluded.Add(itemId);
|
||||
prmItemDoc.StatusCat = SaItemDoc.StatusCat.NotDeleted;
|
||||
List<SaItemDoc> itemDocs = GetItemDocs(prmItemDoc);
|
||||
|
||||
// Retrieve 'auto-assign' docs for the master items:
|
||||
SaItemDoc.Params prmMaster = new SaItemDoc.Params();
|
||||
prmMaster.IncludedItemIds.AddRange(masterItemIds);
|
||||
prmMaster.ItemIdsIncluded.UnionWith(masterItemIds);
|
||||
prmMaster.ItemTypeAutoAssign = itemId.Type;
|
||||
List<SaItemDoc> masterDocs = GetItemDocs(prmMaster);
|
||||
|
||||
@@ -218,7 +218,7 @@ namespace Sarand.Net.Standard.Dbas.ItemDocs
|
||||
if (itemDocs.Any(item => item.Folder.EqualsCI(folder) && item.Filename.EqualsCI(filename)))
|
||||
continue;
|
||||
// Assign the item document.
|
||||
SaItemDoc itemDoc = CreateItemDoc(itemId,Category.Document);
|
||||
SaItemDoc itemDoc = CreateItemDoc(itemId, Category.Document);
|
||||
itemDoc.DescBrief = filename;
|
||||
itemDoc.Folder = folder;
|
||||
itemDoc.Filename = filename;
|
||||
|
||||
@@ -54,7 +54,7 @@ namespace Sarand.Net.Standard.Dbas.ItemDocs
|
||||
ClearErrorState();
|
||||
if (!ItemId.IsValid(itemId)) return false;
|
||||
SaItemDoc.Params prmItemDoc = new SaItemDoc.Params();
|
||||
prmItemDoc.IncludedItemIds.Add(itemId);
|
||||
prmItemDoc.ItemIdsIncluded.Add(itemId);
|
||||
prmItemDoc.StatusCat = (ignoreDeleted ? SaItemDoc.StatusCat.NotDeleted : SaItemDoc.StatusCat.Any);
|
||||
return (GetItemDocCount(prmItemDoc) > 0);
|
||||
}
|
||||
@@ -64,7 +64,7 @@ namespace Sarand.Net.Standard.Dbas.ItemDocs
|
||||
if (!ItemId.IsValid(itemId)) return false;
|
||||
if ((int)category < 1) return false;
|
||||
SaItemDoc.Params prmItemDoc = new SaItemDoc.Params();
|
||||
prmItemDoc.IncludedItemIds.Add(itemId);
|
||||
prmItemDoc.ItemIdsIncluded.Add(itemId);
|
||||
prmItemDoc.Category = category;
|
||||
prmItemDoc.StatusCat = (ignoreDeleted ? SaItemDoc.StatusCat.NotDeleted : SaItemDoc.StatusCat.Any);
|
||||
return (GetItemDocCount(prmItemDoc) > 0);
|
||||
@@ -98,7 +98,7 @@ namespace Sarand.Net.Standard.Dbas.ItemDocs
|
||||
ClearErrorState();
|
||||
if (!SysId.IsValid(id)) return false;
|
||||
SaItemDoc.Params prmItemDoc = new SaItemDoc.Params();
|
||||
prmItemDoc.IncludedIds.Add(id);
|
||||
prmItemDoc.IdsIncluded.Add(id);
|
||||
prmItemDoc.StatusCat = SaItemDoc.StatusCat.Any;
|
||||
return (GetItemDocCount(prmItemDoc) > 0);
|
||||
}
|
||||
@@ -110,7 +110,7 @@ namespace Sarand.Net.Standard.Dbas.ItemDocs
|
||||
ClearErrorState();
|
||||
if (!SysId.IsValid(id)) return null;
|
||||
SaItemDoc.Params prmItemDoc = new SaItemDoc.Params();
|
||||
prmItemDoc.IncludedIds.Add(id);
|
||||
prmItemDoc.IdsIncluded.Add(id);
|
||||
prmItemDoc.StatusCat = SaItemDoc.StatusCat.Any;
|
||||
return GetItemDoc(prmItemDoc);
|
||||
}
|
||||
@@ -413,10 +413,10 @@ namespace Sarand.Net.Standard.Dbas.ItemDocs
|
||||
|
||||
// Item Id.
|
||||
String colId = SaItemDocsDbDfn.GetColumnNameQual(SaItemDocsDbDfn.ColumnIdx.SaItemDoc_Id, aliasItemDoc);
|
||||
String includedIds = prm.IncludedIds.Concat(",");
|
||||
String includedIds = prm.IdsIncluded.Concat(",");
|
||||
if (!includedIds.IsEmpty())
|
||||
filter.Add(colId + " IN (" + includedIds + ")");
|
||||
String excludedIds = prm.ExcludedIds.Concat(",");
|
||||
String excludedIds = prm.IdsExcluded.Concat(",");
|
||||
if (!excludedIds.IsEmpty())
|
||||
filter.Add(colId + " NOT IN (" + excludedIds + ")");
|
||||
|
||||
@@ -424,7 +424,7 @@ namespace Sarand.Net.Standard.Dbas.ItemDocs
|
||||
List<String> filterItemId = new List<String>();
|
||||
String colItemType = SaItemDocsDbDfn.GetColumnNameQual(SaItemDocsDbDfn.ColumnIdx.SaItemDoc_ItemType, aliasItemDoc);
|
||||
String colItemId = SaItemDocsDbDfn.GetColumnNameQual(SaItemDocsDbDfn.ColumnIdx.SaItemDoc_ItemId, aliasItemDoc);
|
||||
foreach (ItemId itemId in prm.IncludedItemIds)
|
||||
foreach (ItemId itemId in prm.ItemIdsIncluded)
|
||||
{
|
||||
filterItemId.Add(colItemType + "=" + itemId.Type.ToString() + " And " + colItemId + "=" + SysId.ToString(itemId.Id));
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Sarand.Net.Standard.Base.Bus;
|
||||
using Sarand.Net.Standard.Base.Core;
|
||||
using Sarand.Net.Standard.Base.Dbas;
|
||||
using Sarand.Net.Standard.Base.ReferenceData;
|
||||
using Sarand.Net.Standard.Dbas.Base;
|
||||
@@ -22,7 +23,7 @@ namespace Sarand.Net.Standard.Dbas.ReferenceData
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Construction.
|
||||
protected SaReferenceDataConsole_Dbas (ISacsDatabase database) :
|
||||
protected SaReferenceDataConsole_Dbas(ISacsDatabase database) :
|
||||
base()
|
||||
{
|
||||
Database = database;
|
||||
@@ -45,16 +46,44 @@ namespace Sarand.Net.Standard.Dbas.ReferenceData
|
||||
// M a n a g e R e f e r e n c e D a t a
|
||||
//-------------------------------------------------------------------
|
||||
// Manage Reference Data (interactive applicaton only, eg. desktop) - returns true if changes made.
|
||||
public override bool ManageReferenceData (bool userCanManageReferenceData, DbUpdateInfo dbUpdateInfo)
|
||||
public override bool ManageReferenceData(bool userCanManageReferenceData, DbUpdateInfo dbUpdateInfo)
|
||||
{
|
||||
ClearErrorState();
|
||||
MaintainReferenceDataFn?.Invoke(this, userCanManageReferenceData, dbUpdateInfo);
|
||||
return false;
|
||||
}
|
||||
// Method to display ReferenceData management dialog.
|
||||
protected delegate bool MaintainReferenceDataFunction (SaReferenceDataConsole codeTypeConsole, bool userCanManageReferenceData, DbUpdateInfo dbUpdateInfo);
|
||||
protected delegate bool MaintainReferenceDataFunction(SaReferenceDataConsole codeTypeConsole, bool userCanManageReferenceData, DbUpdateInfo dbUpdateInfo);
|
||||
protected virtual MaintainReferenceDataFunction MaintainReferenceDataFn => null;
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Initialisation data - default population.
|
||||
|
||||
public List<RegionInitData> GetRegionInitialisationList()
|
||||
{
|
||||
List<RegionInitData> regions = new List<RegionInitData>();
|
||||
List<TypeCodeDesc> currencyCodes = GetReferenceDataCodes(ReferenceDataSystemCode.CurrencyCode);
|
||||
|
||||
// Europe.
|
||||
regions.Add(new RegionInitData()
|
||||
{
|
||||
Type = SaRegionType.Continent,
|
||||
Name = "Europe"
|
||||
});
|
||||
|
||||
// United Kingdom.
|
||||
regions.Add(new RegionInitData()
|
||||
{
|
||||
Type = SaRegionType.Country,
|
||||
Name = "United Kingdom",
|
||||
CurrencyCode = currencyCodes.GetCodeForType(SaCurrencyCode.Sterling),
|
||||
ParentType = SaRegionType.Continent,
|
||||
ParentName = "Europe"
|
||||
});
|
||||
|
||||
return regions;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
}
|
||||
//=======================================================================
|
||||
|
||||
@@ -1,13 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Sarand.Net.Standard.Base.App;
|
||||
using Sarand.Net.Standard.Base.Core;
|
||||
using Sarand.Net.Standard.Base.App;
|
||||
using Sarand.Net.Standard.Base.Bus;
|
||||
using Sarand.Net.Standard.Base.Core;
|
||||
using Sarand.Net.Standard.Base.Dbas;
|
||||
using Sarand.Net.Standard.Base.Security;
|
||||
using Sarand.Net.Standard.Dbas.Utils;
|
||||
using Sarand.Net.Standard.Base.Utils;
|
||||
using static Sarand.Net.Standard.Base.Security.SaSecurityMgr;
|
||||
using Sarand.Net.Standard.Dbas.Utils;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Sarand.Net.Standard.Dbas.Security
|
||||
{
|
||||
@@ -308,14 +307,14 @@ namespace Sarand.Net.Standard.Dbas.Security
|
||||
|
||||
// Retrieve Group links associated with the Item.
|
||||
SaSecurityLink.Params prmSecLinkGroups = new SaSecurityLink.Params();
|
||||
prmSecLinkGroups.includedItemIdsOwner.Add(secItem.Id);
|
||||
prmSecLinkGroups.ItemIdsOwnerIncluded.Add(secItem.Id);
|
||||
prmSecLinkGroups.TargetItemType = SaSecurity.ItemType.Group;
|
||||
List<SaSecurityLink> groupLinks = securityMgr.GetSecurityLinkList(prmSecLinkGroups);
|
||||
|
||||
// Retrieve Right links associated with the Item and its Groups.
|
||||
SaSecurityLink.Params prmSecLinkRights = new SaSecurityLink.Params();
|
||||
prmSecLinkRights.includedItemIdsOwner.Add(secItem.Id);
|
||||
prmSecLinkRights.includedItemIdsOwner.AddRange(groupLinks.GetTargetItemIds());
|
||||
prmSecLinkRights.ItemIdsOwnerIncluded.Add(secItem.Id);
|
||||
prmSecLinkRights.ItemIdsOwnerIncluded.UnionWith(groupLinks.GetTargetItemIds());
|
||||
prmSecLinkRights.TargetItemType = SaSecurity.ItemType.Right;
|
||||
List<SaSecurityLink> rightLinks = securityMgr.GetSecurityLinkList(prmSecLinkRights);
|
||||
|
||||
@@ -641,16 +640,16 @@ namespace Sarand.Net.Standard.Dbas.Security
|
||||
|
||||
// From-To.
|
||||
SaSecurityLink.Params prmSecLink = new SaSecurityLink.Params();
|
||||
prmSecLink.includedItemIdsOwner.Add(itemId1);
|
||||
prmSecLink.includedItemIdsTarget.Add(itemId2);
|
||||
prmSecLink.ItemIdsOwnerIncluded.Add(itemId1);
|
||||
prmSecLink.ItemIdsTargetIncluded.Add(itemId2);
|
||||
prmSecLink.StatusCat = SaSecurityLink.StatusCat.Any;
|
||||
if (securityMgr.GetSecurityLinkCount(prmSecLink) > 0)
|
||||
return true;
|
||||
|
||||
// To-From.
|
||||
prmSecLink = new SaSecurityLink.Params();
|
||||
prmSecLink.includedItemIdsOwner.Add(itemId2);
|
||||
prmSecLink.includedItemIdsTarget.Add(itemId1);
|
||||
prmSecLink.ItemIdsOwnerIncluded.Add(itemId2);
|
||||
prmSecLink.ItemIdsTargetIncluded.Add(itemId1);
|
||||
prmSecLink.StatusCat = SaSecurityLink.StatusCat.Any;
|
||||
if (securityMgr.GetSecurityLinkCount(prmSecLink) > 0)
|
||||
return true;
|
||||
|
||||
@@ -48,8 +48,8 @@ namespace Sarand.Net.Standard.Dbas.Security
|
||||
public override bool SecurityItemHasLinksWith(SysId securityItemIdOwner, SysId securityItemIdTarget)
|
||||
{
|
||||
SaSecurityLink.Params prmSecLink = new SaSecurityLink.Params();
|
||||
prmSecLink.includedItemIdsOwner.Add(securityItemIdOwner);
|
||||
prmSecLink.includedItemIdsTarget.Add(securityItemIdTarget);
|
||||
prmSecLink.ItemIdsOwnerIncluded.Add(securityItemIdOwner);
|
||||
prmSecLink.ItemIdsTargetIncluded.Add(securityItemIdTarget);
|
||||
prmSecLink.StatusCat = SaSecurityLink.StatusCat.Any;
|
||||
return (GetSecurityLinkCount(prmSecLink) > 0);
|
||||
}
|
||||
|
||||
@@ -24,9 +24,9 @@ namespace Sarand.Net.Standard.Dbas.Security
|
||||
{
|
||||
ClearErrorState();
|
||||
SaSecurityLink.Params prm = new SaSecurityLink.Params();
|
||||
prm.includedItemIdsOwner.Add(itemIdOwner);
|
||||
prm.includedItemIdsTarget.Add(itemIdTarget);
|
||||
prm.includedItemIdsContext.Add(itemIdContext);
|
||||
prm.ItemIdsOwnerIncluded.Add(itemIdOwner);
|
||||
prm.ItemIdsTargetIncluded.Add(itemIdTarget);
|
||||
prm.ItemIdsContextIncluded.Add(itemIdContext);
|
||||
prm.StatusCat = SaSecurityLink.StatusCat.Any;
|
||||
return GetSecurityLinkQueryFilter(prm).Concat(" AND ", "(", ")");
|
||||
}
|
||||
@@ -314,7 +314,7 @@ namespace Sarand.Net.Standard.Dbas.Security
|
||||
|
||||
// Owner Item Ids.
|
||||
String colItemOwner = SaSecurityDbDfn.GetColumnNameQual(SaSecurityDbDfn.ColumnIdx.SaSecLink_ItemOwner, aliasSecurityLink);
|
||||
String ownerItemIds = prm.includedItemIdsOwner.Concat(",");
|
||||
String ownerItemIds = prm.ItemIdsOwnerIncluded.Concat(",");
|
||||
if (!ownerItemIds.IsEmpty())
|
||||
filter.Add(colItemOwner + " IN (" + ownerItemIds + ")");
|
||||
|
||||
@@ -324,7 +324,7 @@ namespace Sarand.Net.Standard.Dbas.Security
|
||||
|
||||
// Target Item Ids.
|
||||
String colItemTarget = SaSecurityDbDfn.GetColumnNameQual(SaSecurityDbDfn.ColumnIdx.SaSecLink_ItemTarget, aliasSecurityLink);
|
||||
String targetItemIds = prm.includedItemIdsTarget.Concat(",");
|
||||
String targetItemIds = prm.ItemIdsTargetIncluded.Concat(",");
|
||||
if (!targetItemIds.IsEmpty())
|
||||
filter.Add(SaSecurityDbDfn.GetColumnNameQual(SaSecurityDbDfn.ColumnIdx.SaSecLink_ItemTarget, aliasSecurityLink) + " IN (" + targetItemIds + ")");
|
||||
|
||||
@@ -333,7 +333,7 @@ namespace Sarand.Net.Standard.Dbas.Security
|
||||
filter.Add(colItemTarget + " IN (SELECT " + SaSecurityDbDfn.GetColumnNameQual(SaSecurityDbDfn.ColumnIdx.SaSecItem_Id) + " FROM " + TableName_SecItem + " WHERE " + SaSecurityDbDfn.GetColumnNameQual(SaSecurityDbDfn.ColumnIdx.SaSecItem_Type) + "=" + ((int)prm.TargetItemType).ToString() + ")");
|
||||
|
||||
// Context Item Ids.
|
||||
String contextItemIds = prm.includedItemIdsContext.Concat(",");
|
||||
String contextItemIds = prm.ItemIdsContextIncluded.Concat(",");
|
||||
if (!contextItemIds.IsEmpty())
|
||||
filter.Add(SaSecurityDbDfn.GetColumnNameQual(SaSecurityDbDfn.ColumnIdx.SaSecLink_ItemContext, aliasSecurityLink) + " IN (" + contextItemIds + ")");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user