예제 #1
0
        public ActionResult AddBus()
        {
            AddBusModel model = new AddBusModel
            {
                StateNames         = stateNames,
                StateAbbreviations = stateAbbreviations,
                Capacity           = "",
                License            = "",
                UpdatingBus        = false,
                BusId = ""
            };

            return(PartialView("AddBus", model));
        }
예제 #2
0
        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));
        }