Control - Repository initialisation.

This commit is contained in:
Andy Howard
2025-01-09 16:30:52 +00:00
parent d015470f58
commit 4a72043f00
103 changed files with 4324 additions and 469 deletions
@@ -14,8 +14,8 @@ using System.Linq;
namespace Sarand.BusinessMgr.Web.Control.Controllers.Account
{
//=======================================================================
partial class UserAccountController
//=======================================================================
partial class UserAccountController
{
//-------------------------------------------------------------------
// Definitions.
@@ -185,7 +185,7 @@ namespace Sarand.BusinessMgr.Web.Control.Controllers.Account
{
// Identify item.
SysId userAccountId = model.User.Id.ToSysId();
SysId userAccountId = SysId.ToSysId(model.User.Id);
if (!SysId.IsValid(userAccountId))
return Json(responseData.SetMessage(messageTitle, Localiser["msg.error.item.id.not.specified"]));
@@ -265,7 +265,7 @@ namespace Sarand.BusinessMgr.Web.Control.Controllers.Account
RefreshModel(model);
// Validate item Id.
SysId userAccountId = model.User.Id.ToSysId();
SysId userAccountId = SysId.ToSysId(model.User.Id);
if (StringUtil.ToBool(model.User.Exists) && !SysId.IsValid(userAccountId))
{
SaLogger.Warn($"{SysUtil.Fn} User Id not supplied for existing item.");
@@ -366,7 +366,7 @@ namespace Sarand.BusinessMgr.Web.Control.Controllers.Account
{
// Retrieve user.
SysId userAccountId = model.User.Id.ToSysId();
SysId userAccountId = SysId.ToSysId(model.User.Id);
SbmcUserAccount userAccount = ControlAccountMgr.GetUserAccountById(userAccountId);
disposables.Add(userAccount);
if (userAccount == null)