Exemplo n.º 1
0
        public ActionResult Edit(string id)
        {
            sp_BankSelect_Result model = new sp_BankSelect_Result();
            var bankData = BankBusinessLogic.getInstance().getBankById(id);

            model.BankId    = bankData.BankId;
            model.BankName  = bankData.BankName;
            model.AccountNo = bankData.AccountNo;
            return(View(model));
        }
Exemplo n.º 2
0
 public ActionResult Delete(string id)
 {
     if (BankBusinessLogic.getInstance().DeleteBank(id) == -1)
     {
         TempData["Success"] = "Bank was successfully deleted";
     }
     else
     {
         TempData["Error"] = "Bank was unsuccessfully deleted";
     }
     return(RedirectToAction("Index"));
 }
Exemplo n.º 3
0
 public ActionResult Edit(sp_BankSelect_Result model)
 {
     if (BankBusinessLogic.getInstance().UpdateBank(model) == -1)
     {
         TempData["Success"] = "Bank was successfully updated";
     }
     else
     {
         TempData["Error"] = "Bank was unsuccessfully updated";
     }
     return(RedirectToAction("Index"));
 }
Exemplo n.º 4
0
 public ActionResult Create(sp_BankSelect_Result model)
 {
     if (BankBusinessLogic.getInstance().GetCountBank(model.BankName) == 0)
     {
         if (BankBusinessLogic.getInstance().CreateBank(model) == -1)
         {
             TempData["Success"] = "Bank was successfully inserted";
         }
         else
         {
             TempData["Error"] = "Bank was unsuccessfully inserted";
         }
     }
     else
     {
         TempData["Error"] = "Bank already exist";
     }
     return(RedirectToAction("Index"));
 }
Exemplo n.º 5
0
 public ActionResult Index()
 {
     return(View(BankBusinessLogic.getInstance().ListBank()));
 }