public void DeleteAllCustomersFromCustomerGroup_ByIDBookingRs(int IDBookingRs)
 {
     CustomerGroupsBO aCustomerGroupsBO = new CustomerGroupsBO();
     CustomerGroups aCustomerGroups = new CustomerGroups();
     aCustomerGroups = aCustomerGroupsBO.Select_ByIDBookingR(IDBookingRs);
     List<CustomerGroups_Customers> aCustomerGroups_Customers = this.Select_ByIDCustomerGroup(aCustomerGroups.ID);
     foreach (CustomerGroups_Customers item in aCustomerGroups_Customers)
     {
         this.Delete(item);
     }
 }
        public int DeleteCustomerFromCustomerGroup_ByIDBookingRs(int IDCustomer, int IDBookingRs)
        {
            CustomerGroupsBO aCustomerGroupsBO = new CustomerGroupsBO();
            CustomerGroups aCustomerGroups = new CustomerGroups();
            aCustomerGroups = aCustomerGroupsBO.Select_ByIDBookingR(IDBookingRs);

            CustomerGroups_CustomersBO aCustomerGroups_CustomersBO = new CustomerGroups_CustomersBO();

            return aCustomerGroups_CustomersBO.Delete(IDCustomer, aCustomerGroups.ID);
        }
        // Ngoc
        public int InsertCustomerIntoCustomerGroup_ByIDBookingRs(int IDCustomer, int IDBookingRs)
        {
            // Add customer vao group
            CustomerGroupsBO aCustomerGroupsBO = new CustomerGroupsBO();
            CustomerGroups aCustomerGroups = new CustomerGroups();
            aCustomerGroups = aCustomerGroupsBO.Select_ByIDBookingR(IDBookingRs);

            CustomerGroups_CustomersBO aCustomerGroups_CustomersBO = new CustomerGroups_CustomersBO();
            //Kiem tra xe khach do da co trong custome group chua
            CustomerGroups_Customers aCustomerGroups_Customers = new CustomerGroups_Customers();
            aCustomerGroups_Customers = aCustomerGroups_CustomersBO.Select_ByIDCustomer_ByIDCustomerGroup(IDCustomer, aCustomerGroups.ID);
            if (aCustomerGroups_Customers == null)
            {
                aCustomerGroups_Customers = new CustomerGroups_Customers();
                Customers aCustomers = (new CustomersBO()).Select_ByID(IDCustomer);
                aCustomerGroups_Customers.IDCustomer = IDCustomer;
                aCustomerGroups_Customers.IDCustomerGroup = aCustomerGroups.ID;
                aCustomerGroups_Customers.Name = aCustomerGroups.Name + "_" + aCustomers.Name + "_" + aCustomers.Identifier1 + "_" + DateTime.Now.ToShortDateString();
                return aCustomerGroups_CustomersBO.Insert(aCustomerGroups_Customers);
            }
            else
            {
                return 0;
            }
        }