diff --git a/SaBusinessMgrCoreWebControl/.config/dotnet-tools.json b/SaBusinessMgrCoreWebControl/.config/dotnet-tools.json new file mode 100644 index 0000000..159811c --- /dev/null +++ b/SaBusinessMgrCoreWebControl/.config/dotnet-tools.json @@ -0,0 +1,13 @@ +{ + "version": 1, + "isRoot": true, + "tools": { + "dotnet-ef": { + "version": "9.0.1", + "commands": [ + "dotnet-ef" + ], + "rollForward": false + } + } +} \ No newline at end of file diff --git a/SaBusinessMgrCoreWebControl/Control/App/SbmApplication_Control.cs b/SaBusinessMgrCoreWebControl/Control/App/SbmApplication_Control.cs index 709edd5..86cf3d1 100644 --- a/SaBusinessMgrCoreWebControl/Control/App/SbmApplication_Control.cs +++ b/SaBusinessMgrCoreWebControl/Control/App/SbmApplication_Control.cs @@ -222,7 +222,7 @@ namespace Sarand.BusinessMgr.Web.Control.App // Application configuration. appConfigs = SbmAppConfigHelper.ExtractAppConfigs(SbmConfiguration.GetSection("AppConfigs")); - emailConfigs = SbmEmailConfigHelper.ExtractEmailConfigs(SbmConfiguration.GetSection("EmailConfigs")); + emailConfigs = SbmEmailConfigHelper.ExtractEmailConfigs(SbmConfiguration.GetSection("Email/Configs")); LoggingRootFolder = AppConfig.Logging.RootFolder; // Application instance. diff --git a/SaBusinessMgrCoreWebControl/Control/App/SbmSessionData_Control.cs b/SaBusinessMgrCoreWebControl/Control/App/SbmSessionData_Control.cs index 5893079..9caede9 100644 --- a/SaBusinessMgrCoreWebControl/Control/App/SbmSessionData_Control.cs +++ b/SaBusinessMgrCoreWebControl/Control/App/SbmSessionData_Control.cs @@ -3,7 +3,7 @@ using Sarand.BusinessMgr.Net.Core.Web.App; using Sarand.BusinessMgr.Net.Standard.Base.App; using Sarand.BusinessMgr.Net.Standard.Base.Bus.Control; using Sarand.BusinessMgr.Net.Standard.Base.Core; -using Sarand.BusinessMgr.Web.Control.Controllers; +using Sarand.BusinessMgr.Web.Control.Components; using Sarand.Net.Standard.Base.Bus; using Sarand.Net.Standard.Base.Dbas; using Sarand.Net.Standard.Base.Helpers; diff --git a/SaBusinessMgrCoreWebControl/Control/Controllers/SbmController_Control.cs b/SaBusinessMgrCoreWebControl/Control/Components/SbmController_Control.cs similarity index 89% rename from SaBusinessMgrCoreWebControl/Control/Controllers/SbmController_Control.cs rename to SaBusinessMgrCoreWebControl/Control/Components/SbmController_Control.cs index 18fbe5e..f79ef29 100644 --- a/SaBusinessMgrCoreWebControl/Control/Controllers/SbmController_Control.cs +++ b/SaBusinessMgrCoreWebControl/Control/Components/SbmController_Control.cs @@ -19,7 +19,7 @@ using System.Collections.Generic; using System.Collections.Specialized; using System.Web; -namespace Sarand.BusinessMgr.Web.Control.Controllers +namespace Sarand.BusinessMgr.Web.Control.Components { //====================================================================== public class SbmController_Control : SbmController_Web @@ -56,7 +56,7 @@ namespace Sarand.BusinessMgr.Web.Control.Controllers /// Control session data protected SbmApplication_Control App_Control { get { return SbmApplication_Control.Instance; } } protected SbmSessionData_Control SessionData_Control { get { return SessionData as SbmSessionData_Control; } } - protected override SbmSessionData_Web DeserializeSessionData(String sessionDataJson) + protected override SbmSessionData_Web DeserializeSessionData(string sessionDataJson) { return JsonConvert.DeserializeObject(sessionDataJson, SessionDataJsonDeserializerSettings); } @@ -84,7 +84,7 @@ namespace Sarand.BusinessMgr.Web.Control.Controllers /// - Open user session - store details against Sesion Data. /// - Set 'Keep logged in' cookie if required. /// - protected bool SignUserIn(SbmcUserAccount userAccount, bool keepLoggedIn, ref String errorMessage) + protected bool SignUserIn(SbmcUserAccount userAccount, bool keepLoggedIn, ref string errorMessage) { // Record disposable items as they are created so all can be disposed when needed. using (DisposableCollection disposables = new DisposableCollection()) @@ -134,7 +134,7 @@ namespace Sarand.BusinessMgr.Web.Control.Controllers { // Validate user properties. if (!SysId.IsValid(userAccount.Id)) return false; - if (StringUtil.IsEmpty(userAccount.EmailAddress)) return false; + if (userAccount.EmailAddress.IsEmpty()) return false; // Close previous session. CloseUserSession(); @@ -161,9 +161,9 @@ namespace Sarand.BusinessMgr.Web.Control.Controllers if (!AppConfig.Security.SignIn.KeepLoggedIn.Allowed) return false; // Extract cookie details. - String encryptedParams = GetRequestCookie(KeepLoggedIn.CookieName); + string encryptedParams = GetRequestCookie(KeepLoggedIn.CookieName); KeepLoggedInParams keepLoggedInParams = ExtractKeepLoggedInParams(encryptedParams); - String logSuffix = keepLoggedInParams.GetValidParams().Concat("", " ", "."); + string logSuffix = keepLoggedInParams.GetValidParams().Concat("", " ", "."); if (keepLoggedInParams.IsValid()) { using (SbmcUserAccount userAccount = ControlAccountMgr.GetUserAccountById(keepLoggedInParams.UserAccountId)) @@ -172,7 +172,7 @@ namespace Sarand.BusinessMgr.Web.Control.Controllers { if (userAccount.IsStatusActive) { - String errorMessage = ""; + string errorMessage = ""; if (SignUserIn(userAccount, true, ref errorMessage)) { // Successful login. @@ -194,7 +194,7 @@ namespace Sarand.BusinessMgr.Web.Control.Controllers /// Keep-Logged-In cookie. protected void SetKeepLoggedInCookie() { - String keepLoggedInCookieValue = GenerateKeepLoggedInCookieValue(); + string keepLoggedInCookieValue = GenerateKeepLoggedInCookieValue(); int cookieExpiresDays = Math.Max(Sbm.Config.Security.SignIn.KeepLoggedIn.CookieExpiresDays_Min, Math.Min(Sbm.Config.Security.SignIn.KeepLoggedIn.CookieExpiresDays_Max, AppConfig.Security.SignIn.KeepLoggedIn.CookieExpiresDays)); SetResponseCookie(KeepLoggedIn.CookieName, keepLoggedInCookieValue, DateTime.Now.AddDays(cookieExpiresDays), true); SaLogger.Debug($"{SysUtil.Fn} 'Keep Logged In' cookie set. Value: " + keepLoggedInCookieValue); @@ -203,7 +203,7 @@ namespace Sarand.BusinessMgr.Web.Control.Controllers /// Set the 'Keep Logged In' response cookie to expired with no data. public void ClearKeepLoggedInCookie() { - if (StringUtil.IsEmpty(GetRequestCookie(KeepLoggedIn.CookieName))) return; + if (GetRequestCookie(KeepLoggedIn.CookieName).IsEmpty()) return; // Clear cookie by setting expiry date in the past. SetResponseCookie(KeepLoggedIn.CookieName, "", DateTime.Today.AddDays(-7), true); SaLogger.Debug($"{SysUtil.Fn} 'Keep Logged In' cookie cleared."); @@ -217,16 +217,16 @@ namespace Sarand.BusinessMgr.Web.Control.Controllers // - IV Must be regenerated if key is changed: uncomment 'Generated' variable and copy resulting value to IV variable. public static class KeepLoggedIn { - public static String CookieName = "BCKLI"; - public static String Base64Key = SacsEncryptionHelper.EncodePlainKey("$BusinessMgr+KeEp-1OgG3d=1n}*32?", SacsEncryptionHelper.KeyLength); - public static String Base64IV = "fpHMZchDkrJzgjVMrjpdHg=="; + public static string CookieName = "BCKLI"; + public static string Base64Key = SacsEncryptionHelper.EncodePlainKey("$BusinessMgr+KeEp-1OgG3d=1n}*32?", SacsEncryptionHelper.KeyLength); + public static string Base64IV = "fpHMZchDkrJzgjVMrjpdHg=="; //public static String Base64IV_Generated = SacsEncryptionHelper.InitSymmetricEncryptionIV(KeepLoggedIn.Base64Key); } //------------------------------------------------------------------- // Keep-logged-in cookie value. - private static readonly String ParamName_KeepLoggedIn_UserAccountId = "uai"; - private String GenerateKeepLoggedInCookieValue() + private static readonly string ParamName_KeepLoggedIn_UserAccountId = "uai"; + private string GenerateKeepLoggedInCookieValue() { NameValueCollection keepLoggedInParams = new NameValueCollection(); keepLoggedInParams.Add(ParamName_KeepLoggedIn_UserAccountId, SysId.ToString(SessionData_Control.User.UserAccountId)); @@ -238,9 +238,9 @@ namespace Sarand.BusinessMgr.Web.Control.Controllers { public SysId UserAccountId { get; set; } /// Retrieve the list of valid parameters in printable format [Name: Value]. - public List GetValidParams() + public List GetValidParams() { - List values = new List(); + List values = new List(); if (SysId.IsValid(UserAccountId)) values.Add("UserAccountId: " + SysId.ToString(UserAccountId)); return values; @@ -252,13 +252,13 @@ namespace Sarand.BusinessMgr.Web.Control.Controllers SysId.IsValid(UserAccountId); } } - public KeepLoggedInParams ExtractKeepLoggedInParams(String encryptedParams) + public KeepLoggedInParams ExtractKeepLoggedInParams(string encryptedParams) { KeepLoggedInParams keepLoggedInParams = new KeepLoggedInParams(); - if (!StringUtil.IsEmpty(encryptedParams)) + if (!encryptedParams.IsEmpty()) { NameValueCollection linkParams = DecryptParameters(encryptedParams, KeepLoggedIn.Base64IV, KeepLoggedIn.Base64Key); - keepLoggedInParams.UserAccountId = new SysId(StringUtil.ToInt(linkParams.Get(ParamName_KeepLoggedIn_UserAccountId))); + keepLoggedInParams.UserAccountId = new SysId(linkParams.Get(ParamName_KeepLoggedIn_UserAccountId).ToInt()); } if (DebugMode) SaLogger.Info($"{SysUtil.Fn} UserAccountId: " + SysId.ToString(keepLoggedInParams.UserAccountId)); return keepLoggedInParams; @@ -269,16 +269,16 @@ namespace Sarand.BusinessMgr.Web.Control.Controllers //------------------------------------------------------------------- // Encryption key is the same for all users each time the application is started, // but a different IV value is generated for each session so that the links/parameters cannot be shared. - public static String Base64Key_ControlApp { get; } = SacsEncryptionHelper.EncodePlainKey("BusinessMgr=Control&Encryption-" + DateTime.Today.Format("ddMMyy"), SacsEncryptionHelper.KeyLength); - protected String EncryptSessionParams(NameValueCollection parameters) + public static string Base64Key_ControlApp { get; } = SacsEncryptionHelper.EncodePlainKey("BusinessMgr=Control&Encryption-" + DateTime.Today.Format("ddMMyy"), SacsEncryptionHelper.KeyLength); + protected string EncryptSessionParams(NameValueCollection parameters) { return HttpUtility.UrlEncode(EncryptParameters(parameters, SessionData_Control.Base64IV_ControlApp, Base64Key_ControlApp)); } - public static String EncryptSessionParams(SbmController_Control controller, NameValueCollection parameters) + public static string EncryptSessionParams(SbmController_Control controller, NameValueCollection parameters) { return controller.EncryptSessionParams(parameters); } - protected NameValueCollection ExtractSessionParams(String encryptedParams) + protected NameValueCollection ExtractSessionParams(string encryptedParams) { return DecryptParameters(encryptedParams, SessionData_Control.Base64IV_ControlApp, Base64Key_ControlApp); } diff --git a/SaBusinessMgrCoreWebControl/Control/Models/SbmModel_Control.cs b/SaBusinessMgrCoreWebControl/Control/Components/SbmModel_Control.cs similarity index 98% rename from SaBusinessMgrCoreWebControl/Control/Models/SbmModel_Control.cs rename to SaBusinessMgrCoreWebControl/Control/Components/SbmModel_Control.cs index 100cbad..0ac74a5 100644 --- a/SaBusinessMgrCoreWebControl/Control/Models/SbmModel_Control.cs +++ b/SaBusinessMgrCoreWebControl/Control/Components/SbmModel_Control.cs @@ -9,7 +9,7 @@ using Sarand.Net.Standard.Base.Core; using System; using System.Collections.Generic; -namespace Sarand.BusinessMgr.Web.Control.Models +namespace Sarand.BusinessMgr.Web.Control.Components { //======================================================================= public class SbmModel_Control : SbmModel_Base diff --git a/SaBusinessMgrCoreWebControl/Control/Controllers/Account/UserAccountController-Ajax.cs b/SaBusinessMgrCoreWebControl/Control/Controllers/Account/UserAccountController-Ajax.cs index 7a53bf9..05a12ec 100644 --- a/SaBusinessMgrCoreWebControl/Control/Controllers/Account/UserAccountController-Ajax.cs +++ b/SaBusinessMgrCoreWebControl/Control/Controllers/Account/UserAccountController-Ajax.cs @@ -1,7 +1,7 @@ using DocumentFormat.OpenXml.Spreadsheet; using Microsoft.AspNetCore.Mvc; using Sarand.BusinessMgr.Net.Standard.Base.Bus.Control; -using Sarand.BusinessMgr.Web.Control.Models; +using Sarand.BusinessMgr.Web.Control.Components; using Sarand.BusinessMgr.Web.Control.Models.Account; using Sarand.Net.Standard.Base.App; using Sarand.Net.Standard.Base.Bus; diff --git a/SaBusinessMgrCoreWebControl/Control/Controllers/Account/UserAccountController.cs b/SaBusinessMgrCoreWebControl/Control/Controllers/Account/UserAccountController.cs index e791a51..fc1c5d4 100644 --- a/SaBusinessMgrCoreWebControl/Control/Controllers/Account/UserAccountController.cs +++ b/SaBusinessMgrCoreWebControl/Control/Controllers/Account/UserAccountController.cs @@ -1,6 +1,7 @@ using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.Logging; using Sarand.BusinessMgr.Net.Core.Web.App; +using Sarand.BusinessMgr.Web.Control.Components; using Sarand.BusinessMgr.Web.Control.Models.Account; using System; using System.Collections.Generic; @@ -10,8 +11,8 @@ using System.Threading.Tasks; namespace Sarand.BusinessMgr.Web.Control.Controllers.Account { - //====================================================================== - public partial class UserAccountController : SbmController_Control + //====================================================================== + public partial class UserAccountController : SbmController_Control { //------------------------------------------------------------------- // Data members. diff --git a/SaBusinessMgrCoreWebControl/Control/Controllers/HomeController.cs b/SaBusinessMgrCoreWebControl/Control/Controllers/HomeController.cs index c41e489..9b229e1 100644 --- a/SaBusinessMgrCoreWebControl/Control/Controllers/HomeController.cs +++ b/SaBusinessMgrCoreWebControl/Control/Controllers/HomeController.cs @@ -1,6 +1,7 @@ using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.Logging; using Sarand.BusinessMgr.Net.Core.Web.App; +using Sarand.BusinessMgr.Web.Control.Components; using Sarand.BusinessMgr.Web.Control.Models; using System; using System.Collections.Generic; diff --git a/SaBusinessMgrCoreWebControl/Control/Controllers/Instance/CoreDatabaseController-Ajax.cs b/SaBusinessMgrCoreWebControl/Control/Controllers/Instance/CoreDatabaseController-Ajax.cs index bce8db2..1d8f42f 100644 --- a/SaBusinessMgrCoreWebControl/Control/Controllers/Instance/CoreDatabaseController-Ajax.cs +++ b/SaBusinessMgrCoreWebControl/Control/Controllers/Instance/CoreDatabaseController-Ajax.cs @@ -2,8 +2,8 @@ using Microsoft.AspNetCore.Mvc; using NPOI.SS.Formula.Functions; using Sarand.BusinessMgr.Net.Standard.Base.Bus.Control; +using Sarand.BusinessMgr.Web.Control.Components; using Sarand.BusinessMgr.Web.Control.Consoles; -using Sarand.BusinessMgr.Web.Control.Models; using Sarand.BusinessMgr.Web.Control.Models.Instance; using Sarand.Net.Standard.Base.App; using Sarand.Net.Standard.Base.Bus; diff --git a/SaBusinessMgrCoreWebControl/Control/Controllers/Instance/CoreDatabaseController.cs b/SaBusinessMgrCoreWebControl/Control/Controllers/Instance/CoreDatabaseController.cs index 0e57d39..33de668 100644 --- a/SaBusinessMgrCoreWebControl/Control/Controllers/Instance/CoreDatabaseController.cs +++ b/SaBusinessMgrCoreWebControl/Control/Controllers/Instance/CoreDatabaseController.cs @@ -1,6 +1,7 @@ using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.Logging; using Sarand.BusinessMgr.Net.Core.Web.App; +using Sarand.BusinessMgr.Web.Control.Components; using Sarand.BusinessMgr.Web.Control.Models.Instance; namespace Sarand.BusinessMgr.Web.Control.Controllers.Instance diff --git a/SaBusinessMgrCoreWebControl/Control/Controllers/Instance/OwnerController-Ajax.cs b/SaBusinessMgrCoreWebControl/Control/Controllers/Instance/OwnerController-Ajax.cs index 4190553..baede81 100644 --- a/SaBusinessMgrCoreWebControl/Control/Controllers/Instance/OwnerController-Ajax.cs +++ b/SaBusinessMgrCoreWebControl/Control/Controllers/Instance/OwnerController-Ajax.cs @@ -1,6 +1,6 @@ using Microsoft.AspNetCore.Mvc; using Sarand.BusinessMgr.Net.Standard.Base.Bus.Control; -using Sarand.BusinessMgr.Web.Control.Models; +using Sarand.BusinessMgr.Web.Control.Components; using Sarand.BusinessMgr.Web.Control.Models.Instance; using Sarand.Net.Standard.Base.App; using Sarand.Net.Standard.Base.Bus; diff --git a/SaBusinessMgrCoreWebControl/Control/Controllers/Instance/OwnerController.cs b/SaBusinessMgrCoreWebControl/Control/Controllers/Instance/OwnerController.cs index d72fc92..c388400 100644 --- a/SaBusinessMgrCoreWebControl/Control/Controllers/Instance/OwnerController.cs +++ b/SaBusinessMgrCoreWebControl/Control/Controllers/Instance/OwnerController.cs @@ -1,6 +1,7 @@ using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.Logging; using Sarand.BusinessMgr.Net.Core.Web.App; +using Sarand.BusinessMgr.Web.Control.Components; using Sarand.BusinessMgr.Web.Control.Models.Instance; namespace Sarand.BusinessMgr.Web.Control.Controllers.Instance diff --git a/SaBusinessMgrCoreWebControl/Control/Controllers/Instance/RepositoryController-Ajax.cs b/SaBusinessMgrCoreWebControl/Control/Controllers/Instance/RepositoryController-Ajax.cs index aa81050..572b77a 100644 --- a/SaBusinessMgrCoreWebControl/Control/Controllers/Instance/RepositoryController-Ajax.cs +++ b/SaBusinessMgrCoreWebControl/Control/Controllers/Instance/RepositoryController-Ajax.cs @@ -1,7 +1,7 @@ using Microsoft.AspNetCore.Mvc; using Sarand.BusinessMgr.Net.Standard.Base.Bus.Control; +using Sarand.BusinessMgr.Web.Control.Components; using Sarand.BusinessMgr.Web.Control.Consoles; -using Sarand.BusinessMgr.Web.Control.Models; using Sarand.BusinessMgr.Web.Control.Models.Instance; using Sarand.Net.Standard.Base.App; using Sarand.Net.Standard.Base.Bus; diff --git a/SaBusinessMgrCoreWebControl/Control/Controllers/Instance/RepositoryController.cs b/SaBusinessMgrCoreWebControl/Control/Controllers/Instance/RepositoryController.cs index f3c33f3..901fba5 100644 --- a/SaBusinessMgrCoreWebControl/Control/Controllers/Instance/RepositoryController.cs +++ b/SaBusinessMgrCoreWebControl/Control/Controllers/Instance/RepositoryController.cs @@ -1,6 +1,7 @@ using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.Logging; using Sarand.BusinessMgr.Net.Core.Web.App; +using Sarand.BusinessMgr.Web.Control.Components; using Sarand.BusinessMgr.Web.Control.Models.Instance; namespace Sarand.BusinessMgr.Web.Control.Controllers.Instance diff --git a/SaBusinessMgrCoreWebControl/Control/Controllers/Instance/RepositoryInitController-Ajax.cs b/SaBusinessMgrCoreWebControl/Control/Controllers/Instance/RepositoryInitController-Ajax.cs index 10d5bbd..afc7f45 100644 --- a/SaBusinessMgrCoreWebControl/Control/Controllers/Instance/RepositoryInitController-Ajax.cs +++ b/SaBusinessMgrCoreWebControl/Control/Controllers/Instance/RepositoryInitController-Ajax.cs @@ -6,8 +6,8 @@ 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.Consoles; +using Sarand.BusinessMgr.Web.Control.Components; using Sarand.BusinessMgr.Web.Control.Consoles; -using Sarand.BusinessMgr.Web.Control.Models; using Sarand.BusinessMgr.Web.Control.Models.Instance; using Sarand.Net.Standard.Base.App; using Sarand.Net.Standard.Base.Bus; diff --git a/SaBusinessMgrCoreWebControl/Control/Controllers/Param/ParamController-Ajax.cs b/SaBusinessMgrCoreWebControl/Control/Controllers/Param/ParamController-Ajax.cs index 4638881..72ec731 100644 --- a/SaBusinessMgrCoreWebControl/Control/Controllers/Param/ParamController-Ajax.cs +++ b/SaBusinessMgrCoreWebControl/Control/Controllers/Param/ParamController-Ajax.cs @@ -1,6 +1,6 @@ using Microsoft.AspNetCore.Mvc; using Sarand.BusinessMgr.Net.Standard.Base.Bus.Control; -using Sarand.BusinessMgr.Web.Control.Models; +using Sarand.BusinessMgr.Web.Control.Components; using Sarand.BusinessMgr.Web.Control.Models.Param; using Sarand.Net.Standard.Base.App; using Sarand.Net.Standard.Base.Bus; diff --git a/SaBusinessMgrCoreWebControl/Control/Controllers/Param/ParamController.cs b/SaBusinessMgrCoreWebControl/Control/Controllers/Param/ParamController.cs index 558061f..cee689f 100644 --- a/SaBusinessMgrCoreWebControl/Control/Controllers/Param/ParamController.cs +++ b/SaBusinessMgrCoreWebControl/Control/Controllers/Param/ParamController.cs @@ -1,6 +1,7 @@ using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.Logging; using Sarand.BusinessMgr.Net.Core.Web.App; +using Sarand.BusinessMgr.Web.Control.Components; using Sarand.BusinessMgr.Web.Control.Models.Param; namespace Sarand.BusinessMgr.Web.Control.Controllers.Param diff --git a/SaBusinessMgrCoreWebControl/Control/Controllers/Security/SecurityController-Ajax.cs b/SaBusinessMgrCoreWebControl/Control/Controllers/Security/SecurityController-Ajax.cs index 7d066b1..d1372ac 100644 --- a/SaBusinessMgrCoreWebControl/Control/Controllers/Security/SecurityController-Ajax.cs +++ b/SaBusinessMgrCoreWebControl/Control/Controllers/Security/SecurityController-Ajax.cs @@ -1,6 +1,7 @@ using Microsoft.AspNetCore.Mvc; using Sarand.BusinessMgr.Net.Standard.Base.App; using Sarand.BusinessMgr.Net.Standard.Base.Bus.Control; +using Sarand.BusinessMgr.Web.Control.Components; using Sarand.BusinessMgr.Web.Control.Helpers; using Sarand.BusinessMgr.Web.Control.Models; using Sarand.Net.Standard.Base.App; diff --git a/SaBusinessMgrCoreWebControl/Control/Controllers/Security/SecurityController.cs b/SaBusinessMgrCoreWebControl/Control/Controllers/Security/SecurityController.cs index 37922f6..3b8b113 100644 --- a/SaBusinessMgrCoreWebControl/Control/Controllers/Security/SecurityController.cs +++ b/SaBusinessMgrCoreWebControl/Control/Controllers/Security/SecurityController.cs @@ -13,6 +13,7 @@ using System.Diagnostics; using System.Linq; using System.Text.RegularExpressions; using System.Threading.Tasks; +using Sarand.BusinessMgr.Web.Control.Components; namespace Sarand.BusinessMgr.Web.Control.Controllers { diff --git a/SaBusinessMgrCoreWebControl/Control/Models/Account/Model_UserAccount.cs b/SaBusinessMgrCoreWebControl/Control/Models/Account/Model_UserAccount.cs index 379a2f0..cd0e5e3 100644 --- a/SaBusinessMgrCoreWebControl/Control/Models/Account/Model_UserAccount.cs +++ b/SaBusinessMgrCoreWebControl/Control/Models/Account/Model_UserAccount.cs @@ -1,6 +1,7 @@ using Sarand.BusinessMgr.Net.Core.Web.App; using Sarand.BusinessMgr.Net.Standard.Base.App; using Sarand.BusinessMgr.Net.Standard.Base.Bus.Control; +using Sarand.BusinessMgr.Web.Control.Components; using Sarand.Net.Standard.Base.App; using Sarand.Net.Standard.Base.Bus; using Sarand.Net.Standard.Base.Core; diff --git a/SaBusinessMgrCoreWebControl/Control/Models/Instance/Model_CoreDatabase.cs b/SaBusinessMgrCoreWebControl/Control/Models/Instance/Model_CoreDatabase.cs index acc01fe..a3a0290 100644 --- a/SaBusinessMgrCoreWebControl/Control/Models/Instance/Model_CoreDatabase.cs +++ b/SaBusinessMgrCoreWebControl/Control/Models/Instance/Model_CoreDatabase.cs @@ -1,4 +1,5 @@ using Sarand.BusinessMgr.Net.Core.Web.App; +using Sarand.BusinessMgr.Web.Control.Components; using System; namespace Sarand.BusinessMgr.Web.Control.Models.Instance diff --git a/SaBusinessMgrCoreWebControl/Control/Models/Instance/Model_Owner.cs b/SaBusinessMgrCoreWebControl/Control/Models/Instance/Model_Owner.cs index cb00fcc..b7aa712 100644 --- a/SaBusinessMgrCoreWebControl/Control/Models/Instance/Model_Owner.cs +++ b/SaBusinessMgrCoreWebControl/Control/Models/Instance/Model_Owner.cs @@ -3,6 +3,7 @@ using Sarand.BusinessMgr.Net.Core.Web.App; using Sarand.BusinessMgr.Net.Core.Web.Components; using Sarand.BusinessMgr.Net.Standard.Base.App; using Sarand.BusinessMgr.Net.Standard.Base.Bus.Control; +using Sarand.BusinessMgr.Web.Control.Components; using Sarand.Net.Standard.Base.App; using Sarand.Net.Standard.Base.Bus; using Sarand.Net.Standard.Base.Core; diff --git a/SaBusinessMgrCoreWebControl/Control/Models/Instance/Model_Repository.cs b/SaBusinessMgrCoreWebControl/Control/Models/Instance/Model_Repository.cs index 8d4c150..afcb0a6 100644 --- a/SaBusinessMgrCoreWebControl/Control/Models/Instance/Model_Repository.cs +++ b/SaBusinessMgrCoreWebControl/Control/Models/Instance/Model_Repository.cs @@ -3,6 +3,7 @@ using Sarand.BusinessMgr.Net.Core.Web.App; using Sarand.BusinessMgr.Net.Core.Web.Components; using Sarand.BusinessMgr.Net.Standard.Base.App; using Sarand.BusinessMgr.Net.Standard.Base.Bus.Control; +using Sarand.BusinessMgr.Web.Control.Components; using Sarand.Net.Standard.Base.App; using Sarand.Net.Standard.Base.Bus; using Sarand.Net.Standard.Base.Core; diff --git a/SaBusinessMgrCoreWebControl/Control/Models/Instance/Model_RepositoryInit.cs b/SaBusinessMgrCoreWebControl/Control/Models/Instance/Model_RepositoryInit.cs index a341449..9653a66 100644 --- a/SaBusinessMgrCoreWebControl/Control/Models/Instance/Model_RepositoryInit.cs +++ b/SaBusinessMgrCoreWebControl/Control/Models/Instance/Model_RepositoryInit.cs @@ -5,6 +5,7 @@ using Sarand.BusinessMgr.Net.Core.Web.Components; 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.Web.Control.Components; using Sarand.BusinessMgr.Web.Control.Consoles; using Sarand.Net.Standard.Base.App; using Sarand.Net.Standard.Base.Bus; diff --git a/SaBusinessMgrCoreWebControl/Control/Models/Model_Home.cs b/SaBusinessMgrCoreWebControl/Control/Models/Model_Home.cs index 67a15b7..b8c7aba 100644 --- a/SaBusinessMgrCoreWebControl/Control/Models/Model_Home.cs +++ b/SaBusinessMgrCoreWebControl/Control/Models/Model_Home.cs @@ -1,10 +1,11 @@ using Sarand.BusinessMgr.Net.Core.Web.App; using Sarand.BusinessMgr.Net.Standard.Base.Bus.Control; +using Sarand.BusinessMgr.Web.Control.Components; namespace Sarand.BusinessMgr.Web.Control.Models { - //======================================================================= - public class Model_Home : SbmModel_Control + //======================================================================= + public class Model_Home : SbmModel_Control { //------------------------------------------------------------------- // Construction. diff --git a/SaBusinessMgrCoreWebControl/Control/Models/Model_Security.cs b/SaBusinessMgrCoreWebControl/Control/Models/Model_Security.cs index 9c008c5..9af73ea 100644 --- a/SaBusinessMgrCoreWebControl/Control/Models/Model_Security.cs +++ b/SaBusinessMgrCoreWebControl/Control/Models/Model_Security.cs @@ -2,6 +2,7 @@ using Sarand.BusinessMgr.Net.Core.Web.Components; using Sarand.BusinessMgr.Net.Standard.Base.Bus.Control; using Sarand.BusinessMgr.Net.Standard.Base.Helpers; +using Sarand.BusinessMgr.Web.Control.Components; using Sarand.Net.Standard.Base.Helpers; using Sarand.Net.Standard.Base.Utils; using System; diff --git a/SaBusinessMgrCoreWebControl/Control/Models/Param/Model_Param.cs b/SaBusinessMgrCoreWebControl/Control/Models/Param/Model_Param.cs index 23df5c4..519142a 100644 --- a/SaBusinessMgrCoreWebControl/Control/Models/Param/Model_Param.cs +++ b/SaBusinessMgrCoreWebControl/Control/Models/Param/Model_Param.cs @@ -2,6 +2,7 @@ using Sarand.BusinessMgr.Net.Core.Web.App; using Sarand.BusinessMgr.Net.Standard.Base.App; using Sarand.BusinessMgr.Net.Standard.Base.Bus.Control; +using Sarand.BusinessMgr.Web.Control.Components; using Sarand.Net.Standard.Base.App; using Sarand.Net.Standard.Base.Bus; using Sarand.Net.Standard.Base.CodeTypes; diff --git a/SaBusinessMgrCoreWebControl/SaBusinessMgrCoreWebControl.csproj b/SaBusinessMgrCoreWebControl/SaBusinessMgrCoreWebControl.csproj index fa025ad..0fc1db2 100644 --- a/SaBusinessMgrCoreWebControl/SaBusinessMgrCoreWebControl.csproj +++ b/SaBusinessMgrCoreWebControl/SaBusinessMgrCoreWebControl.csproj @@ -26,6 +26,7 @@ + @@ -35,6 +36,11 @@ + + PreserveNewest + true + PreserveNewest + PreserveNewest true diff --git a/SaBusinessMgrCoreWebControl/Views/_ViewImports.cshtml b/SaBusinessMgrCoreWebControl/Views/_ViewImports.cshtml index 059b57f..fe268c1 100644 --- a/SaBusinessMgrCoreWebControl/Views/_ViewImports.cshtml +++ b/SaBusinessMgrCoreWebControl/Views/_ViewImports.cshtml @@ -1,6 +1,7 @@ @using Sarand.BusinessMgr.Net.Standard.Base.App @using Sarand.BusinessMgr.Net.Core.Web.App @using Sarand.BusinessMgr.Web.Control +@using Sarand.BusinessMgr.Web.Control.Components @using Sarand.BusinessMgr.Web.Control.Models @using Sarand.BusinessMgr.Web.Control.Models.Account @using Sarand.BusinessMgr.Web.Control.Models.Instance diff --git a/SaBusinessMgrCoreWebControl/appsettings.Development.json b/SaBusinessMgrCoreWebControl/appsettings.Development.json index 58b13a3..d98cc2e 100644 --- a/SaBusinessMgrCoreWebControl/appsettings.Development.json +++ b/SaBusinessMgrCoreWebControl/appsettings.Development.json @@ -1,26 +1,28 @@ { - "Logging": { - "LogLevel": { - "Default": "Information", - "Microsoft": "Warning", - "Microsoft.Hosting.Lifetime": "Information" - } - }, - "EmailConfigs": { - "SBM-Dev": { - "SMTP": { - "Server": "smtp.ionos.co.uk", - "ServerPort": 587, - "UseSSL": true - }, - "Send": { - "Using": 2, - "UserName": "businessmgr@sarand.com", - "Password": "sarand-busmgr-5apP1re" - }, - "Message": { - "AddressFrom": "DoNotReply@SaBusinessMgr.com" - } - } - } + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft": "Warning", + "Microsoft.Hosting.Lifetime": "Information" + } + }, + "Email": { + "Configs": { + "SBM-Dev": { + "SMTP": { + "Server": "smtp.ionos.co.uk", + "ServerPort": 587, + "UseSSL": true + }, + "Send": { + "Using": 2, + "UserName": "businessmgr@sarand.com", + "Password": "sarand-busmgr-5apP1re" + }, + "Message": { + "AddressFrom": "DoNotReply@SaBusinessMgr.com" + } + } + } + } } diff --git a/SaBusinessMgrCoreWebControl/appsettings.Machine.Sarand602.json b/SaBusinessMgrCoreWebControl/appsettings.Machine.Sarand602.json new file mode 100644 index 0000000..a19caff --- /dev/null +++ b/SaBusinessMgrCoreWebControl/appsettings.Machine.Sarand602.json @@ -0,0 +1,31 @@ +{ + "AppConfigs": { + "BusMgr-Ctrl": { + "Environments": [ "Production" ], + "Instance": "Prod", + "ControlDatabase": { + "Location": "MsSql:.\\BusMgr.SaBusinessMgr_Control", + "User": "bmc", + "Password": "sarand" + }, + "TemplateDatabase": { + "Location": "MsSql:.\\BusMgr.SaBusinessMgr_Template", + "User": "busmgr", + "Password": "sapphire" + }, + "Email": { + "Configs": [], + "Context": "SBC", + "ContactUs": { + "AddressesTo": [ "contact@BusMgr.Sarand.com" ] + } + }, + "Documents": { + "RootFolder": "C:\\Sarand\\BusinessMgr\\Docs" + }, + "Logging": { + "RootFolder": "C:\\Sarand\\BusinessMgr\\Log\\WebControl" + } + } + } +} diff --git a/SaBusinessMgrCoreWebControl/appsettings.Production.json b/SaBusinessMgrCoreWebControl/appsettings.Production.json index 679a8e2..8fbe703 100644 --- a/SaBusinessMgrCoreWebControl/appsettings.Production.json +++ b/SaBusinessMgrCoreWebControl/appsettings.Production.json @@ -1,18 +1,20 @@ { - "EmailConfigs": { - "SBM-Prod": { - "SMTP": { - "Server": "smtp.ionos.co.uk", - "ServerPort": 587, - "UseSSL": true - }, - "Send": { - "Using": 2, - "UserName": "businessmgr@sarand.com", - "Password": "sarand-busmgr-5apP1re" - }, - "Message": { - "AddressFrom": "DoNotReply@SaBusinessMgr.com" + "Email": { + "Configs": { + "SBM-Prod": { + "SMTP": { + "Server": "smtp.ionos.co.uk", + "ServerPort": 587, + "UseSSL": true + }, + "Send": { + "Using": 2, + "UserName": "businessmgr@sarand.com", + "Password": "sarand-busmgr-5apP1re" + }, + "Message": { + "AddressFrom": "DoNotReply@SaBusinessMgr.com" + } } } } diff --git a/SaBusinessMgrCoreWebPortal/.config/dotnet-tools.json b/SaBusinessMgrCoreWebPortal/.config/dotnet-tools.json new file mode 100644 index 0000000..159811c --- /dev/null +++ b/SaBusinessMgrCoreWebPortal/.config/dotnet-tools.json @@ -0,0 +1,13 @@ +{ + "version": 1, + "isRoot": true, + "tools": { + "dotnet-ef": { + "version": "9.0.1", + "commands": [ + "dotnet-ef" + ], + "rollForward": false + } + } +} \ No newline at end of file diff --git a/SaBusinessMgrCoreWebPortal/Portal/App/SbmApplication_Portal.cs b/SaBusinessMgrCoreWebPortal/Portal/App/SbmApplication_Portal.cs index 52d3dad..7d66a14 100644 --- a/SaBusinessMgrCoreWebPortal/Portal/App/SbmApplication_Portal.cs +++ b/SaBusinessMgrCoreWebPortal/Portal/App/SbmApplication_Portal.cs @@ -243,7 +243,7 @@ namespace Sarand.BusinessMgr.Web.Portal.App // Application configuration. appConfigs = SbmAppConfigHelper.ExtractAppConfigs(SbmConfiguration.GetSection("AppConfigs")); - emailConfigs = SbmEmailConfigHelper.ExtractEmailConfigs(SbmConfiguration.GetSection("EmailConfigs")); + emailConfigs = SbmEmailConfigHelper.ExtractEmailConfigs(SbmConfiguration.GetSection("Email/Configs")); LoggingRootFolder = AppConfig.Logging.RootFolder; // Application instance. diff --git a/SaBusinessMgrCoreWebPortal/Portal/App/SbmSessionData_Portal.cs b/SaBusinessMgrCoreWebPortal/Portal/App/SbmSessionData_Portal.cs index 718b852..a3caad9 100644 --- a/SaBusinessMgrCoreWebPortal/Portal/App/SbmSessionData_Portal.cs +++ b/SaBusinessMgrCoreWebPortal/Portal/App/SbmSessionData_Portal.cs @@ -4,7 +4,7 @@ using Sarand.BusinessMgr.Net.Standard.Base.App; using Sarand.BusinessMgr.Net.Standard.Base.Bus; using Sarand.BusinessMgr.Net.Standard.Base.Core; using Sarand.BusinessMgr.Net.Standard.Base.Mgr; -using Sarand.BusinessMgr.Web.Portal.Controllers; +using Sarand.BusinessMgr.Web.Portal.Components; using Sarand.Net.Standard.Base.App; using Sarand.Net.Standard.Base.Bus; using Sarand.Net.Standard.Base.Dbas; diff --git a/SaBusinessMgrCoreWebPortal/Portal/Controllers/SbmController_Portal.cs b/SaBusinessMgrCoreWebPortal/Portal/Components/SbmController_Portal.cs similarity index 91% rename from SaBusinessMgrCoreWebPortal/Portal/Controllers/SbmController_Portal.cs rename to SaBusinessMgrCoreWebPortal/Portal/Components/SbmController_Portal.cs index 17dcc95..f626548 100644 --- a/SaBusinessMgrCoreWebPortal/Portal/Controllers/SbmController_Portal.cs +++ b/SaBusinessMgrCoreWebPortal/Portal/Components/SbmController_Portal.cs @@ -9,7 +9,6 @@ using Sarand.BusinessMgr.Net.Standard.Base.Core; using Sarand.BusinessMgr.Net.Standard.Base.Mgr; using Sarand.BusinessMgr.Web.Portal.App; using Sarand.BusinessMgr.Web.Portal.Helpers; -using Sarand.BusinessMgr.Web.Portal.Models; using Sarand.Net.Standard.Base.App; using Sarand.Net.Standard.Base.Bus; using Sarand.Net.Standard.Base.CodeTypes; @@ -32,7 +31,7 @@ using System.Diagnostics; using System.Linq; using System.Web; -namespace Sarand.BusinessMgr.Web.Portal.Controllers +namespace Sarand.BusinessMgr.Web.Portal.Components { //======================================================================= // Portal Controller - Utils. @@ -100,7 +99,7 @@ namespace Sarand.BusinessMgr.Web.Portal.Controllers /// /// Session data deserialisation. /// - protected override SbmSessionData_Web DeserializeSessionData(String sessionDataJson) + protected override SbmSessionData_Web DeserializeSessionData(string sessionDataJson) { return JsonConvert.DeserializeObject(sessionDataJson, SessionDataJsonDeserializerSettings); } @@ -120,7 +119,7 @@ namespace Sarand.BusinessMgr.Web.Portal.Controllers /// - Open user session - store details against Sesion Data. /// - Set 'Keep logged in' cookie if required. /// - protected bool SignUserIn(SbmSessionData_Portal sessionDataForUser, SbmInternals internalsForUser, SaSecurityItem securityItemUser, SbmAffiliate affiliateUser, SbmAssociation associationOrganisation, SbmAffiliate affiliateOrganisation, bool keepLoggedIn, ref String errorMessage) + protected bool SignUserIn(SbmSessionData_Portal sessionDataForUser, SbmInternals internalsForUser, SaSecurityItem securityItemUser, SbmAffiliate affiliateUser, SbmAssociation associationOrganisation, SbmAffiliate affiliateOrganisation, bool keepLoggedIn, ref string errorMessage) { string errorPrefix = $"Unable to sign account in"; string errorSuffix = $"Context: {sessionDataForUser.RepositoryContext}. Email: {sessionDataForUser.UserEmailAddress}."; @@ -240,7 +239,7 @@ namespace Sarand.BusinessMgr.Web.Portal.Controllers { return false; } - if (StringUtil.IsBlank(sessionDataForUser.UserEmailAddress)) + if (sessionDataForUser.UserEmailAddress.IsBlank()) { return false; } @@ -311,10 +310,10 @@ namespace Sarand.BusinessMgr.Web.Portal.Controllers if (!AppConfig.Security.SignIn.KeepLoggedIn.Allowed) return false; // Extract parameters and validate that they are populated. - String encryptedParams = GetRequestCookie(KeepLoggedIn.CookieName); + string encryptedParams = GetRequestCookie(KeepLoggedIn.CookieName); KeepLoggedInParams keepLoggedInParams = ExtractKeepLoggedInParams(encryptedParams); - String logPrefix = $"{SysUtil.Fn} 'Keep Logged In' cookie found but "; - String logSuffix = keepLoggedInParams.GetValidParams().Concat("", " ", "."); + string logPrefix = $"{SysUtil.Fn} 'Keep Logged In' cookie found but "; + string logSuffix = keepLoggedInParams.GetValidParams().Concat("", " ", "."); if (keepLoggedInParams.IsValid()) { // Instance Repository configured on Control database identified by Context. @@ -338,7 +337,7 @@ namespace Sarand.BusinessMgr.Web.Portal.Controllers { // Bring the Session Data up to date with the session properties. sessionDataForUser.Refresh(securityItemUser, affiliateUser, associationOrganisation, affiliateOrganisation); - String errorMessage = ""; + string errorMessage = ""; if (SignUserIn(sessionDataForUser, internalsForUser, securityItemUser, affiliateUser, associationOrganisation, affiliateOrganisation, true, ref errorMessage)) { // User auto-login successful. @@ -357,7 +356,7 @@ namespace Sarand.BusinessMgr.Web.Portal.Controllers } else SaLogger.Warn($"{SysUtil.Fn} Keep Logged In cookie found but no matching session contexts found." + logSuffix); } - else if (!StringUtil.IsEmpty(encryptedParams)) + else if (!encryptedParams.IsEmpty()) SaLogger.Warn($"{SysUtil.Fn} Keep Logged In cookie found but with incomplete details." + logSuffix); ClearKeepLoggedInCookie(); return false; @@ -367,7 +366,7 @@ namespace Sarand.BusinessMgr.Web.Portal.Controllers /// Keep-Logged-In cookie. protected void SetKeepLoggedInCookie() { - String keepLoggedInCookieValue = GenerateKeepLoggedInCookieValue(); + string keepLoggedInCookieValue = GenerateKeepLoggedInCookieValue(); int cookieExpiresDays = Math.Max(Sbm.Config.Security.SignIn.KeepLoggedIn.CookieExpiresDays_Min, Math.Min(Sbm.Config.Security.SignIn.KeepLoggedIn.CookieExpiresDays_Max, AppConfig.Security.SignIn.KeepLoggedIn.CookieExpiresDays)); SetResponseCookie(KeepLoggedIn.CookieName, keepLoggedInCookieValue, DateTime.Now.AddDays(cookieExpiresDays), true); SaLogger.Debug($"{SysUtil.Fn} 'Keep Logged In' cookie set. Name: {KeepLoggedIn.CookieName}. Value: {keepLoggedInCookieValue}"); @@ -376,7 +375,7 @@ namespace Sarand.BusinessMgr.Web.Portal.Controllers /// Set the 'Keep Logged In' response cookie to expired with no data. public void ClearKeepLoggedInCookie() { - if (StringUtil.IsEmpty(GetRequestCookie(KeepLoggedIn.CookieName))) return; + if (GetRequestCookie(KeepLoggedIn.CookieName).IsEmpty()) return; // Clear cookie by setting expiry date in the past. SetResponseCookie(KeepLoggedIn.CookieName, "", DateTime.Today.AddDays(-7), true); SaLogger.Debug($"{SysUtil.Fn} 'Keep Logged In' cookie cleared. Name: {KeepLoggedIn.CookieName}."); @@ -391,20 +390,20 @@ namespace Sarand.BusinessMgr.Web.Portal.Controllers // NB - 'Keep Logged In' is termed 'Remember Me' in the Portal application. public static class KeepLoggedIn { - public static String CookieName = "sbprm"; - public static String Base64Key = SacsEncryptionHelper.EncodePlainKey("<=SaBusMgr^P0rt4L{KeepLoggedIn}~", SacsEncryptionHelper.KeyLength); + public static string CookieName = "sbprm"; + public static string Base64Key = SacsEncryptionHelper.EncodePlainKey("<=SaBusMgr^P0rt4L{KeepLoggedIn}~", SacsEncryptionHelper.KeyLength); //private static String KeepLoggedIn.Base64IV_Generated = SacsEncryptionHelper.InitSymmetricEncryptionIV(KeepLoggedIn.Base64Key); - public static String Base64IV = "m47AMcMgACp3aoQVc0Y92A=="; + public static string Base64IV = "m47AMcMgACp3aoQVc0Y92A=="; } //------------------------------------------------------------------- // Keep-logged-in cookie value. - private static readonly String ParamName_KeepLoggedIn_RepositoryContext = "rct"; - private static readonly String ParamName_KeepLoggedIn_EmailAddress = "ema"; - private static readonly String ParamName_KeepLoggedIn_SecurityItemId = "sii"; - private static readonly String ParamName_KeepLoggedIn_AffiliateIdUser = "afiu"; - private static readonly String ParamName_KeepLoggedIn_AssociationIdOrganisation = "asio"; - private String GenerateKeepLoggedInCookieValue() + private static readonly string ParamName_KeepLoggedIn_RepositoryContext = "rct"; + private static readonly string ParamName_KeepLoggedIn_EmailAddress = "ema"; + private static readonly string ParamName_KeepLoggedIn_SecurityItemId = "sii"; + private static readonly string ParamName_KeepLoggedIn_AffiliateIdUser = "afiu"; + private static readonly string ParamName_KeepLoggedIn_AssociationIdOrganisation = "asio"; + private string GenerateKeepLoggedInCookieValue() { NameValueCollection keepLoggedInParams = new NameValueCollection(); keepLoggedInParams.Add(ParamName_KeepLoggedIn_RepositoryContext, SessionData_Portal.RepositoryContext); @@ -418,18 +417,18 @@ namespace Sarand.BusinessMgr.Web.Portal.Controllers //------------------------------------------------------------------- public class KeepLoggedInParams { - public String RepositoryContext { get; set; } - public String EmailAddress { get; set; } + public string RepositoryContext { get; set; } + public string EmailAddress { get; set; } public SysId SecurityItemId { get; set; } public SysId AffiliateIdUser { get; set; } public SysId AssociationIdOrganisation { get; set; } /// Retrieve the list of valid parameters in printable format [Name: Value]. - public List GetValidParams() + public List GetValidParams() { - List values = new List(); - if (!StringUtil.IsBlank(RepositoryContext)) + List values = new List(); + if (!RepositoryContext.IsBlank()) values.Add("RepositoryContext: " + RepositoryContext); - if (!StringUtil.IsBlank(EmailAddress)) + if (!EmailAddress.IsBlank()) values.Add("EmailAddress: " + EmailAddress); if (SysId.IsValid(SecurityItemId)) values.Add("SecurityItemId: " + SysId.ToString(SecurityItemId)); @@ -443,17 +442,17 @@ namespace Sarand.BusinessMgr.Web.Portal.Controllers public bool IsValid() { return - !StringUtil.IsBlank(RepositoryContext) && - !StringUtil.IsBlank(EmailAddress) && + !RepositoryContext.IsBlank() && + !EmailAddress.IsBlank() && SysId.IsValid(SecurityItemId) && SysId.IsValid(AffiliateIdUser) && SysId.IsValid(AssociationIdOrganisation); } } - public KeepLoggedInParams ExtractKeepLoggedInParams(String encryptedParams) + public KeepLoggedInParams ExtractKeepLoggedInParams(string encryptedParams) { KeepLoggedInParams keepLoggedInParams = new KeepLoggedInParams(); - if (!StringUtil.IsEmpty(encryptedParams)) + if (!encryptedParams.IsEmpty()) { NameValueCollection linkParams = DecryptParameters(encryptedParams, KeepLoggedIn.Base64IV, KeepLoggedIn.Base64Key); keepLoggedInParams.RepositoryContext = linkParams.Get(ParamName_KeepLoggedIn_RepositoryContext); @@ -470,16 +469,16 @@ namespace Sarand.BusinessMgr.Web.Portal.Controllers // Parameter encryption, eg. for images. //------------------------------------------------------------------- // Encryption key is the same for all users but a different IV value is generated for each session so that the links/parameters cannot be shared. - public static String Base64Key_PortalApp { get; } = SacsEncryptionHelper.EncodePlainKey("{SaBusMgr=Portal-App#Encryption}", SacsEncryptionHelper.KeyLength); - protected String EncryptPortalParams(NameValueCollection parameters) + public static string Base64Key_PortalApp { get; } = SacsEncryptionHelper.EncodePlainKey("{SaBusMgr=Portal-App#Encryption}", SacsEncryptionHelper.KeyLength); + protected string EncryptPortalParams(NameValueCollection parameters) { return HttpUtility.UrlEncode(EncryptParameters(parameters, SessionData_Portal.Base64IV_PortalApp, Base64Key_PortalApp)); } - public static String EncryptPortalParams(SbmController_Portal controller, NameValueCollection parameters) + public static string EncryptPortalParams(SbmController_Portal controller, NameValueCollection parameters) { return controller.EncryptPortalParams(parameters); } - protected NameValueCollection ExtractPortalParams(String encryptedParams) + protected NameValueCollection ExtractPortalParams(string encryptedParams) { return DecryptParameters(encryptedParams, SessionData_Portal.Base64IV_PortalApp, Base64Key_PortalApp); } @@ -487,13 +486,13 @@ namespace Sarand.BusinessMgr.Web.Portal.Controllers //------------------------------------------------------------------- // Logging. //------------------------------------------------------------------- - protected String getLogSuffix() + protected string getLogSuffix() { - List logSuffix = new List(); + List logSuffix = new List(); SbmSessionData_Portal sessionData = SessionData_Portal; if (sessionData != null) { - if (!StringUtil.IsEmpty(sessionData.User.EmailAddress)) + if (!sessionData.User.EmailAddress.IsEmpty()) logSuffix.Add("User: " + sessionData.User.EmailAddress); } return logSuffix.Concat("", " ", "."); diff --git a/SaBusinessMgrCoreWebPortal/Portal/Models/SbmModel_Portal.cs b/SaBusinessMgrCoreWebPortal/Portal/Components/SbmModel_Portal.cs similarity index 77% rename from SaBusinessMgrCoreWebPortal/Portal/Models/SbmModel_Portal.cs rename to SaBusinessMgrCoreWebPortal/Portal/Components/SbmModel_Portal.cs index 5421a47..4310286 100644 --- a/SaBusinessMgrCoreWebPortal/Portal/Models/SbmModel_Portal.cs +++ b/SaBusinessMgrCoreWebPortal/Portal/Components/SbmModel_Portal.cs @@ -22,7 +22,7 @@ using System.Collections.Generic; using System.Linq; using static Sarand.BusinessMgr.Net.Standard.Base.App.Sbm; -namespace Sarand.BusinessMgr.Web.Portal.Models +namespace Sarand.BusinessMgr.Web.Portal.Components { //======================================================================= public class SbmModel_Portal : SbmModel_Base @@ -50,17 +50,17 @@ namespace Sarand.BusinessMgr.Web.Portal.Models //------------------------------------------------------------------- // Properties. protected SbmSessionData_Portal SessionData_Portal { get { return SessionData_Web as SbmSessionData_Portal; } } - public String OrganisationName { get { return SessionData_Portal?.Organisation?.DisplayName ?? ""; } } + public string OrganisationName { get { return SessionData_Portal?.Organisation?.DisplayName ?? ""; } } //------------------------------------------------------------------- // Security profile. public bool UserCanViewFinancials() { return SessionData_Portal.SecurityProfile.UserCanViewFinancials(); } - public bool UserCanViewCommodityFinancials_Supply() { return SessionData_Portal.SecurityProfile.UserCanViewFinancials(Sbm.FinancialType.CommoditySupply); } - public bool UserCanViewCommodityFinancials_Sales() { return SessionData_Portal.SecurityProfile.UserCanViewFinancials(Sbm.FinancialType.CommoditySales); } + public bool UserCanViewCommodityFinancials_Supply() { return SessionData_Portal.SecurityProfile.UserCanViewFinancials(FinancialType.CommoditySupply); } + public bool UserCanViewCommodityFinancials_Sales() { return SessionData_Portal.SecurityProfile.UserCanViewFinancials(FinancialType.CommoditySales); } public bool UserCanUpdateFinancials() { return SessionData_Portal.SecurityProfile.UserCanUpdateFinancials(); } - public bool UserCanStockTake() { return SessionData_Portal.SecurityProfile.UserHasSecurityRight(Sbm.SecurityRight.StockTake); } - public bool UserCanCreateItem(Sbm.ItemType itemType) { return SessionData_Portal.SecurityProfile.UserCanCreateItemType(itemType); } - public bool UserCanUpdateItem(Sbm.ItemType itemType) { return SessionData_Portal.SecurityProfile.UserCanUpdateItemType(itemType); } + public bool UserCanStockTake() { return SessionData_Portal.SecurityProfile.UserHasSecurityRight(SecurityRight.StockTake); } + public bool UserCanCreateItem(ItemType itemType) { return SessionData_Portal.SecurityProfile.UserCanCreateItemType(itemType); } + public bool UserCanUpdateItem(ItemType itemType) { return SessionData_Portal.SecurityProfile.UserCanUpdateItemType(itemType); } //------------------------------------------------------------------- // Business components. @@ -90,19 +90,19 @@ namespace Sarand.BusinessMgr.Web.Portal.Models protected SbmStockControlConfig StockControlConfig { get { return Internals.StockControlConfig; } } protected SbmRequirementCostingConfig RequirementCostingConfig { get { return Internals.RequirementCostingConfig; } } // System codes. - protected List GetCodesOfType(Sbm.SystemCode systemCode) { return Internals.GetSystemCodes(systemCode); } + protected List GetCodesOfType(SystemCode systemCode) { return Internals.GetSystemCodes(systemCode); } //------------------------------------------------------------------- // Page menu options. public class MenuOptionData { - public String Caption { get; set; } - public String Page { get; set; } + public string Caption { get; set; } + public string Page { get; set; } } public class MenuItemData { - public String Caption { get; set; } + public string Caption { get; set; } public List Options { get; } = new List(); } public class MenuData @@ -122,7 +122,7 @@ namespace Sarand.BusinessMgr.Web.Portal.Models // Contacts. MenuItemData contactsItem = new MenuItemData() { Caption = @Localiser["label.contacts"] }; - if (SessionConsole.AllowOption(Sbm.ConfigOption.Contacts)) + if (SessionConsole.AllowOption(ConfigOption.Contacts)) { contactsItem.Options.Add(new MenuOptionData() { Caption = @Localiser["label.contacts"], Page = "Contacts" }); contactsItem.Options.Add(new MenuOptionData() { Caption = @Localiser["label.customers"], Page = "Customers" }); @@ -134,13 +134,13 @@ namespace Sarand.BusinessMgr.Web.Portal.Models // Commodities. MenuItemData commoditiesItem = new MenuItemData() { Caption = @Localiser["label.commodities"] }; - if (SessionConsole.AllowOption(Sbm.ConfigOption.Commodities)) + if (SessionConsole.AllowOption(ConfigOption.Commodities)) commoditiesItem.Options.Add(new MenuOptionData() { Caption = @Localiser["label.commodities"], Page = "Commodity" }); - if (SessionConsole.AllowOption(Sbm.ConfigOption.Assets)) + if (SessionConsole.AllowOption(ConfigOption.Assets)) { commoditiesItem.Options.Add(new MenuOptionData() { Caption = @Localiser["caption.asset.categories"], Page = "Assets/AssetCategory" }); commoditiesItem.Options.Add(new MenuOptionData() { Caption = @Localiser["label.assets"], Page = "Assets/Asset" }); - if (SessionConsole.AllowOption(Sbm.ConfigOption.Vehicles)) + if (SessionConsole.AllowOption(ConfigOption.Vehicles)) { commoditiesItem.Options.Add(new MenuOptionData() { Caption = @Localiser["caption.vehicle.classes"], Page = "Vehicles/VehicleClass" }); commoditiesItem.Options.Add(new MenuOptionData() { Caption = @Localiser["label.vehicles"], Page = "Vehicles/Vehicle" }); @@ -175,7 +175,7 @@ namespace Sarand.BusinessMgr.Web.Portal.Models } /// List of Code Type Codes for dropdown. - public IEnumerable GetCodeTypeCodesForSelect(Sbm.ApplCodeType codeType, bool activeOnly = true) + public IEnumerable GetCodeTypeCodesForSelect(ApplCodeType codeType, bool activeOnly = true) { List codes = new List(); foreach (SaCode code in CodeTypeConsole.GetCodesForCodeType(SbmSystem.GetCodeTypeCode(codeType), activeOnly)) @@ -192,10 +192,10 @@ namespace Sarand.BusinessMgr.Web.Portal.Models /// public IEnumerable GetAffiliateTypeCodesForFilterDropdown() { - List affiliateTypes = GetCodesOfType(Sbm.SystemCode.AffiliateType); - if (!affiliateTypes.Any(item => item.Type == (int)Sbm.AffiliateType.AnyOrganisation)) - affiliateTypes.Insert(0, new TypeCodeDesc((int)Sbm.AffiliateType.AnyOrganisation, ((short)Sbm.AffiliateType.AnyOrganisation).ToString(), Localiser["label.organisation"])); - affiliateTypes.Insert(0, Sbm.AffiliateType.Any, "", Localiser["label.any"]); + List affiliateTypes = GetCodesOfType(SystemCode.AffiliateType); + if (!affiliateTypes.Any(item => item.Type == (int)AffiliateType.AnyOrganisation)) + affiliateTypes.Insert(0, new TypeCodeDesc((int)AffiliateType.AnyOrganisation, ((short)AffiliateType.AnyOrganisation).ToString(), Localiser["label.organisation"])); + affiliateTypes.Insert(0, AffiliateType.Any, "", Localiser["label.any"]); return new SelectList(affiliateTypes, "Code", "Desc"); } @@ -205,10 +205,10 @@ namespace Sarand.BusinessMgr.Web.Portal.Models /// public IEnumerable GetAssociationTypeCodesForFilterDropdown() { - List associationTypes = GetCodesOfType(Sbm.SystemCode.AssociationType); - associationTypes.Insert(0, Sbm.AssociationType.Any, "", Localiser["label.any"]); - associationTypes.RemoveAll(item => item.Type == (short)Sbm.AssociationType.Internal); - foreach (Sbm.AssociationType associationType in EnumUtil.GetValues()) + List associationTypes = GetCodesOfType(SystemCode.AssociationType); + associationTypes.Insert(0, AssociationType.Any, "", Localiser["label.any"]); + associationTypes.RemoveAll(item => item.Type == (short)AssociationType.Internal); + foreach (AssociationType associationType in EnumUtil.GetValues()) { if (!SessionConsole.AllowAssociationType(associationType)) associationTypes.RemoveAll(item => item.Type == (short)associationType); @@ -225,10 +225,10 @@ namespace Sarand.BusinessMgr.Web.Portal.Models public IEnumerable GetCommodityTypeCodesForFilterDropdown() { List commodityTypes = new List(); - commodityTypes.Add(Sbm.CommodityType.Any, "", Localiser["label.any"]); - foreach (TypeCodeDesc commodityType in GetCodesOfType(Sbm.SystemCode.CommodityType)) + commodityTypes.Add(CommodityType.Any, "", Localiser["label.any"]); + foreach (TypeCodeDesc commodityType in GetCodesOfType(SystemCode.CommodityType)) { - if (commodityType.Type == (int)Sbm.CommodityType.Asset && !SessionConsole.AllowOption(Sbm.ConfigOption.Assets)) continue; + if (commodityType.Type == (int)CommodityType.Asset && !SessionConsole.AllowOption(ConfigOption.Assets)) continue; commodityTypes.Add(commodityType); } return new SelectList(commodityTypes, "Code", "Desc"); @@ -240,9 +240,9 @@ namespace Sarand.BusinessMgr.Web.Portal.Models public IEnumerable GetCommodityTypeCodesForDropdown() { List commodityTypes = new List(); - foreach (TypeCodeDesc commodityType in GetCodesOfType(Sbm.SystemCode.CommodityType)) + foreach (TypeCodeDesc commodityType in GetCodesOfType(SystemCode.CommodityType)) { - if (commodityType.Type == (int)Sbm.CommodityType.Asset && !SessionConsole.AllowOption(Sbm.ConfigOption.Assets)) continue; + if (commodityType.Type == (int)CommodityType.Asset && !SessionConsole.AllowOption(ConfigOption.Assets)) continue; commodityTypes.Add(commodityType); } return new SelectList(commodityTypes, "Code", "Desc"); @@ -254,8 +254,8 @@ namespace Sarand.BusinessMgr.Web.Portal.Models public IEnumerable GetAssetTypeCodesForFilterDropdown() { List assetTypes = new List(); - assetTypes.Add(Sbm.AssetType.Any, "", Localiser["label.any"]); - foreach (TypeCodeDesc assetType in GetCodesOfType(Sbm.SystemCode.AssetType)) + assetTypes.Add(AssetType.Any, "", Localiser["label.any"]); + foreach (TypeCodeDesc assetType in GetCodesOfType(SystemCode.AssetType)) { assetTypes.Add(assetType); } @@ -268,7 +268,7 @@ namespace Sarand.BusinessMgr.Web.Portal.Models public IEnumerable GetAssetTypeCodesForDropdown() { List assetTypes = new List(); - foreach (TypeCodeDesc assetType in GetCodesOfType(Sbm.SystemCode.AssetType)) + foreach (TypeCodeDesc assetType in GetCodesOfType(SystemCode.AssetType)) { assetTypes.Add(assetType); } @@ -284,11 +284,11 @@ namespace Sarand.BusinessMgr.Web.Portal.Models public IEnumerable GetTransactionTypeCodesForFilterDropdown() { List transactionTypes = new List(); - transactionTypes.Add(Sbm.TransactionType.Any, "", Localiser["label.any"]); - foreach (TypeCodeDesc transactionType in GetCodesOfType(Sbm.SystemCode.TransactionType)) + transactionTypes.Add(TransactionType.Any, "", Localiser["label.any"]); + foreach (TypeCodeDesc transactionType in GetCodesOfType(SystemCode.TransactionType)) { - if (!SessionConsole.AllowTransactionType((Sbm.TransactionType)transactionType.Type)) continue; - String description = SessionConsole.GetOwnerOption_Caption(Sbm.TransTypeToOrgOption((Sbm.TransactionType)transactionType.Type), Localiser.GetTransactionTypeCaption((Sbm.TransactionType)transactionType.Type)); + if (!SessionConsole.AllowTransactionType((TransactionType)transactionType.Type)) continue; + string description = SessionConsole.GetOwnerOption_Caption(TransTypeToOrgOption((TransactionType)transactionType.Type), Localiser.GetTransactionTypeCaption((TransactionType)transactionType.Type)); transactionTypes.Add(transactionType.Type, transactionType.Code, description); } return new SelectList(transactionTypes, "Code", "Desc"); @@ -300,10 +300,10 @@ namespace Sarand.BusinessMgr.Web.Portal.Models public IEnumerable GetTransactionTypeCodesForDropdown() { List transactionTypes = new List(); - foreach (TypeCodeDesc transactionType in GetCodesOfType(Sbm.SystemCode.TransactionType)) + foreach (TypeCodeDesc transactionType in GetCodesOfType(SystemCode.TransactionType)) { - if (!SessionConsole.AllowTransactionType((Sbm.TransactionType)transactionType.Type)) continue; - String description = SessionConsole.GetOwnerOption_Caption(Sbm.TransTypeToOrgOption((Sbm.TransactionType)transactionType.Type), Localiser.GetTransactionTypeCaption((Sbm.TransactionType)transactionType.Type)); + if (!SessionConsole.AllowTransactionType((TransactionType)transactionType.Type)) continue; + string description = SessionConsole.GetOwnerOption_Caption(TransTypeToOrgOption((TransactionType)transactionType.Type), Localiser.GetTransactionTypeCaption((TransactionType)transactionType.Type)); transactionTypes.Add(transactionType.Type, transactionType.Code, description); } return new SelectList(transactionTypes, "Code", "Desc"); diff --git a/SaBusinessMgrCoreWebPortal/Portal/Controllers/Assets/AssetCategoryController-Ajax.cs b/SaBusinessMgrCoreWebPortal/Portal/Controllers/Assets/AssetCategoryController-Ajax.cs index 8216ac6..6fcaa30 100644 --- a/SaBusinessMgrCoreWebPortal/Portal/Controllers/Assets/AssetCategoryController-Ajax.cs +++ b/SaBusinessMgrCoreWebPortal/Portal/Controllers/Assets/AssetCategoryController-Ajax.cs @@ -1,7 +1,7 @@ using Microsoft.AspNetCore.Mvc; using Sarand.BusinessMgr.Net.Standard.Base.App; using Sarand.BusinessMgr.Net.Standard.Base.Bus; -using Sarand.BusinessMgr.Web.Portal.Models; +using Sarand.BusinessMgr.Web.Portal.Components; using Sarand.BusinessMgr.Web.Portal.Models.Assets; using Sarand.BusinessMgr.Web.Portal.Models.Commodities; using Sarand.Net.Standard.Base.App; diff --git a/SaBusinessMgrCoreWebPortal/Portal/Controllers/Assets/AssetCategoryController.cs b/SaBusinessMgrCoreWebPortal/Portal/Controllers/Assets/AssetCategoryController.cs index 4293af1..1eaaa83 100644 --- a/SaBusinessMgrCoreWebPortal/Portal/Controllers/Assets/AssetCategoryController.cs +++ b/SaBusinessMgrCoreWebPortal/Portal/Controllers/Assets/AssetCategoryController.cs @@ -1,6 +1,7 @@ using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.Logging; using Sarand.BusinessMgr.Net.Core.Web.App; +using Sarand.BusinessMgr.Web.Portal.Components; using Sarand.BusinessMgr.Web.Portal.Models; using Sarand.BusinessMgr.Web.Portal.Models.Assets; using System; diff --git a/SaBusinessMgrCoreWebPortal/Portal/Controllers/Assets/AssetController-Ajax.cs b/SaBusinessMgrCoreWebPortal/Portal/Controllers/Assets/AssetController-Ajax.cs index fb354d5..5a14255 100644 --- a/SaBusinessMgrCoreWebPortal/Portal/Controllers/Assets/AssetController-Ajax.cs +++ b/SaBusinessMgrCoreWebPortal/Portal/Controllers/Assets/AssetController-Ajax.cs @@ -2,7 +2,7 @@ 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.Web.Portal.Models; +using Sarand.BusinessMgr.Web.Portal.Components; using Sarand.BusinessMgr.Web.Portal.Models.Assets; using Sarand.Net.Standard.Base.App; using Sarand.Net.Standard.Base.Bus; diff --git a/SaBusinessMgrCoreWebPortal/Portal/Controllers/Assets/AssetController.cs b/SaBusinessMgrCoreWebPortal/Portal/Controllers/Assets/AssetController.cs index 7cd1373..53e5182 100644 --- a/SaBusinessMgrCoreWebPortal/Portal/Controllers/Assets/AssetController.cs +++ b/SaBusinessMgrCoreWebPortal/Portal/Controllers/Assets/AssetController.cs @@ -1,6 +1,7 @@ using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.Logging; using Sarand.BusinessMgr.Net.Core.Web.App; +using Sarand.BusinessMgr.Web.Portal.Components; using Sarand.BusinessMgr.Web.Portal.Models; using Sarand.BusinessMgr.Web.Portal.Models.Assets; using System; diff --git a/SaBusinessMgrCoreWebPortal/Portal/Controllers/Codes/CodeController-Ajax.cs b/SaBusinessMgrCoreWebPortal/Portal/Controllers/Codes/CodeController-Ajax.cs index 6960115..0e764c2 100644 --- a/SaBusinessMgrCoreWebPortal/Portal/Controllers/Codes/CodeController-Ajax.cs +++ b/SaBusinessMgrCoreWebPortal/Portal/Controllers/Codes/CodeController-Ajax.cs @@ -3,7 +3,7 @@ using NPOI.OpenXmlFormats.Dml.Diagram; 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.Web.Portal.Models; +using Sarand.BusinessMgr.Web.Portal.Components; using Sarand.BusinessMgr.Web.Portal.Models.Codes; using Sarand.Net.Standard.Base.App; using Sarand.Net.Standard.Base.Bus; diff --git a/SaBusinessMgrCoreWebPortal/Portal/Controllers/Codes/CodeController.cs b/SaBusinessMgrCoreWebPortal/Portal/Controllers/Codes/CodeController.cs index 192cb6e..134a8d7 100644 --- a/SaBusinessMgrCoreWebPortal/Portal/Controllers/Codes/CodeController.cs +++ b/SaBusinessMgrCoreWebPortal/Portal/Controllers/Codes/CodeController.cs @@ -1,6 +1,7 @@ using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.Logging; using Sarand.BusinessMgr.Net.Core.Web.App; +using Sarand.BusinessMgr.Web.Portal.Components; using Sarand.BusinessMgr.Web.Portal.Models; using Sarand.BusinessMgr.Web.Portal.Models.Codes; using System; diff --git a/SaBusinessMgrCoreWebPortal/Portal/Controllers/Codes/CodeTypeController-Ajax.cs b/SaBusinessMgrCoreWebPortal/Portal/Controllers/Codes/CodeTypeController-Ajax.cs index 72cab76..0b91e5d 100644 --- a/SaBusinessMgrCoreWebPortal/Portal/Controllers/Codes/CodeTypeController-Ajax.cs +++ b/SaBusinessMgrCoreWebPortal/Portal/Controllers/Codes/CodeTypeController-Ajax.cs @@ -3,7 +3,7 @@ using NPOI.SS.Formula.Functions; 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.Web.Portal.Models; +using Sarand.BusinessMgr.Web.Portal.Components; using Sarand.BusinessMgr.Web.Portal.Models.Assets; using Sarand.BusinessMgr.Web.Portal.Models.Codes; using Sarand.Net.Standard.Base.App; diff --git a/SaBusinessMgrCoreWebPortal/Portal/Controllers/Codes/CodeTypeController.cs b/SaBusinessMgrCoreWebPortal/Portal/Controllers/Codes/CodeTypeController.cs index 4b446e3..35a79a6 100644 --- a/SaBusinessMgrCoreWebPortal/Portal/Controllers/Codes/CodeTypeController.cs +++ b/SaBusinessMgrCoreWebPortal/Portal/Controllers/Codes/CodeTypeController.cs @@ -1,6 +1,7 @@ using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.Logging; using Sarand.BusinessMgr.Net.Core.Web.App; +using Sarand.BusinessMgr.Web.Portal.Components; using Sarand.BusinessMgr.Web.Portal.Models; using Sarand.BusinessMgr.Web.Portal.Models.Assets; using Sarand.BusinessMgr.Web.Portal.Models.Codes; diff --git a/SaBusinessMgrCoreWebPortal/Portal/Controllers/Commodities/CommodityController-Ajax.cs b/SaBusinessMgrCoreWebPortal/Portal/Controllers/Commodities/CommodityController-Ajax.cs index 9746b19..3826eb8 100644 --- a/SaBusinessMgrCoreWebPortal/Portal/Controllers/Commodities/CommodityController-Ajax.cs +++ b/SaBusinessMgrCoreWebPortal/Portal/Controllers/Commodities/CommodityController-Ajax.cs @@ -1,7 +1,7 @@ using Microsoft.AspNetCore.Mvc; using Sarand.BusinessMgr.Net.Standard.Base.App; using Sarand.BusinessMgr.Net.Standard.Base.Bus; -using Sarand.BusinessMgr.Web.Portal.Models; +using Sarand.BusinessMgr.Web.Portal.Components; using Sarand.BusinessMgr.Web.Portal.Models.Commodities; using Sarand.BusinessMgr.Web.Portal.Models.Contacts; using Sarand.Net.Standard.Base.App; diff --git a/SaBusinessMgrCoreWebPortal/Portal/Controllers/Commodities/CommodityController.cs b/SaBusinessMgrCoreWebPortal/Portal/Controllers/Commodities/CommodityController.cs index 250a8ca..6dd3135 100644 --- a/SaBusinessMgrCoreWebPortal/Portal/Controllers/Commodities/CommodityController.cs +++ b/SaBusinessMgrCoreWebPortal/Portal/Controllers/Commodities/CommodityController.cs @@ -15,11 +15,12 @@ using System.Diagnostics; using System.Linq; using System.Threading.Tasks; using Sarand.BusinessMgr.Web.Portal.Models.Commodities; +using Sarand.BusinessMgr.Web.Portal.Components; namespace Sarand.BusinessMgr.Web.Portal.Controllers.Commodities { - //======================================================================= - public partial class CommodityController : SbmController_Portal + //======================================================================= + public partial class CommodityController : SbmController_Portal { //------------------------------------------------------------------- // Data members. diff --git a/SaBusinessMgrCoreWebPortal/Portal/Controllers/Contacts/AssociationController-Ajax.cs b/SaBusinessMgrCoreWebPortal/Portal/Controllers/Contacts/AssociationController-Ajax.cs index fb33dad..3ae4cca 100644 --- a/SaBusinessMgrCoreWebPortal/Portal/Controllers/Contacts/AssociationController-Ajax.cs +++ b/SaBusinessMgrCoreWebPortal/Portal/Controllers/Contacts/AssociationController-Ajax.cs @@ -3,7 +3,7 @@ using Microsoft.AspNetCore.Mvc; using NPOI.OpenXmlFormats.Dml.Diagram; using Sarand.BusinessMgr.Net.Standard.Base.App; using Sarand.BusinessMgr.Net.Standard.Base.Bus; -using Sarand.BusinessMgr.Web.Portal.Models; +using Sarand.BusinessMgr.Web.Portal.Components; using Sarand.BusinessMgr.Web.Portal.Models.Contacts; using Sarand.Net.Standard.Base.App; using Sarand.Net.Standard.Base.Bus; diff --git a/SaBusinessMgrCoreWebPortal/Portal/Controllers/Contacts/AssociationController.cs b/SaBusinessMgrCoreWebPortal/Portal/Controllers/Contacts/AssociationController.cs index 200ec60..3ad612d 100644 --- a/SaBusinessMgrCoreWebPortal/Portal/Controllers/Contacts/AssociationController.cs +++ b/SaBusinessMgrCoreWebPortal/Portal/Controllers/Contacts/AssociationController.cs @@ -16,6 +16,7 @@ using System.Linq; using System.Threading.Tasks; using Sarand.BusinessMgr.Web.Portal.Models.Contacts; using Sarand.Net.Standard.Base.Core; +using Sarand.BusinessMgr.Web.Portal.Components; namespace Sarand.BusinessMgr.Web.Portal.Controllers.Contacts { diff --git a/SaBusinessMgrCoreWebPortal/Portal/Controllers/Contacts/ContactController-Ajax.cs b/SaBusinessMgrCoreWebPortal/Portal/Controllers/Contacts/ContactController-Ajax.cs index d027b53..36c1e44 100644 --- a/SaBusinessMgrCoreWebPortal/Portal/Controllers/Contacts/ContactController-Ajax.cs +++ b/SaBusinessMgrCoreWebPortal/Portal/Controllers/Contacts/ContactController-Ajax.cs @@ -3,7 +3,7 @@ using DocumentFormat.OpenXml.ExtendedProperties; using Microsoft.AspNetCore.Mvc; using Sarand.BusinessMgr.Net.Standard.Base.App; using Sarand.BusinessMgr.Net.Standard.Base.Bus; -using Sarand.BusinessMgr.Web.Portal.Models; +using Sarand.BusinessMgr.Web.Portal.Components; using Sarand.BusinessMgr.Web.Portal.Models.Contacts; using Sarand.Net.Standard.Base.App; using Sarand.Net.Standard.Base.Bus; diff --git a/SaBusinessMgrCoreWebPortal/Portal/Controllers/Contacts/ContactController.cs b/SaBusinessMgrCoreWebPortal/Portal/Controllers/Contacts/ContactController.cs index 9c24a65..ea64db7 100644 --- a/SaBusinessMgrCoreWebPortal/Portal/Controllers/Contacts/ContactController.cs +++ b/SaBusinessMgrCoreWebPortal/Portal/Controllers/Contacts/ContactController.cs @@ -15,6 +15,7 @@ using System.Diagnostics; using System.Linq; using System.Threading.Tasks; using Sarand.BusinessMgr.Web.Portal.Models.Contacts; +using Sarand.BusinessMgr.Web.Portal.Components; namespace Sarand.BusinessMgr.Web.Portal.Controllers.Contacts { diff --git a/SaBusinessMgrCoreWebPortal/Portal/Controllers/HomeController.cs b/SaBusinessMgrCoreWebPortal/Portal/Controllers/HomeController.cs index 432b24b..74fbf09 100644 --- a/SaBusinessMgrCoreWebPortal/Portal/Controllers/HomeController.cs +++ b/SaBusinessMgrCoreWebPortal/Portal/Controllers/HomeController.cs @@ -15,11 +15,12 @@ using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Threading.Tasks; +using Sarand.BusinessMgr.Web.Portal.Components; namespace Sarand.BusinessMgr.Web.Portal.Controllers { - //======================================================================= - public class HomeController : SbmController_Portal + //======================================================================= + public class HomeController : SbmController_Portal { //------------------------------------------------------------------- // Data members. diff --git a/SaBusinessMgrCoreWebPortal/Portal/Controllers/Security/SecurityController-Ajax.cs b/SaBusinessMgrCoreWebPortal/Portal/Controllers/Security/SecurityController-Ajax.cs index e9abe68..d0a1e57 100644 --- a/SaBusinessMgrCoreWebPortal/Portal/Controllers/Security/SecurityController-Ajax.cs +++ b/SaBusinessMgrCoreWebPortal/Portal/Controllers/Security/SecurityController-Ajax.cs @@ -6,6 +6,7 @@ using Sarand.BusinessMgr.Net.Standard.Base.Core; using Sarand.BusinessMgr.Net.Standard.Base.Helpers; using Sarand.BusinessMgr.Net.Standard.Base.Mgr; using Sarand.BusinessMgr.Web.Portal.App; +using Sarand.BusinessMgr.Web.Portal.Components; using Sarand.BusinessMgr.Web.Portal.Helpers; using Sarand.BusinessMgr.Web.Portal.Models; using Sarand.Net.Standard.Base.App; diff --git a/SaBusinessMgrCoreWebPortal/Portal/Controllers/Security/SecurityController.cs b/SaBusinessMgrCoreWebPortal/Portal/Controllers/Security/SecurityController.cs index e687a63..4b79a74 100644 --- a/SaBusinessMgrCoreWebPortal/Portal/Controllers/Security/SecurityController.cs +++ b/SaBusinessMgrCoreWebPortal/Portal/Controllers/Security/SecurityController.cs @@ -18,6 +18,7 @@ using System.Linq; using System.Threading.Tasks; using Sarand.BusinessMgr.Web.Portal.Helpers; using Sarand.BusinessMgr.Web.Portal.App; +using Sarand.BusinessMgr.Web.Portal.Components; namespace Sarand.BusinessMgr.Web.Portal.Controllers.Security { diff --git a/SaBusinessMgrCoreWebPortal/Portal/Controllers/Transactions/TransactionController-Ajax.cs b/SaBusinessMgrCoreWebPortal/Portal/Controllers/Transactions/TransactionController-Ajax.cs index d22a3e8..a9f386a 100644 --- a/SaBusinessMgrCoreWebPortal/Portal/Controllers/Transactions/TransactionController-Ajax.cs +++ b/SaBusinessMgrCoreWebPortal/Portal/Controllers/Transactions/TransactionController-Ajax.cs @@ -1,7 +1,6 @@ using Microsoft.AspNetCore.Mvc; using Sarand.BusinessMgr.Net.Standard.Base.App; using Sarand.BusinessMgr.Net.Standard.Base.Bus; -using Sarand.BusinessMgr.Web.Portal.Models; using Sarand.BusinessMgr.Web.Portal.Models.Transactions; using Sarand.BusinessMgr.Web.Portal.Models.Contacts; using Sarand.Net.Standard.Base.App; @@ -13,6 +12,7 @@ using Sarand.Net.Standard.Base.Utils; using System; using System.Collections.Generic; using static Sacs.Web.Components.SaController.AjaxResponse_Data; +using Sarand.BusinessMgr.Web.Portal.Components; namespace Sarand.BusinessMgr.Web.Portal.Controllers.Transactions { diff --git a/SaBusinessMgrCoreWebPortal/Portal/Controllers/Transactions/TransactionController.cs b/SaBusinessMgrCoreWebPortal/Portal/Controllers/Transactions/TransactionController.cs index 63aabc5..d52d958 100644 --- a/SaBusinessMgrCoreWebPortal/Portal/Controllers/Transactions/TransactionController.cs +++ b/SaBusinessMgrCoreWebPortal/Portal/Controllers/Transactions/TransactionController.cs @@ -15,11 +15,12 @@ using System.Diagnostics; using System.Linq; using System.Threading.Tasks; using Sarand.BusinessMgr.Web.Portal.Models.Transactions; +using Sarand.BusinessMgr.Web.Portal.Components; namespace Sarand.BusinessMgr.Web.Portal.Controllers.Transactions { - //======================================================================= - public partial class TransactionController : SbmController_Portal + //======================================================================= + public partial class TransactionController : SbmController_Portal { //------------------------------------------------------------------- // Data members. diff --git a/SaBusinessMgrCoreWebPortal/Portal/Controllers/Vehicles/VehicleClassController-Ajax.cs b/SaBusinessMgrCoreWebPortal/Portal/Controllers/Vehicles/VehicleClassController-Ajax.cs index 0c5c17a..68d83b5 100644 --- a/SaBusinessMgrCoreWebPortal/Portal/Controllers/Vehicles/VehicleClassController-Ajax.cs +++ b/SaBusinessMgrCoreWebPortal/Portal/Controllers/Vehicles/VehicleClassController-Ajax.cs @@ -2,7 +2,7 @@ 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.Web.Portal.Models; +using Sarand.BusinessMgr.Web.Portal.Components; using Sarand.BusinessMgr.Web.Portal.Models.Vehicles; using Sarand.Net.Standard.Base.App; using Sarand.Net.Standard.Base.Bus; diff --git a/SaBusinessMgrCoreWebPortal/Portal/Controllers/Vehicles/VehicleClassController.cs b/SaBusinessMgrCoreWebPortal/Portal/Controllers/Vehicles/VehicleClassController.cs index e328d24..9c11d61 100644 --- a/SaBusinessMgrCoreWebPortal/Portal/Controllers/Vehicles/VehicleClassController.cs +++ b/SaBusinessMgrCoreWebPortal/Portal/Controllers/Vehicles/VehicleClassController.cs @@ -1,6 +1,7 @@ using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.Logging; using Sarand.BusinessMgr.Net.Core.Web.App; +using Sarand.BusinessMgr.Web.Portal.Components; using Sarand.BusinessMgr.Web.Portal.Models; using Sarand.BusinessMgr.Web.Portal.Models.Vehicles; using System; diff --git a/SaBusinessMgrCoreWebPortal/Portal/Models/Assets/Model_Asset.cs b/SaBusinessMgrCoreWebPortal/Portal/Models/Assets/Model_Asset.cs index 250c0b1..a260baa 100644 --- a/SaBusinessMgrCoreWebPortal/Portal/Models/Assets/Model_Asset.cs +++ b/SaBusinessMgrCoreWebPortal/Portal/Models/Assets/Model_Asset.cs @@ -4,7 +4,7 @@ using Sarand.BusinessMgr.Net.Core.Web.Components; 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.Web.Portal.Models; +using Sarand.BusinessMgr.Web.Portal.Components; using Sarand.Net.Standard.Base.App; using Sarand.Net.Standard.Base.Bus; using Sarand.Net.Standard.Base.Core; diff --git a/SaBusinessMgrCoreWebPortal/Portal/Models/Assets/Model_AssetCategory.cs b/SaBusinessMgrCoreWebPortal/Portal/Models/Assets/Model_AssetCategory.cs index bd7bc3b..f291f28 100644 --- a/SaBusinessMgrCoreWebPortal/Portal/Models/Assets/Model_AssetCategory.cs +++ b/SaBusinessMgrCoreWebPortal/Portal/Models/Assets/Model_AssetCategory.cs @@ -5,7 +5,7 @@ using Sarand.BusinessMgr.Net.Core.Web.Components; 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.Web.Portal.Models; +using Sarand.BusinessMgr.Web.Portal.Components; using Sarand.Net.Standard.Base.App; using Sarand.Net.Standard.Base.Bus; using Sarand.Net.Standard.Base.Core; diff --git a/SaBusinessMgrCoreWebPortal/Portal/Models/Codes/Model_Code.cs b/SaBusinessMgrCoreWebPortal/Portal/Models/Codes/Model_Code.cs index 7f22a52..7d7e717 100644 --- a/SaBusinessMgrCoreWebPortal/Portal/Models/Codes/Model_Code.cs +++ b/SaBusinessMgrCoreWebPortal/Portal/Models/Codes/Model_Code.cs @@ -4,7 +4,7 @@ using Sarand.BusinessMgr.Net.Core.Web.Components; 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.Web.Portal.Models; +using Sarand.BusinessMgr.Web.Portal.Components; using Sarand.Net.Standard.Base.App; using Sarand.Net.Standard.Base.Bus; using Sarand.Net.Standard.Base.CodeTypes; diff --git a/SaBusinessMgrCoreWebPortal/Portal/Models/Codes/Model_CodeType.cs b/SaBusinessMgrCoreWebPortal/Portal/Models/Codes/Model_CodeType.cs index 57641f7..49e7e91 100644 --- a/SaBusinessMgrCoreWebPortal/Portal/Models/Codes/Model_CodeType.cs +++ b/SaBusinessMgrCoreWebPortal/Portal/Models/Codes/Model_CodeType.cs @@ -4,7 +4,7 @@ using Sarand.BusinessMgr.Net.Core.Web.Components; 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.Web.Portal.Models; +using Sarand.BusinessMgr.Web.Portal.Components; using Sarand.Net.Standard.Base.App; using Sarand.Net.Standard.Base.Bus; using Sarand.Net.Standard.Base.CodeTypes; diff --git a/SaBusinessMgrCoreWebPortal/Portal/Models/Commodities/Model_Commodity.cs b/SaBusinessMgrCoreWebPortal/Portal/Models/Commodities/Model_Commodity.cs index 499b066..926836e 100644 --- a/SaBusinessMgrCoreWebPortal/Portal/Models/Commodities/Model_Commodity.cs +++ b/SaBusinessMgrCoreWebPortal/Portal/Models/Commodities/Model_Commodity.cs @@ -1,6 +1,7 @@ using Sarand.BusinessMgr.Net.Core.Web.App; using Sarand.BusinessMgr.Net.Standard.Base.App; using Sarand.BusinessMgr.Net.Standard.Base.Bus; +using Sarand.BusinessMgr.Web.Portal.Components; using Sarand.Net.Standard.Base.App; using Sarand.Net.Standard.Base.Bus; using Sarand.Net.Standard.Base.Core; diff --git a/SaBusinessMgrCoreWebPortal/Portal/Models/Contacts/Model_Association.cs b/SaBusinessMgrCoreWebPortal/Portal/Models/Contacts/Model_Association.cs index 9a361f7..b502c5d 100644 --- a/SaBusinessMgrCoreWebPortal/Portal/Models/Contacts/Model_Association.cs +++ b/SaBusinessMgrCoreWebPortal/Portal/Models/Contacts/Model_Association.cs @@ -1,6 +1,7 @@ using Sarand.BusinessMgr.Net.Core.Web.App; using Sarand.BusinessMgr.Net.Standard.Base.App; using Sarand.BusinessMgr.Net.Standard.Base.Bus; +using Sarand.BusinessMgr.Web.Portal.Components; using Sarand.Net.Standard.Base.App; using Sarand.Net.Standard.Base.Core; using Sarand.Net.Standard.Base.Utils; diff --git a/SaBusinessMgrCoreWebPortal/Portal/Models/Contacts/Model_Contact.cs b/SaBusinessMgrCoreWebPortal/Portal/Models/Contacts/Model_Contact.cs index 281787e..4f3e8c3 100644 --- a/SaBusinessMgrCoreWebPortal/Portal/Models/Contacts/Model_Contact.cs +++ b/SaBusinessMgrCoreWebPortal/Portal/Models/Contacts/Model_Contact.cs @@ -1,6 +1,7 @@ using Sarand.BusinessMgr.Net.Core.Web.App; using Sarand.BusinessMgr.Net.Standard.Base.App; using Sarand.BusinessMgr.Net.Standard.Base.Bus; +using Sarand.BusinessMgr.Web.Portal.Components; using Sarand.Net.Standard.Base.App; using Sarand.Net.Standard.Base.Bus; using Sarand.Net.Standard.Base.Core; diff --git a/SaBusinessMgrCoreWebPortal/Portal/Models/ErrorViewModel.cs b/SaBusinessMgrCoreWebPortal/Portal/Models/ErrorViewModel.cs index 5c06f20..3313de3 100644 --- a/SaBusinessMgrCoreWebPortal/Portal/Models/ErrorViewModel.cs +++ b/SaBusinessMgrCoreWebPortal/Portal/Models/ErrorViewModel.cs @@ -1,4 +1,5 @@ using Sarand.BusinessMgr.Net.Core.Web.App; +using Sarand.BusinessMgr.Web.Portal.Components; using System; namespace Sarand.BusinessMgr.Web.Portal.Models diff --git a/SaBusinessMgrCoreWebPortal/Portal/Models/Model_Home.cs b/SaBusinessMgrCoreWebPortal/Portal/Models/Model_Home.cs index cb770fa..860d40a 100644 --- a/SaBusinessMgrCoreWebPortal/Portal/Models/Model_Home.cs +++ b/SaBusinessMgrCoreWebPortal/Portal/Models/Model_Home.cs @@ -2,6 +2,7 @@ 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.Web.Portal.Components; namespace Sarand.BusinessMgr.Web.Portal.Models { diff --git a/SaBusinessMgrCoreWebPortal/Portal/Models/Model_Security.cs b/SaBusinessMgrCoreWebPortal/Portal/Models/Model_Security.cs index a017da0..70fcdbe 100644 --- a/SaBusinessMgrCoreWebPortal/Portal/Models/Model_Security.cs +++ b/SaBusinessMgrCoreWebPortal/Portal/Models/Model_Security.cs @@ -2,6 +2,7 @@ using Sarand.BusinessMgr.Net.Core.Web.Components; using Sarand.BusinessMgr.Net.Standard.Base.Bus; using Sarand.BusinessMgr.Net.Standard.Base.Helpers; +using Sarand.BusinessMgr.Web.Portal.Components; using Sarand.Net.Standard.Base.Helpers; using Sarand.Net.Standard.Base.Security; using Sarand.Net.Standard.Base.Utils; diff --git a/SaBusinessMgrCoreWebPortal/Portal/Models/Transactions/Model_Transaction.cs b/SaBusinessMgrCoreWebPortal/Portal/Models/Transactions/Model_Transaction.cs index cbdae23..24fa3e7 100644 --- a/SaBusinessMgrCoreWebPortal/Portal/Models/Transactions/Model_Transaction.cs +++ b/SaBusinessMgrCoreWebPortal/Portal/Models/Transactions/Model_Transaction.cs @@ -1,6 +1,7 @@ using Sarand.BusinessMgr.Net.Core.Web.App; using Sarand.BusinessMgr.Net.Standard.Base.App; using Sarand.BusinessMgr.Net.Standard.Base.Bus; +using Sarand.BusinessMgr.Web.Portal.Components; using Sarand.Net.Standard.Base.App; using Sarand.Net.Standard.Base.Bus; using Sarand.Net.Standard.Base.Core; diff --git a/SaBusinessMgrCoreWebPortal/Portal/Models/Vehicles/Model_Vehicle.cs b/SaBusinessMgrCoreWebPortal/Portal/Models/Vehicles/Model_Vehicle.cs index 533b095..e8c100b 100644 --- a/SaBusinessMgrCoreWebPortal/Portal/Models/Vehicles/Model_Vehicle.cs +++ b/SaBusinessMgrCoreWebPortal/Portal/Models/Vehicles/Model_Vehicle.cs @@ -4,7 +4,7 @@ using Sarand.BusinessMgr.Net.Core.Web.Components; 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.Web.Portal.Models; +using Sarand.BusinessMgr.Web.Portal.Components; using Sarand.Net.Standard.Base.App; using Sarand.Net.Standard.Base.Bus; using Sarand.Net.Standard.Base.Core; diff --git a/SaBusinessMgrCoreWebPortal/Portal/Models/Vehicles/Model_VehicleClass.cs b/SaBusinessMgrCoreWebPortal/Portal/Models/Vehicles/Model_VehicleClass.cs index 1299d40..847c4b0 100644 --- a/SaBusinessMgrCoreWebPortal/Portal/Models/Vehicles/Model_VehicleClass.cs +++ b/SaBusinessMgrCoreWebPortal/Portal/Models/Vehicles/Model_VehicleClass.cs @@ -1,6 +1,7 @@ using Sarand.BusinessMgr.Net.Core.Web.App; using Sarand.BusinessMgr.Net.Standard.Base.App; using Sarand.BusinessMgr.Net.Standard.Base.Bus; +using Sarand.BusinessMgr.Web.Portal.Components; using Sarand.Net.Standard.Base.App; using Sarand.Net.Standard.Base.Bus; using Sarand.Net.Standard.Base.Core; diff --git a/SaBusinessMgrCoreWebPortal/Views/_ViewImports.cshtml b/SaBusinessMgrCoreWebPortal/Views/_ViewImports.cshtml index 9e8daf9..41b440b 100644 --- a/SaBusinessMgrCoreWebPortal/Views/_ViewImports.cshtml +++ b/SaBusinessMgrCoreWebPortal/Views/_ViewImports.cshtml @@ -1,5 +1,6 @@ @using Sarand.BusinessMgr.Net.Core.Web.App @using Sarand.BusinessMgr.Net.Standard.Base.App +@using Sarand.BusinessMgr.Web.Portal.Components @using Sarand.BusinessMgr.Web.Portal.Models @using Sarand.BusinessMgr.Web.Portal.Models.Contacts @using Sarand.BusinessMgr.Web.Portal.Models.Commodities diff --git a/SaBusinessMgrCoreWebPortal/appsettings.Development.json b/SaBusinessMgrCoreWebPortal/appsettings.Development.json index 771d378..0eed37f 100644 --- a/SaBusinessMgrCoreWebPortal/appsettings.Development.json +++ b/SaBusinessMgrCoreWebPortal/appsettings.Development.json @@ -1,26 +1,28 @@ { - "Logging": { - "LogLevel": { - "Default": "Information", - "Microsoft": "Warning", - "Microsoft.Hosting.Lifetime": "Information" - } - }, - "EmailConfigs": { - "SBM-Dev": { - "SMTP": { - "Server": "smtp.ionos.co.uk", - "ServerPort": 587, - "UseSSL": true - }, - "Send": { - "Using": 2, - "UserName": "businessmgr@sarand.com", - "Password": "sarand-busmgr-5apPh1re" - }, - "Message": { - "AddressFrom": "DoNotReply@SaBusinessMgr.com" - } - } - } + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft": "Warning", + "Microsoft.Hosting.Lifetime": "Information" + } + }, + "Email": { + "Configs": { + "SBM-Dev": { + "SMTP": { + "Server": "smtp.ionos.co.uk", + "ServerPort": 587, + "UseSSL": true + }, + "Send": { + "Using": 2, + "UserName": "businessmgr@sarand.com", + "Password": "sarand-busmgr-5apPh1re" + }, + "Message": { + "AddressFrom": "DoNotReply@SaBusinessMgr.com" + } + } + } + } } diff --git a/SaBusinessMgrCoreWebPortal/appsettings.Machine.Sarand602.json b/SaBusinessMgrCoreWebPortal/appsettings.Machine.Sarand602.json new file mode 100644 index 0000000..95f8d86 --- /dev/null +++ b/SaBusinessMgrCoreWebPortal/appsettings.Machine.Sarand602.json @@ -0,0 +1,26 @@ +{ + "AppConfigs": { + "BusMgr": { + "Environments": [ "Production" ], + "Instance": "Prod", + "ControlDatabase": { + "Location": "MsSql:.\\BusMgr.SaBusinessMgr_Control", + "User": "bmc", + "Password": "sarand" + }, + "Email": { + "Configs": [], + "Context": "SBM-Dev", + "ContactUs": { + "AddressesTo": [ "Control@BusMgr.Sarand.com" ] + } + }, + "Documents": { + "RootFolder": "D:\\Sarand\\Projects\\Users\\AHoward\\VS2022\\BusinessMgr\\Docs" + }, + "Logging": { + "RootFolder": "D:\\Sarand\\Projects\\Users\\AHoward\\VS2022\\BusinessMgr\\Logs\\WebPortal" + } + } + } +} diff --git a/SaBusinessMgrCoreWebPortal/appsettings.Production.json b/SaBusinessMgrCoreWebPortal/appsettings.Production.json index 679a8e2..8fbe703 100644 --- a/SaBusinessMgrCoreWebPortal/appsettings.Production.json +++ b/SaBusinessMgrCoreWebPortal/appsettings.Production.json @@ -1,18 +1,20 @@ { - "EmailConfigs": { - "SBM-Prod": { - "SMTP": { - "Server": "smtp.ionos.co.uk", - "ServerPort": 587, - "UseSSL": true - }, - "Send": { - "Using": 2, - "UserName": "businessmgr@sarand.com", - "Password": "sarand-busmgr-5apP1re" - }, - "Message": { - "AddressFrom": "DoNotReply@SaBusinessMgr.com" + "Email": { + "Configs": { + "SBM-Prod": { + "SMTP": { + "Server": "smtp.ionos.co.uk", + "ServerPort": 587, + "UseSSL": true + }, + "Send": { + "Using": 2, + "UserName": "businessmgr@sarand.com", + "Password": "sarand-busmgr-5apP1re" + }, + "Message": { + "AddressFrom": "DoNotReply@SaBusinessMgr.com" + } } } }