public bool Update(Reservation item) { var stored = Get(item.ReservationId); if (stored == null) return false; stored.Location = item.Location; stored.ClientName = item.ClientName; return true; }
public bool Update(Reservation item) { Reservation storedItem = Get(item.ReservationId); if (storedItem != null) { storedItem.ClientName = item.ClientName; storedItem.Location = item.Location; return true; } else { return false; } }
public bool UpdateReservation(Reservation item) { return repo.Update(item); }
public Reservation CreateReservation(Reservation item) { return repo.Add(item); }
public Reservation Add(Reservation item) { item.ReservationId = data.Count() + 1; data.Add(item); return item; }
public Reservation PostReservation(Reservation item) { return repository.Add(item); }
public int CreateReservation(String hotelCode, String roomTypeCode, DateTime checkIn, DateTime checkOut) { var reservation = new Reservation(); reservation.hotel_code = hotelCode; reservation.room_type_code = roomTypeCode; reservation.check_in = checkIn; reservation.check_out = checkOut; db.Reservations.InsertOnSubmit(reservation); db.SubmitChanges(); return reservation.reference_number; }