3.0.2.1 Vehicle Classes
This commit is contained in:
@@ -13,7 +13,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.App
|
||||
//-------------------------------------------------------------------
|
||||
public static class Version
|
||||
{
|
||||
private static String version { get; } = "3.0.2.0";
|
||||
private static String version { get; } = "3.0.2.1";
|
||||
// Retrieve version.
|
||||
public static String GetFullVersion() { return version; }
|
||||
public static String GetAppVersion()
|
||||
@@ -36,6 +36,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.App
|
||||
// Version history.
|
||||
//-------------------------------------------------------------------
|
||||
// 3.0.2 20-Nov-25 .Net 8.
|
||||
// 3.0.2.1 29-Nov-25 Vehicle Classes.
|
||||
//-------------------------------------------------------------------
|
||||
// 3.0.1 19-Feb-25 Portal Transactions.
|
||||
// 3.0.1.1 19-Feb-25 Portal tidy.
|
||||
@@ -48,7 +49,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.App
|
||||
// 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.
|
||||
// 3.0.0 Jul-2021 Initial version.
|
||||
// 02-Feb-25 Initial live deployment.
|
||||
// 3.0.0.1 08-Feb-25 Demo repository registration.
|
||||
// 3.0.0.2 08-Feb-25 Production SMTP config.
|
||||
|
||||
@@ -15,6 +15,7 @@ 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.Linq;
|
||||
@@ -292,7 +293,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.App
|
||||
public List<TypeCodeDesc> RequirementTypeCodes { get { return GetApplicationCodes(Sbm.ApplicationCode.RequirementType); } }
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Code types.
|
||||
// Application Code types.
|
||||
private Dictionary<Sbm.ApplCodeType, List<SaCode>> codeTypeCodes { get; } = new Dictionary<Sbm.ApplCodeType, List<SaCode>>();
|
||||
public String GetCodeTypeCode(Sbm.ApplCodeType codeType)
|
||||
{
|
||||
@@ -302,7 +303,11 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.App
|
||||
{
|
||||
if (!codeTypeCodes.ContainsKey(codeType))
|
||||
codeTypeCodes.Add(codeType, CodeTypeConsole.GetCodesForCodeType(GetCodeTypeCode(codeType), false));
|
||||
return new List<SaCode>(codeTypeCodes.GetValueOrDefault(codeType, new List<SaCode>()).Where(c => !activeOnly || c.IsStatusActive));
|
||||
return new List<SaCode>(codeTypeCodes.GetValueOrDefault(codeType, new List<SaCode>()).Where(c => !activeOnly || c.IsStatusActive || c.IsStatusCurrent));
|
||||
}
|
||||
public String GetCodeTypeDesc(Sbm.ApplCodeType codeType, String code)
|
||||
{
|
||||
return GetCodesForCodeType(codeType, false).FirstOrDefault(vm => vm.Code.EqualsCI(code))?.Description ?? code;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
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.Dbas;
|
||||
using Sarand.Net.Standard.Base.Utils;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@@ -58,12 +56,12 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.Bus
|
||||
/// <summary>Properties other than common.</summary>
|
||||
public class DataProperties
|
||||
{
|
||||
public Sbm.VehicleType VehicleType { get; set; } = Sbm.VehicleType.Unknown;
|
||||
public String VehicleCategoryCode { get; set; } = "";
|
||||
public String MakeCode { get; set; } = "";
|
||||
public String Model { get; set; } = "";
|
||||
public String Derivative { get; set; } = "";
|
||||
public String DescBrief { get; set; } = "";
|
||||
public Sbm.VehicleType VehicleType { get; set; } = Sbm.VehicleType.Unknown;
|
||||
public String VehicleCategoryCode { get; set; } = "";
|
||||
public Sbm.VehicleFuelType FuelType { get; set; } = Sbm.VehicleFuelType.Unknown;
|
||||
public Sbm.VehicleOdometerUnits OdometerUnits { get; set; } = Sbm.VehicleOdometerUnits.Unknown;
|
||||
public short Seats { get; set; } = 0;
|
||||
|
||||
@@ -36,6 +36,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.Mgr
|
||||
//-------------------------------------------------------------------
|
||||
// Utilities.
|
||||
public abstract bool AssetDatabaseIsValid();
|
||||
public abstract bool VehicleDatabaseIsValid();
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
}
|
||||
|
||||
@@ -109,7 +109,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.Mgr
|
||||
public virtual bool IsValidVehicleClassData(SbmVehicleClass.Data data, SbmVehicleClass.ErrField errField)
|
||||
{
|
||||
ClearErrorState();
|
||||
// VehicleClass properties.
|
||||
// Item properties.
|
||||
if (errField.MakeCode != SacsHierarchyItem.ValidValue.Ignore && !IsValidValue(data.MakeCode, "make", (long)Internals.GetColTextLen(SbmDbDfn.ColumnIdx.SaVehicleClass_MakeCode), true))
|
||||
{
|
||||
errField.MakeCode = SacsHierarchyItem.ValidValue.Invalid;
|
||||
@@ -120,12 +120,12 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.Mgr
|
||||
errField.Model = SacsHierarchyItem.ValidValue.Invalid;
|
||||
return false;
|
||||
}
|
||||
if (errField.Derivative != SacsHierarchyItem.ValidValue.Ignore && !IsValidValue(data.MakeCode, "derivative", (long)Internals.GetColTextLen(SbmDbDfn.ColumnIdx.SaVehicleClass_Derivative), true))
|
||||
if (errField.Derivative != SacsHierarchyItem.ValidValue.Ignore && !IsValidValue(data.MakeCode, "derivative", (long)Internals.GetColTextLen(SbmDbDfn.ColumnIdx.SaVehicleClass_Derivative)))
|
||||
{
|
||||
errField.Derivative = SacsHierarchyItem.ValidValue.Invalid;
|
||||
return false;
|
||||
}
|
||||
if (errField.DescBrief != SacsHierarchyItem.ValidValue.Ignore && !IsValidValue(data.DescBrief, "desctiption brief", (long)Internals.GetColTextLen(SbmDbDfn.ColumnIdx.SaVehicleClass_DescBrief), true))
|
||||
if (errField.DescBrief != SacsHierarchyItem.ValidValue.Ignore && !IsValidValue(data.DescBrief, "desctiption brief", (long)Internals.GetColTextLen(SbmDbDfn.ColumnIdx.SaVehicleClass_DescBrief)))
|
||||
{
|
||||
errField.DescBrief = SacsHierarchyItem.ValidValue.Invalid;
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user