public List<Reservation> GetAllCustomerReservations(Customer customer)
 {
     throw new NotImplementedException();
 }
 public bool CreateCustomer(Customer customer)
 {
     throw new NotImplementedException();
 }
 public Reservation CreateCustomerReservation(Trip trip, Customer customer, double totalPrice, int numberOfPeople, Vehicle vehicle)
 {
     throw new NotImplementedException();
 }
 public bool DeleteCustomer(Customer customer)
 {
     return db.CustomerList.Remove(customer);
 }
 public Customer UpdateCustomer(Customer customer)
 {
     throw new NotImplementedException();
 }
 public Customer CreateCustomer(Customer customer)
 {
     db.CustomerList.Add(customer);
     return customer;
 }
 public Customer UpdateCustomer(Customer customer)
 {
     var old = db.CustomerList.Single(x => x.CustomerId == customer.CustomerId);
     db.CustomerList[db.CustomerList.IndexOf(old)] = customer;
     return customer;
 }
Example #8
0
 public List<Reservation> GetAllCustomerReservations(Customer customer)
 {
     return db.ReservationList.Where(x => x.CustomerId == customer.CustomerId).ToList();
 }
Example #9
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;
 }
Example #10
0
 public bool CreateCustomer(Customer customer)
 {
     db.CustomerList.Add(customer);
     return true;
 }