// Delete
 public bool Delete(int ID)
 {
     try {
         BookingRoomByType aBookingRoomByType = new BookingRoomByType();
         aBookingRoomByType = this.Select_ByID(ID);
         aDatabaseDA.BookingRoomByType.Remove(aBookingRoomByType);
         aDatabaseDA.SaveChanges();
         return true;
     }
     catch (Exception ex) {
         return false;
         throw new Exception("BookingRoomByTypeBO.Delete" + ex.ToString());
     }
 }
        public bool NewOrEditBookingRoomByType(BookingRoomByTypeEN aBookingRoomByTypeEN)
        {
            try{
                BookingRoomByType aNewBooking = new BookingRoomByType();
                int IDCustomer = 0;

                #region Them moi khach hang khi khach hang chua co
                if (aBookingRoomByTypeEN.IDCustomer > 0) {
                    IDCustomer = aBookingRoomByTypeEN.IDCustomer;
                }
                else {
                    CustomersBO aCustomersBO = new CustomersBO();
                    Customers aCustomers = new Customers();
                    if (aBookingRoomByTypeEN.CustomerName.Length > 50) {
                        aCustomers.Name = aBookingRoomByTypeEN.CustomerName.Substring(0, 50);
                    }
                    else {
                        aCustomers.Name = aBookingRoomByTypeEN.CustomerName;
                    }
                    IDCustomer = aCustomersBO.Insert(aCustomers);
                }
                #endregion
                aNewBooking.ID = aBookingRoomByTypeEN.ID;
                aNewBooking.IDCustomer = IDCustomer;
                aNewBooking.FromDate = aBookingRoomByTypeEN.FromDate;
                aNewBooking.ToDate = aBookingRoomByTypeEN.ToDate;
                aNewBooking.Suite = aBookingRoomByTypeEN.Suite;
                aNewBooking.Superior = aBookingRoomByTypeEN.Superior;
                aNewBooking.Standard = aBookingRoomByTypeEN.Standard;
                aNewBooking.BookingStatus = aBookingRoomByTypeEN.BookingStatus;

                aDatabaseDA.BookingRoomByType.AddOrUpdate(aNewBooking);
                aDatabaseDA.SaveChanges();
                return true;
            }
            catch(Exception ex){
                return false;
                throw new Exception("BookingRoomByTypeBO.NewBookingRoomByType"+ex.ToString());
            }
        }
        // Update
        public bool Update(BookingRoomByType aBookingRoomByType)
        {
            try {
                aDatabaseDA.BookingRoomByType.AddOrUpdate(aBookingRoomByType);
                aDatabaseDA.SaveChanges();
                return true;

            }
            catch (Exception ex) {
                return false;
                throw new Exception("BookingRoomByTypeBO.Update" + ex.ToString());
            }
        }