public ActionResult IzmeniStomatologa(string IDClanaKomore) { if (IDClanaKomore == null) { throw new Exception("ID clana komore nije zadat!"); } IzmeniStomatologaViewModel model = new IzmeniStomatologaViewModel(); model.IDClanaKomore = IDClanaKomore; model.loadData(); return(View(model)); }
public ActionResult IzmeniStomatologa(IzmeniStomatologaViewModel model) { if (ModelState.IsValid) { try { model.editStomatologa(); return(RedirectToAction("Index")); } catch (Exception e) { return(RedirectToAction("Error", new { Message = e.Message })); } } return(View(model)); }