public ActionResult ModifyBus(int busId) { DatabaseInterface db = new DatabaseInterface(); Bus bus = db.GetBusByBusId(busId); AddBusModel model = new AddBusModel { StateNames = stateNames, StateAbbreviations = stateAbbreviations, Capacity = bus.Capacity.ToString(), License = bus.LicensePlate, UpdatingBus = true, Status = bus.Status.ToString(), State = bus.State, BusId = busId.ToString() }; return PartialView("AddBus", model); }
public ActionResult AddBus() { AddBusModel model = new AddBusModel { StateNames = stateNames, StateAbbreviations = stateAbbreviations, Capacity = "", License = "", UpdatingBus = false, BusId = "" }; return PartialView("AddBus", model); }