public bool DeleteTrip(Trip trip)
 {
     throw new NotImplementedException();
 }
Пример #2
0
 public Reservation CreateCustomerReservation(Trip trip, Customer customer, double totalPrice, int numberOfPeople, Vehicle vehicle)
 {
     throw new NotImplementedException();
 }
 public Trip CreateTrip(Trip trip)
 {
     throw new NotImplementedException();
 }
Пример #4
0
 public bool DeleteTrip(Trip trip)
 {
     return db.TripList.Remove(trip);
 }
Пример #5
0
 public Trip CreateTrip(Trip trip)
 {
     db.TripList.Add(trip);
     return trip;
 }
Пример #6
0
 public Trip UpdateTrip(Trip trip)
 {
     var old = db.TripList.Single(x => x.TripId == trip.TripId);
     db.TripList[db.TripList.IndexOf(old)] = trip;
     return trip;
 }
Пример #7
0
 public Reservation CreateCustomerReservation(Trip trip, Customer customer, double totalPrice, int numberOfPeople, Vehicle vehicle)
 {
     var reservation = new Reservation {ReservationId = (db.ReservationList.Count+1), CustomerId = customer.CustomerId, TripId = trip.TripId, VehicleId = vehicle.VehicleId, TotalPrice = totalPrice, NumberOfPeople = numberOfPeople };
     db.ReservationList.Add(reservation);
     return reservation;
 }