public ActionResult Edit(Guid id) { var truck = _truckService.GetById(id); var truckForm = TruckForm.FromTruck(truck); return(View(truckForm)); }
public ActionResult Edit(Guid id, TruckForm truckForm) { if (!ModelState.IsValid) { return(View(truckForm)); } _truckService.Edit(truckForm.ToTruck()); return(RedirectToAction("Index", new TruckListFiltersModel().GetRouteValues()).WithSuccess("Camion Editado")); }
public ActionResult Edit(Guid id, TruckForm truckForm) { if (!ModelState.IsValid) { return View(truckForm); } _truckService.Edit(truckForm.ToTruck()); return RedirectToAction("Index", new TruckListFiltersModel().GetRouteValues()).WithSuccess("Camion Editado"); }
public ActionResult Create(TruckForm truckForm) { if (!ModelState.IsValid) { return(View(truckForm)); } var truck = truckForm.ToTruck(); _truckService.Create(truck); return(RedirectToAction("Index", new TruckListFiltersModel().GetRouteValues()).WithSuccess("Camion Creado")); }
public ActionResult Create(TruckForm truckForm) { if (!ModelState.IsValid) { return View(truckForm); } var truck = truckForm.ToTruck(); _truckService.Create(truck); return RedirectToAction("Index", new TruckListFiltersModel().GetRouteValues()).WithSuccess("Camion Creado"); }
public ActionResult Create() { var truckForm = new TruckForm(); return(View(truckForm)); }
public ActionResult Create() { var truckForm = new TruckForm(); return View(truckForm); }
private void btnNewTruck_ItemClick(object sender, ItemClickEventArgs e) { TruckForm tf = new TruckForm(null); AddTab(tf, "Novo Caminhão", false); }