public ActionResult New(Vehicle vehicle) { if (ModelState.IsValid) { if (base.genericMgr.FindAll<long>(duiplicateVerifyStatement, new object[] { vehicle.Code })[0] > 0) { SaveErrorMessage(Resources.SYS.ErrorMessage.Errors_Existing_Code, vehicle.Code); } else { base.genericMgr.Create(vehicle); SaveSuccessMessage(Resources.TMS.Vehicle.Vehicle_Added); return RedirectToAction("Edit/" + vehicle.Code); } } return View(vehicle); }
public ActionResult Edit(Vehicle vehicle) { if (ModelState.IsValid) { base.genericMgr.Update(vehicle); SaveSuccessMessage(Resources.TMS.Vehicle.Vehicle_Updated); } return View(vehicle); }