public ActionResult Create(OrgaoVM model) { if (!ModelState.IsValid) { MontarViewBags(); return(View(model)); } auxiliaresAppServices.Adicionar <OrgaoVM>(model); return(RedirectToAction("Index")); }
public ActionResult Edit(OrgaoVM model) { if (!ModelState.IsValid) { MontarViewBags(); return(View(model)); } auxiliaresAppServices.Atualizar(model); return(RedirectToAction("Index")); }
public ActionResult Create(int?justica) { MontarViewBags(); if (justica.HasValue) { var model = new OrgaoVM() { JusticaId = justica.Value }; return(View(model)); } return(View()); }