Control - Repository initialisation.
This commit is contained in:
@@ -200,7 +200,7 @@ namespace Sarand.BusinessMgr.Web.Control.Controllers.Param
|
||||
|
||||
// Item filter.
|
||||
SbmcItemParam.Params prmParam = new SbmcItemParam.Params();
|
||||
ItemId itemId = new ItemId(StringUtil.ToShort(model.Filter.ItemType), StringUtil.ToSysId(model.Filter.ItemId));
|
||||
ItemId itemId = new ItemId(StringUtil.ToShort(model.Filter.ItemType), SysId.ToSysId(model.Filter.ItemId));
|
||||
if (ItemId.IsValid(itemId))
|
||||
prmParam.ItemIdsIncluded.Add(itemId);
|
||||
prmParam.Search = model.Filter.Search;
|
||||
@@ -284,7 +284,7 @@ namespace Sarand.BusinessMgr.Web.Control.Controllers.Param
|
||||
{
|
||||
|
||||
// Identify item.
|
||||
SysId itemParamId = model.Param.Id.ToSysId();
|
||||
SysId itemParamId = SysId.ToSysId(model.Param.Id);
|
||||
if (!SysId.IsValid(itemParamId))
|
||||
return Json(responseData.SetMessage(messageTitle, Localiser["msg.error.item.id.not.specified"]));
|
||||
|
||||
@@ -321,7 +321,7 @@ namespace Sarand.BusinessMgr.Web.Control.Controllers.Param
|
||||
RefreshModel(model);
|
||||
|
||||
// Validate item Id.
|
||||
SysId itemParamId = model.Param.Id.ToSysId();
|
||||
SysId itemParamId = SysId.ToSysId(model.Param.Id);
|
||||
if (StringUtil.ToBool(model.Param.Exists) && !SysId.IsValid(itemParamId))
|
||||
{
|
||||
SaLogger.Warn($"{SysUtil.Fn} Id not supplied for existing Item Param.");
|
||||
@@ -352,7 +352,7 @@ namespace Sarand.BusinessMgr.Web.Control.Controllers.Param
|
||||
}
|
||||
|
||||
// Contruct item id.
|
||||
ItemId itemId = new ItemId(StringUtil.ToShort(model.Param.ItemType), model.Param.ItemId.ToSysId());
|
||||
ItemId itemId = new ItemId(StringUtil.ToShort(model.Param.ItemType), SysId.ToSysId(model.Param.ItemId));
|
||||
|
||||
if (itemParam != null && !itemParam.ItemId.Equals(itemId))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user