public void Update(UpdateMatterViewModel matter) { Matter updateMatter = db.Matters.Find(matter.Matter_Id); updateMatter.Matter_Code = matter.Matter_Code; updateMatter.Due_Client_Date = matter.Due_Client_Date; updateMatter.Due_File_Date = matter.Due_File_Date; updateMatter.Bar_Date = matter.Bar_Date; updateMatter.Client_Id = matter.Client_Id; db.SaveChanges(); }
public ActionResult Edit(UpdateMatterViewModel matter) { if (ModelState.IsValid) { mattersService.Update(matter); return RedirectToAction("Index"); } ViewBag.Client_Id = selectListService.Clients(matter.Client_Id); return View(matter); }