3.0.1.9 Portal styling. Interfaces controller/model.

This commit is contained in:
Andy Howard
2025-10-30 12:59:27 +00:00
parent d414910e96
commit 1075e9eef5
159 changed files with 1642 additions and 869 deletions
@@ -120,7 +120,7 @@ namespace Sarand.BusinessMgr.Net.Core.Procs.Interfaces
public SbmInterfaceProcess_Commodity_Export(Config config) : base(config)
{
this.config = config;
interfaceOptions = Internals.GetSystemCodes(Sbm.SystemCode.InterfaceOption);
interfaceOptions = Internals.GetApplicationCodes(Sbm.ApplicationCode.InterfaceOption);
}
protected override void Dispose(bool disposing)
{
@@ -677,7 +677,7 @@ namespace Sarand.BusinessMgr.Net.Core.Procs.Interfaces
for (int i = 1; i <= kiMaxDataColumn; i++)
optionContexts_Column.Add(i, StringUtil.PadLeft(i.ToString(), 3, '0'), "Column " + StringUtil.PadLeft(i.ToString(), 2, '0'));
}
optionValues_Mode = Internals.GetSystemCodes(Sbm.SystemCode.FileInterface_Mode);
optionValues_Mode = Internals.GetApplicationCodes(Sbm.ApplicationCode.FileInterface_Mode);
if (optionValues_Column == null)
{
optionValues_Column = new List<TypeCodeDesc>();
+6 -6
View File
@@ -148,8 +148,8 @@ namespace Sarand.BusinessMgr.Net.Core.Web.App
//-------------------------------------------------------------------
private class CodeCache
{
public Dictionary<Sbm.SystemCode, List<TypeCodeDesc>> codes { get; } = new Dictionary<Sbm.SystemCode, List<TypeCodeDesc>>();
public List<TypeCodeDesc> GetSystemCodes(Sbm.SystemCode codeType)
public Dictionary<Sbm.ApplicationCode, List<TypeCodeDesc>> codes { get; } = new Dictionary<Sbm.ApplicationCode, List<TypeCodeDesc>>();
public List<TypeCodeDesc> GetSystemCodes(Sbm.ApplicationCode codeType)
{
if (!codes.ContainsKey(codeType))
codes.Add(codeType, SbmSystem.GetSystemCodes(codeType));
@@ -170,7 +170,7 @@ namespace Sarand.BusinessMgr.Net.Core.Web.App
{
if ((int)affiliateType < 1) return "";
// ToDo Affiliate Type localisation.
List<TypeCodeDesc> affiliateTypeCodes = systemCodes.GetSystemCodes(Sbm.SystemCode.AffiliateType);
List<TypeCodeDesc> affiliateTypeCodes = systemCodes.GetSystemCodes(Sbm.ApplicationCode.AffiliateType);
return affiliateTypeCodes.GetDescForType(affiliateType, affiliateTypeCodes.GetCodeForType(affiliateType));
}
@@ -179,7 +179,7 @@ namespace Sarand.BusinessMgr.Net.Core.Web.App
{
if ((int)associationType < 1) return "";
// ToDo Association Type localisation.
List<TypeCodeDesc> associationTypeCodes = systemCodes.GetSystemCodes(Sbm.SystemCode.AssociationType);
List<TypeCodeDesc> associationTypeCodes = systemCodes.GetSystemCodes(Sbm.ApplicationCode.AssociationType);
return associationTypeCodes.GetDescForType(associationType, associationTypeCodes.GetCodeForType(associationType));
}
@@ -188,7 +188,7 @@ namespace Sarand.BusinessMgr.Net.Core.Web.App
{
if ((int)assetType < 1) return "";
// ToDo Asset Type localisation.
List<TypeCodeDesc> assetTypeCodes = systemCodes.GetSystemCodes(Sbm.SystemCode.AssetType);
List<TypeCodeDesc> assetTypeCodes = systemCodes.GetSystemCodes(Sbm.ApplicationCode.AssetType);
return assetTypeCodes.GetDescForType(assetType, assetTypeCodes.GetCodeForType(assetType));
}
@@ -197,7 +197,7 @@ namespace Sarand.BusinessMgr.Net.Core.Web.App
{
if ((int)transactionType < 1) return "";
// ToDo Transaction Type localisation.
List<TypeCodeDesc> transactionTypeCodes = systemCodes.GetSystemCodes(Sbm.SystemCode.TransactionType);
List<TypeCodeDesc> transactionTypeCodes = systemCodes.GetSystemCodes(Sbm.ApplicationCode.TransactionType);
return transactionTypeCodes.GetDescForType(transactionType, transactionTypeCodes.GetCodeForType(transactionType));
}
+18 -15
View File
@@ -1,30 +1,17 @@
using DocumentFormat.OpenXml.Drawing;
using Microsoft.AspNetCore.Html;
using Microsoft.AspNetCore.Mvc.Rendering;
using Microsoft.AspNetCore.Html;
using Sacs.Web.Components;
using Sarand.BusinessMgr.Net.Core.Web.App;
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.BusinessMgr.Net.Standard.Base.Mgr.Control;
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.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.Globalization;
using System.Text;
namespace Sarand.BusinessMgr.Net.Core.Web.Components
{
@@ -100,7 +87,7 @@ namespace Sarand.BusinessMgr.Net.Core.Web.Components
public int PasswordMaxLength { get; } = 32;
//-------------------------------------------------------------------
// Control max lengths - based on database tabke column length.
// Control max lengths - based on database table column length.
/// <summary>
/// Form control value max length - Security tables.
@@ -152,6 +139,22 @@ namespace Sarand.BusinessMgr.Net.Core.Web.Components
return maxLength;
}
/// <summary>
/// Form control value max length - Code Type tables.
/// <para>In many cases the database columns allow plenty of extra space for the value, in case they need to be encrypted.</para>
/// <para>Hence, several cases where the value entered in the control isn't allowed the full database length.</para>
/// </summary>
public virtual int GetControlMaxLength(SaInterfaceDbDfn.ColumnIdx column)
{
int maxLength = (int)(InstanceSchemaConsole?.GetColTextLen(column) ?? SaInterfaceDbDfn.GetColTextLen(column));
switch (column)
{
case SaInterfaceDbDfn.ColumnIdx.SaInterface_Code:
break;
}
return maxLength;
}
/// <summary>
/// Form control value max length - BusinessMgr tables.
/// <para>In many cases the database columns allow plenty of extra space for the value, in case they need to be encrypted.</para>
+2 -1
View File
@@ -13,7 +13,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.App
//-------------------------------------------------------------------
public static class Version
{
private static String version { get; } = "3.0.1.8";
private static String version { get; } = "3.0.1.9";
// Retrieve version.
public static String GetFullVersion() { return version; }
public static String GetAppVersion()
@@ -44,6 +44,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.App
// 3.0.1.6 05-May-25 Addresses.
// 3.0.1.7 21-Oct-25 Business object disposability.
// 3.0.1.8 26-Oct-25 Control repository status check on update.
// 3.0.1.9 30-Oct-25 Portal styling.
//-------------------------------------------------------------------
// 3.0.0 Jul-2021 Initial demo test version.
// 02-Feb-25 Initial live deployment.
+1 -1
View File
@@ -762,7 +762,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.App
/// <summary>
/// CodeType fixed enumerated values.
/// </summary>
public enum SystemCode
public enum ApplicationCode
{
ItemType,
ItemDataType,
+16 -21
View File
@@ -6,7 +6,7 @@ using System.Collections.Generic;
using System.Linq;
//---------------------------------------------------------------------------
// Code generated by Sarand Database Utilities Tue 11-Feb-2025 12:43:45
// Code generated by Sarand Database Utilities Thu 30-Oct-2025 11:27:05
//---------------------------------------------------------------------------
namespace Sarand.BusinessMgr.Net.Standard.Base.App
{
@@ -74,7 +74,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.App
// Column identifiers.
public enum ColumnIdx
{
Unknown = 0,
Unknown = 0,
Address_Id,
Address_ItemType,
Address_ItemId,
@@ -446,10 +446,10 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.App
InterfaceDataItem_ItemId,
InterfaceDataItem_ProcessStatus,
InterfaceDataItem_ProcessStatusBy,
InterfaceDataItem_ProcessStatusOn,
InterfaceDataItem_ProcessStatusAt,
InterfaceDataItem_ItemStatus,
InterfaceDataItem_ItemStatusBy,
InterfaceDataItem_ItemStatusOn,
InterfaceDataItem_ItemStatusAt,
InterfaceDataItem_Notes,
InterfaceDataItem_Flags,
InterfaceDataItem_CreateOn,
@@ -463,10 +463,8 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.App
InterfaceProcess_Direction,
InterfaceProcess_ProcRef,
InterfaceProcess_ProcSeq,
InterfaceProcess_ProcDate,
InterfaceProcess_ProcTime,
InterfaceProcess_BatchDate,
InterfaceProcess_BatchTime,
InterfaceProcess_ProcessAt,
InterfaceProcess_BatchAt,
InterfaceProcess_ElapseSecs,
InterfaceProcess_ItemCount,
InterfaceProcess_Flags,
@@ -1272,11 +1270,11 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.App
//-------------------------------------------------------------------
// Data members.
private static readonly int tableCount = 51;
private static readonly int columnCount = 1192;
private static readonly int columnCount = 1190;
public static ulong MaxTextLen { get; private set; }
//-------------------------------------------------------------------
// Retrieve Table details (eg. name: 'Company').
// Retrieve Table details.
public static int GetTableCount ()
{
return tableCount;
@@ -1334,8 +1332,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.App
String tableName = StringUtil.EmptyOnNull(tableAlias);
if (tableName.IsEmpty()) tableName = GetTableName(GetTableForColumn(column));
columnName = tableName + (tableName.Length > 0 ? "." : "") + columnName;
if (braces)
columnName = "(" + columnName + ")";
if (braces) columnName = $"({columnName})";
}
return columnName;
}
@@ -1368,11 +1365,11 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.App
case DbReservedWordDelim.None:
break;
case DbReservedWordDelim.DoubleQuotes:
word = "\"" + word + "\"";
word = $"\"{word}\"";
break;
case DbReservedWordDelim.SquareBrackets:
default:
word = "[" + word + "]";
word = $"[{word}]";
break;
}
return word;
@@ -1898,10 +1895,10 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.App
new ColumnDfn(12,"ItemId",4,4,false,10),
new ColumnDfn(12,"ProcessStatus",0,-9,false,3),
new ColumnDfn(12,"ProcessStatusBy",4,4,false,10),
new ColumnDfn(12,"ProcessStatusOn",4,4,false,10),
new ColumnDfn(12,"ProcessStatusAt",9,93,false,23),
new ColumnDfn(12,"ItemStatus",0,-9,false,3),
new ColumnDfn(12,"ItemStatusBy",4,4,false,10),
new ColumnDfn(12,"ItemStatusOn",4,4,false,10),
new ColumnDfn(12,"ItemStatusAt",9,93,false,23),
new ColumnDfn(12,"Notes",0,-9,false,255),
new ColumnDfn(12,"Flags",3,5,false,5),
new ColumnDfn(12,"CreateOn",9,93,false,23),
@@ -1915,10 +1912,8 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.App
new ColumnDfn(13,"Direction",3,5,false,5),
new ColumnDfn(13,"ProcRef",0,-9,false,32),
new ColumnDfn(13,"ProcSeq",4,4,false,10),
new ColumnDfn(13,"ProcDate",4,4,false,10),
new ColumnDfn(13,"ProcTime",4,4,false,10),
new ColumnDfn(13,"BatchDate",4,4,false,10),
new ColumnDfn(13,"BatchTime",4,4,false,10),
new ColumnDfn(13,"ProcessAt",9,93,false,23),
new ColumnDfn(13,"BatchAt",9,93,false,23),
new ColumnDfn(13,"ElapseSecs",4,4,false,10),
new ColumnDfn(13,"ItemCount",4,4,false,10),
new ColumnDfn(13,"Flags",3,5,false,5),
@@ -2798,7 +2793,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.App
"VALUES",
"VIEW",
"WHEN",
"WHERE",
"WHERE"
};
//-------------------------------------------------------------------
@@ -6,7 +6,7 @@ using System.Collections.Generic;
using System.Linq;
//---------------------------------------------------------------------------
// Code generated by Sarand Database Utilities Thu 13-Feb-2025 11:12:01
// Code generated by Sarand Database Utilities Thu 30-Oct-2025 11:25:21
//---------------------------------------------------------------------------
namespace Sarand.BusinessMgr.Net.Standard.Base.App
{
@@ -28,7 +28,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.App
// Column identifiers.
public enum ColumnIdx
{
Unknown = 0,
Unknown = 0,
AccountRegistration_Id,
AccountRegistration_EmailAddress,
AccountRegistration_FirstName,
@@ -131,7 +131,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.App
public static ulong MaxTextLen { get; private set; }
//-------------------------------------------------------------------
// Retrieve Table details (eg. name: 'Company').
// Retrieve Table details.
public static int GetTableCount ()
{
return tableCount;
@@ -189,8 +189,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.App
String tableName = StringUtil.EmptyOnNull(tableAlias);
if (tableName.IsEmpty()) tableName = GetTableName(GetTableForColumn(column));
columnName = tableName + (tableName.Length > 0 ? "." : "") + columnName;
if (braces)
columnName = "(" + columnName + ")";
if (braces) columnName = $"({columnName})";
}
return columnName;
}
@@ -223,11 +222,11 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.App
case DbReservedWordDelim.None:
break;
case DbReservedWordDelim.DoubleQuotes:
word = "\"" + word + "\"";
word = $"\"{word}\"";
break;
case DbReservedWordDelim.SquareBrackets:
default:
word = "[" + word + "]";
word = $"[{word}]";
break;
}
return word;
@@ -508,7 +507,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.App
"VALUES",
"VIEW",
"WHEN",
"WHERE",
"WHERE"
};
//-------------------------------------------------------------------
+40 -27
View File
@@ -93,6 +93,9 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.App
public SbmEmailConsole emailConsole;
}
public Consoles con { get; } = new Consoles();
// System and Application codes.
public Dictionary<SaSysCodeType, List<TypeCodeDesc>> systemCodeCache { get; } = new Dictionary<SaSysCodeType, List<TypeCodeDesc>>();
public Dictionary<Sbm.ApplicationCode, List<TypeCodeDesc>> applicationCodeCache = new Dictionary<Sbm.ApplicationCode, List<TypeCodeDesc>>();
// Configurations.
public SbmStockControlConfig stockControlConfig { get; set; }
public SbmRequirementCostingConfig requirementCostingConfig { get; set; }
@@ -203,41 +206,51 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.App
//-------------------------------------------------------------------
// System codes.
private Dictionary<Sbm.SystemCode, List<TypeCodeDesc>> systemCodeCache = new Dictionary<Sbm.SystemCode, List<TypeCodeDesc>>();
public List<TypeCodeDesc> GetSystemCodes(Sbm.SystemCode systemCode)
public List<TypeCodeDesc> GetSystemCodes(SaSysCodeType systemCode)
{
if (!systemCodeCache.ContainsKey(systemCode))
if (!mbr.systemCodeCache.ContainsKey(systemCode))
mbr.systemCodeCache[systemCode] = SacsSystem.GetCodesOfType(systemCode);
return new List<TypeCodeDesc>(mbr.systemCodeCache.GetValueOrDefault(systemCode, new List<TypeCodeDesc>()));
}
public List<TypeCodeDesc> MessageLevelCodes { get { return GetSystemCodes(SaSysCodeType.MessageLevel); } }
public List<TypeCodeDesc> InterfaceCategoryCodes { get { return GetSystemCodes(SaSysCodeType.InterfaceCategory); } }
public List<TypeCodeDesc> InterfaceProcessDirectionCodes { get { return GetSystemCodes(SaSysCodeType.InterfaceProcessDirection); } }
// Application codes.
public List<TypeCodeDesc> GetApplicationCodes(Sbm.ApplicationCode applicationCode)
{
if (!mbr.applicationCodeCache.ContainsKey(applicationCode))
{
List<TypeCodeDesc> codes = new List<TypeCodeDesc>();
foreach (TypeCodeDesc code in SbmSystem.GetSystemCodes(systemCode))
foreach (TypeCodeDesc code in SbmSystem.GetSystemCodes(applicationCode))
{
switch (systemCode)
switch (applicationCode)
{
case Sbm.SystemCode.AffiliateType:
case Sbm.ApplicationCode.AffiliateType:
if (!SessionConsole.AllowAffiliateType((Sbm.AffiliateType)code.Type)) continue;
break;
case Sbm.SystemCode.AssociationType:
case Sbm.ApplicationCode.AssociationType:
if (!SessionConsole.AllowAssociationType((Sbm.AssociationType)code.Type)) continue;
break;
case Sbm.SystemCode.TransactionType:
case Sbm.ApplicationCode.TransactionType:
if (!SessionConsole.AllowTransactionType((Sbm.TransactionType)code.Type)) continue;
break;
case Sbm.SystemCode.CommodityType:
case Sbm.ApplicationCode.CommodityType:
if (code.Type == (int)Sbm.CommodityType.Asset && (!SessionConsole.AllowOption(Sbm.ConfigOption.Assets) || !AssetMgr.AssetDatabaseIsValid())) continue;
break;
case Sbm.SystemCode.ProcessCategory:
case Sbm.ApplicationCode.ProcessCategory:
if (code.Type == (int)Sbm.ProcessCategory.Commodity && !SessionConsole.AllowOption(Sbm.ConfigOption.Commodities)) continue;
if (code.Type == (int)Sbm.ProcessCategory.Asset && (!SessionConsole.AllowOption(Sbm.ConfigOption.Assets) || !AssetMgr.AssetDatabaseIsValid())) continue;
break;
case Sbm.SystemCode.FinancialType:
case Sbm.ApplicationCode.FinancialType:
if ((code.Type == (int)Sbm.FinancialType.CommoditySupply || code.Type == (int)Sbm.FinancialType.CommoditySales) && !SessionConsole.AllowOption(Sbm.ConfigOption.Commodities)) continue;
break;
case Sbm.SystemCode.InterfaceType_Website:
case Sbm.ApplicationCode.InterfaceType_Website:
if (code.Type == (int)Sbm.InterfaceType_Website.WebStore && !SessionConsole.AllowInterface(SaInterfaceCategory.Website, (short)code.Type)) continue;
if (code.Type == (int)Sbm.InterfaceType_Website.JoomlaVirtueMart && !SessionConsole.AllowInterface(SaInterfaceCategory.Website, (short)code.Type)) continue;
if (code.Type == (int)Sbm.InterfaceType_Website.MiMoWeb && !SessionConsole.AllowInterface(SaInterfaceCategory.Website, (short)code.Type)) continue;
break;
case Sbm.SystemCode.InterfaceType_System:
case Sbm.ApplicationCode.InterfaceType_System:
if (code.Type == (int)Sbm.InterfaceType_System.MSOutlook && !SessionConsole.AllowInterface(SaInterfaceCategory.System, (short)code.Type)) continue;
if (code.Type == (int)Sbm.InterfaceType_System.PostcodeAnywhere && !SessionConsole.AllowInterface(SaInterfaceCategory.System, (short)code.Type)) continue;
if (code.Type == (int)Sbm.InterfaceType_System.Bac && !SessionConsole.AllowInterface(SaInterfaceCategory.System, (short)code.Type)) continue;
@@ -248,35 +261,35 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.App
if (code.Type == (int)Sbm.InterfaceType_System.Cadix_OrderSpreadsheet_Argos && !SessionConsole.AllowInterface(SaInterfaceCategory.System, (short)code.Type)) continue;
if (code.Type == (int)Sbm.InterfaceType_System.Cadix_OrderSpreadsheet_Homebase && !SessionConsole.AllowInterface(SaInterfaceCategory.System, (short)code.Type)) continue;
break;
case Sbm.SystemCode.OrgOption_PeriodDays:
case Sbm.ApplicationCode.OrgOption_PeriodDays:
if (code.Type == (int)Sbm.OrgOption_PeriodDays.UpdateClosedTransaction_DispatchDetails && !SessionConsole.AllowOption(Sbm.ConfigOption.DeliveryPlanning)) continue;
if (code.Type == (int)Sbm.OrgOption_PeriodDays.UpdateStockLevelsInPast && !SessionConsole.AllowInterface(SaInterfaceCategory.System, (short)code.Type)) continue;
break;
case Sbm.SystemCode.OrgOption_PeriodWeeks:
case Sbm.ApplicationCode.OrgOption_PeriodWeeks:
if (code.Type == (int)Sbm.OrgOption_PeriodWeeks.Timesheets && !SessionConsole.AllowOption(Sbm.ConfigOption.TimeRecording)) continue;
if (code.Type == (int)Sbm.OrgOption_PeriodWeeks.UpdateTimeRecords_Control && !SessionConsole.AllowOption(Sbm.ConfigOption.TimeRecording)) continue;
if (code.Type == (int)Sbm.OrgOption_PeriodWeeks.ImminentStockDue && !SessionConsole.GetOwnerOption_AllowOption(Sbm.OrgOption_AllowOption.ImminentStock)) continue;
break;
case Sbm.SystemCode.OrgOption_Caption:
case Sbm.ApplicationCode.OrgOption_Caption:
if (!SessionConsole.AllowTransactionType(Sbm.OrgOptionToTransType((Sbm.OrgOption_Caption)code.Type))) continue;
break;
}
codes.Add(code);
}
systemCodeCache.Add(systemCode, codes);
mbr.applicationCodeCache.Add(applicationCode, codes);
}
return new List<TypeCodeDesc>(systemCodeCache.GetValueOrDefault(systemCode, new List<TypeCodeDesc>()));
return new List<TypeCodeDesc>(mbr.applicationCodeCache.GetValueOrDefault(applicationCode, new List<TypeCodeDesc>()));
}
// Selection of specific system code types.
public List<TypeCodeDesc> ItemTypeCodes { get { return GetSystemCodes(Sbm.SystemCode.ItemType); } }
public List<TypeCodeDesc> AffiliateTypeCodes { get { return GetSystemCodes(Sbm.SystemCode.AffiliateType); } }
public List<TypeCodeDesc> AddressTypeCodes { get { return GetSystemCodes(Sbm.SystemCode.AddressType); } }
public List<TypeCodeDesc> AssociationTypeCodes { get { return GetSystemCodes(Sbm.SystemCode.AssociationType); } }
public List<TypeCodeDesc> CommodityTypeCodes { get { return GetSystemCodes(Sbm.SystemCode.CommodityType); } }
public List<TypeCodeDesc> AssetTypeCodes { get { return GetSystemCodes(Sbm.SystemCode.AssetType); } }
public List<TypeCodeDesc> VehicleTypeCodes { get { return GetSystemCodes(Sbm.SystemCode.VehicleType); } }
public List<TypeCodeDesc> TransactionTypeCodes { get { return GetSystemCodes(Sbm.SystemCode.TransactionType); } }
public List<TypeCodeDesc> RequirementTypeCodes { get { return GetSystemCodes(Sbm.SystemCode.RequirementType); } }
public List<TypeCodeDesc> ItemTypeCodes { get { return GetApplicationCodes(Sbm.ApplicationCode.ItemType); } }
public List<TypeCodeDesc> AffiliateTypeCodes { get { return GetApplicationCodes(Sbm.ApplicationCode.AffiliateType); } }
public List<TypeCodeDesc> AddressTypeCodes { get { return GetApplicationCodes(Sbm.ApplicationCode.AddressType); } }
public List<TypeCodeDesc> AssociationTypeCodes { get { return GetApplicationCodes(Sbm.ApplicationCode.AssociationType); } }
public List<TypeCodeDesc> CommodityTypeCodes { get { return GetApplicationCodes(Sbm.ApplicationCode.CommodityType); } }
public List<TypeCodeDesc> AssetTypeCodes { get { return GetApplicationCodes(Sbm.ApplicationCode.AssetType); } }
public List<TypeCodeDesc> VehicleTypeCodes { get { return GetApplicationCodes(Sbm.ApplicationCode.VehicleType); } }
public List<TypeCodeDesc> TransactionTypeCodes { get { return GetApplicationCodes(Sbm.ApplicationCode.TransactionType); } }
public List<TypeCodeDesc> RequirementTypeCodes { get { return GetApplicationCodes(Sbm.ApplicationCode.RequirementType); } }
//-------------------------------------------------------------------
// Code types.
@@ -48,7 +48,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.App
// Organisation configuration.
public String GetOrganisationOption(Sbm.OrganisationOption option, String context)
{
if (assocOptions == null) assocOptions = SbmSystem.GetSystemCodes(Sbm.SystemCode.AssociationOption);
if (assocOptions == null) assocOptions = SbmSystem.GetSystemCodes(Sbm.ApplicationCode.AssociationOption);
String optionName = assocOptions.GetCodeForType(option);
return GetOrganisationOption(optionName, context);
}
@@ -59,33 +59,33 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.App
}
public String GetOwnerOption_Value(Sbm.OrgOption_Value value)
{
if (contextValues == null) contextValues = SbmSystem.GetSystemCodes(Sbm.SystemCode.OrgOption_Value);
if (contextValues == null) contextValues = SbmSystem.GetSystemCodes(Sbm.ApplicationCode.OrgOption_Value);
String context = contextValues.GetCodeForType(value);
return GetOrganisationOption(Sbm.OrganisationOption.Value, context).Trim();
}
public String GetOwnerOption_Folder(Sbm.OrgOption_Folder folder)
{
if (contextFolders == null) contextFolders = SbmSystem.GetSystemCodes(Sbm.SystemCode.OrgOption_Folder);
if (contextFolders == null) contextFolders = SbmSystem.GetSystemCodes(Sbm.ApplicationCode.OrgOption_Folder);
String context = contextFolders.GetCodeForType(folder);
return GetOrganisationOption(Sbm.OrganisationOption.Folder, context).Trim();
}
public bool GetOwnerOption_AllowOption(Sbm.OrgOption_AllowOption option)
{
if (contextAllowOptions == null) contextAllowOptions = SbmSystem.GetSystemCodes(Sbm.SystemCode.OrgOption_AllowOption);
if (contextAllowOptions == null) contextAllowOptions = SbmSystem.GetSystemCodes(Sbm.ApplicationCode.OrgOption_AllowOption);
String context = contextAllowOptions.GetCodeForType(option);
String value = GetOrganisationOption(Sbm.OrganisationOption.AllowOption, context).Trim();
return StringUtil.ToBool(value);
}
public String GetOwnerOption_Caption(Sbm.OrgOption_Caption caption, String defaultValue)
{
if (contextCaptions == null) contextCaptions = SbmSystem.GetSystemCodes(Sbm.SystemCode.OrgOption_Caption);
if (contextCaptions == null) contextCaptions = SbmSystem.GetSystemCodes(Sbm.ApplicationCode.OrgOption_Caption);
String context = contextCaptions.GetCodeForType(caption);
String value = GetOrganisationOption(Sbm.OrganisationOption.Caption, context).Trim();
return (!value.IsEmpty() ? value : defaultValue);
}
public bool GetOwnerOption_ShowField(SbmDbDfn.ColumnIdx column)
{
if (contextShowFields == null) contextShowFields = SbmSystem.GetSystemCodes(Sbm.SystemCode.OrgOption_ShowField);
if (contextShowFields == null) contextShowFields = SbmSystem.GetSystemCodes(Sbm.ApplicationCode.OrgOption_ShowField);
String context = contextShowFields.GetCodeForType(column);
if (context.IsEmpty()) return true; // Automatically show fields that are not in the 'Show Field' list.
String value = GetOrganisationOption(Sbm.OrganisationOption.ShowField, context).Trim();
@@ -93,21 +93,21 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.App
}
public bool GetOwnerOption_ShowColumn(Sbm.OrgOption_ShowColumn column)
{
if (contextShowColumns == null) contextShowColumns = SbmSystem.GetSystemCodes(Sbm.SystemCode.OrgOption_ShowColumn);
if (contextShowColumns == null) contextShowColumns = SbmSystem.GetSystemCodes(Sbm.ApplicationCode.OrgOption_ShowColumn);
String context = contextShowColumns.GetCodeForType(column);
String value = GetOrganisationOption(Sbm.OrganisationOption.ShowColumn, context).Trim();
return StringUtil.ToBool(value);
}
public String GetOwnerOption_FieldLabel(SbmDbDfn.ColumnIdx column, String defautValue)
{
if (contextFieldLabels == null) contextFieldLabels = SbmSystem.GetSystemCodes(Sbm.SystemCode.OrgOption_FieldLabel);
if (contextFieldLabels == null) contextFieldLabels = SbmSystem.GetSystemCodes(Sbm.ApplicationCode.OrgOption_FieldLabel);
String context = contextFieldLabels.GetCodeForType(column);
String value = GetOrganisationOption(Sbm.OrganisationOption.FieldLabel, context).Trim();
return (!value.IsEmpty() ? value : defautValue); // Return default if no label defined.
}
public int GetOwnerOption_Minutes(Sbm.OrgOption_Minutes limit, int defautValue)
{
if (contextMinutes == null) contextMinutes = SbmSystem.GetSystemCodes(Sbm.SystemCode.OrgOption_Minutes);
if (contextMinutes == null) contextMinutes = SbmSystem.GetSystemCodes(Sbm.ApplicationCode.OrgOption_Minutes);
String context = contextMinutes.GetCodeForType(limit);
String value = GetOrganisationOption(Sbm.OrganisationOption.Minutes, context).Trim();
if (!value.IsEmpty())
@@ -120,7 +120,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.App
}
public int GetOwnerOption_UpdateLimit(Sbm.OrgOption_PeriodDays limit, int defautValue)
{
if (contextPeriodDays == null) contextPeriodDays = SbmSystem.GetSystemCodes(Sbm.SystemCode.OrgOption_PeriodDays);
if (contextPeriodDays == null) contextPeriodDays = SbmSystem.GetSystemCodes(Sbm.ApplicationCode.OrgOption_PeriodDays);
String context = contextPeriodDays.GetCodeForType(limit);
String value = GetOrganisationOption(Sbm.OrganisationOption.PeriodDays, context).Trim();
if (!value.IsEmpty())
@@ -133,7 +133,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.App
}
public int GetOwnerOption_UpdateLimit(Sbm.OrgOption_PeriodWeeks limit, int defautValue)
{
if (contextPeriodWeeks == null) contextPeriodWeeks = SbmSystem.GetSystemCodes(Sbm.SystemCode.OrgOption_PeriodWeeks);
if (contextPeriodWeeks == null) contextPeriodWeeks = SbmSystem.GetSystemCodes(Sbm.ApplicationCode.OrgOption_PeriodWeeks);
String context = contextPeriodWeeks.GetCodeForType(limit);
String value = GetOrganisationOption(Sbm.OrganisationOption.PeriodWeeks, context).Trim();
if (!value.IsEmpty())
@@ -146,7 +146,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.App
}
public int GetOwnerOption_NumericDecimals(Sbm.OrgOption_NumericDecimals decimals, int defautValue = 2)
{
if (contextNumericDecimals == null) contextNumericDecimals = SbmSystem.GetSystemCodes(Sbm.SystemCode.OrgOption_NumericDecimals);
if (contextNumericDecimals == null) contextNumericDecimals = SbmSystem.GetSystemCodes(Sbm.ApplicationCode.OrgOption_NumericDecimals);
String context = contextNumericDecimals.GetCodeForType(decimals);
String value = GetOrganisationOption(Sbm.OrganisationOption.NumericDecimals, context).Trim();
int iNumDecimals = defautValue;
@@ -157,8 +157,8 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.App
}
public Sbm.CommodityType GetOwnerOption_CommodityType(Sbm.OrgOption_CommodityType commodityType)
{
if (contextCommodityTypes == null) contextCommodityTypes = SbmSystem.GetSystemCodes(Sbm.SystemCode.OrgOption_CommodityType);
if (commodityTypes == null) commodityTypes = SbmSystem.GetSystemCodes(Sbm.SystemCode.CommodityType);
if (contextCommodityTypes == null) contextCommodityTypes = SbmSystem.GetSystemCodes(Sbm.ApplicationCode.OrgOption_CommodityType);
if (commodityTypes == null) commodityTypes = SbmSystem.GetSystemCodes(Sbm.ApplicationCode.CommodityType);
String context = contextCommodityTypes.GetCodeForType(commodityType);
String value = GetOrganisationOption(Sbm.OrganisationOption.CommodityType, context).Trim();
Sbm.CommodityType eCmdType = (Sbm.CommodityType)commodityTypes.GetTypeForCode(value);
@@ -166,7 +166,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.App
}
public SysId GetOwnerOption_StockLocation(Sbm.OrgOption_StockLocation stockLocation)
{
if (contextSalesLocations == null) contextSalesLocations = SbmSystem.GetSystemCodes(Sbm.SystemCode.OrgOption_StockLocation);
if (contextSalesLocations == null) contextSalesLocations = SbmSystem.GetSystemCodes(Sbm.ApplicationCode.OrgOption_StockLocation);
String context = contextSalesLocations.GetCodeForType(stockLocation);
String value = GetOrganisationOption(Sbm.OrganisationOption.SalesLocation, context).Trim();
SysId idLoc = new SysId();
@@ -17,7 +17,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.App
//-------------------------------------------------------------------
// System code types.
private static Dictionary<Sbm.SystemCode, List<TypeCodeDesc>> systemCodes = new Dictionary<Sbm.SystemCode, List<TypeCodeDesc>>();
private static Dictionary<Sbm.ApplicationCode, List<TypeCodeDesc>> systemCodes = new Dictionary<Sbm.ApplicationCode, List<TypeCodeDesc>>();
// Code types.
private static List<TypeCodeDesc> codeTypes = new List<TypeCodeDesc>();
@@ -97,7 +97,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.App
//---------------------------------------------------------------
// I t e m T y p e
//---------------------------------------------------------------
systemCodes[Sbm.SystemCode.ItemType] = new List<TypeCodeDesc>()
systemCodes[Sbm.ApplicationCode.ItemType] = new List<TypeCodeDesc>()
{
new TypeCodeDesc((int)Sbm.ItemType.SecItem, "SecItm", "Securty Item"),
new TypeCodeDesc((int)Sbm.ItemType.Currency, "Currency", "Currency"),
@@ -139,7 +139,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.App
// Contacts.
// Affiliate Type.
systemCodes[Sbm.SystemCode.AffiliateType] = new List<TypeCodeDesc>()
systemCodes[Sbm.ApplicationCode.AffiliateType] = new List<TypeCodeDesc>()
{
new TypeCodeDesc((int)Sbm.AffiliateType.Individual, "IND", "Individual"),
new TypeCodeDesc((int)Sbm.AffiliateType.Commercial, "COM", "Commercial"),
@@ -151,7 +151,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.App
};
// Address Type.
systemCodes[Sbm.SystemCode.AddressType] = new List<TypeCodeDesc>()
systemCodes[Sbm.ApplicationCode.AddressType] = new List<TypeCodeDesc>()
{
new TypeCodeDesc((int)Sbm.AddressType.Office, "OFF", "Office"),
new TypeCodeDesc((int)Sbm.AddressType.Registered, "REG", "Registered"),
@@ -161,7 +161,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.App
};
// Association Type.
systemCodes[Sbm.SystemCode.AssociationType] = new List<TypeCodeDesc>()
systemCodes[Sbm.ApplicationCode.AssociationType] = new List<TypeCodeDesc>()
{
new TypeCodeDesc((int)Sbm.AssociationType.Internal, "INT", "Internal"),
new TypeCodeDesc((int)Sbm.AssociationType.Customer, "CUS", "Customer"),
@@ -174,7 +174,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.App
};
// System Account Type.
systemCodes[Sbm.SystemCode.SystemAccountType] = new List<TypeCodeDesc>()
systemCodes[Sbm.ApplicationCode.SystemAccountType] = new List<TypeCodeDesc>()
{
new TypeCodeDesc((int)Sbm.SystemAccountType.Customer, "CUST", "Customer")
};
@@ -183,7 +183,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.App
// Transactions.
// Transaction types.
systemCodes[Sbm.SystemCode.TransactionType] = new List<TypeCodeDesc>()
systemCodes[Sbm.ApplicationCode.TransactionType] = new List<TypeCodeDesc>()
{
new TypeCodeDesc((int) Sbm.TransactionType.Project, "PRO", "Project"),
new TypeCodeDesc((int)Sbm.TransactionType.SalesLead, "SLD", "Sales Lead"),
@@ -204,7 +204,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.App
};
// Transaction StatusCat.
systemCodes[Sbm.SystemCode.TransactionStatusCat] = new List<TypeCodeDesc>()
systemCodes[Sbm.ApplicationCode.TransactionStatusCat] = new List<TypeCodeDesc>()
{
new TypeCodeDesc((int)SbmTransaction.StatusCat.Pending, "PEN", "Pending"),
new TypeCodeDesc((int)SbmTransaction.StatusCat.Open, "OPE", "Open"),
@@ -212,28 +212,28 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.App
};
// Requirement Type.
systemCodes[Sbm.SystemCode.RequirementType] = new List<TypeCodeDesc>()
systemCodes[Sbm.ApplicationCode.RequirementType] = new List<TypeCodeDesc>()
{
new TypeCodeDesc((int)Sbm.RequirementType.Detail, "DET", "Detail"),
new TypeCodeDesc((int)Sbm.RequirementType.Job, "JOB", "Job"),
};
// TaskCodeType.
systemCodes[Sbm.SystemCode.TaskCodeType] = new List<TypeCodeDesc>()
systemCodes[Sbm.ApplicationCode.TaskCodeType] = new List<TypeCodeDesc>()
{
new TypeCodeDesc((int)Sbm.TaskCodeType.Project, "PRO", "Project code"),
new TypeCodeDesc((int)Sbm.TaskCodeType.Job, "JOB", "Job number"),
};
// Requirement StatusCat.
systemCodes[Sbm.SystemCode.RequirementStatusCat] = new List<TypeCodeDesc>()
systemCodes[Sbm.ApplicationCode.RequirementStatusCat] = new List<TypeCodeDesc>()
{
new TypeCodeDesc((int)SbmRequirement.StatusCat.Open, "OPE", "Open"),
new TypeCodeDesc((int)SbmRequirement.StatusCat.Closed, "CLO", "Closed"),
};
// ConstituentType.
systemCodes[Sbm.SystemCode.ConstituentType] = new List<TypeCodeDesc>()
systemCodes[Sbm.ApplicationCode.ConstituentType] = new List<TypeCodeDesc>()
{
new TypeCodeDesc((int)Sbm.ConstituentType.TimeRecord, "TIM", "Time record"),
new TypeCodeDesc((int)Sbm.ConstituentType.Event, "EVT", "Event"),
@@ -244,7 +244,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.App
};
// Constituent StatusCat.
systemCodes[Sbm.SystemCode.ConstituentStatusCat] = new List<TypeCodeDesc>()
systemCodes[Sbm.ApplicationCode.ConstituentStatusCat] = new List<TypeCodeDesc>()
{
new TypeCodeDesc((int)SbmConstituent.StatusCat.Open, "OPE", "Open"),
new TypeCodeDesc((int)SbmConstituent.StatusCat.Closed, "CLO", "Closed"),
@@ -254,13 +254,13 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.App
// Miscellaneous.
// ItemLinkData.
systemCodes[Sbm.SystemCode.ItemLinkData] = new List<TypeCodeDesc>()
systemCodes[Sbm.ApplicationCode.ItemLinkData] = new List<TypeCodeDesc>()
{
new TypeCodeDesc((int)Sbm.ItemLinkData.Requirement_AssocItem_PurchaseCostProportion, "PurchaseCostProportion", "Purchase cost proportion")
};
// Sys Param Category.
systemCodes[Sbm.SystemCode.SysParamCategory] = new List<TypeCodeDesc>()
systemCodes[Sbm.ApplicationCode.SysParamCategory] = new List<TypeCodeDesc>()
{
new TypeCodeDesc((int)Sbm.StockLevelSource.Manual, "MAN", "Manual"),
new TypeCodeDesc((int)Sbm.SysParamCategory.Security, "SEC", "Security parameter"),
@@ -271,7 +271,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.App
// Commodities.
// Commodity Type.
systemCodes[Sbm.SystemCode.CommodityType] = new List<TypeCodeDesc>()
systemCodes[Sbm.ApplicationCode.CommodityType] = new List<TypeCodeDesc>()
{
new TypeCodeDesc((int)Sbm.CommodityType.Stock, "STK", "Stock"),
new TypeCodeDesc((int)Sbm.CommodityType.NonStock, "NST", "Non-stock"),
@@ -280,14 +280,14 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.App
};
// Commodity Status Cat. - Any' value is included in list to support organisation item options and commodity panel filter.
systemCodes[Sbm.SystemCode.CommodityStatusCat] = new List<TypeCodeDesc>()
systemCodes[Sbm.ApplicationCode.CommodityStatusCat] = new List<TypeCodeDesc>()
{
new TypeCodeDesc((int)SbmCommodity.StatusCat.Any, "ANY", "<Any>"),
new TypeCodeDesc((int)SbmCommodity.StatusCat.Current, "CUR", "Current")
};
// Portfolio Item Type.
systemCodes[Sbm.SystemCode.PortfolioItemType] = new List<TypeCodeDesc>()
systemCodes[Sbm.ApplicationCode.PortfolioItemType] = new List<TypeCodeDesc>()
{
new TypeCodeDesc((int)Sbm.PortfolioItemType.Portfolio, "PORT", "Portfolio"),
new TypeCodeDesc((int)Sbm.PortfolioItemType.Category, "CAT", "Category"),
@@ -295,13 +295,13 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.App
};
// Container Category.
systemCodes[Sbm.SystemCode.ContainerCategory] = new List<TypeCodeDesc>()
systemCodes[Sbm.ApplicationCode.ContainerCategory] = new List<TypeCodeDesc>()
{
new TypeCodeDesc((int)Sbm.ContainerCategory.Stock, "STOCK", "Stock")
};
// Container Type.
systemCodes[Sbm.SystemCode.ContainerType] = new List<TypeCodeDesc>()
systemCodes[Sbm.ApplicationCode.ContainerType] = new List<TypeCodeDesc>()
{
new TypeCodeDesc((int)Sbm.ContainerType.Vehicle, "VEHICLE", "Vehicle"),
new TypeCodeDesc((int)Sbm.ContainerType.Truck, "TRUCK", "Truck"),
@@ -316,13 +316,13 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.App
// Stock.
// Location Category.
systemCodes[Sbm.SystemCode.LocationCategory] = new List<TypeCodeDesc>()
systemCodes[Sbm.ApplicationCode.LocationCategory] = new List<TypeCodeDesc>()
{
new TypeCodeDesc((int)Sbm.LocationCategory.Stock, "STOCK", "Stock")
};
// Location Filter.
systemCodes[Sbm.SystemCode.LocationFilter] = new List<TypeCodeDesc>()
systemCodes[Sbm.ApplicationCode.LocationFilter] = new List<TypeCodeDesc>()
{
new TypeCodeDesc((int)Sbm.LocationFilter.Sales, "SALESLOC", "Sales locations"),
new TypeCodeDesc((int)Sbm.LocationFilter.Calc, "CALCLOC", "Calculated locations"),
@@ -330,7 +330,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.App
};
// Movement Type.
systemCodes[Sbm.SystemCode.MovementType] = new List<TypeCodeDesc>()
systemCodes[Sbm.ApplicationCode.MovementType] = new List<TypeCodeDesc>()
{
new TypeCodeDesc((int)Sbm.MovementType.StockTransfer, "STKTRA", "Stock transfer"),
new TypeCodeDesc((int)Sbm.MovementType.SalesAllocation, "SALALL", "Sales allocation"),
@@ -338,7 +338,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.App
};
// Stock Level Type.
systemCodes[Sbm.SystemCode.StockLevelType] = new List<TypeCodeDesc>()
systemCodes[Sbm.ApplicationCode.StockLevelType] = new List<TypeCodeDesc>()
{
new TypeCodeDesc((int)Sbm.StockLevelType.CurrentLevel, "CUR", "Current level"),
new TypeCodeDesc((int)Sbm.StockLevelType.StockTake, "STK", "Stock take"),
@@ -346,7 +346,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.App
};
// Stock Level Source.
systemCodes[Sbm.SystemCode.StockLevelSource] = new List<TypeCodeDesc>()
systemCodes[Sbm.ApplicationCode.StockLevelSource] = new List<TypeCodeDesc>()
{
new TypeCodeDesc((int)Sbm.StockLevelSource.Manual, "MAN", "Manual"),
new TypeCodeDesc((int)Sbm.StockLevelSource.System, "SYS", "System"),
@@ -357,14 +357,14 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.App
// Processes.
// Process Category.
systemCodes[Sbm.SystemCode.ProcessCategory] = new List<TypeCodeDesc>()
systemCodes[Sbm.ApplicationCode.ProcessCategory] = new List<TypeCodeDesc>()
{
new TypeCodeDesc((int)Sbm.ProcessCategory.Commodity, "CMD", "Commodity"),
new TypeCodeDesc((int)Sbm.ProcessCategory.Asset, "ASSET", "Asset")
};
// Process Type.
systemCodes[Sbm.SystemCode.ProcessType] = new List<TypeCodeDesc>()
systemCodes[Sbm.ApplicationCode.ProcessType] = new List<TypeCodeDesc>()
{
new TypeCodeDesc((int)Sbm.ProcessType.Preparation, "PREP", "Preparation"),
new TypeCodeDesc((int)Sbm.ProcessType.Production, "PROD", "Production"),
@@ -373,7 +373,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.App
};
// Payment Type.
systemCodes[Sbm.SystemCode.PaymentType] = new List<TypeCodeDesc>()
systemCodes[Sbm.ApplicationCode.PaymentType] = new List<TypeCodeDesc>()
{
new TypeCodeDesc((int)Sbm.PaymentType.Finance, "FINANCE", "Finance"),
new TypeCodeDesc((int)Sbm.PaymentType.Cash, "CASH", "Cash"),
@@ -386,7 +386,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.App
// Assets.
// Asset Type.
systemCodes[Sbm.SystemCode.AssetType] = new List<TypeCodeDesc>()
systemCodes[Sbm.ApplicationCode.AssetType] = new List<TypeCodeDesc>()
{
new TypeCodeDesc((int)Sbm.AssetType.General, "GEN", "General"),
new TypeCodeDesc((int)Sbm.AssetType.Furniture, "FUR", "Furniture"),
@@ -395,7 +395,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.App
};
// Asset Income Type.
systemCodes[Sbm.SystemCode.AssetIncomeType] = new List<TypeCodeDesc>()
systemCodes[Sbm.ApplicationCode.AssetIncomeType] = new List<TypeCodeDesc>()
{
new TypeCodeDesc((int)Sbm.AssetIncomeType.Sale, "SALE", "Sale"),
new TypeCodeDesc((int)Sbm.AssetIncomeType.Rental, "RENTAL", "Rental")
@@ -405,7 +405,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.App
// Vehicles.
// Vehicle Type.
systemCodes[Sbm.SystemCode.VehicleType] = new List<TypeCodeDesc>()
systemCodes[Sbm.ApplicationCode.VehicleType] = new List<TypeCodeDesc>()
{
new TypeCodeDesc((int)Sbm.VehicleType.Car, "CAR", "Car"),
new TypeCodeDesc((int)Sbm.VehicleType.Minibus, "MINIBUS", "Minibus"),
@@ -415,7 +415,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.App
};
// Vehicle Event Type.
systemCodes[Sbm.SystemCode.VehicleEventType] = new List<TypeCodeDesc>()
systemCodes[Sbm.ApplicationCode.VehicleEventType] = new List<TypeCodeDesc>()
{
new TypeCodeDesc((int)Sbm.VehicleEventType.Odometer, "ODO", "Odometer"),
new TypeCodeDesc((int)Sbm.VehicleEventType.Service, "SRV", "Service"),
@@ -425,7 +425,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.App
};
// Vehicle Feature Source.
systemCodes[Sbm.SystemCode.VehicleFeatureSource] = new List<TypeCodeDesc>()
systemCodes[Sbm.ApplicationCode.VehicleFeatureSource] = new List<TypeCodeDesc>()
{
new TypeCodeDesc((int)Sbm.VehicleFeatureSource.Manual, "MAN", "Manual"),
new TypeCodeDesc((int)Sbm.VehicleFeatureSource.HPI, "HPI", "HPI"),
@@ -435,7 +435,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.App
};
// Vehicle Feature Type.
systemCodes[Sbm.SystemCode.VehicleFeatureType] = new List<TypeCodeDesc>()
systemCodes[Sbm.ApplicationCode.VehicleFeatureType] = new List<TypeCodeDesc>()
{
new TypeCodeDesc((int)Sbm.VehicleFeatureType.Make, "MAKE", "Make"),
new TypeCodeDesc((int)Sbm.VehicleFeatureType.Model, "MODEL", "Model"),
@@ -458,7 +458,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.App
};
// Vehicle Option Type.
systemCodes[Sbm.SystemCode.VehicleOptionType] = new List<TypeCodeDesc>()
systemCodes[Sbm.ApplicationCode.VehicleOptionType] = new List<TypeCodeDesc>()
{
new TypeCodeDesc((int)Sbm.VehicleOptionType.Trim, "TRIM", "Trim"),
new TypeCodeDesc((int)Sbm.VehicleOptionType.Ventilation, "VENTILATION", "Ventilation"),
@@ -468,14 +468,14 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.App
};
// Vehicle Trans Type.
systemCodes[Sbm.SystemCode.VehicleTransType] = new List<TypeCodeDesc>()
systemCodes[Sbm.ApplicationCode.VehicleTransType] = new List<TypeCodeDesc>()
{
new TypeCodeDesc((int)Sbm.VehicleTransType.Manual, "MANUAL", "Manual"),
new TypeCodeDesc((int)Sbm.VehicleTransType.Automatic, "AUTO", "Automatic")
};
// Fuel Type.
systemCodes[Sbm.SystemCode.FuelType] = new List<TypeCodeDesc>()
systemCodes[Sbm.ApplicationCode.FuelType] = new List<TypeCodeDesc>()
{
new TypeCodeDesc((int)Sbm.VehicleFuelType.Petrol, "PETROL", "Petrol"),
new TypeCodeDesc((int)Sbm.VehicleFuelType.Diesel, "DIESEL", "Diesel"),
@@ -485,14 +485,14 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.App
};
// Odometer Units.
systemCodes[Sbm.SystemCode.OdometerUnits] = new List<TypeCodeDesc>()
systemCodes[Sbm.ApplicationCode.OdometerUnits] = new List<TypeCodeDesc>()
{
new TypeCodeDesc((int)Sbm.VehicleOdometerUnits.Mile, "MILE", "Miles"),
new TypeCodeDesc((int)Sbm.VehicleOdometerUnits.Kilometre, "KM", "Kilometres")
};
// Discount Type.
systemCodes[Sbm.SystemCode.DiscountType] = new List<TypeCodeDesc>()
systemCodes[Sbm.ApplicationCode.DiscountType] = new List<TypeCodeDesc>()
{
new TypeCodeDesc((int)Sbm.DiscountType.NoDiscount, "NoDisc", "No Discount"),
new TypeCodeDesc((int)Sbm.DiscountType.ValueDiscount, "ValDisc", "Value discount"),
@@ -504,7 +504,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.App
};
// Discount Markup.
systemCodes[Sbm.SystemCode.DiscountMarkup] = new List<TypeCodeDesc>()
systemCodes[Sbm.ApplicationCode.DiscountMarkup] = new List<TypeCodeDesc>()
{
new TypeCodeDesc((int)Sbm.DiscountMarkup.Discount, "DISC", "Discount"),
new TypeCodeDesc((int)Sbm.DiscountMarkup.Markup, "MARK", "Markup")
@@ -514,16 +514,16 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.App
// Reference.
// Region Type.
systemCodes[Sbm.SystemCode.RegionType] = new List<TypeCodeDesc>(SaReferenceDataConsole.GetReferenceDataCodes(ReferenceDataSystemCode.RegionType));
systemCodes[Sbm.ApplicationCode.RegionType] = new List<TypeCodeDesc>(SaReferenceDataConsole.GetReferenceDataCodes(ReferenceDataSystemCode.RegionType));
// Unit Measure Category.
systemCodes[Sbm.SystemCode.UnitMeasureCategory] = new List<TypeCodeDesc>(SaReferenceDataConsole.GetReferenceDataCodes(ReferenceDataSystemCode.UnitMeasureCategory));
systemCodes[Sbm.ApplicationCode.UnitMeasureCategory] = new List<TypeCodeDesc>(SaReferenceDataConsole.GetReferenceDataCodes(ReferenceDataSystemCode.UnitMeasureCategory));
// Unit Measure Type.
systemCodes[Sbm.SystemCode.UnitMeasureType] = new List<TypeCodeDesc>(SaReferenceDataConsole.GetReferenceDataCodes(ReferenceDataSystemCode.UnitMeasureType));
systemCodes[Sbm.ApplicationCode.UnitMeasureType] = new List<TypeCodeDesc>(SaReferenceDataConsole.GetReferenceDataCodes(ReferenceDataSystemCode.UnitMeasureType));
// Financial Type.
systemCodes[Sbm.SystemCode.FinancialType] = new List<TypeCodeDesc>()
systemCodes[Sbm.ApplicationCode.FinancialType] = new List<TypeCodeDesc>()
{
new TypeCodeDesc((int)Sbm.FinancialType.CommoditySupply, "CmdSup", "Commodity supply"),
new TypeCodeDesc((int)Sbm.FinancialType.CommoditySales, "CmdSal", "Commodity sales")
@@ -533,7 +533,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.App
// Pricing.
// Price Type.
systemCodes[Sbm.SystemCode.PriceType] = new List<TypeCodeDesc>()
systemCodes[Sbm.ApplicationCode.PriceType] = new List<TypeCodeDesc>()
{
new TypeCodeDesc((int)Sbm.PriceType.Customer, "P", "Customer"),
new TypeCodeDesc((int)Sbm.PriceType.Supplier, "U", "Supplier"),
@@ -541,7 +541,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.App
};
// Price Calc Method.
systemCodes[Sbm.SystemCode.PriceCalcMethod] = new List<TypeCodeDesc>()
systemCodes[Sbm.ApplicationCode.PriceCalcMethod] = new List<TypeCodeDesc>()
{
new TypeCodeDesc((int)Sbm.PriceCalcMethod.Fixed, "Fixed", "Fixed"),
new TypeCodeDesc((int)Sbm.PriceCalcMethod.Standard, "Standard", "Standard"),
@@ -564,7 +564,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.App
// Application configuration.
// Association Tab.
systemCodes[Sbm.SystemCode.AssociationTab] = new List<TypeCodeDesc>()
systemCodes[Sbm.ApplicationCode.AssociationTab] = new List<TypeCodeDesc>()
{
new TypeCodeDesc((int)Sbm.AssociationTab.Details, "Details", "Details"),
new TypeCodeDesc((int)Sbm.AssociationTab.Order, "Order", "Order"),
@@ -579,7 +579,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.App
// Interfaces.
// Interface types - Website.
systemCodes[Sbm.SystemCode.InterfaceType_Website] = new List<TypeCodeDesc>()
systemCodes[Sbm.ApplicationCode.InterfaceType_Website] = new List<TypeCodeDesc>()
{
new TypeCodeDesc((int)Sbm.InterfaceType_Website.WebStore, "WebStore", "WebStore"),
new TypeCodeDesc((int)Sbm.InterfaceType_Website.JoomlaVirtueMart, "JoomlaVM", "Joomla VirtueMart"),
@@ -587,14 +587,14 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.App
};
// Interface types - Accounts.
systemCodes[Sbm.SystemCode.InterfaceType_Accounts] = new List<TypeCodeDesc>()
systemCodes[Sbm.ApplicationCode.InterfaceType_Accounts] = new List<TypeCodeDesc>()
{
new TypeCodeDesc((int)Sbm.InterfaceType_Accounts.SageLine50, "SageLine50", "Sage Line 50"),
new TypeCodeDesc((int)Sbm.InterfaceType_Accounts.QuickBooks, "QBooks", "QuickBooks")
};
// Interface types - System.
systemCodes[Sbm.SystemCode.InterfaceType_System] = new List<TypeCodeDesc>()
systemCodes[Sbm.ApplicationCode.InterfaceType_System] = new List<TypeCodeDesc>()
{
new TypeCodeDesc((int)Sbm.InterfaceType_System.MSOutlook, "MSOutlook", "MS Outlook"),
new TypeCodeDesc((int)Sbm.InterfaceType_System.PostcodeAnywhere, "POSTCODEANYWHERE", "Postcode Anywhere"),
@@ -609,7 +609,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.App
};
// Interface types - File.
systemCodes[Sbm.SystemCode.InterfaceType_File] = new List<TypeCodeDesc>()
systemCodes[Sbm.ApplicationCode.InterfaceType_File] = new List<TypeCodeDesc>()
{
new TypeCodeDesc((int)Sbm.InterfaceType_File.TransactionImport, "SalesOrderImport", "Transaction import"),
new TypeCodeDesc((int)Sbm.InterfaceType_File.TransactionExport, "SalesOrderExport", "Transaction export"),
@@ -627,7 +627,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.App
};
// InterfaceDataType.
systemCodes[Sbm.SystemCode.InterfaceDataType] = new List<TypeCodeDesc>()
systemCodes[Sbm.ApplicationCode.InterfaceDataType] = new List<TypeCodeDesc>()
{
new TypeCodeDesc((int)Sbm.InterfaceDataType.Contact, "CONTACT", "Contact"),
new TypeCodeDesc((int)Sbm.InterfaceDataType.Association, "ASSOCIATION", "Association"),
@@ -665,7 +665,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.App
// Associated data.
// Item Data Type.
systemCodes[Sbm.SystemCode.ItemDataType] = new List<TypeCodeDesc>()
systemCodes[Sbm.ApplicationCode.ItemDataType] = new List<TypeCodeDesc>()
{
new TypeCodeDesc((int)Sbm.ItemDataType.Vehicle_HpiResponse, "HPI", "HPI response"),
new TypeCodeDesc((int)Sbm.ItemDataType.Transaction_VehicleFilter, "VehicleFilter", "Vehicle filter"),
@@ -682,7 +682,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.App
// Organisation configuration.
// Organisation Option - Value.
systemCodes[Sbm.SystemCode.OrgOption_Value] = new List<TypeCodeDesc>()
systemCodes[Sbm.ApplicationCode.OrgOption_Value] = new List<TypeCodeDesc>()
{
new TypeCodeDesc((int)Sbm.OrgOption_Value.MaxTransactionsQueriedForEmptyFilter, "MaxTransEmptyFilter", "Maximum transactions queried for empty filter"),
new TypeCodeDesc((int)Sbm.OrgOption_Value.AlternativePromotionText, "AltPromotionText", "To be used when no promotion specified"),
@@ -697,14 +697,14 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.App
};
// Organisation Option - Folder.
systemCodes[Sbm.SystemCode.OrgOption_Folder] = new List<TypeCodeDesc>()
systemCodes[Sbm.ApplicationCode.OrgOption_Folder] = new List<TypeCodeDesc>()
{
new TypeCodeDesc((int)Sbm.OrgOption_Folder.CommodityImage, "CmdImage", "Commodity image"),
new TypeCodeDesc((int)Sbm.OrgOption_Folder.CommodityBarcodeImage, "CmdBarcodeImage", "Commodity barcode image")
};
// Organisation Option - Allow Option.
systemCodes[Sbm.SystemCode.OrgOption_AllowOption] = new List<TypeCodeDesc>()
systemCodes[Sbm.ApplicationCode.OrgOption_AllowOption] = new List<TypeCodeDesc>()
{
new TypeCodeDesc((int)Sbm.OrgOption_AllowOption.UpdateAssociationCode, "UpdAssocCode", "Update association code"),
new TypeCodeDesc((int)Sbm.OrgOption_AllowOption.CustomerAccountDetails, "CustAccntDet", "Customer account details"),
@@ -738,7 +738,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.App
};
// Organisation Option - Caption
systemCodes[Sbm.SystemCode.OrgOption_Caption] = new List<TypeCodeDesc>()
systemCodes[Sbm.ApplicationCode.OrgOption_Caption] = new List<TypeCodeDesc>()
{
// Transaction type captions.
new TypeCodeDesc((int)Sbm.OrgOption_Caption.TransType_Project, "Project", "Transaction type - Project"),
@@ -777,7 +777,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.App
};
// Organisation Option - Show Column.
systemCodes[Sbm.SystemCode.OrgOption_ShowColumn] = new List<TypeCodeDesc>()
systemCodes[Sbm.ApplicationCode.OrgOption_ShowColumn] = new List<TypeCodeDesc>()
{
new TypeCodeDesc((int)Sbm.OrgOption_ShowColumn.Association_AnnualSalesTarget, "Association:AnnualSalesTarget", "Association: Annual sales target"),
new TypeCodeDesc((int)Sbm.OrgOption_ShowColumn.Association_Trans_LastSaleRaised, "Association:Trans:LastSaleRaised", "Association: Last SO raised"),
@@ -807,7 +807,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.App
};
// Organisation Option - Show Field.
systemCodes[Sbm.SystemCode.OrgOption_ShowField] = new List<TypeCodeDesc>()
systemCodes[Sbm.ApplicationCode.OrgOption_ShowField] = new List<TypeCodeDesc>()
{
new TypeCodeDesc((int)Sbm.OrgOption_ShowField.Association_AnnualSalesTarget, SbmDbDfn.GetColumnNameQual(SbmDbDfn.ColumnIdx.Association_AnnualSalesTarget, null, false), "Association: Annual sales target"),
new TypeCodeDesc((int)Sbm.OrgOption_ShowField.Address_LastVisitOn, SbmDbDfn.GetColumnNameQual(SbmDbDfn.ColumnIdx.Address_LastVisitOn, null, false), "Address: Last visit date"),
@@ -830,7 +830,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.App
};
// Organisation Option - Field Label.
systemCodes[Sbm.SystemCode.OrgOption_FieldLabel] = new List<TypeCodeDesc>()
systemCodes[Sbm.ApplicationCode.OrgOption_FieldLabel] = new List<TypeCodeDesc>()
{
new TypeCodeDesc((int)Sbm.OrgOption_FieldLabel.Commodity_CatalogRef, SbmDbDfn.GetColumnNameQual(SbmDbDfn.ColumnIdx.Commodity_CatalogRef, null, false), "Commodity: Catalog reference"),
new TypeCodeDesc((int)Sbm.OrgOption_FieldLabel.Commodity_Dimensions, SbmDbDfn.GetColumnNameQual(SbmDbDfn.ColumnIdx.Commodity_Dimensions, null, false), "Commodity: Dimensions"),
@@ -865,14 +865,14 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.App
};
// Organisation Option - Transaction Creation Status.
systemCodes[Sbm.SystemCode.OrgOption_TransactionCreationStatus] = new List<TypeCodeDesc>()
systemCodes[Sbm.ApplicationCode.OrgOption_TransactionCreationStatus] = new List<TypeCodeDesc>()
{
new TypeCodeDesc((int)Sbm.OrgOption_TransCreateStatus.ProformaSalesOrder, "ProFromaSalOrd", "Proforma SO creation status", "Default: 'Preparation'"),
new TypeCodeDesc((int)Sbm.OrgOption_TransCreateStatus.SalesOrder, "SalesOrder", "SO creation status", "Default. 'In progress'")
};
// Organisation Option - Container Status Caption.
systemCodes[Sbm.SystemCode.OrgOption_ContainerStatusCaption] = new List<TypeCodeDesc>()
systemCodes[Sbm.ApplicationCode.OrgOption_ContainerStatusCaption] = new List<TypeCodeDesc>()
{
new TypeCodeDesc((int)Sbm.OrgOption_StatusContainer.Provisional, SacsSystem.GetStatusCode(SaStatus.Provisional), "Provisional"),
new TypeCodeDesc((int)Sbm.OrgOption_StatusContainer.Awaiting, SacsSystem.GetStatusCode(SaStatus.Awaiting), "Awaiting"),
@@ -882,13 +882,13 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.App
};
// Organisation Option - Minutes.
systemCodes[Sbm.SystemCode.OrgOption_Minutes] = new List<TypeCodeDesc>()
systemCodes[Sbm.ApplicationCode.OrgOption_Minutes] = new List<TypeCodeDesc>()
{
new TypeCodeDesc((int)Sbm.OrgOption_Minutes.AutoSaveTransaction, "MinsAutoSaveTrans", "Auto save transactions (minutes)", "")
};
// Organisation Option - Period Days.
systemCodes[Sbm.SystemCode.OrgOption_PeriodDays] = new List<TypeCodeDesc>()
systemCodes[Sbm.ApplicationCode.OrgOption_PeriodDays] = new List<TypeCodeDesc>()
{
new TypeCodeDesc((int)Sbm.OrgOption_PeriodDays.TransactionDatesInFuture, "TransDatesInFut", "Days in future that transaction dates can be set", ""),
new TypeCodeDesc((int)Sbm.OrgOption_PeriodDays.UpdateClosedTransaction, "UpdClosedTrans", "Grace period (days) for updating closed transactions", "Period after transaction closure during which updates are allowed (0-30 days)"),
@@ -897,7 +897,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.App
};
// Organisation Option - Period Weeks.
systemCodes[Sbm.SystemCode.OrgOption_PeriodWeeks] = new List<TypeCodeDesc>()
systemCodes[Sbm.ApplicationCode.OrgOption_PeriodWeeks] = new List<TypeCodeDesc>()
{
new TypeCodeDesc((int)Sbm.OrgOption_PeriodWeeks.Timesheets, "Timesheets", "Weeks of timesheets to list (default 8)"),
new TypeCodeDesc((int)Sbm.OrgOption_PeriodWeeks.UpdateTimeRecords_Control, "UpdTimeRecsCtrl", "Weeks in past for admin user to update time records (default 2)"),
@@ -905,7 +905,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.App
};
// Organisation Option - Numeric Decimals.
systemCodes[Sbm.SystemCode.OrgOption_NumericDecimals] = new List<TypeCodeDesc>()
systemCodes[Sbm.ApplicationCode.OrgOption_NumericDecimals] = new List<TypeCodeDesc>()
{
new TypeCodeDesc((int)Sbm.OrgOption_NumericDecimals.OrderQuantity, "OrdQty", "Order quantity"),
new TypeCodeDesc((int)Sbm.OrgOption_NumericDecimals.CommodityWeight, "CmdWeight", "Commodity weight"),
@@ -915,13 +915,13 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.App
};
// Organisation Option - Commodity Type.
systemCodes[Sbm.SystemCode.OrgOption_CommodityType] = new List<TypeCodeDesc>()
systemCodes[Sbm.ApplicationCode.OrgOption_CommodityType] = new List<TypeCodeDesc>()
{
new TypeCodeDesc((int)Sbm.OrgOption_CommodityType.CommodityCreationDefault, "CmdCreateDflt", "Commodity creation default")
};
// Organisation Option - Stock Location.
systemCodes[Sbm.SystemCode.OrgOption_StockLocation] = new List<TypeCodeDesc>()
systemCodes[Sbm.ApplicationCode.OrgOption_StockLocation] = new List<TypeCodeDesc>()
{
new TypeCodeDesc((int)Sbm.OrgOption_StockLocation.SalesOrderDefault, "SalOrdDflt", "Sales order default"),
new TypeCodeDesc((int)Sbm.OrgOption_StockLocation.PurchaseOrderDefault, "PurOrdDflt", "Purchase order default"),
@@ -932,7 +932,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.App
// Association organisation options.
// AssociationOrgOption.
systemCodes[Sbm.SystemCode.AssociationOption] = new List<TypeCodeDesc>()
systemCodes[Sbm.ApplicationCode.AssociationOption] = new List<TypeCodeDesc>()
{
new TypeCodeDesc((int)Sbm.OrganisationOption.Value, "Value", "Value"),
new TypeCodeDesc((int)Sbm.OrganisationOption.Folder, "Folder", "Folder"),
@@ -956,7 +956,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.App
// System User options.
// SystemUserOption.
systemCodes[Sbm.SystemCode.SystemUserOption] = new List<TypeCodeDesc>()
systemCodes[Sbm.ApplicationCode.SystemUserOption] = new List<TypeCodeDesc>()
{
new TypeCodeDesc((int)Sbm.SystemUserOption.Right, "SecRight", "Security Right")
};
@@ -965,7 +965,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.App
// Interface options.
// InterfaceOption.
systemCodes[Sbm.SystemCode.InterfaceOption] = new List<TypeCodeDesc>()
systemCodes[Sbm.ApplicationCode.InterfaceOption] = new List<TypeCodeDesc>()
{
new TypeCodeDesc((int)Sbm.InterfaceOption.Value, "Value", "Value"),
new TypeCodeDesc((int)Sbm.InterfaceOption.Flag, "Flag", "Flag"),
@@ -1006,7 +1006,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.App
// Generic item options.
// OrgOption_TaxCodeColumn. // eg. for Sage and other system interfaces.
systemCodes[Sbm.SystemCode.OrgOption_TaxCodeColumn] = new List<TypeCodeDesc>()
systemCodes[Sbm.ApplicationCode.OrgOption_TaxCodeColumn] = new List<TypeCodeDesc>()
{
new TypeCodeDesc((int)SaTaxCodeColumn.Code, SbmDbDfn.GetColumnName(SbmDbDfn.ColumnIdx.TaxCode_Code), "Code"),
new TypeCodeDesc((int)SaTaxCodeColumn.CodeAlt1, SbmDbDfn.GetColumnName(SbmDbDfn.ColumnIdx.TaxCode_CodeAlt1), "Alternative code 1"),
@@ -1017,14 +1017,14 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.App
// Website interface configuration.
// InterfaceOption_WebFlag.
systemCodes[Sbm.SystemCode.InterfaceOption_WebFlag] = new List<TypeCodeDesc>()
systemCodes[Sbm.ApplicationCode.InterfaceOption_WebFlag] = new List<TypeCodeDesc>()
{
new TypeCodeDesc((int)Sbm.SystemInterface_Website_Flag.IncludeImminentStock, "IncImminStock", "Include imminent stock in current level"),
new TypeCodeDesc((int)Sbm.SystemInterface_Website_Flag.AllowZeroOrderItemAmount, "AllowZeroOrdItmAmt", "Allow zero order item amount")
};
// InterfaceOption_WebUploadData.
systemCodes[Sbm.SystemCode.InterfaceOption_WebUploadData] = new List<TypeCodeDesc>()
systemCodes[Sbm.ApplicationCode.InterfaceOption_WebUploadData] = new List<TypeCodeDesc>()
{
new TypeCodeDesc((int)Sbm.WebUploadData.Portfolio, "Portfolio", "Portfolio"),
new TypeCodeDesc((int)Sbm.WebUploadData.StockLevels, "StockLevels", "Stock Levels"),
@@ -1033,7 +1033,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.App
};
//InterfaceOption_WebUploadMethod.
systemCodes[Sbm.SystemCode.InterfaceOption_WebUploadMethod] = new List<TypeCodeDesc>()
systemCodes[Sbm.ApplicationCode.InterfaceOption_WebUploadMethod] = new List<TypeCodeDesc>()
{
new TypeCodeDesc((int)Sbm.WebUploadMethod.None, "None", "None"),
new TypeCodeDesc((int)Sbm.WebUploadMethod.Ftp, "FTP", "FTP"),
@@ -1041,13 +1041,13 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.App
};
// InterfaceOption_WebDownloadData.
systemCodes[Sbm.SystemCode.InterfaceOption_WebDownloadData] = new List<TypeCodeDesc>()
systemCodes[Sbm.ApplicationCode.InterfaceOption_WebDownloadData] = new List<TypeCodeDesc>()
{
new TypeCodeDesc((int)Sbm.WebDownloadData.Orders, "Orders", "Orders")
};
//InterfaceOption_WebDownloadMethod.
systemCodes[Sbm.SystemCode.InterfaceOption_WebDownloadMethod] = new List<TypeCodeDesc>()
systemCodes[Sbm.ApplicationCode.InterfaceOption_WebDownloadMethod] = new List<TypeCodeDesc>()
{
new TypeCodeDesc((int)Sbm.WebDownloadMethod.None, "None", "None"),
new TypeCodeDesc((int)Sbm.WebDownloadMethod.Ftp, "FTP", "FTP"),
@@ -1058,7 +1058,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.App
// Generic File Interface options.
// File Interface - Row Column values.
systemCodes[Sbm.SystemCode.FileInterface_RowColValue] = new List<TypeCodeDesc>()
systemCodes[Sbm.ApplicationCode.FileInterface_RowColValue] = new List<TypeCodeDesc>()
{
new TypeCodeDesc((int)Sbm.FileInterface_RowColValue.Row, "Row", "Row"),
new TypeCodeDesc((int)Sbm.FileInterface_RowColValue.Col, "Col", "Column"),
@@ -1066,7 +1066,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.App
};
// File Interface - Mode.
systemCodes[Sbm.SystemCode.FileInterface_Mode] = new List<TypeCodeDesc>()
systemCodes[Sbm.ApplicationCode.FileInterface_Mode] = new List<TypeCodeDesc>()
{
new TypeCodeDesc((int)Sbm.FileInterface_Mode.Csv, "CSV", "Comma separated file (csv)", ""),
new TypeCodeDesc((int)Sbm.FileInterface_Mode.MsExcel, "MSExcel", "MS Excel workbook", "")
@@ -1074,7 +1074,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.App
//---------------------------------------------------------------
// System User configuration.
systemCodes[Sbm.SystemCode.OrgOption_SystemUserRight] = new List<TypeCodeDesc>()
systemCodes[Sbm.ApplicationCode.OrgOption_SystemUserRight] = new List<TypeCodeDesc>()
{
new TypeCodeDesc((int)Sbm.SystemUserRight.AllAccounts, "AllAccounts", "All accounts"),
new TypeCodeDesc((int)Sbm.SystemUserRight.Admin, "Admin", "Admin"),
+14 -11
View File
@@ -1,5 +1,4 @@
using Sarand.BusinessMgr.Net.Standard.Base.Consoles;
using Sarand.BusinessMgr.Net.Standard.Base.Core;
using Sarand.BusinessMgr.Net.Standard.Base.Mgr;
using Sarand.BusinessMgr.Net.Standard.Base.Mgr.Control;
using Sarand.Net.Standard.Base.App;
@@ -16,7 +15,6 @@ using Sarand.Net.Standard.Base.UpdateLog;
using Sarand.Net.Standard.Base.Utils;
using System;
using System.Collections.Generic;
using System.Linq;
namespace Sarand.BusinessMgr.Net.Standard.Base.App
{
@@ -25,10 +23,12 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.App
{
//-------------------------------------------------------------------
// Data members.
private static short assetCommodityTypeAllowed = -1;
//-------------------------------------------------------------------
// Extended logging options.
public enum ExtendedLogginOption
{
SecurityProfile,
@@ -44,6 +44,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.App
//-------------------------------------------------------------------
// Construction - use derived objects.
protected SbmSystem(PropertySet properties)
{
// Configure extended logging.
@@ -52,6 +53,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.App
//-------------------------------------------------------------------
// Application definitions.
public static Sbm.SessionConfig GetSessionConfigType(String consoleProperty)
{
if (consoleProperty.ContainsCI("Sarand"))
@@ -85,19 +87,19 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.App
}
//-------------------------------------------------------------------
// S y s t e m C o d e s
//-------------------------------------------------------------------
public static List<TypeCodeDesc> GetSystemCodes(Sbm.SystemCode systemCode)
// Application codes.
public static List<TypeCodeDesc> GetSystemCodes(Sbm.ApplicationCode applicationCode)
{
List<TypeCodeDesc> codes = systemCodes.GetValueOrDefault(systemCode);
List<TypeCodeDesc> codes = systemCodes.GetValueOrDefault(applicationCode);
if (codes == null)
SaLogger.Warn($"{SysUtil.Fn} Unrecognised system code type: {systemCode}.");
SaLogger.Warn($"{SysUtil.Fn} Unrecognised system code type: {applicationCode}.");
return codes;
}
//-------------------------------------------------------------------
// D a t a M a n a g e r s
//-------------------------------------------------------------------
// Data Managers.
public abstract SbmAccountMgr CreateAccountMgr(SbmInternals internals);
public abstract SbmAssetMgr CreateAssetMgr(SbmInternals internals);
public abstract SbmCommodityMgr CreateCommodityMgr(SbmInternals internals);
@@ -113,6 +115,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.App
//-------------------------------------------------------------------
// Consoles.
public abstract SbmSessionConsole CreateSessionConsole(SbmInternals internals);
public abstract SaDiaryConsole CreateDiaryConsole(SbmInternals internals);
public abstract SaSecurityConsole CreateSecurityConsole(SbmInternals internals);
@@ -126,8 +129,8 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.App
public abstract SbmEmailConsole CreateEmailConsole(SbmEmailConfig emailConfig);
//-------------------------------------------------------------------
// A p p l i c a t i o n P r o p e r t i e s
//-------------------------------------------------------------------
// Application Properties.
public bool IsExtendedLogging(ExtendedLogginOption extendedLoggingOption)
{
if (extendedLoggingOptions == null) return false;
@@ -1,5 +1,4 @@
using Sarand.BusinessMgr.Net.Standard.Base.App;
using Sarand.BusinessMgr.Net.Standard.Base.Core;
using Sarand.Net.Standard.Base.Bus;
using Sarand.Net.Standard.Base.Core;
using Sarand.Net.Standard.Base.Utils;
@@ -550,10 +549,13 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.Bus
}
// Association type.
public static bool TypeIsValid(Sbm.AssociationType associationType)
{
return (associationType > 0);
}
public bool TypeIsValid()
{
if (AssociationType > 0) return true;
return false;
return TypeIsValid(AssociationType);
}
public bool IsOfType(Sbm.AssociationType associationType)
{
@@ -1870,7 +1870,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.Bus
if (IdsIncluded.Count > 0) values.Add("Included commodities", IdsIncluded.Count.ToString());
if (IdsExcluded.Count > 0) values.Add("Excluded commodities", IdsExcluded.Count.ToString());
// Commodity type.
if (CommodityType > 0) values.Add("Type", SbmSystem.GetSystemCodes(Sbm.SystemCode.CommodityType).GetDescForType(CommodityType, CommodityType.ToString()));
if (CommodityType > 0) values.Add("Type", SbmSystem.GetSystemCodes(Sbm.ApplicationCode.CommodityType).GetDescForType(CommodityType, CommodityType.ToString()));
else if (CommodityType == Sbm.CommodityType.AnyProduct) values.Add("Type", "Any product");
if (StockItemsOnly) values.Add("Stock items only", "True");
// Commodity code.
@@ -284,7 +284,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.Bus
PurchaseCostsPopulated = true;
int decimalsPercent = 2;
List<TypeCodeDesc> ItemLinkDataTypes = SbmSystem.GetSystemCodes(Sbm.SystemCode.ItemLinkData);
List<TypeCodeDesc> ItemLinkDataTypes = SbmSystem.GetSystemCodes(Sbm.ApplicationCode.ItemLinkData);
String dataTypeCostProportion = ItemLinkDataTypes.GetCodeForType(Sbm.ItemLinkData.Requirement_AssocItem_PurchaseCostProportion);
if (itemLinks == null)
{
@@ -1,15 +1,11 @@
using Sarand.BusinessMgr.Net.Standard.Base.App;
using Sarand.BusinessMgr.Net.Standard.Base.Consoles;
using Sarand.BusinessMgr.Net.Standard.Base.Core;
using Sarand.Net.Standard.Base.Bus;
using Sarand.Net.Standard.Base.Core;
using Sarand.Net.Standard.Base.Dbas;
using Sarand.Net.Standard.Base.Utils;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text.RegularExpressions;
using System.Transactions;
namespace Sarand.BusinessMgr.Net.Standard.Base.Bus
{
@@ -801,7 +797,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.Bus
public static List<TypeCodeDesc> GetTransactionStatusCats(Sbm.TransactionType transactionType)
{
List<TypeCodeDesc> statusCats = new List<TypeCodeDesc>();
List<TypeCodeDesc> statusCatsFull = SbmSystem.GetSystemCodes(Sbm.SystemCode.TransactionStatusCat);
List<TypeCodeDesc> statusCatsFull = SbmSystem.GetSystemCodes(Sbm.ApplicationCode.TransactionStatusCat);
switch (transactionType)
{
// NB Changes here may also need to be made in GetTaxEffectiveDate()
@@ -1023,7 +1019,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.Bus
bool updateRequired = true;
if (messageConsole != null)
{
String transactionType = SbmSystem.GetSystemCodes(Sbm.SystemCode.TransactionStatusCat).GetDescForType(TransactionType);
String transactionType = SbmSystem.GetSystemCodes(Sbm.ApplicationCode.TransactionStatusCat).GetDescForType(TransactionType);
if (StringUtil.IsEmpty(transactionType)) transactionType = "Transaction";
String message =
"The earliest 'Required' date against unclosed\nrequirements for this " + transactionType + " is " +
@@ -1060,7 +1056,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.Bus
bool completeTransaction = true;
if (messageConsole != null)
{
String transactionType = SbmSystem.GetSystemCodes(Sbm.SystemCode.TransactionStatusCat).GetDescForType(TransactionType);
String transactionType = SbmSystem.GetSystemCodes(Sbm.ApplicationCode.TransactionStatusCat).GetDescForType(TransactionType);
if (StringUtil.IsEmpty(transactionType)) transactionType = "Transaction";
String message =
"All of the requirements against this " + transactionType + "\nhave been completed.\n\nSet the status to 'Completed'?";
@@ -1651,6 +1647,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.Bus
// Test each 'significant' element of the filter and return 'false' if any of the values are set.
// NB Elements without a test in the list below are not regarded as 'significant'.
if (ForceFullResults) return false;
if (ResultsPaging.Paged) return false;
if (IdsIncluded.Count > 0) return false;
if (SysId.IsValid(TransIdSource)) return false;
if (StatusCat == StatusCat.Pending || StatusCat == StatusCat.Open) return false;
@@ -327,7 +327,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.Consoles
itemOption.DisplayOptions.Group = OptionGroup_Data;
itemOption.Name = sageStatics.InterfaceOptions.GetCodeForType(QuickBooksInterfaceOption.TaxCodeColumn);
itemOption.DisplayOptions.Caption = sageStatics.InterfaceOptions.GetDescForType(QuickBooksInterfaceOption.TaxCodeColumn);
itemOption.DisplayOptions.Values.AddRange(Internals.GetSystemCodes(Sbm.SystemCode.OrgOption_TaxCodeColumn));
itemOption.DisplayOptions.Values.AddRange(Internals.GetApplicationCodes(Sbm.ApplicationCode.OrgOption_TaxCodeColumn));
//itemOption.DefaultValue = SbmDbDfn.GetColumnName(SbmDbDfn.ColumnIdx.TaxCode_CodeAlt1);
interfaceItemOptionDfns.Add(itemOption);
@@ -556,7 +556,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.Consoles
itemOption.DisplayOptions.Group = OptionGroup_Stock;
itemOption.Name = sageStatics.InterfaceOptions.GetCodeForType(SageInterfaceOption.TaxCodeColumn);
itemOption.DisplayOptions.Caption = sageStatics.InterfaceOptions.GetDescForType(SageInterfaceOption.TaxCodeColumn);
itemOption.DisplayOptions.Values.AddRange(Internals.GetSystemCodes(Sbm.SystemCode.OrgOption_TaxCodeColumn));
itemOption.DisplayOptions.Values.AddRange(Internals.GetApplicationCodes(Sbm.ApplicationCode.OrgOption_TaxCodeColumn));
//itemOption.DefaultValue = SbmDbDfn.GetColumnName(SbmDbDfn.ColumnIdx.TaxCode_CodeAlt1);
interfaceItemOptionDfns.Add(itemOption);
@@ -75,7 +75,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.Consoles
mbr = new DataMembers(internalsSupplied);
sageParams = new SageParams(Internals);
qbkParams = new QBooksParams(Internals);
mbr.InterfaceOptions.AddRange(Internals.GetSystemCodes(Sbm.SystemCode.InterfaceOption));
mbr.InterfaceOptions.AddRange(Internals.GetApplicationCodes(Sbm.ApplicationCode.InterfaceOption));
Reset();
}
@@ -1,14 +1,12 @@
using Sarand.BusinessMgr.Net.Standard.Base.App;
using Sarand.Net.Standard.Base.CodeTypes;
using Sarand.Net.Standard.Base.Dbas;
using Sarand.Net.Standard.Base.Interfaces;
using Sarand.Net.Standard.Base.ItemOptions;
using Sarand.Net.Standard.Base.Security;
using Sarand.Net.Standard.Base.Utils;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Sarand.BusinessMgr.Net.Standard.Base.Consoles
{
@@ -165,6 +163,36 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.Consoles
return (SaItemOptionDbDfn.MaxTextLen > 1 ? Math.Min(SaItemOptionDbDfn.MaxTextLen, columnLength) : columnLength);
}
//-------------------------------------------------------------------
// Interface Column lengths - taking into account current database schema for selected columns.
public ulong GetColTextLen(SaInterfaceDbDfn.ColumnIdx column)
{
// Intercept columns that may have different lengths on the database.
if (db != null && InterfaceColumnLengths.ContainsKey(column))
{
if (InterfaceColumnLengths[column] == 0)
InterfaceColumnLengths[column] = GetDbColTextLen(column);
if (InterfaceColumnLengths[column] > 0)
return InterfaceColumnLengths[column];
}
return SaInterfaceDbDfn.GetColTextLen(column);
}
// Interface columns that may differ in length on the db.
private readonly Dictionary<SaInterfaceDbDfn.ColumnIdx, ulong> InterfaceColumnLengths = new Dictionary<SaInterfaceDbDfn.ColumnIdx, ulong>()
{
{ SaInterfaceDbDfn.ColumnIdx.SaInterface_Code, 0},
{ SaInterfaceDbDfn.ColumnIdx.SaInterface_Caption, 0},
};
public ulong GetDbColTextLen(SaInterfaceDbDfn.ColumnIdx column)
{
// Get the column's length from the currently open database:
if (SaInterfaceDbDfn.GetColDataType(column) != DbColumnDataType.VarChar) return 0;
DbDfnTable dfnTable = db.GetTableDfn(SaInterfaceDbDfn.GetTableName(SaInterfaceDbDfn.GetTableForColumn(column), false));
String columnName = SaInterfaceDbDfn.GetColumnName(column, false);
ulong columnLength = (ulong)(dfnTable.Columns.Find(col => col.Name.EqualsCI(columnName))?.Size ?? 0);
return (SaInterfaceDbDfn.MaxTextLen > 1 ? Math.Min(SaInterfaceDbDfn.MaxTextLen, columnLength) : columnLength);
}
//-------------------------------------------------------------------
}
//=======================================================================
@@ -337,7 +337,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.Consoles
{
// Build the list of transaction types that are allowed to be raised from the specified type.
List<TypeCodeDesc> transTypes = new List<TypeCodeDesc>();
if (mbr.TransactionTypes_Full == null) mbr.TransactionTypes_Full = Internals.GetSystemCodes(Sbm.SystemCode.TransactionType);
if (mbr.TransactionTypes_Full == null) mbr.TransactionTypes_Full = Internals.GetApplicationCodes(Sbm.ApplicationCode.TransactionType);
foreach (TypeCodeDesc transTypeTo in mbr.TransactionTypes_Full)
{
//if ((Sbm.TransactionType)typeTo.iType == typeFrom) continue;
@@ -352,7 +352,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.Consoles
{
// Build the list of transaction types that are allowed to be raised to the specified type.
List<TypeCodeDesc> transTypes = new List<TypeCodeDesc>();
if (mbr.TransactionTypes_Full.Count == 0) mbr.TransactionTypes_Full = Internals.GetSystemCodes(Sbm.SystemCode.TransactionType);
if (mbr.TransactionTypes_Full.Count == 0) mbr.TransactionTypes_Full = Internals.GetApplicationCodes(Sbm.ApplicationCode.TransactionType);
//transTypes_Full.GotoStart();
foreach (TypeCodeDesc transTypeTo in mbr.TransactionTypes_Full)
{
@@ -55,13 +55,13 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.Mgr
// Properties.
public abstract bool SystemAccountDatabaseIsValid { get; }
// System codes.
protected List<TypeCodeDesc> AffiliateTypes { get { return GetSystemCodes(Sbm.SystemCode.AffiliateType); } }
protected List<TypeCodeDesc> AssociationTypes { get { return GetSystemCodes(Sbm.SystemCode.AssociationType); } }
protected List<TypeCodeDesc> AddressTypes { get { return GetSystemCodes(Sbm.SystemCode.AddressType); } }
protected List<TypeCodeDesc> SysParamCategories { get { return GetSystemCodes(Sbm.SystemCode.SysParamCategory); } }
protected List<TypeCodeDesc> TransactionStatusCats { get { return GetSystemCodes(Sbm.SystemCode.TransactionStatusCat); } }
protected List<TypeCodeDesc> DiscountTypes { get { return GetSystemCodes(Sbm.SystemCode.DiscountType); } }
protected List<TypeCodeDesc> SystemAccountTypes { get { return GetSystemCodes(Sbm.SystemCode.SystemAccountType); } }
protected List<TypeCodeDesc> AffiliateTypes { get { return GetSystemCodes(Sbm.ApplicationCode.AffiliateType); } }
protected List<TypeCodeDesc> AssociationTypes { get { return GetSystemCodes(Sbm.ApplicationCode.AssociationType); } }
protected List<TypeCodeDesc> AddressTypes { get { return GetSystemCodes(Sbm.ApplicationCode.AddressType); } }
protected List<TypeCodeDesc> SysParamCategories { get { return GetSystemCodes(Sbm.ApplicationCode.SysParamCategory); } }
protected List<TypeCodeDesc> TransactionStatusCats { get { return GetSystemCodes(Sbm.ApplicationCode.TransactionStatusCat); } }
protected List<TypeCodeDesc> DiscountTypes { get { return GetSystemCodes(Sbm.ApplicationCode.DiscountType); } }
protected List<TypeCodeDesc> SystemAccountTypes { get { return GetSystemCodes(Sbm.ApplicationCode.SystemAccountType); } }
// Code types.
public override List<Sbm.ApplCodeType> SupportedCodeTypes { get { return new List<Sbm.ApplCodeType>(supportedCodeTypes); } }
@@ -115,7 +115,8 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.Mgr
public virtual bool IsValidAssociationData(SbmAssociation.Data data, SbmAssociation.ErrField errField)
{
ClearErrorState();
// Association properties.
// Association must have valid Owner and Target.
if (errField.AffiliateIdOwner != SacsHierarchyItem.ValidValue.Ignore && !SysId.IsValid(data.AffiliateIdOwner))
{
errField.AffiliateIdOwner = SacsHierarchyItem.ValidValue.Invalid;
@@ -126,14 +127,15 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.Mgr
errField.AffiliateIdTarget = SacsHierarchyItem.ValidValue.Invalid;
return SetErrorState("Target must be supplied");
}
if (errField.AssociationType != SacsHierarchyItem.ValidValue.Ignore && (short)data.AssociationType < 1)
// Association must have valid type.
if (errField.AssociationType != SacsHierarchyItem.ValidValue.Ignore && !SbmAssociation.TypeIsValid(data.AssociationType))
{
if ((int)data.AssociationType < 1)
{
errField.AssociationType = SacsHierarchyItem.ValidValue.Invalid;
return SetErrorState("Association type must be supplied");
}
errField.AssociationType = SacsHierarchyItem.ValidValue.Invalid;
return SetErrorState("Association type must be supplied");
}
// Validate text fields.
if (errField.Code != SacsHierarchyItem.ValidValue.Ignore && !IsValidValue(data.Code, "code", (long)Internals.GetColTextLen(SbmDbDfn.ColumnIdx.Association_Code)))
{
errField.Code = SacsHierarchyItem.ValidValue.Invalid;
@@ -184,6 +186,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.Mgr
errField.InvoiceDesc = SacsHierarchyItem.ValidValue.Invalid;
return false;
}
// Association codes.
if (errField.AccountManagerCode != SacsHierarchyItem.ValidValue.Ignore && !IsValidValue(data.AccountManagerCode, " account manager code", (long)Internals.GetColTextLen(SbmDbDfn.ColumnIdx.Association_AccountManagerCode)))
{
@@ -225,6 +228,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.Mgr
errField.ContactCallCycleCode = SacsHierarchyItem.ValidValue.Invalid;
return false;
}
if (errField.CommodityIdSalesDefault != SacsHierarchyItem.ValidValue.Ignore && SysId.IsValid(data.CommodityIdSalesDefault))
{
if (data.AssociationType != Sbm.AssociationType.Customer)
@@ -233,6 +237,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.Mgr
return SetErrorState("Default sales Commodity can only be assigned to customers");
}
}
if (errField.OrderLeadTimeCode != SacsHierarchyItem.ValidValue.Ignore && !IsValidValue(data.OrderLeadTimeCode, "order lead time code", (long)Internals.GetColTextLen(SbmDbDfn.ColumnIdx.Association_OrderLeadTimeCode)))
{
errField.OrderLeadTimeCode = SacsHierarchyItem.ValidValue.Invalid;
@@ -258,6 +263,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.Mgr
errField.DeliveryBookInCode = SacsHierarchyItem.ValidValue.Invalid;
return false;
}
// Numeric values.
if (errField.AmountTransMax != SacsHierarchyItem.ValidValue.Ignore && data.AmountTransMax < 0.0m)
{
@@ -281,11 +287,13 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.Mgr
errField.DiscountRate = SacsHierarchyItem.ValidValue.Invalid;
return SetErrorState("Discount Rate must not be negative");
}
/* Not applied in desktop application.
if (data.DiscountRate > 0.0m && (short)data.DiscountType < 1)
{
errField.DiscountRate = SacsHierarchyItem.ValidValue.Invalid;
return SetErrorState("Discount Type must be specified if a Rate is supplied");
}
*/
}
if (errField.PaymentTerms != SacsHierarchyItem.ValidValue.Ignore && data.PaymentTerms < 0)
{
@@ -220,7 +220,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.Mgr
OrganisationOptionData orgOptData = new OrganisationOptionData();
// Option types.
orgOptData.associationOptionTypes.AddRange(Internals.GetSystemCodes(Sbm.SystemCode.AssociationOption));
orgOptData.associationOptionTypes.AddRange(Internals.GetApplicationCodes(Sbm.ApplicationCode.AssociationOption));
// Yes/No.
orgOptData.Values_YesNo.Add(orgOptData.Value_Yes, "Yes");
@@ -243,7 +243,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.Mgr
bool bAllowInterfaces_File = (bAllowInterfaces && SessionConsole.AllowInterfaceCategory(SaInterfaceCategory.File));
// Values:
List<TypeCodeDesc> orgOptionValues = Internals.GetSystemCodes(Sbm.SystemCode.OrgOption_Value);
List<TypeCodeDesc> orgOptionValues = Internals.GetApplicationCodes(Sbm.ApplicationCode.OrgOption_Value);
if (bAllowTransactions)
{
orgOptData.Contexts_Value.Add(orgOptionValues.GetCodeDescForType(Sbm.OrgOption_Value.MaxTransactionsQueriedForEmptyFilter));
@@ -268,7 +268,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.Mgr
}
// Folders:
List<TypeCodeDesc> lOrgOptionFolder = Internals.GetSystemCodes(Sbm.SystemCode.OrgOption_Folder);
List<TypeCodeDesc> lOrgOptionFolder = Internals.GetApplicationCodes(Sbm.ApplicationCode.OrgOption_Folder);
if (bAllowCommodities)
{
orgOptData.Contexts_Folder.Add(lOrgOptionFolder.GetCodeDescForType(Sbm.OrgOption_Folder.CommodityImage));
@@ -276,7 +276,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.Mgr
}
// Allow option contexts:
List<TypeCodeDesc> lAllowOption = Internals.GetSystemCodes(Sbm.SystemCode.OrgOption_AllowOption);
List<TypeCodeDesc> lAllowOption = Internals.GetApplicationCodes(Sbm.ApplicationCode.OrgOption_AllowOption);
if (bAllowContacts)
{
orgOptData.Contexts_AllowOption.Add(lAllowOption.GetCodeDescForType(Sbm.OrgOption_AllowOption.UpdateAssociationCode));
@@ -341,11 +341,11 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.Mgr
}
// Caption contexts:
orgOptData.Contexts_Caption.AddRange(Internals.GetSystemCodes(Sbm.SystemCode.OrgOption_Caption));
orgOptData.Contexts_Caption.AddRange(Internals.GetApplicationCodes(Sbm.ApplicationCode.OrgOption_Caption));
// Show field contexts.
// NB This list must be kept up to date with equivalent in 'SapphireConsole::DisplayAttribute':
List<TypeCodeDesc> lShowField = Internals.GetSystemCodes(Sbm.SystemCode.OrgOption_ShowField);
List<TypeCodeDesc> lShowField = Internals.GetApplicationCodes(Sbm.ApplicationCode.OrgOption_ShowField);
if (ColumnExists(SbmDbDfn.ColumnIdx.Association_AnnualSalesTarget))
orgOptData.Contexts_ShowField.Add(lShowField.GetCodeDescForType(SbmDbDfn.ColumnIdx.Association_AnnualSalesTarget));
if (ColumnExists(SbmDbDfn.ColumnIdx.Address_LastVisitOn))
@@ -376,7 +376,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.Mgr
}
// Show column contexts:
List<TypeCodeDesc> lShowColumn = Internals.GetSystemCodes(Sbm.SystemCode.OrgOption_ShowColumn);
List<TypeCodeDesc> lShowColumn = Internals.GetApplicationCodes(Sbm.ApplicationCode.OrgOption_ShowColumn);
if (bAllowSalesOrders)
{
if (ColumnExists(SbmDbDfn.ColumnIdx.Association_AnnualSalesTarget))
@@ -426,7 +426,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.Mgr
orgOptData.Contexts_ShowColumn.Add(lShowColumn.GetCodeDescForType(Sbm.OrgOption_ShowColumn.Vehicle_KeyLocation));
// Field label contexts:
List<TypeCodeDesc> lFieldLabel = Internals.GetSystemCodes(Sbm.SystemCode.OrgOption_FieldLabel);
List<TypeCodeDesc> lFieldLabel = Internals.GetApplicationCodes(Sbm.ApplicationCode.OrgOption_FieldLabel);
orgOptData.Contexts_FieldLabelAssoc.Add(lFieldLabel.GetCodeDescForType(SbmDbDfn.ColumnIdx.Commodity_CatalogRef));
orgOptData.Contexts_FieldLabelAssoc.Add(lFieldLabel.GetCodeDescForType(SbmDbDfn.ColumnIdx.Commodity_Dimensions));
orgOptData.Contexts_FieldLabelAssoc.Add(lFieldLabel.GetCodeDescForType(SbmDbDfn.ColumnIdx.Commodity_ICNTariffCode));
@@ -466,7 +466,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.Mgr
}
// Commodity status filter.
List<TypeCodeDesc> lCmdStatusCat = Internals.GetSystemCodes(Sbm.SystemCode.CommodityStatusCat);
List<TypeCodeDesc> lCmdStatusCat = Internals.GetApplicationCodes(Sbm.ApplicationCode.CommodityStatusCat);
orgOptData.Values_CommodityStatusCat.Add(lCmdStatusCat.GetCodeDescForType(SbmCommodity.StatusCat.Any));
orgOptData.Values_CommodityStatusCat.Add(lCmdStatusCat.GetCodeDescForType(SbmCommodity.StatusCat.Current));
@@ -476,12 +476,12 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.Mgr
// Container status caption.
if (CommodityMgr.ContainerDatabaseIsValid && StockControlConfig.AllowStockContainers())
orgOptData.Contexts_ContainerStatus.AddRange(Internals.GetSystemCodes(Sbm.SystemCode.OrgOption_ContainerStatusCaption));
orgOptData.Contexts_ContainerStatus.AddRange(Internals.GetApplicationCodes(Sbm.ApplicationCode.OrgOption_ContainerStatusCaption));
// Generic options:
orgOptData.Contexts_Minutes.AddRange(Internals.GetSystemCodes(Sbm.SystemCode.OrgOption_Minutes));
orgOptData.Contexts_PeriodDays.AddRange(Internals.GetSystemCodes(Sbm.SystemCode.OrgOption_PeriodDays));
orgOptData.Contexts_PeriodWeeks.AddRange(Internals.GetSystemCodes(Sbm.SystemCode.OrgOption_PeriodWeeks));
orgOptData.Contexts_Minutes.AddRange(Internals.GetApplicationCodes(Sbm.ApplicationCode.OrgOption_Minutes));
orgOptData.Contexts_PeriodDays.AddRange(Internals.GetApplicationCodes(Sbm.ApplicationCode.OrgOption_PeriodDays));
orgOptData.Contexts_PeriodWeeks.AddRange(Internals.GetApplicationCodes(Sbm.ApplicationCode.OrgOption_PeriodWeeks));
// Minutes.
for (int iMins = 0; iMins <= 30; iMins++)
@@ -535,7 +535,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.Mgr
orgOptData.Values_PeriodWeeks.Add("30", "30 weeks");
// Numeric Decimals:
orgOptData.Contexts_NumericDecimals.AddRange(Internals.GetSystemCodes(Sbm.SystemCode.OrgOption_NumericDecimals));
orgOptData.Contexts_NumericDecimals.AddRange(Internals.GetApplicationCodes(Sbm.ApplicationCode.OrgOption_NumericDecimals));
orgOptData.Values_Decimals_0To2.Add("0", "None");
orgOptData.Values_Decimals_0To2.Add("1", "1 places");
orgOptData.Values_Decimals_0To2.Add("2", "2 places");
@@ -546,11 +546,11 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.Mgr
orgOptData.Values_Decimals_0To4.Add("4", "4 places");
// Commodity types.
orgOptData.Contexts_CommodityType.AddRange(Internals.GetSystemCodes(Sbm.SystemCode.CommodityType));
orgOptData.Values_CommodityTypes.AddRange(Internals.GetSystemCodes(Sbm.SystemCode.CommodityType));
orgOptData.Contexts_CommodityType.AddRange(Internals.GetApplicationCodes(Sbm.ApplicationCode.CommodityType));
orgOptData.Values_CommodityTypes.AddRange(Internals.GetApplicationCodes(Sbm.ApplicationCode.CommodityType));
// Sales locations.
orgOptData.Contexts_SalesLocation.AddRange(Internals.GetSystemCodes(Sbm.SystemCode.OrgOption_StockLocation));
orgOptData.Contexts_SalesLocation.AddRange(Internals.GetApplicationCodes(Sbm.ApplicationCode.OrgOption_StockLocation));
SbmLocation.Params prmLocation = new SbmLocation.Params();
prmLocation.RestrictToSalesStock = true;
prmLocation.StatusCat = SbmLocation.StatusCat.ActiveOnly;
+1 -1
View File
@@ -31,7 +31,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.Mgr
//-------------------------------------------------------------------
// Properties.
public List<TypeCodeDesc> AssetTypes { get { return GetSystemCodes(Sbm.SystemCode.AssetType); } }
public List<TypeCodeDesc> AssetTypes { get { return GetSystemCodes(Sbm.ApplicationCode.AssetType); } }
//-------------------------------------------------------------------
// Utilities.
@@ -53,14 +53,14 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.Mgr
public abstract bool ContainerDatabaseIsValid { get; }
public abstract bool PortfolioDatabaseIsValid { get; }
// Code lists.
public List<TypeCodeDesc> CommodityTypes { get { return GetSystemCodes(Sbm.SystemCode.CommodityType); } }
public List<TypeCodeDesc> ContainerCategories { get { return GetSystemCodes(Sbm.SystemCode.ContainerCategory); } }
public List<TypeCodeDesc> ContainerTypes { get { return GetSystemCodes(Sbm.SystemCode.ContainerType); } }
public List<TypeCodeDesc> PortfolioItemTypes { get { return GetSystemCodes(Sbm.SystemCode.PortfolioItemType); } }
public List<TypeCodeDesc> CommodityStatusCats { get { return GetSystemCodes(Sbm.SystemCode.CommodityStatusCat); } }
public List<TypeCodeDesc> TransactionTypes { get { return GetSystemCodes(Sbm.SystemCode.TransactionType); } }
public List<TypeCodeDesc> TransactionStatusCats { get { return GetSystemCodes(Sbm.SystemCode.TransactionStatusCat); } }
public List<TypeCodeDesc> RequirementStatusCats { get { return GetSystemCodes(Sbm.SystemCode.RequirementStatusCat); } }
public List<TypeCodeDesc> CommodityTypes { get { return GetSystemCodes(Sbm.ApplicationCode.CommodityType); } }
public List<TypeCodeDesc> ContainerCategories { get { return GetSystemCodes(Sbm.ApplicationCode.ContainerCategory); } }
public List<TypeCodeDesc> ContainerTypes { get { return GetSystemCodes(Sbm.ApplicationCode.ContainerType); } }
public List<TypeCodeDesc> PortfolioItemTypes { get { return GetSystemCodes(Sbm.ApplicationCode.PortfolioItemType); } }
public List<TypeCodeDesc> CommodityStatusCats { get { return GetSystemCodes(Sbm.ApplicationCode.CommodityStatusCat); } }
public List<TypeCodeDesc> TransactionTypes { get { return GetSystemCodes(Sbm.ApplicationCode.TransactionType); } }
public List<TypeCodeDesc> TransactionStatusCats { get { return GetSystemCodes(Sbm.ApplicationCode.TransactionStatusCat); } }
public List<TypeCodeDesc> RequirementStatusCats { get { return GetSystemCodes(Sbm.ApplicationCode.RequirementStatusCat); } }
// Code types.
public override List<Sbm.ApplCodeType> SupportedCodeTypes { get { return new List<Sbm.ApplCodeType>(supportedCodeTypes); } }
+8 -6
View File
@@ -166,8 +166,8 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.Mgr
//-------------------------------------------------------------------
// Properties.
// System codes.
protected List<TypeCodeDesc> ItemTypes { get { return GetSystemCodes(Sbm.SystemCode.ItemType); } }
protected List<TypeCodeDesc> InterfaceOptionCodes { get { return GetSystemCodes(Sbm.SystemCode.InterfaceOption); } }
protected List<TypeCodeDesc> ItemTypes { get { return GetSystemCodes(Sbm.ApplicationCode.ItemType); } }
protected List<TypeCodeDesc> InterfaceOptionCodes { get { return GetSystemCodes(Sbm.ApplicationCode.InterfaceOption); } }
// Numeric control values.
protected int WeightDecimals { get { InitialiseNumericControlValues(); return mbr.weightDecimals; } }
protected int LengthDecimals { get { InitialiseNumericControlValues(); return mbr.lengthDecimals; } }
@@ -247,9 +247,10 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.Mgr
//-------------------------------------------------------------------
// Utilities.
public List<TypeCodeDesc> GetSystemCodes(Sbm.SystemCode systemCode)
public List<TypeCodeDesc> GetSystemCodes(Sbm.ApplicationCode applicationCode)
{
return Internals.GetSystemCodes(systemCode);
return Internals.GetApplicationCodes(applicationCode);
}
// Database utilities.
@@ -274,6 +275,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.Mgr
//-------------------------------------------------------------------
// Session console utilities.
public bool AllowConfigOption(Sbm.ConfigOption configOption)
{
return SessionConsole.AllowOption(configOption);
@@ -296,8 +298,8 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.Mgr
}
//-------------------------------------------------------------------
// C o d e T y p e s
//-------------------------------------------------------------------
// Code Types.
public virtual List<Sbm.ApplCodeType> SupportedCodeTypes { get; } = new List<Sbm.ApplCodeType>();
private CodeTypeCache codeTypeCache;
public bool CodeTypeHasCodes(Sbm.ApplCodeType codeType)
+4 -4
View File
@@ -40,10 +40,10 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.Mgr
// Properties.
public abstract bool PriceDatabaseIsValid { get; }
// System codes.
public List<TypeCodeDesc> PriceTypes { get { return GetSystemCodes(Sbm.SystemCode.PriceType); } }
public List<TypeCodeDesc> PriceCalculationMethods { get { return GetSystemCodes(Sbm.SystemCode.PriceCalcMethod); } }
public List<TypeCodeDesc> PriceRounderMethods { get { return GetSystemCodes(Sbm.SystemCode.PriceRounderMethod); } }
public List<TypeCodeDesc> PriceRounderDirections { get { return GetSystemCodes(Sbm.SystemCode.PriceRounderDirection); } }
public List<TypeCodeDesc> PriceTypes { get { return GetSystemCodes(Sbm.ApplicationCode.PriceType); } }
public List<TypeCodeDesc> PriceCalculationMethods { get { return GetSystemCodes(Sbm.ApplicationCode.PriceCalcMethod); } }
public List<TypeCodeDesc> PriceRounderMethods { get { return GetSystemCodes(Sbm.ApplicationCode.PriceRounderMethod); } }
public List<TypeCodeDesc> PriceRounderDirections { get { return GetSystemCodes(Sbm.ApplicationCode.PriceRounderDirection); } }
// Code types.
public override List<Sbm.ApplCodeType> SupportedCodeTypes { get { return new List<Sbm.ApplCodeType>(supportedCodeTypes); } }
@@ -39,8 +39,8 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.Mgr
// Properties.
public abstract bool ProcessDatabaseIsValid { get; }
// System codes.
public List<TypeCodeDesc> ProcessTypes { get { return GetSystemCodes(Sbm.SystemCode.ProcessType); } }
public List<TypeCodeDesc> processCategories { get { return GetSystemCodes(Sbm.SystemCode.ProcessCategory); } }
public List<TypeCodeDesc> ProcessTypes { get { return GetSystemCodes(Sbm.ApplicationCode.ProcessType); } }
public List<TypeCodeDesc> processCategories { get { return GetSystemCodes(Sbm.ApplicationCode.ProcessCategory); } }
//-------------------------------------------------------------------
}
@@ -24,7 +24,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.Mgr
// Associated codes.
public String GetItemDataCodeForProcessCostCode(SbmProcess.SbmProcessCostCode processCostCode)
{
List<TypeCodeDesc> itemDataTypes = Internals.GetSystemCodes(Sbm.SystemCode.ItemDataType);
List<TypeCodeDesc> itemDataTypes = Internals.GetApplicationCodes(Sbm.ApplicationCode.ItemDataType);
switch (processCostCode)
{
case SbmProcess.SbmProcessCostCode.Fixed_Unit: return itemDataTypes.GetCodeForType(Sbm.ItemDataType.Process_FixedCost_Unit);
+1 -1
View File
@@ -41,7 +41,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.Mgr
//-------------------------------------------------------------------
// Properties.
// Code lists.
public List<TypeCodeDesc> LocationCategories { get { return GetSystemCodes(Sbm.SystemCode.LocationCategory); } }
public List<TypeCodeDesc> LocationCategories { get { return GetSystemCodes(Sbm.ApplicationCode.LocationCategory); } }
//-------------------------------------------------------------------
// Utilities.
@@ -159,7 +159,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.Mgr
case SbmStockLevel.Column.Type_Desc:
{
Sbm.StockLevelType type = (Sbm.StockLevelType)values.GetLong(column.DataName);
value = new DataValue(Internals.GetSystemCodes(Sbm.SystemCode.StockLevelType).GetDescForType(type, $"{type}"));
value = new DataValue(Internals.GetApplicationCodes(Sbm.ApplicationCode.StockLevelType).GetDescForType(type, $"{type}"));
break;
}
@@ -168,7 +168,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.Mgr
case SbmStockLevel.Column.Source_Desc:
{
Sbm.StockLevelSource source = (Sbm.StockLevelSource)values.GetLong(column.DataName);
value = new DataValue(Internals.GetSystemCodes(Sbm.SystemCode.StockLevelSource).GetDescForType(source, $"{source}"));
value = new DataValue(Internals.GetApplicationCodes(Sbm.ApplicationCode.StockLevelSource).GetDescForType(source, $"{source}"));
break;
}
@@ -50,12 +50,12 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.Mgr
//-------------------------------------------------------------------
// Properties.
public List<TypeCodeDesc> TransactionTypes { get { return GetSystemCodes(Sbm.SystemCode.TransactionType); } }
public List<TypeCodeDesc> TransactionStatusCats { get { return GetSystemCodes(Sbm.SystemCode.TransactionStatusCat); } }
public List<TypeCodeDesc> AssociationTypes { get { return GetSystemCodes(Sbm.SystemCode.AssociationType); } }
public List<TypeCodeDesc> RequirementStatusCats { get { return GetSystemCodes(Sbm.SystemCode.RequirementStatusCat); } }
public List<TypeCodeDesc> ConstituentTypes { get { return GetSystemCodes(Sbm.SystemCode.ConstituentType); } }
public List<TypeCodeDesc> ConstituentStatusCats { get { return GetSystemCodes(Sbm.SystemCode.ConstituentStatusCat); } }
public List<TypeCodeDesc> TransactionTypes { get { return GetSystemCodes(Sbm.ApplicationCode.TransactionType); } }
public List<TypeCodeDesc> TransactionStatusCats { get { return GetSystemCodes(Sbm.ApplicationCode.TransactionStatusCat); } }
public List<TypeCodeDesc> AssociationTypes { get { return GetSystemCodes(Sbm.ApplicationCode.AssociationType); } }
public List<TypeCodeDesc> RequirementStatusCats { get { return GetSystemCodes(Sbm.ApplicationCode.RequirementStatusCat); } }
public List<TypeCodeDesc> ConstituentTypes { get { return GetSystemCodes(Sbm.ApplicationCode.ConstituentType); } }
public List<TypeCodeDesc> ConstituentStatusCats { get { return GetSystemCodes(Sbm.ApplicationCode.ConstituentStatusCat); } }
// Code types.
public override List<Sbm.ApplCodeType> SupportedCodeTypes { get { return new List<Sbm.ApplCodeType>(supportedCodeTypes); } }
@@ -1,6 +1,5 @@
using Sarand.BusinessMgr.Net.Standard.Base.App;
using Sarand.BusinessMgr.Net.Standard.Base.Bus;
using Sarand.BusinessMgr.Net.Standard.Base.Consoles;
using Sarand.Net.Standard.Base.App;
using Sarand.Net.Standard.Base.Bus;
using Sarand.Net.Standard.Base.Core;
@@ -9,7 +8,6 @@ using Sarand.Net.Standard.Base.ReferenceData;
using Sarand.Net.Standard.Base.Utils;
using System;
using System.Collections.Generic;
using static Sarand.BusinessMgr.Net.Standard.Base.App.Sbm;
namespace Sarand.BusinessMgr.Net.Standard.Base.Mgr
{
@@ -404,7 +402,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.Mgr
//-------------------------------------------------------------------
// Transaction list.
public abstract ColumnDfn GetTransactionColumnDfn(SbmTransaction.Column columnId, String caption = "", int width = 0);
public abstract List<String> GetTransactionQueryFilter(SbmTransaction.Params prm);
public abstract List<String> GetTransactionQueryFilter(SbmTransaction.Params prm, bool forceFullResults = false);
public abstract long GetTransactionCount(SbmTransaction.Params prm);
public abstract List<SbmTransaction> GetTransactionList(SbmTransaction.Params prm);
public abstract DbResultSet ExecuteTransactionQuery(List<ColumnDfn> columns, SbmTransaction.Params prm);
@@ -36,8 +36,8 @@ namespace Sarand.BusinessMgr.Net.Standard.Dbas.Consoles
protected SbmInterfaceConsole_Dbas(SbmInternals internals) : base(internals.BusMgrDatabase)
{
mbr = new DataMembers(internals);
dataItemTypes = Internals.GetSystemCodes(Sbm.SystemCode.ItemType);
interfaceDataTypes = internals.GetSystemCodes(Sbm.SystemCode.InterfaceDataType);
dataItemTypes = Internals.GetApplicationCodes(Sbm.ApplicationCode.ItemType);
interfaceDataTypes = internals.GetApplicationCodes(Sbm.ApplicationCode.InterfaceDataType);
}
protected override void Dispose(bool disposing)
{
@@ -75,13 +75,13 @@ namespace Sarand.BusinessMgr.Net.Standard.Dbas.Consoles
private List<TypeCodeDesc> GetInterfaceTypesForCategory(SaInterfaceCategory interfaceCategory)
{
if (interfaceCategory == SaInterfaceCategory.Website)
return Internals.GetSystemCodes(Sbm.SystemCode.InterfaceType_Website);
return Internals.GetApplicationCodes(Sbm.ApplicationCode.InterfaceType_Website);
if (interfaceCategory == SaInterfaceCategory.Accounts)
return Internals.GetSystemCodes(Sbm.SystemCode.InterfaceType_Accounts);
return Internals.GetApplicationCodes(Sbm.ApplicationCode.InterfaceType_Accounts);
if (interfaceCategory == SaInterfaceCategory.System)
return Internals.GetSystemCodes(Sbm.SystemCode.InterfaceType_System);
return Internals.GetApplicationCodes(Sbm.ApplicationCode.InterfaceType_System);
if (interfaceCategory == SaInterfaceCategory.File)
return Internals.GetSystemCodes(Sbm.SystemCode.InterfaceType_File);
return Internals.GetApplicationCodes(Sbm.ApplicationCode.InterfaceType_File);
return new List<TypeCodeDesc>();
}
public void RegisterInterfaces(String context)
@@ -129,7 +129,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Dbas.Consoles
{
// Construct list of transaction types and statuses to use in security rights.
List<SysIdString> transactionTypesStatus = new List<SysIdString>();
foreach (TypeCodeDesc transactionType in Internals.GetSystemCodes(Sbm.SystemCode.TransactionType))
foreach (TypeCodeDesc transactionType in Internals.GetApplicationCodes(Sbm.ApplicationCode.TransactionType))
{
Sbm.TransactionType transType = (Sbm.TransactionType)transactionType.Type;
// Only interested in sales quotes and orders for now.
@@ -208,7 +208,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Dbas.Consoles
// Transaction types:
List<SysIdString> transactionTypesDesc = new List<SysIdString>();
List<SysIdString> transactionTypesDescAllowed = new List<SysIdString>();
foreach (TypeCodeDesc transactionType in Internals.GetSystemCodes(Sbm.SystemCode.TransactionType))
foreach (TypeCodeDesc transactionType in Internals.GetApplicationCodes(Sbm.ApplicationCode.TransactionType))
{
if (SessionConsole.AllowTransactionType((Sbm.TransactionType)transactionType.Type))
transactionTypesDescAllowed.Add(new SysId(transactionType.Type), transactionType.Desc);
@@ -235,7 +235,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Dbas.Consoles
// Financial types:
List<SysIdString> financialTypesDesc = new List<SysIdString>();
List<SysIdString> financialTypesDescAllowed = new List<SysIdString>();
foreach (TypeCodeDesc financialType in Internals.GetSystemCodes(Sbm.SystemCode.FinancialType))
foreach (TypeCodeDesc financialType in Internals.GetApplicationCodes(Sbm.ApplicationCode.FinancialType))
{
financialTypesDescAllowed.Add(new SysId(financialType.Type), financialType.Desc);
financialTypesDesc.Add(new SysId(financialType.Type), financialType.Desc);
@@ -10,7 +10,7 @@ using System.Data.Common;
using System.Linq;
//---------------------------------------------------------------------------
// Code generated by Sarand Database Utilities Tue 11-Feb-2025 12:43:45
// Code generated by Sarand Database Utilities Thu 30-Oct-2025 11:27:05
//---------------------------------------------------------------------------
namespace Sarand.BusinessMgr.Net.Standard.Dbas.Internal
{
@@ -10,7 +10,7 @@ using System.Data.Common;
using System.Linq;
//---------------------------------------------------------------------------
// Code generated by Sarand Database Utilities Tue 11-Feb-2025 12:43:45
// Code generated by Sarand Database Utilities Thu 30-Oct-2025 11:27:05
//---------------------------------------------------------------------------
namespace Sarand.BusinessMgr.Net.Standard.Dbas.Internal
{
@@ -10,7 +10,7 @@ using System.Data.Common;
using System.Linq;
//---------------------------------------------------------------------------
// Code generated by Sarand Database Utilities Tue 11-Feb-2025 12:43:45
// Code generated by Sarand Database Utilities Thu 30-Oct-2025 11:27:05
//---------------------------------------------------------------------------
namespace Sarand.BusinessMgr.Net.Standard.Dbas.Internal
{
@@ -10,7 +10,7 @@ using System.Data.Common;
using System.Linq;
//---------------------------------------------------------------------------
// Code generated by Sarand Database Utilities Tue 11-Feb-2025 12:43:45
// Code generated by Sarand Database Utilities Thu 30-Oct-2025 11:27:05
//---------------------------------------------------------------------------
namespace Sarand.BusinessMgr.Net.Standard.Dbas.Internal
{
@@ -10,7 +10,7 @@ using System.Data.Common;
using System.Linq;
//---------------------------------------------------------------------------
// Code generated by Sarand Database Utilities Tue 11-Feb-2025 12:43:45
// Code generated by Sarand Database Utilities Thu 30-Oct-2025 11:27:05
//---------------------------------------------------------------------------
namespace Sarand.BusinessMgr.Net.Standard.Dbas.Internal
{
@@ -10,7 +10,7 @@ using System.Data.Common;
using System.Linq;
//---------------------------------------------------------------------------
// Code generated by Sarand Database Utilities Tue 11-Feb-2025 12:43:45
// Code generated by Sarand Database Utilities Thu 30-Oct-2025 11:27:05
//---------------------------------------------------------------------------
namespace Sarand.BusinessMgr.Net.Standard.Dbas.Internal
{
@@ -10,7 +10,7 @@ using System.Data.Common;
using System.Linq;
//---------------------------------------------------------------------------
// Code generated by Sarand Database Utilities Tue 11-Feb-2025 12:43:45
// Code generated by Sarand Database Utilities Thu 30-Oct-2025 11:27:05
//---------------------------------------------------------------------------
namespace Sarand.BusinessMgr.Net.Standard.Dbas.Internal
{
@@ -10,7 +10,7 @@ using System.Data.Common;
using System.Linq;
//---------------------------------------------------------------------------
// Code generated by Sarand Database Utilities Tue 11-Feb-2025 12:43:45
// Code generated by Sarand Database Utilities Thu 30-Oct-2025 11:27:05
//---------------------------------------------------------------------------
namespace Sarand.BusinessMgr.Net.Standard.Dbas.Internal
{
@@ -10,7 +10,7 @@ using System.Data.Common;
using System.Linq;
//---------------------------------------------------------------------------
// Code generated by Sarand Database Utilities Tue 11-Feb-2025 12:43:45
// Code generated by Sarand Database Utilities Thu 30-Oct-2025 11:27:05
//---------------------------------------------------------------------------
namespace Sarand.BusinessMgr.Net.Standard.Dbas.Internal
{
@@ -10,7 +10,7 @@ using System.Data.Common;
using System.Linq;
//---------------------------------------------------------------------------
// Code generated by Sarand Database Utilities Thu 13-Feb-2025 11:12:01
// Code generated by Sarand Database Utilities Thu 30-Oct-2025 11:25:21
//---------------------------------------------------------------------------
namespace Sarand.BusinessMgr.Net.Standard.Dbas.Internal.Control
{
@@ -10,7 +10,7 @@ using System.Data.Common;
using System.Linq;
//---------------------------------------------------------------------------
// Code generated by Sarand Database Utilities Thu 13-Feb-2025 11:12:01
// Code generated by Sarand Database Utilities Thu 30-Oct-2025 11:25:21
//---------------------------------------------------------------------------
namespace Sarand.BusinessMgr.Net.Standard.Dbas.Internal.Control
{
@@ -10,7 +10,7 @@ using System.Data.Common;
using System.Linq;
//---------------------------------------------------------------------------
// Code generated by Sarand Database Utilities Thu 13-Feb-2025 11:12:01
// Code generated by Sarand Database Utilities Thu 30-Oct-2025 11:25:21
//---------------------------------------------------------------------------
namespace Sarand.BusinessMgr.Net.Standard.Dbas.Internal.Control
{
@@ -10,7 +10,7 @@ using System.Data.Common;
using System.Linq;
//---------------------------------------------------------------------------
// Code generated by Sarand Database Utilities Thu 13-Feb-2025 11:12:01
// Code generated by Sarand Database Utilities Thu 30-Oct-2025 11:25:21
//---------------------------------------------------------------------------
namespace Sarand.BusinessMgr.Net.Standard.Dbas.Internal.Control
{
@@ -10,7 +10,7 @@ using System.Data.Common;
using System.Linq;
//---------------------------------------------------------------------------
// Code generated by Sarand Database Utilities Thu 13-Feb-2025 11:12:01
// Code generated by Sarand Database Utilities Thu 30-Oct-2025 11:25:21
//---------------------------------------------------------------------------
namespace Sarand.BusinessMgr.Net.Standard.Dbas.Internal.Control
{
@@ -10,7 +10,7 @@ using System.Data.Common;
using System.Linq;
//---------------------------------------------------------------------------
// Code generated by Sarand Database Utilities Tue 11-Feb-2025 12:43:45
// Code generated by Sarand Database Utilities Thu 30-Oct-2025 11:27:05
//---------------------------------------------------------------------------
namespace Sarand.BusinessMgr.Net.Standard.Dbas.Internal
{
@@ -10,7 +10,7 @@ using System.Data.Common;
using System.Linq;
//---------------------------------------------------------------------------
// Code generated by Sarand Database Utilities Tue 11-Feb-2025 12:43:45
// Code generated by Sarand Database Utilities Thu 30-Oct-2025 11:27:05
//---------------------------------------------------------------------------
namespace Sarand.BusinessMgr.Net.Standard.Dbas.Internal
{
@@ -10,7 +10,7 @@ using System.Data.Common;
using System.Linq;
//---------------------------------------------------------------------------
// Code generated by Sarand Database Utilities Tue 11-Feb-2025 12:43:45
// Code generated by Sarand Database Utilities Thu 30-Oct-2025 11:27:05
//---------------------------------------------------------------------------
namespace Sarand.BusinessMgr.Net.Standard.Dbas.Internal
{
@@ -10,7 +10,7 @@ using System.Data.Common;
using System.Linq;
//---------------------------------------------------------------------------
// Code generated by Sarand Database Utilities Tue 11-Feb-2025 12:43:45
// Code generated by Sarand Database Utilities Thu 30-Oct-2025 11:27:05
//---------------------------------------------------------------------------
namespace Sarand.BusinessMgr.Net.Standard.Dbas.Internal
{
@@ -10,7 +10,7 @@ using System.Data.Common;
using System.Linq;
//---------------------------------------------------------------------------
// Code generated by Sarand Database Utilities Tue 11-Feb-2025 12:43:45
// Code generated by Sarand Database Utilities Thu 30-Oct-2025 11:27:05
//---------------------------------------------------------------------------
namespace Sarand.BusinessMgr.Net.Standard.Dbas.Internal
{
@@ -10,7 +10,7 @@ using System.Data.Common;
using System.Linq;
//---------------------------------------------------------------------------
// Code generated by Sarand Database Utilities Tue 11-Feb-2025 12:43:45
// Code generated by Sarand Database Utilities Thu 30-Oct-2025 11:27:05
//---------------------------------------------------------------------------
namespace Sarand.BusinessMgr.Net.Standard.Dbas.Internal
{
@@ -10,7 +10,7 @@ using System.Data.Common;
using System.Linq;
//---------------------------------------------------------------------------
// Code generated by Sarand Database Utilities Tue 11-Feb-2025 12:43:45
// Code generated by Sarand Database Utilities Thu 30-Oct-2025 11:27:05
//---------------------------------------------------------------------------
namespace Sarand.BusinessMgr.Net.Standard.Dbas.Internal
{
@@ -10,7 +10,7 @@ using System.Data.Common;
using System.Linq;
//---------------------------------------------------------------------------
// Code generated by Sarand Database Utilities Tue 11-Feb-2025 12:43:45
// Code generated by Sarand Database Utilities Thu 30-Oct-2025 11:27:05
//---------------------------------------------------------------------------
namespace Sarand.BusinessMgr.Net.Standard.Dbas.Internal
{
@@ -10,7 +10,7 @@ using System.Data.Common;
using System.Linq;
//---------------------------------------------------------------------------
// Code generated by Sarand Database Utilities Tue 11-Feb-2025 12:43:45
// Code generated by Sarand Database Utilities Thu 30-Oct-2025 11:27:05
//---------------------------------------------------------------------------
namespace Sarand.BusinessMgr.Net.Standard.Dbas.Internal
{
@@ -10,7 +10,7 @@ using System.Data.Common;
using System.Linq;
//---------------------------------------------------------------------------
// Code generated by Sarand Database Utilities Tue 11-Feb-2025 12:43:45
// Code generated by Sarand Database Utilities Thu 30-Oct-2025 11:27:05
//---------------------------------------------------------------------------
namespace Sarand.BusinessMgr.Net.Standard.Dbas.Internal
{
@@ -10,7 +10,7 @@ using System.Data.Common;
using System.Linq;
//---------------------------------------------------------------------------
// Code generated by Sarand Database Utilities Tue 11-Feb-2025 12:43:45
// Code generated by Sarand Database Utilities Thu 30-Oct-2025 11:27:05
//---------------------------------------------------------------------------
namespace Sarand.BusinessMgr.Net.Standard.Dbas.Internal
{
@@ -10,7 +10,7 @@ using System.Data.Common;
using System.Linq;
//---------------------------------------------------------------------------
// Code generated by Sarand Database Utilities Tue 11-Feb-2025 12:43:45
// Code generated by Sarand Database Utilities Thu 30-Oct-2025 11:27:05
//---------------------------------------------------------------------------
namespace Sarand.BusinessMgr.Net.Standard.Dbas.Internal
{
@@ -10,7 +10,7 @@ using System.Data.Common;
using System.Linq;
//---------------------------------------------------------------------------
// Code generated by Sarand Database Utilities Tue 11-Feb-2025 12:43:45
// Code generated by Sarand Database Utilities Thu 30-Oct-2025 11:27:05
//---------------------------------------------------------------------------
namespace Sarand.BusinessMgr.Net.Standard.Dbas.Internal
{
@@ -10,7 +10,7 @@ using System.Data.Common;
using System.Linq;
//---------------------------------------------------------------------------
// Code generated by Sarand Database Utilities Tue 11-Feb-2025 12:43:45
// Code generated by Sarand Database Utilities Thu 30-Oct-2025 11:27:05
//---------------------------------------------------------------------------
namespace Sarand.BusinessMgr.Net.Standard.Dbas.Internal
{
@@ -10,7 +10,7 @@ using System.Data.Common;
using System.Linq;
//---------------------------------------------------------------------------
// Code generated by Sarand Database Utilities Tue 11-Feb-2025 12:43:45
// Code generated by Sarand Database Utilities Thu 30-Oct-2025 11:27:05
//---------------------------------------------------------------------------
namespace Sarand.BusinessMgr.Net.Standard.Dbas.Internal
{
@@ -10,7 +10,7 @@ using System.Data.Common;
using System.Linq;
//---------------------------------------------------------------------------
// Code generated by Sarand Database Utilities Tue 11-Feb-2025 12:43:45
// Code generated by Sarand Database Utilities Thu 30-Oct-2025 11:27:05
//---------------------------------------------------------------------------
namespace Sarand.BusinessMgr.Net.Standard.Dbas.Internal
{
@@ -10,7 +10,7 @@ using System.Data.Common;
using System.Linq;
//---------------------------------------------------------------------------
// Code generated by Sarand Database Utilities Tue 11-Feb-2025 12:43:45
// Code generated by Sarand Database Utilities Thu 30-Oct-2025 11:27:05
//---------------------------------------------------------------------------
namespace Sarand.BusinessMgr.Net.Standard.Dbas.Internal
{
@@ -10,7 +10,7 @@ using System.Data.Common;
using System.Linq;
//---------------------------------------------------------------------------
// Code generated by Sarand Database Utilities Tue 11-Feb-2025 12:43:45
// Code generated by Sarand Database Utilities Thu 30-Oct-2025 11:27:05
//---------------------------------------------------------------------------
namespace Sarand.BusinessMgr.Net.Standard.Dbas.Internal
{
@@ -10,7 +10,7 @@ using System.Data.Common;
using System.Linq;
//---------------------------------------------------------------------------
// Code generated by Sarand Database Utilities Tue 11-Feb-2025 12:43:45
// Code generated by Sarand Database Utilities Thu 30-Oct-2025 11:27:05
//---------------------------------------------------------------------------
namespace Sarand.BusinessMgr.Net.Standard.Dbas.Internal
{
@@ -10,7 +10,7 @@ using System.Data.Common;
using System.Linq;
//---------------------------------------------------------------------------
// Code generated by Sarand Database Utilities Tue 11-Feb-2025 12:43:45
// Code generated by Sarand Database Utilities Thu 30-Oct-2025 11:27:05
//---------------------------------------------------------------------------
namespace Sarand.BusinessMgr.Net.Standard.Dbas.Internal
{
@@ -10,7 +10,7 @@ using System.Data.Common;
using System.Linq;
//---------------------------------------------------------------------------
// Code generated by Sarand Database Utilities Tue 11-Feb-2025 12:43:45
// Code generated by Sarand Database Utilities Thu 30-Oct-2025 11:27:05
//---------------------------------------------------------------------------
namespace Sarand.BusinessMgr.Net.Standard.Dbas.Internal
{
@@ -10,7 +10,7 @@ using System.Data.Common;
using System.Linq;
//---------------------------------------------------------------------------
// Code generated by Sarand Database Utilities Tue 11-Feb-2025 12:43:45
// Code generated by Sarand Database Utilities Thu 30-Oct-2025 11:27:05
//---------------------------------------------------------------------------
namespace Sarand.BusinessMgr.Net.Standard.Dbas.Internal
{
@@ -10,7 +10,7 @@ using System.Data.Common;
using System.Linq;
//---------------------------------------------------------------------------
// Code generated by Sarand Database Utilities Tue 11-Feb-2025 12:43:45
// Code generated by Sarand Database Utilities Thu 30-Oct-2025 11:27:05
//---------------------------------------------------------------------------
namespace Sarand.BusinessMgr.Net.Standard.Dbas.Internal
{
@@ -10,7 +10,7 @@ using System.Data.Common;
using System.Linq;
//---------------------------------------------------------------------------
// Code generated by Sarand Database Utilities Tue 11-Feb-2025 12:43:45
// Code generated by Sarand Database Utilities Thu 30-Oct-2025 11:27:05
//---------------------------------------------------------------------------
namespace Sarand.BusinessMgr.Net.Standard.Dbas.Internal
{
@@ -1,8 +1,5 @@
using Org.BouncyCastle.Asn1.Cmp;
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.Control;
using Sarand.BusinessMgr.Net.Standard.Base.Mgr;
using Sarand.BusinessMgr.Net.Standard.Dbas.Bus;
using Sarand.BusinessMgr.Net.Standard.Dbas.Internal;
using Sarand.BusinessMgr.Net.Standard.Dbas.UpdateLog;
@@ -10,7 +7,6 @@ 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.Interfaces;
using Sarand.Net.Standard.Base.Utils;
using Sarand.Net.Standard.Dbas.Data;
using System;
@@ -451,7 +447,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Dbas.Mgr
affiliate.Email = dbAffiliate._Email;
affiliate.Website = dbAffiliate._Website;
// Ogranisation.
affiliate.AffiliateIdParent = new SysId(dbAffiliate._AffIdParent ?? 0);
affiliate.AffiliateIdParent = new SysId(dbAffiliate._AffIdParent);
affiliate.Name = dbAffiliate._Name;
affiliate.Abbr = dbAffiliate._Abbrev;
affiliate.Nature = dbAffiliate._Nature;
@@ -473,12 +469,12 @@ namespace Sarand.BusinessMgr.Net.Standard.Dbas.Mgr
affiliate.Spouse = dbAffiliate._Spouse;
affiliate.Children = dbAffiliate._Children;
affiliate.Hometown = dbAffiliate._Hometown;
affiliate.UserId = new SysId(dbAffiliate._UserId ?? 0);
affiliate.UserId = new SysId(dbAffiliate._UserId);
// Common properties.
affiliate.Notes = dbAffiliate._Notes;
affiliate.Status = SacsSystem.GetStatusForCode(dbAffiliate._Status);
affiliate.SetCreateStamp(dbAffiliate._CreateOn, new SysId(dbAffiliate._CreateBy ?? 0), dbAffiliate._CreateHost);
affiliate.SetUpdateStamp(dbAffiliate._UpdateOn ?? default(DateTime), new SysId(dbAffiliate._UpdateBy ?? 0), dbAffiliate._UpdateHost);
affiliate.SetCreateStamp(dbAffiliate._CreateOn, new SysId(dbAffiliate._CreateBy), dbAffiliate._CreateHost);
affiliate.SetUpdateStamp(dbAffiliate._UpdateOn, new SysId(dbAffiliate._UpdateBy), dbAffiliate._UpdateHost);
affiliate.AcceptChanges();
}
@@ -332,7 +332,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Dbas.Mgr
association.ContactCallCycleCode = dbAssociation._ContactCallCycleCode;
association.CallsPerYear = dbAssociation._CallsPerYear ?? 0;
association.LastCall = dbAssociation._LastCall ?? default(DateTime);
association.CommodityIdSalesDefault = new SysId(dbAssociation._CommodityIdSalesDefault ?? 0);
association.CommodityIdSalesDefault = new SysId(dbAssociation._CommodityIdSalesDefault);
association.OrderLeadTimeCode = dbAssociation._OrderLeadTimeCode;
association.DeliveryTypeCode = dbAssociation._DeliveryTypeCode;
association.DeliveryCourierCode = dbAssociation._DeliveryCourierCode;
@@ -345,8 +345,8 @@ namespace Sarand.BusinessMgr.Net.Standard.Dbas.Mgr
association.AccountBalance = dbAssociation._AccountBalance ?? 0;
association.DiscountType = (Sbm.DiscountType)(dbAssociation._DiscountType ?? 0);
association.DiscountRate = dbAssociation._DiscountRate ?? 0;
association.PriceSetId = new SysId(dbAssociation._PriceSetId ?? 0);
association.TaxCodeId = new SysId(dbAssociation._TaxCodeId ?? 0);
association.PriceSetId = new SysId(dbAssociation._PriceSetId);
association.TaxCodeId = new SysId(dbAssociation._TaxCodeId);
association.PaymentTerms = dbAssociation._PaymentTerms ?? 0;
association.InvoiceDesc = dbAssociation._InvoiceDesc;
if (dbAssociation._Terminated > 0)
@@ -355,8 +355,8 @@ namespace Sarand.BusinessMgr.Net.Standard.Dbas.Mgr
// Common properties.
association.Notes = dbAssociation._Notes;
association.Status = SacsSystem.GetStatusForCode(dbAssociation._Status);
association.SetCreateStamp(dbAssociation._CreateOn, new SysId(dbAssociation._CreateBy ?? 0), dbAssociation._CreateHost);
association.SetUpdateStamp(dbAssociation._UpdateOn ?? default(DateTime), new SysId(dbAssociation._UpdateBy ?? 0), dbAssociation._UpdateHost);
association.SetCreateStamp(dbAssociation._CreateOn, new SysId(dbAssociation._CreateBy), dbAssociation._CreateHost);
association.SetUpdateStamp(dbAssociation._UpdateOn, new SysId(dbAssociation._UpdateBy), dbAssociation._UpdateHost);
association.AcceptChanges();
}
//-------------------------------------------------------------------
@@ -225,14 +225,14 @@ namespace Sarand.BusinessMgr.Net.Standard.Dbas.Mgr
sysparam.Category = (Sbm.SysParamCategory)dbSysParam._Cat;
sysparam.Name = dbSysParam._Name;
sysparam.Value = dbSysParam._Value;
sysparam.AffiliateIdOwner = new SysId(dbSysParam._AffIdOwner ?? 0);
sysparam.AffiliateIdTarget = new SysId(dbSysParam._AffIdTarget ?? 0);
sysparam.AssociationId = new SysId(dbSysParam._AssocId ?? 0);
sysparam.AffiliateIdOwner = new SysId(dbSysParam._AffIdOwner);
sysparam.AffiliateIdTarget = new SysId(dbSysParam._AffIdTarget);
sysparam.AssociationId = new SysId(dbSysParam._AssocId);
// Common properties.
//sysparam.Notes = dbSysParam._Notes;
sysparam.Status = SacsSystem.GetStatusForCode(dbSysParam._Status);
sysparam.SetCreateStamp(dbSysParam._CreateOn ?? default(DateTime), new SysId(dbSysParam._CreateBy ?? 0), dbSysParam._CreateHost);
sysparam.SetUpdateStamp(dbSysParam._UpdateOn ?? default(DateTime), new SysId(dbSysParam._UpdateBy ?? 0), dbSysParam._UpdateHost);
sysparam.SetCreateStamp(dbSysParam._CreateOn, new SysId(dbSysParam._CreateBy), dbSysParam._CreateHost);
sysparam.SetUpdateStamp(dbSysParam._UpdateOn, new SysId(dbSysParam._UpdateBy), dbSysParam._UpdateHost);
sysparam.AcceptChanges();
}
@@ -256,8 +256,8 @@ namespace Sarand.BusinessMgr.Net.Standard.Dbas.Mgr
// Common properties.
systemAccount.Notes = dbSystemAccount._Notes;
systemAccount.Status = SacsSystem.GetStatusForCode(dbSystemAccount._Status);
systemAccount.SetCreateStamp(dbSystemAccount._CreateOn ?? default(DateTime), new SysId(dbSystemAccount._CreateBy ?? 0), dbSystemAccount._CreateHost);
systemAccount.SetUpdateStamp(dbSystemAccount._UpdateOn ?? default(DateTime), new SysId(dbSystemAccount._UpdateBy ?? 0), dbSystemAccount._UpdateHost);
systemAccount.SetCreateStamp(dbSystemAccount._CreateOn, new SysId(dbSystemAccount._CreateBy), dbSystemAccount._CreateHost);
systemAccount.SetUpdateStamp(dbSystemAccount._UpdateOn, new SysId(dbSystemAccount._UpdateBy), dbSystemAccount._UpdateHost);
systemAccount.AcceptChanges();
}
@@ -217,8 +217,8 @@ namespace Sarand.BusinessMgr.Net.Standard.Dbas.Mgr
// Common properties.
systemAccountUser.Notes = dbSystemAccountUser._Notes;
systemAccountUser.Status = SacsSystem.GetStatusForCode(dbSystemAccountUser._Status);
systemAccountUser.SetCreateStamp(dbSystemAccountUser._CreateOn ?? default(DateTime), new SysId(dbSystemAccountUser._CreateBy ?? 0), dbSystemAccountUser._CreateHost);
systemAccountUser.SetUpdateStamp(dbSystemAccountUser._UpdateOn ?? default(DateTime), new SysId(dbSystemAccountUser._UpdateBy ?? 0), dbSystemAccountUser._UpdateHost);
systemAccountUser.SetCreateStamp(dbSystemAccountUser._CreateOn, new SysId(dbSystemAccountUser._CreateBy), dbSystemAccountUser._CreateHost);
systemAccountUser.SetUpdateStamp(dbSystemAccountUser._UpdateOn, new SysId(dbSystemAccountUser._UpdateBy), dbSystemAccountUser._UpdateHost);
systemAccountUser.AcceptChanges();
}
@@ -45,7 +45,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Dbas.Mgr
private SbmSystemUser_Dbas CreateSystemUser(SystemUser_Db dbSystemUser)
{
ClearErrorState();
SbmSystemUser_Dbas systemUser = new SbmSystemUser_Dbas(new SysId(dbSystemUser._Id), new SysId(dbSystemUser._AffIdOwner), new SysId(dbSystemUser._InterfaceId ?? 0), new SysId(dbSystemUser._AffiliateId ?? 0), (ushort)dbSystemUser._Flags);
SbmSystemUser_Dbas systemUser = new SbmSystemUser_Dbas(new SysId(dbSystemUser._Id), new SysId(dbSystemUser._AffIdOwner), new SysId(dbSystemUser._InterfaceId), new SysId(dbSystemUser._AffiliateId), (ushort)dbSystemUser._Flags);
PopulateFrom(dbSystemUser, systemUser);
return systemUser;
}
@@ -225,15 +225,15 @@ namespace Sarand.BusinessMgr.Net.Standard.Dbas.Mgr
{
systemUser.Id = new SysId(dbSystemUser._Id);
systemUser.AffiliateIdOwner = new SysId(dbSystemUser._AffIdOwner);
systemUser.InterfaceId = new SysId(dbSystemUser._InterfaceId ?? 0);
systemUser.AffiliateId = new SysId(dbSystemUser._AffiliateId ?? 0);
systemUser.InterfaceId = new SysId(dbSystemUser._InterfaceId);
systemUser.AffiliateId = new SysId(dbSystemUser._AffiliateId);
systemUser.Code = dbSystemUser._Code;
systemUser.AuthCodeEnc = dbSystemUser._AuthCodeEnc;
// Common properties.
systemUser.Notes = dbSystemUser._Notes;
systemUser.Status = SacsSystem.GetStatusForCode(dbSystemUser._Status);
systemUser.SetCreateStamp(dbSystemUser._CreateOn ?? default(DateTime), new SysId(dbSystemUser._CreateBy ?? 0), dbSystemUser._CreateHost);
systemUser.SetUpdateStamp(dbSystemUser._UpdateOn ?? default(DateTime), new SysId(dbSystemUser._UpdateBy ?? 0), dbSystemUser._UpdateHost);
systemUser.SetCreateStamp(dbSystemUser._CreateOn, new SysId(dbSystemUser._CreateBy), dbSystemUser._CreateHost);
systemUser.SetUpdateStamp(dbSystemUser._UpdateOn, new SysId(dbSystemUser._UpdateBy), dbSystemUser._UpdateHost);
systemUser.AcceptChanges();
}
@@ -7,7 +7,6 @@ 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.Interfaces;
using Sarand.Net.Standard.Base.Utils;
using Sarand.Net.Standard.Dbas.Data;
using System;
@@ -264,7 +263,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Dbas.Mgr
private SbmAsset_Dbas CreateAsset(SaAsset_Db dbAsset)
{
ClearErrorState();
SbmAsset_Dbas asset = new SbmAsset_Dbas(new SysId(dbAsset._Id), new SysId(dbAsset._AssetCategoryId ?? 0), (ushort)dbAsset._Flags);
SbmAsset_Dbas asset = new SbmAsset_Dbas(new SysId(dbAsset._Id), new SysId(dbAsset._AssetCategoryId), (ushort)dbAsset._Flags);
PopulateFrom(dbAsset, asset);
return asset;
}
@@ -434,26 +433,26 @@ namespace Sarand.BusinessMgr.Net.Standard.Dbas.Mgr
}
private void PopulateFrom(SaAsset_Db dbAsset, SbmAsset asset)
{
asset.AssetCategoryId = new SysId(dbAsset._AssetCategoryId ?? 0);
asset.AssetCategoryId = new SysId(dbAsset._AssetCategoryId);
asset.SerialNumber = dbAsset._SerialNumber;
asset.RefExt = dbAsset._RefExt;
asset.DescBrief = dbAsset._DescBrief;
asset.ItemId = new ItemId(dbAsset._ItemType ?? 0, new SysId(dbAsset._ItemId ?? 0));
asset.ItemId = new ItemId(dbAsset._ItemType, new SysId(dbAsset._ItemId));
asset.PurchaseOn = dbAsset._PurchaseOn ?? default(DateTime);
asset.AssocIdSupplier = new SysId(dbAsset._AssocIdSupplier ?? 0);
asset.AssocIdSupplier = new SysId(dbAsset._AssocIdSupplier);
asset.PurchaseInvoiceRef = dbAsset._PurchaseInvoiceRef;
asset.PaymentTerms = dbAsset._PaymentTerms ?? 0;
asset.AmountPurchase = dbAsset._AmountPurchase ?? 0.0m;
asset.TaxCodeIdPurchase = new SysId(dbAsset._TaxCodeIdPurchase ?? 0);
asset.TaxCodeIdPurchase = new SysId(dbAsset._TaxCodeIdPurchase);
asset.AmountPurchaseGross = dbAsset._AmountPurchaseGross ?? 0.0m;
asset.AmountSettlementGross = dbAsset._AmountSettlementGross ?? 0.0m;
asset.AmountEnhancementGross = dbAsset._AmountEnhancementGross ?? 0.0m;
asset.AssocIdCustomer = new SysId(dbAsset._AssocIdCustomer ?? 0);
asset.AssocIdCustomer = new SysId(dbAsset._AssocIdCustomer);
asset.SellCategoryCode = dbAsset._SellCategoryCode;
asset.AmountSell = dbAsset._AmountSell ?? 0.0m;
asset.TaxCodeIdSell = new SysId(dbAsset._TaxCodeIdSell ?? 0);
asset.TaxCodeIdSell = new SysId(dbAsset._TaxCodeIdSell);
asset.AmountSellGross = dbAsset._AmountSellGross ?? 0.0m;
asset.TaxCodeIdProfit = new SysId(dbAsset._TaxCodeIdProfit ?? 0);
asset.TaxCodeIdProfit = new SysId(dbAsset._TaxCodeIdProfit);
asset.SoldOn = dbAsset._SoldOn ?? default(DateTime);
asset.AmountSold = dbAsset._AmountSold ?? 0.0m;
asset.AmountSoldGross = dbAsset._AmountSoldGross ?? 0.0m;
@@ -461,17 +460,17 @@ namespace Sarand.BusinessMgr.Net.Standard.Dbas.Mgr
asset.DisposeOn = dbAsset._DisposeOn ?? default(DateTime);
asset.DueBackOn = dbAsset._DueBackOn ?? default(DateTime);
asset.AmountRentalCost = dbAsset._AmountRentalCost ?? 0.0m;
asset.UomIdRentalCost = new SysId(dbAsset._UomIdRentalCost ?? 0);
asset.TaxCodeIdRentalCost = new SysId(dbAsset._TaxCodeIdRentalCost ?? 0);
asset.UomIdRentalCost = new SysId(dbAsset._UomIdRentalCost);
asset.TaxCodeIdRentalCost = new SysId(dbAsset._TaxCodeIdRentalCost);
asset.AmountRentalPrice = dbAsset._AmountRentalPrice ?? 0.0m;
asset.UomIdRentalPrice = new SysId(dbAsset._UomIdRentalPrice ?? 0);
asset.TaxCodeIdRentalPrice = new SysId(dbAsset._TaxCodeIdRentalPrice ?? 0);
asset.ProcessIdNext = new SysId(dbAsset._ProcessIdNext ?? 0);
asset.UomIdRentalPrice = new SysId(dbAsset._UomIdRentalPrice);
asset.TaxCodeIdRentalPrice = new SysId(dbAsset._TaxCodeIdRentalPrice);
asset.ProcessIdNext = new SysId(dbAsset._ProcessIdNext);
// Common properties.
asset.Notes = dbAsset._Notes;
asset.Status = SacsSystem.GetStatusForCode(dbAsset._Status);
asset.SetCreateStamp(dbAsset._CreateOn ?? default(DateTime), new SysId(dbAsset._CreateBy ?? 0), dbAsset._CreateHost);
asset.SetUpdateStamp(dbAsset._UpdateOn ?? default(DateTime), new SysId(dbAsset._UpdateBy ?? 0), dbAsset._UpdateHost);
asset.SetCreateStamp(dbAsset._CreateOn, new SysId(dbAsset._CreateBy), dbAsset._CreateHost);
asset.SetUpdateStamp(dbAsset._UpdateOn, new SysId(dbAsset._UpdateBy), dbAsset._UpdateHost);
asset.AcceptChanges();
}
@@ -7,7 +7,6 @@ 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.Interfaces;
using Sarand.Net.Standard.Base.Utils;
using Sarand.Net.Standard.Dbas.Data;
using System;
@@ -349,22 +348,22 @@ namespace Sarand.BusinessMgr.Net.Standard.Dbas.Mgr
assetCategory.Code = dbAssetCategory._Code;
assetCategory.DescBrief = dbAssetCategory._DescBrief;
assetCategory.IncomeType = (Sbm.AssetIncomeType)(dbAssetCategory._IncomeType ?? 0);
assetCategory.AssocIdSupplier = new SysId(dbAssetCategory._AssocIdSupplier ?? 0);
assetCategory.AssocIdSupplier = new SysId(dbAssetCategory._AssocIdSupplier);
assetCategory.PaymentTerms = dbAssetCategory._PaymentTerms ?? 0;
assetCategory.TaxCodeIdPurchase = new SysId(dbAssetCategory._TaxCodeIdPurchase ?? 0);
assetCategory.AssocIdCustomer = new SysId(dbAssetCategory._AssocIdCustomer ?? 0);
assetCategory.TaxCodeIdSell = new SysId(dbAssetCategory._TaxCodeIdSell ?? 0);
assetCategory.TaxCodeIdProfit = new SysId(dbAssetCategory._TaxCodeIdProfit ?? 0);
assetCategory.TaxCodeIdPurchase = new SysId(dbAssetCategory._TaxCodeIdPurchase);
assetCategory.AssocIdCustomer = new SysId(dbAssetCategory._AssocIdCustomer);
assetCategory.TaxCodeIdSell = new SysId(dbAssetCategory._TaxCodeIdSell);
assetCategory.TaxCodeIdProfit = new SysId(dbAssetCategory._TaxCodeIdProfit);
assetCategory.DisposeCode = dbAssetCategory._DisposeCode;
assetCategory.UomIdRentalCost = new SysId(dbAssetCategory._UomIdRentalCost ?? 0);
assetCategory.TaxCodeIdRentalCost = new SysId(dbAssetCategory._TaxCodeIdRentalCost ?? 0);
assetCategory.UomIdRentalPrice = new SysId(dbAssetCategory._UomIdRentalPrice ?? 0);
assetCategory.TaxCodeIdRentalPrice = new SysId(dbAssetCategory._TaxCodeIdRentalPrice ?? 0);
assetCategory.UomIdRentalCost = new SysId(dbAssetCategory._UomIdRentalCost);
assetCategory.TaxCodeIdRentalCost = new SysId(dbAssetCategory._TaxCodeIdRentalCost);
assetCategory.UomIdRentalPrice = new SysId(dbAssetCategory._UomIdRentalPrice);
assetCategory.TaxCodeIdRentalPrice = new SysId(dbAssetCategory._TaxCodeIdRentalPrice);
// Common properties.
assetCategory.Notes = dbAssetCategory._Notes;
assetCategory.Status = SacsSystem.GetStatusForCode(dbAssetCategory._Status);
assetCategory.SetCreateStamp(dbAssetCategory._CreateOn ?? default(DateTime), new SysId(dbAssetCategory._CreateBy ?? 0), dbAssetCategory._CreateHost);
assetCategory.SetUpdateStamp(dbAssetCategory._UpdateOn ?? default(DateTime), new SysId(dbAssetCategory._UpdateBy ?? 0), dbAssetCategory._UpdateHost);
assetCategory.SetCreateStamp(dbAssetCategory._CreateOn, new SysId(dbAssetCategory._CreateBy), dbAssetCategory._CreateHost);
assetCategory.SetUpdateStamp(dbAssetCategory._UpdateOn, new SysId(dbAssetCategory._UpdateBy), dbAssetCategory._UpdateHost);
assetCategory.AcceptChanges();
}
@@ -87,7 +87,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Dbas.Mgr
private SbmAssetProcess_Dbas CreateAssetProcess(SaAssetProcess_Db dbAssetProcess)
{
ClearErrorState();
SbmAssetProcess_Dbas assetProcess = new SbmAssetProcess_Dbas(new SysId(dbAssetProcess._Id), new SysId(dbAssetProcess._AssetId ?? 0), new SysId(dbAssetProcess._ProcessId ?? 0), (ushort)dbAssetProcess._Flags);
SbmAssetProcess_Dbas assetProcess = new SbmAssetProcess_Dbas(new SysId(dbAssetProcess._Id), new SysId(dbAssetProcess._AssetId), new SysId(dbAssetProcess._ProcessId), (ushort)dbAssetProcess._Flags);
PopulateFrom(dbAssetProcess, assetProcess);
return assetProcess;
}
@@ -230,17 +230,17 @@ namespace Sarand.BusinessMgr.Net.Standard.Dbas.Mgr
private void PopulateFrom(SaAssetProcess_Db dbAssetProcess, SbmAssetProcess assetProcess)
{
//assetProcess.Id = new SysId(dbAssetProcess._Id);
assetProcess.AssetId = new SysId(dbAssetProcess._AssetId ?? 0);
assetProcess.AssetId = new SysId(dbAssetProcess._AssetId);
assetProcess.Seq = dbAssetProcess._Seq.ToString();
assetProcess.ProcessId = new SysId(dbAssetProcess._ProcessId ?? 0);
assetProcess.ProcessId = new SysId(dbAssetProcess._ProcessId);
assetProcess.RequiredOn = dbAssetProcess._RequiredOn ?? default(DateTime);
assetProcess.ExpectedOn = dbAssetProcess._ExpectedOn ?? default(DateTime);
assetProcess.ProcessedOn = dbAssetProcess._ProcessedOn ?? default(DateTime);
// Common properties.
assetProcess.Notes = dbAssetProcess._Notes;
assetProcess.Status = SacsSystem.GetStatusForCode(dbAssetProcess._Status);
assetProcess.SetCreateStamp(dbAssetProcess._CreateOn ?? default(DateTime), new SysId(dbAssetProcess._CreateBy ?? 0), dbAssetProcess._CreateHost);
assetProcess.SetUpdateStamp(dbAssetProcess._UpdateOn ?? default(DateTime), new SysId(dbAssetProcess._UpdateBy ?? 0), dbAssetProcess._UpdateHost);
assetProcess.SetCreateStamp(dbAssetProcess._CreateOn, new SysId(dbAssetProcess._CreateBy), dbAssetProcess._CreateHost);
assetProcess.SetUpdateStamp(dbAssetProcess._UpdateOn, new SysId(dbAssetProcess._UpdateBy), dbAssetProcess._UpdateHost);
assetProcess.AcceptChanges();
}
@@ -7,7 +7,6 @@ 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.Interfaces;
using Sarand.Net.Standard.Base.ItemData;
using Sarand.Net.Standard.Base.Utils;
using Sarand.Net.Standard.Dbas.Data;
@@ -429,7 +428,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Dbas.Mgr
private void PopulateFrom(SaVehicle_Db dbVehicle, SbmVehicle vehicle)
{
//vehicle.Id = new SysId(dbVehicle._Id);
vehicle.VehicleClassId = new SysId(dbVehicle._VehicleClassId ?? 0);
vehicle.VehicleClassId = new SysId(dbVehicle._VehicleClassId);
vehicle.RegNumber = dbVehicle._RegNumber;
vehicle.Vin = dbVehicle._VIN;
vehicle.CapCode = dbVehicle._CapCode;
@@ -459,8 +458,8 @@ namespace Sarand.BusinessMgr.Net.Standard.Dbas.Mgr
// Common properties.
vehicle.Notes = dbVehicle._Notes;
vehicle.Status = SacsSystem.GetStatusForCode(dbVehicle._Status);
vehicle.SetCreateStamp(dbVehicle._CreateOn ?? default(DateTime), new SysId(dbVehicle._CreateBy ?? 0), dbVehicle._CreateHost);
vehicle.SetUpdateStamp(dbVehicle._UpdateOn ?? default(DateTime), new SysId(dbVehicle._UpdateBy ?? 0), dbVehicle._UpdateHost);
vehicle.SetCreateStamp(dbVehicle._CreateOn, new SysId(dbVehicle._CreateBy), dbVehicle._CreateHost);
vehicle.SetUpdateStamp(dbVehicle._UpdateOn, new SysId(dbVehicle._UpdateBy), dbVehicle._UpdateHost);
vehicle.AcceptChanges();
}
@@ -8,7 +8,6 @@ using Sarand.Net.Standard.Base.Bus;
using Sarand.Net.Standard.Base.CodeTypes;
using Sarand.Net.Standard.Base.Core;
using Sarand.Net.Standard.Base.Dbas;
using Sarand.Net.Standard.Base.Interfaces;
using Sarand.Net.Standard.Base.Utils;
using Sarand.Net.Standard.Dbas.Data;
using System;
@@ -409,14 +408,14 @@ namespace Sarand.BusinessMgr.Net.Standard.Dbas.Mgr
vehicleClass.ServiceOdo = dbVehicleClass._ServiceOdo ?? 0;
vehicleClass.ServiceWeeks = dbVehicleClass._ServiceWeeks ?? 0;
vehicleClass.AmountRentalCost = dbVehicleClass._AmountRentalCost ?? 0;
vehicleClass.UomIdRentalCost = new SysId(dbVehicleClass._UomIdRentalCost ?? 0);
vehicleClass.UomIdRentalCost = new SysId(dbVehicleClass._UomIdRentalCost);
vehicleClass.AmountRentalPrice = dbVehicleClass._AmountRentalPrice ?? 0;
vehicleClass.UomIdRentalPrice = new SysId(dbVehicleClass._UomIdRentalPrice ?? 0);
vehicleClass.UomIdRentalPrice = new SysId(dbVehicleClass._UomIdRentalPrice);
// Common properties.
vehicleClass.Notes = dbVehicleClass._Notes;
vehicleClass.Status = SacsSystem.GetStatusForCode(dbVehicleClass._Status);
vehicleClass.SetCreateStamp(dbVehicleClass._CreateOn ?? default(DateTime), new SysId(dbVehicleClass._CreateBy ?? 0), dbVehicleClass._CreateHost);
vehicleClass.SetUpdateStamp(dbVehicleClass._UpdateOn ?? default(DateTime), new SysId(dbVehicleClass._UpdateBy ?? 0), dbVehicleClass._UpdateHost);
vehicleClass.SetCreateStamp(dbVehicleClass._CreateOn, new SysId(dbVehicleClass._CreateBy), dbVehicleClass._CreateHost);
vehicleClass.SetUpdateStamp(dbVehicleClass._UpdateOn, new SysId(dbVehicleClass._UpdateBy), dbVehicleClass._UpdateHost);
vehicleClass.AcceptChanges();
}
@@ -87,7 +87,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Dbas.Mgr
private SbmVehicleEvent_Dbas CreateVehicleEvent(SaVehicleEvent_Db dbVehicleEvent)
{
ClearErrorState();
SbmVehicleEvent_Dbas vehicleEvent = new SbmVehicleEvent_Dbas(new SysId(dbVehicleEvent._VehicleId ?? 0), (Sbm.VehicleEventType)dbVehicleEvent._EventType, (ushort)dbVehicleEvent._Flags);
SbmVehicleEvent_Dbas vehicleEvent = new SbmVehicleEvent_Dbas(new SysId(dbVehicleEvent._VehicleId), (Sbm.VehicleEventType)dbVehicleEvent._EventType, (ushort)dbVehicleEvent._Flags);
PopulateFrom(dbVehicleEvent, vehicleEvent);
return vehicleEvent;
}
@@ -236,7 +236,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Dbas.Mgr
private void PopulateFrom(SaVehicleEvent_Db dbVehicleEvent, SbmVehicleEvent vehicleEvent)
{
//vehicleEvent.Id = new SysId(dbVehicleEvent._Id);
vehicleEvent.VehicleId = new SysId(dbVehicleEvent._VehicleId ?? 0);
vehicleEvent.VehicleId = new SysId(dbVehicleEvent._VehicleId);
vehicleEvent.VehicleEventType = (Sbm.VehicleEventType)(dbVehicleEvent._EventType ?? 0);
vehicleEvent.StartOn = dbVehicleEvent._StartOn ?? default(DateTime);
vehicleEvent.FinishOn = dbVehicleEvent._FinishOn ?? default(DateTime);
@@ -244,15 +244,15 @@ namespace Sarand.BusinessMgr.Net.Standard.Dbas.Mgr
vehicleEvent.DescBrief = dbVehicleEvent._DescBrief;
vehicleEvent.DescDetail = dbVehicleEvent._DescDetail;
vehicleEvent.AmountNet = dbVehicleEvent._AmountNet ?? 0.0m;
vehicleEvent.TaxCodeId = new SysId(dbVehicleEvent._TaxCodeId ?? 0);
vehicleEvent.TaxCodeId = new SysId(dbVehicleEvent._TaxCodeId);
vehicleEvent.TaxRate = dbVehicleEvent._TaxRate ?? 0.0m;
vehicleEvent.AmountTax = dbVehicleEvent._AmountTax ?? 0.0m;
vehicleEvent.AmountTot = dbVehicleEvent._AmountTot ?? 0.0m;
// Common properties.
vehicleEvent.Notes = dbVehicleEvent._Notes;
vehicleEvent.Status = SacsSystem.GetStatusForCode(dbVehicleEvent._Status);
vehicleEvent.SetCreateStamp(dbVehicleEvent._CreateOn ?? default(DateTime), new SysId(dbVehicleEvent._CreateBy ?? 0), dbVehicleEvent._CreateHost);
vehicleEvent.SetUpdateStamp(dbVehicleEvent._UpdateOn ?? default(DateTime), new SysId(dbVehicleEvent._UpdateBy ?? 0), dbVehicleEvent._UpdateHost);
vehicleEvent.SetCreateStamp(dbVehicleEvent._CreateOn, new SysId(dbVehicleEvent._CreateBy), dbVehicleEvent._CreateHost);
vehicleEvent.SetUpdateStamp(dbVehicleEvent._UpdateOn, new SysId(dbVehicleEvent._UpdateBy), dbVehicleEvent._UpdateHost);
vehicleEvent.AcceptChanges();
}
@@ -327,8 +327,8 @@ namespace Sarand.BusinessMgr.Net.Standard.Dbas.Mgr
// Common properties.
vehicleFeature.Notes = dbVehicleFeature._Notes;
vehicleFeature.Status = SacsSystem.GetStatusForCode(dbVehicleFeature._Status);
vehicleFeature.SetCreateStamp(dbVehicleFeature._CreateOn ?? default(DateTime), new SysId(dbVehicleFeature._CreateBy ?? 0), dbVehicleFeature._CreateHost);
vehicleFeature.SetUpdateStamp(dbVehicleFeature._UpdateOn ?? default(DateTime), new SysId(dbVehicleFeature._UpdateBy ?? 0), dbVehicleFeature._UpdateHost);
vehicleFeature.SetCreateStamp(dbVehicleFeature._CreateOn, new SysId(dbVehicleFeature._CreateBy), dbVehicleFeature._CreateHost);
vehicleFeature.SetUpdateStamp(dbVehicleFeature._UpdateOn, new SysId(dbVehicleFeature._UpdateBy), dbVehicleFeature._UpdateHost);
vehicleFeature.AcceptChanges();
}
@@ -1,6 +1,5 @@
using Sarand.BusinessMgr.Net.Standard.Base.App;
using Sarand.BusinessMgr.Net.Standard.Base.Bus;
using Sarand.BusinessMgr.Net.Standard.Base.Mgr;
using Sarand.BusinessMgr.Net.Standard.Dbas.Bus;
using Sarand.BusinessMgr.Net.Standard.Dbas.Internal;
using Sarand.BusinessMgr.Net.Standard.Dbas.UpdateLog;
@@ -836,7 +835,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Dbas.Mgr
commodity.DescDetail = dbCommodity._DescDetail;
commodity.DrawingNumber = dbCommodity._DrawingNo;
commodity.DrawingIssue = dbCommodity._DrawingIssue;
commodity.AssetCatId = new SysId(dbCommodity._AssetCatId ?? 0);
commodity.AssetCatId = new SysId(dbCommodity._AssetCatId);
commodity.ImagePath = dbCommodity._ImagePath;
commodity.Category1 = dbCommodity._Category;
commodity.Category2 = dbCommodity._Category2;
@@ -845,15 +844,15 @@ namespace Sarand.BusinessMgr.Net.Standard.Dbas.Mgr
commodity.Department = dbCommodity._Department;
commodity.CatalogRef = dbCommodity._CatalogRef;
commodity.Weight = dbCommodity._Weight ?? 0.0m;
commodity.UomIdWeight = new SysId(dbCommodity._UomIdWeight ?? 0);
commodity.UomIdWeight = new SysId(dbCommodity._UomIdWeight);
commodity.Length = dbCommodity._Length ?? 0.0m;
commodity.UomIdLength = new SysId(dbCommodity._UomIdLength ?? 0);
commodity.UomIdLength = new SysId(dbCommodity._UomIdLength);
commodity.Volume = dbCommodity._Volume ?? 0.0m;
commodity.UomIdVolume = new SysId(dbCommodity._UomIdVolume ?? 0);
commodity.UomIdVolume = new SysId(dbCommodity._UomIdVolume);
commodity.Density = dbCommodity._Density ?? 0;
commodity.UomIdDensity = new SysId(dbCommodity._UomIdDensity ?? 0);
commodity.UomIdDensity = new SysId(dbCommodity._UomIdDensity);
commodity.BoxQuantity = dbCommodity._BoxQuantity ?? 0;
commodity.UomIdBox = new SysId(dbCommodity._UomIdBox ?? 0);
commodity.UomIdBox = new SysId(dbCommodity._UomIdBox);
commodity.Dimensions = dbCommodity._Dimensions;
commodity.SpecSummary = dbCommodity._SpecSummary;
commodity.RangeCode = dbCommodity._RangeCode;
@@ -869,27 +868,27 @@ namespace Sarand.BusinessMgr.Net.Standard.Dbas.Mgr
commodity.NominalCodePurchase = dbCommodity._NominalCodePurchase;
commodity.ICNTariffCode = dbCommodity._ICNTariffCode;
commodity.TimeProd = dbCommodity._TimeProd ?? 0.0m;
commodity.UomIdTimeProd = new SysId(dbCommodity._UomIdTimeProd ?? 0);
commodity.AssociationIdSupplier = new SysId(dbCommodity._AssIdSupplier ?? 0);
commodity.UomIdTimeProd = new SysId(dbCommodity._UomIdTimeProd);
commodity.AssociationIdSupplier = new SysId(dbCommodity._AssIdSupplier);
commodity.SupplierRef = dbCommodity._SupplierRef;
commodity.CostPrice = dbCommodity._CostPrice ?? 0.0m;
commodity.PlaceOfOrigin = dbCommodity._PlaceOfOrigin;
commodity.MaterialCost = dbCommodity._MaterialCost ?? 0.0m;
commodity.CurrencyIdMaterial = new SysId(dbCommodity._CurrencyIdMaterial ?? 0);
commodity.CurrencyIdMaterial = new SysId(dbCommodity._CurrencyIdMaterial);
commodity.ExWorksCost = dbCommodity._ExWorksCost ?? 0.0m;
commodity.CurrencyIdExWorks = new SysId(dbCommodity._CurrencyIdExWorks ?? 0);
commodity.CurrencyIdExWorks = new SysId(dbCommodity._CurrencyIdExWorks);
commodity.ReorderLevel = dbCommodity._ReorderLevel ?? 0.0m;
commodity.ReorderQty = dbCommodity._ReorderQty ?? 0.0m;
commodity.QtyOnOrder = dbCommodity._QtyOnOrder ?? 0.0m;
commodity.AssociationIdCustomer = new SysId(dbCommodity._AssIdCustomer ?? 0);
commodity.AssociationIdCustomer = new SysId(dbCommodity._AssIdCustomer);
commodity.SalesPrice = dbCommodity._SalesPrice ?? 0.0m;
commodity.RetailPrice = dbCommodity._RetailPrice ?? 0.0m;
commodity.RetailPricePlanned = dbCommodity._RetailPricePlanned ?? 0.0m;
commodity.UomIdSale = new SysId(dbCommodity._UomIdSale ?? 0);
commodity.UomIdSale = new SysId(dbCommodity._UomIdSale);
commodity.CarriageCostIndicative = dbCommodity._CarriageCostIndicative ?? 0.0m;
commodity.MinOrderQty = dbCommodity._MinOrderQty ?? 0.0m;
commodity.PackQtySale = dbCommodity._PackQty ?? 0.0m;
commodity.TaxCodeId = new SysId(dbCommodity._TaxCodeId ?? 0);
commodity.TaxCodeId = new SysId(dbCommodity._TaxCodeId);
commodity.LastOrderDate = dbCommodity._LastOrderDate ?? default(DateTime);
commodity.LastOrderQty = dbCommodity._LastOrderQty ?? 0.0m;
commodity.QtyInStock = dbCommodity._QtyInStock ?? 0.0m;
@@ -897,7 +896,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Dbas.Mgr
commodity.FreeStock = dbCommodity._FreeStock ?? 0.0m;
commodity.StockTakeDate = dbCommodity._StockTakeDate ?? default(DateTime);
commodity.StockTakeQty = dbCommodity._StockTakeQty ?? 0.0m;
commodity.CommodityIdSalesProj = new SysId(dbCommodity._CommodityIdSalesProj ?? 0);
commodity.CommodityIdSalesProj = new SysId(dbCommodity._CommodityIdSalesProj);
commodity.SalesProjAnnual = dbCommodity._SalesProjAnnual ?? 0.0m;
commodity.SalesProjMonth01 = dbCommodity._SalesProjMonth01 ?? 0.0m;
commodity.SalesProjMonth02 = dbCommodity._SalesProjMonth02 ?? 0.0m;
@@ -914,8 +913,8 @@ namespace Sarand.BusinessMgr.Net.Standard.Dbas.Mgr
// Common properties.
commodity.Notes = dbCommodity._Notes;
commodity.Status = SacsSystem.GetStatusForCode(dbCommodity._Status);
commodity.SetCreateStamp(dbCommodity._CreateOn, new SysId(dbCommodity._CreateBy ?? 0), dbCommodity._CreateHost);
commodity.SetUpdateStamp(dbCommodity._UpdateOn ?? default(DateTime), new SysId(dbCommodity._UpdateBy ?? 0), dbCommodity._UpdateHost);
commodity.SetCreateStamp(dbCommodity._CreateOn, new SysId(dbCommodity._CreateBy), dbCommodity._CreateHost);
commodity.SetUpdateStamp(dbCommodity._UpdateOn, new SysId(dbCommodity._UpdateBy), dbCommodity._UpdateHost);
commodity.AcceptChanges();
}
@@ -338,8 +338,8 @@ namespace Sarand.BusinessMgr.Net.Standard.Dbas.Mgr
// Common properties.
commodityCustomer.Notes = dbCommodityCustomer._Notes;
commodityCustomer.Status = SacsSystem.GetStatusForCode(dbCommodityCustomer._Status);
commodityCustomer.SetCreateStamp(dbCommodityCustomer._CreateOn, new SysId(dbCommodityCustomer._CreateBy ?? 0), dbCommodityCustomer._CreateHost);
commodityCustomer.SetUpdateStamp(dbCommodityCustomer._UpdateOn ?? default(DateTime), new SysId(dbCommodityCustomer._UpdateBy ?? 0), dbCommodityCustomer._UpdateHost);
commodityCustomer.SetCreateStamp(dbCommodityCustomer._CreateOn, new SysId(dbCommodityCustomer._CreateBy), dbCommodityCustomer._CreateHost);
commodityCustomer.SetUpdateStamp(dbCommodityCustomer._UpdateOn, new SysId(dbCommodityCustomer._UpdateBy), dbCommodityCustomer._UpdateHost);
commodityCustomer.AcceptChanges();
}
@@ -245,12 +245,12 @@ namespace Sarand.BusinessMgr.Net.Standard.Dbas.Mgr
commoditySupplier.AssocIdSupplier = new SysId(dbCommoditySupplier._AssocIdSupplier);
commoditySupplier.ProductCode = dbCommoditySupplier._ProductCode;
commoditySupplier.AmountCost = dbCommoditySupplier._AmountCost ?? 0.0m;
commoditySupplier.CurrencyIdCost = new SysId(dbCommoditySupplier._CurrencyIdCost ?? 0);
commoditySupplier.CurrencyIdCost = new SysId(dbCommoditySupplier._CurrencyIdCost);
// Common properties.
commoditySupplier.Notes = dbCommoditySupplier._Notes;
commoditySupplier.Status = SacsSystem.GetStatusForCode(dbCommoditySupplier._Status);
commoditySupplier.SetCreateStamp(dbCommoditySupplier._CreateOn, new SysId(dbCommoditySupplier._CreateBy ?? 0), dbCommoditySupplier._CreateHost);
commoditySupplier.SetUpdateStamp(dbCommoditySupplier._UpdateOn ?? default(DateTime), new SysId(dbCommoditySupplier._UpdateBy ?? 0), dbCommoditySupplier._UpdateHost);
commoditySupplier.SetCreateStamp(dbCommoditySupplier._CreateOn, new SysId(dbCommoditySupplier._CreateBy), dbCommoditySupplier._CreateHost);
commoditySupplier.SetUpdateStamp(dbCommoditySupplier._UpdateOn, new SysId(dbCommoditySupplier._UpdateBy), dbCommoditySupplier._UpdateHost);
commoditySupplier.AcceptChanges();
}
@@ -642,12 +642,12 @@ namespace Sarand.BusinessMgr.Net.Standard.Dbas.Mgr
portfolioItem.Caption = dbPortfolioItem._Caption;
portfolioItem.DescBrief = dbPortfolioItem._DescBrief;
portfolioItem.DescDetail = dbPortfolioItem._DescDetail;
portfolioItem.CommodityId = new SysId(dbPortfolioItem._CommodityId ?? 0);
portfolioItem.CommodityId = new SysId(dbPortfolioItem._CommodityId);
// Common properties.
portfolioItem.Notes = dbPortfolioItem._Notes;
portfolioItem.Status = SacsSystem.GetStatusForCode(dbPortfolioItem._Status);
portfolioItem.SetCreateStamp(dbPortfolioItem._CreateOn ?? default(DateTime), new SysId(dbPortfolioItem._CreateBy ?? 0), dbPortfolioItem._CreateHost);
portfolioItem.SetUpdateStamp(dbPortfolioItem._UpdateOn ?? default(DateTime), new SysId(dbPortfolioItem._UpdateBy ?? 0), dbPortfolioItem._UpdateHost);
portfolioItem.SetCreateStamp(dbPortfolioItem._CreateOn, new SysId(dbPortfolioItem._CreateBy), dbPortfolioItem._CreateHost);
portfolioItem.SetUpdateStamp(dbPortfolioItem._UpdateOn, new SysId(dbPortfolioItem._UpdateBy), dbPortfolioItem._UpdateHost);
portfolioItem.AcceptChanges();
}
@@ -351,8 +351,8 @@ namespace Sarand.BusinessMgr.Net.Standard.Dbas.Mgr
// Common properties.
itemLink.Notes = dbItemLink._Notes;
itemLink.Status = SacsSystem.GetStatusForCode(dbItemLink._Status);
itemLink.SetCreateStamp(dbItemLink._CreateOn ?? default(DateTime), new SysId(dbItemLink._CreateBy ?? 0), dbItemLink._CreateHost);
itemLink.SetUpdateStamp(dbItemLink._UpdateOn ?? default(DateTime), new SysId(dbItemLink._UpdateBy ?? 0), dbItemLink._UpdateHost);
itemLink.SetCreateStamp(dbItemLink._CreateOn, new SysId(dbItemLink._CreateBy), dbItemLink._CreateHost);
itemLink.SetUpdateStamp(dbItemLink._UpdateOn, new SysId(dbItemLink._UpdateBy), dbItemLink._UpdateHost);
itemLink.AcceptChanges();
}
@@ -232,8 +232,8 @@ namespace Sarand.BusinessMgr.Net.Standard.Dbas.Mgr
// Common properties.
price.Notes = dbPrice._Notes;
price.Status = SacsSystem.GetStatusForCode(dbPrice._Status);
price.SetCreateStamp(dbPrice._CreateOn ?? default(DateTime), new SysId(dbPrice._CreateBy ?? 0), dbPrice._CreateHost);
price.SetUpdateStamp(dbPrice._UpdateOn ?? default(DateTime), new SysId(dbPrice._UpdateBy ?? 0), dbPrice._UpdateHost);
price.SetCreateStamp(dbPrice._CreateOn, new SysId(dbPrice._CreateBy), dbPrice._CreateHost);
price.SetUpdateStamp(dbPrice._UpdateOn, new SysId(dbPrice._UpdateBy), dbPrice._UpdateHost);
price.AcceptChanges();
}
@@ -243,12 +243,12 @@ namespace Sarand.BusinessMgr.Net.Standard.Dbas.Mgr
//priceSet.Reference = dbPriceSet._Ref;
priceSet.PriceType = (Sbm.PriceType)(dbPriceSet._Type ?? 0);
priceSet.Name = dbPriceSet._Name;
priceSet.CurrencyId = new SysId(dbPriceSet._CurrencyId ?? 0);
priceSet.CurrencyId = new SysId(dbPriceSet._CurrencyId);
// Common properties.
priceSet.Notes = dbPriceSet._Notes;
priceSet.Status = SacsSystem.GetStatusForCode(dbPriceSet._Status);
priceSet.SetCreateStamp(dbPriceSet._CreateOn ?? default(DateTime), new SysId(dbPriceSet._CreateBy ?? 0), dbPriceSet._CreateHost);
priceSet.SetUpdateStamp(dbPriceSet._UpdateOn ?? default(DateTime), new SysId(dbPriceSet._UpdateBy ?? 0), dbPriceSet._UpdateHost);
priceSet.SetCreateStamp(dbPriceSet._CreateOn, new SysId(dbPriceSet._CreateBy), dbPriceSet._CreateHost);
priceSet.SetUpdateStamp(dbPriceSet._UpdateOn, new SysId(dbPriceSet._UpdateBy), dbPriceSet._UpdateHost);
priceSet.AcceptChanges();
}
@@ -267,7 +267,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Dbas.Mgr
private SbmProcess_Dbas CreateProcess(Process_Db dbProcess)
{
ClearErrorState();
SbmProcess_Dbas process = new SbmProcess_Dbas(new SysId(dbProcess._Id), new SysId(dbProcess._AffIdOwner ?? 0), (Sbm.ProcessCategory)dbProcess._Category, (ushort)dbProcess._Flags);
SbmProcess_Dbas process = new SbmProcess_Dbas(new SysId(dbProcess._Id), new SysId(dbProcess._AffIdOwner), (Sbm.ProcessCategory)dbProcess._Category, (ushort)dbProcess._Flags);
PopulateFrom(dbProcess, process);
return process;
}
@@ -417,8 +417,8 @@ namespace Sarand.BusinessMgr.Net.Standard.Dbas.Mgr
// Common properties.
process.Notes = dbProcess._Notes;
process.Status = SacsSystem.GetStatusForCode(dbProcess._Status);
process.SetCreateStamp(dbProcess._CreateOn ?? default(DateTime), new SysId(dbProcess._CreateBy ?? 0), dbProcess._CreateHost);
process.SetUpdateStamp(dbProcess._UpdateOn ?? default(DateTime), new SysId(dbProcess._UpdateBy ?? 0), dbProcess._UpdateHost);
process.SetCreateStamp(dbProcess._CreateOn, new SysId(dbProcess._CreateBy), dbProcess._CreateHost);
process.SetUpdateStamp(dbProcess._UpdateOn, new SysId(dbProcess._UpdateBy), dbProcess._UpdateHost);
process.AcceptChanges();
}
@@ -360,7 +360,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Dbas.Mgr
private SbmConstituent_Dbas CreateConstituent(Constituent_Db dbConstituent)
{
ClearErrorState();
SbmConstituent_Dbas constituent = new SbmConstituent_Dbas(new SysId(dbConstituent._Id), new SysId(dbConstituent._AffIdOwner), new SysId(dbConstituent._AssocId ?? 0), (Sbm.ConstituentType)dbConstituent._Type, (ushort)dbConstituent._Flags);
SbmConstituent_Dbas constituent = new SbmConstituent_Dbas(new SysId(dbConstituent._Id), new SysId(dbConstituent._AffIdOwner), new SysId(dbConstituent._AssocId), (Sbm.ConstituentType)dbConstituent._Type, (ushort)dbConstituent._Flags);
PopulateFrom(dbConstituent, constituent);
return constituent;
}
@@ -531,14 +531,14 @@ namespace Sarand.BusinessMgr.Net.Standard.Dbas.Mgr
{
//constituent.Id = new SysId(dbConstituent._Id);
constituent.AffiliateIdOwner = new SysId(dbConstituent._AffIdOwner);
constituent.AffiliateIdTarget = new SysId(dbConstituent._AffIdTarget ?? 0);
constituent.AssociationId = new SysId(dbConstituent._AssocId ?? 0);
constituent.TransactionId = new SysId(dbConstituent._TransId ?? 0);
constituent.RequirementId = new SysId(dbConstituent._ReqntId ?? 0);
constituent.ConstituentId = new SysId(dbConstituent._ConstId ?? 0);
constituent.AssetId = new SysId(dbConstituent._AssetId ?? 0);
constituent.ProcessId = new SysId(dbConstituent._ProcessId ?? 0);
constituent.AssociationIdContractor = new SysId(dbConstituent._AssocIdContractor ?? 0);
constituent.AffiliateIdTarget = new SysId(dbConstituent._AffIdTarget);
constituent.AssociationId = new SysId(dbConstituent._AssocId);
constituent.TransactionId = new SysId(dbConstituent._TransId);
constituent.RequirementId = new SysId(dbConstituent._ReqntId);
constituent.ConstituentId = new SysId(dbConstituent._ConstId);
constituent.AssetId = new SysId(dbConstituent._AssetId);
constituent.ProcessId = new SysId(dbConstituent._ProcessId);
constituent.AssociationIdContractor = new SysId(dbConstituent._AssocIdContractor);
constituent.ConstituentType = (Sbm.ConstituentType)(dbConstituent._Type ?? 0);
constituent.Seq = dbConstituent._Seq ?? 0;
constituent.Effective = dbConstituent._Effective ?? default(DateTime);
@@ -553,11 +553,11 @@ namespace Sarand.BusinessMgr.Net.Standard.Dbas.Mgr
constituent.Category = dbConstituent._Category;
constituent.Reference = dbConstituent._Reference;
constituent.Quantity = dbConstituent._Quantity ?? 0.0m;
constituent.UomId = new SysId(dbConstituent._UomId ?? 0);
constituent.UomId = new SysId(dbConstituent._UomId);
constituent.UnitCost = dbConstituent._UnitCost ?? 0.0m;
constituent.AmountEst = dbConstituent._AmountEst ?? 0.0m;
constituent.AmountNet = dbConstituent._AmountNet ?? 0.0m;
constituent.TaxCodeId = new SysId(dbConstituent._TaxCodeId ?? 0);
constituent.TaxCodeId = new SysId(dbConstituent._TaxCodeId);
constituent.TaxRate = dbConstituent._TaxRate ?? 0.0m;
constituent.AmountTax = dbConstituent._AmountTax ?? 0.0m;
constituent.AmountTot = dbConstituent._AmountTot ?? 0.0m;
@@ -566,8 +566,8 @@ namespace Sarand.BusinessMgr.Net.Standard.Dbas.Mgr
// Common properties.
constituent.Notes = dbConstituent._Notes;
constituent.Status = SacsSystem.GetStatusForCode(dbConstituent._Status);
constituent.SetCreateStamp(dbConstituent._CreateOn ?? default(DateTime), new SysId(dbConstituent._CreateBy ?? 0), dbConstituent._CreateHost);
constituent.SetUpdateStamp(dbConstituent._UpdateOn ?? default(DateTime), new SysId(dbConstituent._UpdateBy ?? 0), dbConstituent._UpdateHost);
constituent.SetCreateStamp(dbConstituent._CreateOn, new SysId(dbConstituent._CreateBy), dbConstituent._CreateHost);
constituent.SetUpdateStamp(dbConstituent._UpdateOn, new SysId(dbConstituent._UpdateBy), dbConstituent._UpdateHost);
constituent.AcceptChanges();
}
@@ -1,5 +1,4 @@
using Org.BouncyCastle.Bcpg;
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.Dbas.Bus;
using Sarand.BusinessMgr.Net.Standard.Dbas.Internal;
@@ -17,7 +16,6 @@ using System.Collections.Generic;
using System.Data.Common;
using System.Linq;
using System.Text.RegularExpressions;
using System.Transactions;
namespace Sarand.BusinessMgr.Net.Standard.Dbas.Mgr
{
@@ -571,7 +569,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Dbas.Mgr
private SbmRequirement_Dbas CreateRequirement(Requirement_Db dbRequirement)
{
ClearErrorState();
SbmRequirement_Dbas requirement = new SbmRequirement_Dbas(new SysId(dbRequirement._Id), new SysId(dbRequirement._AffIdOwner), new SysId(dbRequirement._AssocId ?? 0), new SysId(dbRequirement._TransId ?? 0), (Sbm.RequirementType)dbRequirement._Type, (ushort)dbRequirement._Flags);
SbmRequirement_Dbas requirement = new SbmRequirement_Dbas(new SysId(dbRequirement._Id), new SysId(dbRequirement._AffIdOwner), new SysId(dbRequirement._AssocId), new SysId(dbRequirement._TransId), (Sbm.RequirementType)dbRequirement._Type, (ushort)dbRequirement._Flags);
PopulateFrom(dbRequirement, requirement);
return requirement;
}
@@ -753,19 +751,19 @@ namespace Sarand.BusinessMgr.Net.Standard.Dbas.Mgr
{
//requirement.Id = new SysId(dbRequirement._Id);
requirement.AffiliateIdOwner = new SysId(dbRequirement._AffIdOwner);
requirement.AssociationId = new SysId(dbRequirement._AssocId ?? 0);
requirement.TransactionId = new SysId(dbRequirement._TransId ?? 0);
requirement.AssociationId = new SysId(dbRequirement._AssocId);
requirement.TransactionId = new SysId(dbRequirement._TransId);
requirement.RequirementType = (Sbm.RequirementType)(dbRequirement._Type ?? 0);
requirement.Seq = dbRequirement._Seq ?? 0;
requirement.RequirementIdSource = new SysId(dbRequirement._ReqntIdSource ?? 0);
requirement.RequirementIdSource = new SysId(dbRequirement._ReqntIdSource);
requirement.Required = dbRequirement._Required ?? default(DateTime);
requirement.Started = dbRequirement._Started ?? default(DateTime);
requirement.Completed = dbRequirement._Completed ?? default(DateTime);
requirement.JobNumber = dbRequirement._JobNumber;
requirement.AssociationIdSubContract = new SysId(dbRequirement._AssIdSubcontract ?? 0);
requirement.CommodityId = new SysId(dbRequirement._CommodityId ?? 0);
requirement.AssociationIdSubContract = new SysId(dbRequirement._AssIdSubcontract);
requirement.CommodityId = new SysId(dbRequirement._CommodityId);
requirement.ProductCode = dbRequirement._ProductCode;
requirement.AssetId = new SysId(dbRequirement._AssetId ?? 0);
requirement.AssetId = new SysId(dbRequirement._AssetId);
requirement.DescBrief = dbRequirement._DescBrief;
requirement.DescIntro = dbRequirement._DescIntro;
requirement.DescOutline = dbRequirement._DescOutline;
@@ -774,20 +772,20 @@ namespace Sarand.BusinessMgr.Net.Standard.Dbas.Mgr
requirement.NominalCode = dbRequirement._NominalCode;
requirement.Quantity = (decimal)dbRequirement._Quantity;
requirement.QuantityProd = (decimal)dbRequirement._QuantityProd;
requirement.UomId = new SysId(dbRequirement._UomId ?? 0);
requirement.UomId = new SysId(dbRequirement._UomId);
requirement.MaterialSourceCode = dbRequirement._MaterialSourceCode;
requirement.AmountUnit = (decimal)dbRequirement._AmountUnit;
requirement.AmountAct = (decimal)dbRequirement._AmountAct;
requirement.AmountDisc = (decimal)dbRequirement._AmountDisc;
requirement.AmountNet = (decimal)dbRequirement._AmountNet;
requirement.TaxCodeId = new SysId(dbRequirement._TaxCodeId ?? 0);
requirement.TaxCodeId = new SysId(dbRequirement._TaxCodeId);
requirement.TaxRate = (decimal)dbRequirement._TaxRate;
requirement.AmountTax = (decimal)dbRequirement._AmountTax;
requirement.AmountTot = (decimal)dbRequirement._AmountTot;
requirement.TimeEst = (decimal)dbRequirement._TimeEst;
requirement.TimeAct = (decimal)dbRequirement._TimeAct;
requirement.TimeTot = (decimal)dbRequirement._TimeTot;
requirement.LocationIdStock = new SysId(dbRequirement._LocationIdStock ?? 0);
requirement.LocationIdStock = new SysId(dbRequirement._LocationIdStock);
requirement.CostLabourHours = dbRequirement._CostLabourHours ?? 0.0m;
requirement.CostLabourRateHour = dbRequirement._CostLabourRateHour ?? 0.0m;
requirement.CostLabour = dbRequirement._CostLabour ?? 0.0m;
@@ -800,8 +798,8 @@ namespace Sarand.BusinessMgr.Net.Standard.Dbas.Mgr
// Common properties.
requirement.Notes = dbRequirement._Notes;
requirement.Status = SacsSystem.GetStatusForCode(dbRequirement._Status);
requirement.SetCreateStamp(dbRequirement._CreateOn ?? default(DateTime), new SysId(dbRequirement._CreateBy ?? 0), dbRequirement._CreateHost);
requirement.SetUpdateStamp(dbRequirement._UpdateOn ?? default(DateTime), new SysId(dbRequirement._UpdateBy ?? 0), dbRequirement._UpdateHost);
requirement.SetCreateStamp(dbRequirement._CreateOn, new SysId(dbRequirement._CreateBy), dbRequirement._CreateHost);
requirement.SetUpdateStamp(dbRequirement._UpdateOn, new SysId(dbRequirement._UpdateBy), dbRequirement._UpdateHost);
requirement.AcceptChanges();
}
@@ -566,7 +566,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Dbas.Mgr
private SbmTransaction_Dbas CreateTransaction(Transaction_Db dbTransaction)
{
ClearErrorState();
SbmTransaction_Dbas transaction = new SbmTransaction_Dbas(new SysId(dbTransaction._Id), new SysId(dbTransaction._AffIdOwner ?? 0), new SysId(dbTransaction._AssocId), (Sbm.TransactionType)dbTransaction._Type, (ushort)dbTransaction._Flags);
SbmTransaction_Dbas transaction = new SbmTransaction_Dbas(new SysId(dbTransaction._Id), new SysId(dbTransaction._AffIdOwner), new SysId(dbTransaction._AssocId), (Sbm.TransactionType)dbTransaction._Type, (ushort)dbTransaction._Flags);
PopulateFrom(dbTransaction, transaction);
return transaction;
}
@@ -821,22 +821,22 @@ namespace Sarand.BusinessMgr.Net.Standard.Dbas.Mgr
private void PopulateFrom(Transaction_Db dbTransaction, SbmTransaction transaction)
{
//transaction.Id = new SysId(dbTransaction._Id);
transaction.AffiliateIdOwner = new SysId(dbTransaction._AffIdOwner ?? 0);
transaction.AffiliateIdOwner = new SysId(dbTransaction._AffIdOwner);
transaction.AssociationId = new SysId(dbTransaction._AssocId);
transaction.TransactionType = (Sbm.TransactionType)(dbTransaction._Type ?? 0);
transaction.Ref = dbTransaction._Ref;
transaction.RefExt = dbTransaction._RefExt;
transaction.RaisedBy = dbTransaction._RaisedBy;
transaction.AffiliateIdRaise = new SysId(dbTransaction._AffIdRaise ?? 0);
transaction.AssociationIdOffice = new SysId(dbTransaction._AssocIdOffice ?? 0);
transaction.AffiliateIdRaise = new SysId(dbTransaction._AffIdRaise);
transaction.AssociationIdOffice = new SysId(dbTransaction._AssocIdOffice);
transaction.ContactName = dbTransaction._ContactName;
transaction.Likelihood = dbTransaction._Likelihood;
transaction.TransactionIdSource = new SysId(dbTransaction._TransIdSource ?? 0);
transaction.TransactionIdSource = new SysId(dbTransaction._TransIdSource);
transaction.ReferCode = dbTransaction._ReferCode;
transaction.ReferSource = dbTransaction._ReferSource;
transaction.AffiliateIdRefer = new SysId(dbTransaction._AffIdRefer ?? 0);
transaction.AssociationIdContract = new SysId(dbTransaction._AssocIdContract ?? 0);
transaction.AssociationIdDelivery = new SysId(dbTransaction._AssIdDeliver ?? 0);
transaction.AffiliateIdRefer = new SysId(dbTransaction._AffIdRefer);
transaction.AssociationIdContract = new SysId(dbTransaction._AssocIdContract);
transaction.AssociationIdDelivery = new SysId(dbTransaction._AssIdDeliver);
transaction.Raised = dbTransaction._Raised ?? default(DateTime);
transaction.Required = dbTransaction._Required ?? default(DateTime);
transaction.InProgress = dbTransaction._InProgress ?? default(DateTime);
@@ -851,8 +851,8 @@ namespace Sarand.BusinessMgr.Net.Standard.Dbas.Mgr
transaction.ResponseCode = dbTransaction._ResponseCode;
transaction.ContactAreaCode = dbTransaction._ContactAreaCode;
transaction.Postcode = dbTransaction._Postcode;
transaction.CurrencyId = new SysId(dbTransaction._CurrencyId ?? 0);
transaction.TaxCodeId = new SysId(dbTransaction._TaxCodeId ?? 0);
transaction.CurrencyId = new SysId(dbTransaction._CurrencyId);
transaction.TaxCodeId = new SysId(dbTransaction._TaxCodeId);
transaction.AmountEst = dbTransaction._AmountEst ?? 0.0m;
transaction.AmountMax = dbTransaction._AmountMax ?? 0.0m;
transaction.AmountNet = dbTransaction._AmountNet ?? 0.0m;
@@ -861,9 +861,9 @@ namespace Sarand.BusinessMgr.Net.Standard.Dbas.Mgr
transaction.TimeEst = dbTransaction._TimeEst ?? 0.0m;
transaction.TimeAct = dbTransaction._TimeAct ?? 0.0m;
transaction.TimeTot = dbTransaction._TimeTot ?? 0.0m;
transaction.LocationIdStock = new SysId(dbTransaction._LocationIdStock ?? 0);
transaction.LocationIdStock = new SysId(dbTransaction._LocationIdStock);
transaction.Weight = dbTransaction._Weight ?? 0.0m;
transaction.UomIdWeight = new SysId(dbTransaction._UomIdWeight ?? 0);
transaction.UomIdWeight = new SysId(dbTransaction._UomIdWeight);
transaction.BoxCount = dbTransaction._BoxCount;
transaction.DeliveryStatusCode = dbTransaction._DeliveryStatusCode;
transaction.DeliveryTypeCode = dbTransaction._DeliveryTypeCode;
@@ -874,7 +874,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Dbas.Mgr
transaction.DeliveryRef = dbTransaction._DeliveryRef;
transaction.DeliveryComment = dbTransaction._DeliveryComment;
transaction.DeliveryAmountNet = dbTransaction._DeliveryAmountNet ?? 0.0m;
transaction.TaxCodeIdDelivery = new SysId(dbTransaction._TaxCodeIdDelivery ?? 0);
transaction.TaxCodeIdDelivery = new SysId(dbTransaction._TaxCodeIdDelivery);
transaction.DeliveryAmountTax = dbTransaction._DeliveryAmountTax ?? 0.0m;
transaction.DeliveryAmountTot = dbTransaction._DeliveryAmountTot ?? 0.0m;
transaction.DeliveryDepartment = dbTransaction._DeliveryDepartment;
@@ -882,8 +882,8 @@ namespace Sarand.BusinessMgr.Net.Standard.Dbas.Mgr
// Common properties.
transaction.Notes = dbTransaction._Notes;
transaction.Status = SacsSystem.GetStatusForCode(dbTransaction._Status);
transaction.SetCreateStamp(dbTransaction._CreateOn ?? default(DateTime), new SysId(dbTransaction._CreateBy ?? 0), dbTransaction._CreateHost);
transaction.SetUpdateStamp(dbTransaction._UpdateOn ?? default(DateTime), new SysId(dbTransaction._UpdateBy ?? 0), dbTransaction._UpdateHost);
transaction.SetCreateStamp(dbTransaction._CreateOn, new SysId(dbTransaction._CreateBy), dbTransaction._CreateHost);
transaction.SetUpdateStamp(dbTransaction._UpdateOn, new SysId(dbTransaction._UpdateBy), dbTransaction._UpdateHost);
transaction.AcceptChanges();
}
@@ -1379,7 +1379,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Dbas.Mgr
//-------------------------------------------------------------------
// Transaction query filter.
public override List<string> GetTransactionQueryFilter(SbmTransaction.Params prm)
public override List<string> GetTransactionQueryFilter(SbmTransaction.Params prm, bool forceFullResults = false)
{
List<String> filter = new List<String>();
String tableAlias = StringUtil.OnEmpty(prm.TableAlias, aliasTransaction);
@@ -1779,7 +1779,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Dbas.Mgr
//---------------------------------------------------------------
// 'Archive' filter - restrict transaction dates if no other 'significant' filter in place.
if (prm.RequiresVolumeThrottle())
if (prm.RequiresVolumeThrottle() && !forceFullResults)
{
DateTime today = DateTime.Today;
DateTime earliestTransaction = new DateTime(today.Year - 1, 1, 1);
@@ -1860,7 +1860,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Dbas.Mgr
public override long GetTransactionCount(SbmTransaction.Params prm)
{
ClearErrorState();
return GetTransactionCount(GetTransactionQueryFilter(prm).Concat(" AND ", "(", ")"));
return GetTransactionCount(GetTransactionQueryFilter(prm, true).Concat(" AND ", "(", ")"));
}
//-------------------------------------------------------------------
@@ -32,8 +32,8 @@ namespace Sarand.BusinessMgr.Net.Standard.Dbas.UpdateLog
public SbmUpdateLogItemMonitor_Address(SbmInternals internals, SbmAddress address) :
base(new Config(internals, address.Id))
{
itemTypes = internals.GetSystemCodes(Sbm.SystemCode.ItemType);
addressTypes = internals.GetSystemCodes(Sbm.SystemCode.AddressType);
itemTypes = internals.GetApplicationCodes(Sbm.ApplicationCode.ItemType);
addressTypes = internals.GetApplicationCodes(Sbm.ApplicationCode.AddressType);
RecordAttrValues(address, false);
}
@@ -31,7 +31,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Dbas.UpdateLog
public SbmUpdateLogItemMonitor_Affiliate(SbmInternals internals, SbmAffiliate affiliate) :
base(new Config(internals, affiliate.Id))
{
affiliateTypes = internals.GetSystemCodes(Sbm.SystemCode.AffiliateType);
affiliateTypes = internals.GetApplicationCodes(Sbm.ApplicationCode.AffiliateType);
RecordAttrValues(affiliate, false);
}
@@ -32,8 +32,8 @@ namespace Sarand.BusinessMgr.Net.Standard.Dbas.UpdateLog
public SbmUpdateLogItemMonitor_AssetCategory(SbmInternals internals, SbmAssetCategory assetCategory) :
base(new Config(internals, assetCategory.Id))
{
assetTypes = internals.GetSystemCodes(Sbm.SystemCode.AssetType);
incomeTypes = internals.GetSystemCodes(Sbm.SystemCode.AssetIncomeType);
assetTypes = internals.GetApplicationCodes(Sbm.ApplicationCode.AssetType);
incomeTypes = internals.GetApplicationCodes(Sbm.ApplicationCode.AssetIncomeType);
RecordAttrValues(assetCategory, false);
}

Some files were not shown because too many files have changed in this diff Show More