public ActionResult Edit(BankFirm bankFirm) { if (ModelState.IsValid) { bankFirmRepo.Update(bankFirm); bankFirmRepo.Save(); return Json(new { success = true }); } return PartialView("Edit", bankFirm); }
public JsonResult Create(BankFirm bankFirm) { if (ModelState.IsValid) { bankFirm.CreatedBy = Request.Cookies["USER"].Value; bankFirm.CreationDate = DateTime.Now; bankFirmRepo.Insert(bankFirm); bankFirmRepo.Save(); return Json(new { success = true }); } return Json(bankFirm, JsonRequestBehavior.AllowGet); }
public void Delete(BankFirm entity) { context.BankFirms.Remove(entity); }
public void Update(BankFirm entity) { context.Entry(entity).State = System.Data.Entity.EntityState.Modified; }
public void Insert(BankFirm entity) { context.BankFirms.Add(entity); }
public ActionResult Create() { var bankFirm = new BankFirm(); return PartialView("Create", bankFirm); }