예제 #1
0
 public ActionResult Edit(BankFirm bankFirm)
 {
     if (ModelState.IsValid)
     {
         bankFirmRepo.Update(bankFirm);
         bankFirmRepo.Save();
         return Json(new { success = true });
     }
     return PartialView("Edit", bankFirm);
 }
예제 #2
0
        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);
        }
예제 #3
0
 public void Delete(BankFirm entity)
 {
     context.BankFirms.Remove(entity);
 }
예제 #4
0
 public void Update(BankFirm entity)
 {
     context.Entry(entity).State = System.Data.Entity.EntityState.Modified;
 }
예제 #5
0
 public void Insert(BankFirm entity)
 {
     context.BankFirms.Add(entity);
 }
예제 #6
0
 public ActionResult Create()
 {
     var bankFirm = new BankFirm();
     return PartialView("Create", bankFirm);
 }