public ActionResult Edit(Guid id, BarnForm barnForm) { if (!ModelState.IsValid) { return(View(barnForm)); } _barnService.Edit(barnForm.ToBarn()); return(RedirectToAction("Index", new BarnListFiltersModel().GetRouteValues()).WithSuccess("Galpón Editado")); }
public ActionResult Create(BarnForm barnForm) { if (!ModelState.IsValid) { return View(barnForm); } var barn = barnForm.ToBarn(); _barnService.Create(barn); return RedirectToAction("Index", new BarnListFiltersModel().GetRouteValues()).WithSuccess("Galpón Creado"); }
public ActionResult Create(BarnForm barnForm) { if (!ModelState.IsValid) { return(View(barnForm)); } var barn = barnForm.ToBarn(); _barnService.Create(barn); return(RedirectToAction("Index", new BarnListFiltersModel().GetRouteValues()).WithSuccess("Galpón Creado")); }
public ActionResult Edit(Guid id, BarnForm barnForm) { if (!ModelState.IsValid) { return View(barnForm); } _barnService.Edit(barnForm.ToBarn()); return RedirectToAction("Index", new BarnListFiltersModel().GetRouteValues()).WithSuccess("Galpón Editado"); }