Esempio n. 1
0
 public ActionResult Edit(Bank bank)
 {
     if (ModelState.IsValid)
     {
         bankRepo.Update(bank);
         bankRepo.Save();
         return Json(new { success = true });
     }
     return PartialView("Edit", bank);
 }
Esempio n. 2
0
 public JsonResult Create(Bank bank)
 {
     if (ModelState.IsValid)
     {
         bank.CreatedBy = Request.Cookies["USER"].Value;
         bank.CreationDate = DateTime.Now;
         bankRepo.Insert(bank);
         bankRepo.Save();
         return Json(new { success = true });
     }
     return Json(bank, JsonRequestBehavior.AllowGet);
 }
Esempio n. 3
0
        public void Update(Bank entity)
        {
 	        context.Entry(entity).State = System.Data.Entity.EntityState.Modified;
        }
Esempio n. 4
0
        public void Delete(Bank entity)
        {
 	        context.Banks.Remove(entity);
        }
Esempio n. 5
0
        public void Insert(Bank entity)
        {
 	        context.Banks.Add(entity);
        }