public ActionResult ChargeoffCar(AutoModel autom,int id=0) { id = MechanicController.idi; var model = new AutoModel(); model.AssignTo(AutoAPI.GetCar(id)); ViewData["test"]=model.PhotoFileName; ViewBag.index = id; return View(model); }
public ActionResult ChargeOffCar(AutoModel model) { if (ModelState.IsValid) { AutoModel result = new AutoModel(); result.AssignTo(model); ///TODO saving changes into database return RedirectToAction("NextCar", "Mechanic"); } return RedirectToAction("NextCar", "Mechanic"); }