public AccountController()
 {
     _accountBusinessLogic    = new AccountBusinessLogic();
     _navigationBusinessLogic = new NavigationBusinessLogic();
     _log = ClassLogger.Create(this.GetType());
     _applicationAlert = Catalog.Factory.Resolve <IApplicationAlert>();
 }
Esempio n. 2
0
        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));
        }
Esempio n. 3
0
 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"));
 }
Esempio n. 4
0
 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"));
 }
Esempio n. 5
0
        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"));
            }
        }
Esempio n. 6
0
 public ActionResult Index()
 {
     return(View(AccountBusinessLogic.getInstance().ListMasterAccount()));
 }
Esempio n. 7
0
 public AccountController(AccountBusinessLogic accountBusinessLogic)
 {
     _accountBusinessLogic = accountBusinessLogic;
 }
 public AccountController(AccountBusinessLogic accountBl)
 {
     _accountBl = accountBl;
 }
Esempio n. 9
0
 public ManageController(ManageBusinessLogic manageBl, AccountBusinessLogic accountBl)
 {
     _manageBl  = manageBl;
     _accountBl = accountBl;
 }