public ActionResult Edit(DermatologyService dermatoServ) { try { if (ModelState.IsValid) { interfaceobj.UpdateModel(dermatoServ); interfaceobj.Save(); return(RedirectToAction("Index")); } } catch (DataException) { ModelState.AddModelError(string.Empty, "Unable to save changes.Try again, and if the problem persists contact your system administrator."); } return(View(dermatoServ)); }
public ActionResult Create(DermatologyService dermatoServ) { try { if (ModelState.IsValid) { interfaceobj.InsertModel(dermatoServ); interfaceobj.Save(); return(RedirectToAction("Index")); } } catch (DataException) { ModelState.AddModelError("", "Unable to save changes. Try Againand if the problem persists see your system administrator."); } return(View(dermatoServ)); }
// GET: /DermatologyService/Delete/5 public ActionResult Delete(int id) { DermatologyService dermatoServender = interfaceobj.GetModelByID(id); return(View(dermatoServender)); }
//GET:/DermatologyService/Edit/5 public ActionResult Edit(int id) { DermatologyService dermarServi = interfaceobj.GetModelByID(id); return(View(dermarServi)); }