public AccountController() { _accountBusinessLogic = new AccountBusinessLogic(); _navigationBusinessLogic = new NavigationBusinessLogic(); _log = ClassLogger.Create(this.GetType()); _applicationAlert = Catalog.Factory.Resolve <IApplicationAlert>(); }
public ActionResult Edit(string id) { sp_AccountSelect_Result model = new sp_AccountSelect_Result(); var accountData = AccountBusinessLogic.getInstance().getAccountById(id); model.AccountId = accountData.AccountId; model.AccountName = accountData.AccountName; model.AccountNo = accountData.AccountNo; return(View(model)); }
public ActionResult Edit(sp_AccountSelect_Result model) { if (AccountBusinessLogic.getInstance().UpdateAccount(model) == -1) { TempData["Success"] = "Account was successfully updated"; } else { TempData["Error"] = "Account was unsuccessfully updated"; } return(RedirectToAction("Index")); }
public ActionResult Delete(string id) { try { if (AccountBusinessLogic.getInstance().DeleteAccount(id) == -1) { TempData["Success"] = "Account was successfully deleted"; } else { TempData["Error"] = "Account was unsuccessfully deleted"; } } catch (Exception e) { TempData["Error"] = "Account was unsuccessfully deleted"; Logging.getInstance().CreateLogError(e); } return(RedirectToAction("Index")); }
public ActionResult Login(AccountModel accountModel) { var userDetails = Session["userDetails"] as User; if (userDetails != null) { return(RedirectToAction("Index", "LPManagement")); } else { var accountBusinessLogic = new AccountBusinessLogic(); var user = accountBusinessLogic.AuthenticateUser(accountModel.UserName, accountModel.Password); if (user == null) { ViewBag.Message = "Username not exists or User name/password is not correct"; return(RedirectToAction("Index", "Account")); } Session["userDetails"] = user; return(RedirectToAction("Index", "LPManagement")); } }
public ActionResult Index() { return(View(AccountBusinessLogic.getInstance().ListMasterAccount())); }
public AccountController(AccountBusinessLogic accountBusinessLogic) { _accountBusinessLogic = accountBusinessLogic; }
public AccountController(AccountBusinessLogic accountBl) { _accountBl = accountBl; }
public ManageController(ManageBusinessLogic manageBl, AccountBusinessLogic accountBl) { _manageBl = manageBl; _accountBl = accountBl; }