Brought in to line with common projects.

This commit is contained in:
Andy Howard
2019-06-06 13:08:37 +01:00
parent 0d0feafbf5
commit f892fa7bb6
3 changed files with 19 additions and 11 deletions
@@ -224,7 +224,7 @@ namespace Sarand.LogisticsMgr.Mobile.Core.CodeTypes
case SaCodeType.Column.Description: saCodeType.Description = value; break;
case SaCodeType.Column.MaxCodeLen: saCodeType.MaxCodeLen = (byte)StringUtil.ToInt(value); break;
case SaCodeType.Column.CodeFormat: saCodeType.CodeFormat = value; break;
case SaCodeType.Column.NextCode: saCodeType.NextCode= value; break;
case SaCodeType.Column.NextCode: saCodeType.NextCode = value; break;
case SaCodeType.Column.Notes: saCodeType.Notes = value; break;
case SaCodeType.Column.Status: saCodeType.Status = SacsSystem.GetStatusForCode(value); break;
}
@@ -293,8 +293,8 @@ namespace Sarand.LogisticsMgr.Mobile.Core.CodeTypes
String value = itemData.GetValue(column);
switch (column)
{
case SaCode.Column.Description: saCode.Description= value; break;
case SaCode.Column.DataValue: saCode.DataValue= value; break;
case SaCode.Column.Description: saCode.Description = value; break;
case SaCode.Column.DataValue: saCode.DataValue = value; break;
case SaCode.Column.Sequence: saCode.Sequence = (ushort)StringUtil.ToInt(value); break;
case SaCode.Column.Notes: saCode.Notes = value; break;
case SaCode.Column.Status: saCode.Status = SacsSystem.GetStatusForCode(value); break;
@@ -440,8 +440,8 @@ namespace Sarand.LogisticsMgr.Mobile.Core.CodeTypes
// Filter Code Types.
foreach (SaCodeType codeType in codeTypes)
{
if (SysId.IsValid(prmCode.CodeTypeId) && !codeType.Id.Equals(prmCode.CodeTypeId)) continue;
if (!StringUtil.IsEmpty(prmCode.CodeTypeCode) && !codeType.Code.EqualsCI(prmCode.CodeTypeCode)) continue;
if (prmCode.CodeTypeIds.HasValidIds() && !prmCode.CodeTypeIds.Contains(codeType.Id)) continue;
if (prmCode.CodeTypeCodes.Count > 1 && !prmCode.CodeTypeCodes.ContainsCI(codeType.Code)) continue;
// Code Type is valid - filter code for code types.
foreach (SaCode saCode in GetCodeListForCodeType(codeType.Code, prmCode.StatusCat == SaCode.StatusCat.ActiveOnly))
@@ -477,7 +477,7 @@ namespace Sarand.LogisticsMgr.Mobile.Core.CodeTypes
public override bool CodeExistsForCodeType (string codeTypeCode, string code, bool activeOnly = true)
{
SaCode.Params prmCode = new SaCode.Params();
prmCode.CodeTypeCode = codeTypeCode;
prmCode.CodeTypeCodes.Add(codeTypeCode);
prmCode.Code = code;
prmCode.StatusCat = (activeOnly ? SaCode.StatusCat.ActiveOnly : SaCode.StatusCat.Any);
return GetCodeCount(prmCode) == 1;
@@ -508,6 +508,14 @@ namespace Sarand.LogisticsMgr.Mobile.Core.CodeTypes
throw new NotImplementedException();
}
//-------------------------------------------------------------------
// Get code desc list..
public override Dictionary<string, List<CodeDesc>> GetCodeDescList (SaCode.Params prmCode)
{
throw new NotImplementedException();
}
//-------------------------------------------------------------------
}
//=======================================================================
@@ -130,7 +130,7 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Forms.Controls
// Code filter
SaCode.Params prmCode = new SaCode.Params();
prmCode.CodeTypeCode = SlmSystem.GetCodeTypeCode(codeType);
prmCode.CodeTypeCodes.Add(SlmSystem.GetCodeTypeCode(codeType));
// Retrieve codes.
SlmCodeTypeConsole_Mobile codeTypeConsole = SlmGlobals_Mobile.Application.CodeTypeConsole;
@@ -234,8 +234,8 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Mgr
SlmCommodity.Column.DescFmt,
SlmCommodity.Column.GenesysCode,
SlmCommodity.Column.CustomerId,
SlmCommodity.Column.CustomerCode,
SlmCommodity.Column.CustomerDesc,
SlmCommodity.Column.Customer_Code,
SlmCommodity.Column.Customer_Desc,
SlmCommodity.Column.StockUnit,
SlmCommodity.Column.StockColour,
SlmCommodity.Column.StockCalcDate,
@@ -265,8 +265,8 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Mgr
case SlmCommodity.Column.Desc: commodity.Desc= value; break;
case SlmCommodity.Column.GenesysCode: commodity.GenesysCode = value; break;
case SlmCommodity.Column.CustomerId: commodity.CustomerId = itemData.GetIdValue(column); break;
case SlmCommodity.Column.CustomerCode: commodity.CustomerCode = value; break;
case SlmCommodity.Column.CustomerDesc: commodity.CustomerDesc = value; break;
case SlmCommodity.Column.Customer_Code: commodity.CustomerCode = value; break;
case SlmCommodity.Column.Customer_Desc: commodity.CustomerDesc = value; break;
case SlmCommodity.Column.StockUnit: commodity.StockUnit = StringUtil.ToShort(itemData.GetDecimalValue(column)); break;
case SlmCommodity.Column.StockColour: commodity.StockColour = value; break;
case SlmCommodity.Column.StockCalcDate: commodity.StockCalcDate = itemData.GetDateTimeValue(column); break;