public void InsertReservationInGivenPeriod() { ReservationTransaction transaction = new ReservationTransaction(); int checkInTime = int.Parse(DropDownListCheckIn.SelectedItem.Value); int checkOutTime = int.Parse(DropDownListCheckOut.SelectedItem.Value); while (checkInTime <= checkOutTime) { SiCAP_GrupoCARARA.App_Domain.Reservation myReservation = FillReservation(checkInTime); transaction.InsertReservation(myReservation); checkInTime++; } }
void populateDDLListOfVehicles(User user) { //List<Vehicle> lstVehicles = new List<Vehicle>(); ReservationTransaction transaction = new ReservationTransaction(); List<Vehicle> lstVehicles = transaction.ReadVehiclesOfUser(user); DropDownListVehiclesOfOneUser.DataTextField = "numberPlate"; DropDownListVehiclesOfOneUser.DataValueField = "id"; DropDownListVehiclesOfOneUser.DataSource = lstVehicles; DropDownListVehiclesOfOneUser.DataBind(); }