示例#1
0
 public bool Update(Booking item)
 {
     if (item == null)
     {
         throw new ArgumentNullException("item");
     }
     if (BookingDBManager.Update(item) == 0)
     {
         return(false);
     }
     else
     {
         return(true);
     }
 }
示例#2
0
 public Booking AddBooking(Booking item)
 {
     if (item == null)
     {
         throw new ArgumentNullException("item");
     }
     if (BookingDBManager.AddBooking(item) == 0)
     {
         return(null);
     }
     else
     {
         return(item);
     }
 }
示例#3
0
 public Booking GetById(int id)
 {
     return(BookingDBManager.GetBookingById(id));
 }
示例#4
0
 public IEnumerable <Booking> GetAll()
 {
     return(BookingDBManager.GetAllBookings().Cast <Booking>());
 }