public void CustomerDropdown(ParkingSystemContext _context, object selectedCustomer = null) { var customerQuery = from d in _context.Customer orderby d.CustomerID select new SelectListItem { Text = d.FirstName + " " + d.LastName, Value = d.CustomerID.ToString() };; CustomerSL = new SelectList(customerQuery, "Value", "Text", selectedCustomer); }
public void ParkingDropdown(ParkingSystemContext _context, object selectedParking = null) { var customerQuery = from d in _context.ParkingSlot orderby d.ParkingID select new SelectListItem { Text = d.Plate, Value = d.ParkingID.ToString() };; ParkingSL = new SelectList(customerQuery, "Value", "Text", selectedParking); }
public void PositionDropdown(ParkingSystemContext _context, object selectedPosition = null) { var positionQuery = from d in _context.PositionDiscount orderby d.Position select d; PositionSL = new SelectList(positionQuery.AsNoTracking(), "Position", "Position", selectedPosition); }