/// <summary> /// Method read all vehicle types from database /// Creates a drop down to select a vehicle type /// </summary> /// <param name="strSelectedVehicleType">Value for the vehicle type that shall be selected</param> /// <returns>Return a drop down list of vehicle types. One item is selected</returns> public List <SelectListItem> CreateVehicleTypeDropDown(string strSelectedVehicleType) { List <VehicleType> vehicleTypes = GetVehicleTypes(); List <SelectListItem> selectListItems = ParkVehicleHelper.CreateVehicleTypeDropDown(vehicleTypes, strSelectedVehicleType); return(selectListItems); }
/// <summary> /// Method read all free parking places /// Creates a drop down to select a free parking place /// </summary> /// <param name="strSelectedParkingPlace">Value for the free parking place that shall be selected</param> /// <returns>Return a drop down list of free parking places. One item is selected</returns> public List <SelectListItem> CreateFreeParkingPlaceDropDown(string strSelectedParkingPlace) { List <ParkingPlace> parkingPlaces = m_DbGarage.ParkingPlace.AsNoTracking().Where(i => i.IsOccupied == false).ToList(); List <SelectListItem> selectListItems = ParkVehicleHelper.CreateParkingPlaceDropDown(parkingPlaces, strSelectedParkingPlace); return(selectListItems); }