Пример #1
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));
        }
Пример #2
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"));
 }
Пример #3
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"));
 }
Пример #4
0
 public ActionResult Index()
 {
     return(View(AccountBusinessLogic.getInstance().ListMasterAccount()));
 }