public ActionResult Edit(Guid id, DriverForm driverForm) { if (!ModelState.IsValid) { return(View(driverForm)); } _driverService.Edit(driverForm.ToDriver()); return(RedirectToAction("Index", new DriverListFiltersModel().GetRouteValues()).WithSuccess("Conductor Editado")); }
public ActionResult Create(DriverForm driverForm) { if (!ModelState.IsValid) { return View(driverForm); } var driver = driverForm.ToDriver(); _driverService.Create(driver); return RedirectToAction("Index", new DriverListFiltersModel().GetRouteValues()).WithSuccess("Conductor Creado"); }
public ActionResult Create(DriverForm driverForm) { if (!ModelState.IsValid) { return(View(driverForm)); } var driver = driverForm.ToDriver(); _driverService.Create(driver); return(RedirectToAction("Index", new DriverListFiltersModel().GetRouteValues()).WithSuccess("Conductor Creado")); }
public ActionResult Edit(Guid id, DriverForm driverForm) { if (!ModelState.IsValid) { return View(driverForm); } _driverService.Edit(driverForm.ToDriver()); return RedirectToAction("Index", new DriverListFiltersModel().GetRouteValues()).WithSuccess("Conductor Editado"); }