public frmTsk_Booking_Step2(frmTsk_Booking_Step1 afrmTsk_Booking_Step1, BookingEN aBookingEN, int CustomerType)
 {
     InitializeComponent();
     this.afrmTsk_Booking_Step1 = afrmTsk_Booking_Step1;
     this.aBookingEN = aBookingEN;
     this.CustomerType = CustomerType;
 }
        //=======================================================
        //Author: Hiennv
        //Function : Booking()
        //=======================================================
        public bool Booking(BookingEN aBookingEN)
        {
            try
            {
                //========================================================

                BookingRs aBookingRs = new BookingRs();

                aBookingRs.CreatedDate = DateTime.Now;
                aBookingRs.CustomerType = aBookingEN.CustomerType;
                aBookingRs.BookingType = aBookingEN.BookingType;
                aBookingRs.Note = aBookingEN.Note;
                aBookingRs.IDCustomerGroup = aBookingEN.IDCustomerGroup;
                aBookingRs.IDCustomer = aBookingEN.IDCustomer;
                aBookingRs.IDSystemUser = aBookingEN.IDSystemUser;
                aBookingRs.PayMenthod = aBookingEN.PayMenthod;
                aBookingRs.StatusPay = aBookingEN.StatusPay;
                aBookingRs.BookingMoney = aBookingEN.BookingMoney;
                aBookingRs.ExchangeRate = aBookingEN.ExchangeRate;
                aBookingRs.Status = aBookingEN.Status;
                aBookingRs.Type = aBookingEN.Type;
                aBookingRs.Disable = aBookingEN.Disable;
                aBookingRs.Level = aBookingEN.Level;
                aBookingRs.Subject = aBookingEN.Subject;
                aBookingRs.Description = aBookingEN.Description;
                aBookingRs.DatePay = aBookingEN.DatePay;
                aBookingRs.DateEdit = aBookingEN.DateEdit;

                //add new bookingRs
                BookingRsBO aBookingRsBO = new BookingRsBO();
                aBookingRsBO.Insert(aBookingRs);

                int IDBookingR = aBookingRs.ID;
                //==========================================================
                BookingRoomsBO aBookingRoomsBO = new BookingRoomsBO();
                BookingRooms aBookingRooms;
                BookingRoomsMembers aBookingRoomsMembers;

                for (int i = 0; i < aBookingEN.aListRoomsEN.Count; i++)
                {
                    aBookingRooms = new BookingRooms();
                    aBookingRooms.IDBookingR = IDBookingR;
                    aBookingRooms.CodeRoom = aBookingEN.aListRoomsEN[i].Code;
                    aBookingRooms.PercentTax = 10;
                    aBookingRooms.CostRef_Rooms = aBookingEN.aListRoomsEN[i].CostRef;
                    aBookingRooms.Cost = aBookingEN.aListRoomsEN[i].CostRef;
                    aBookingRooms.CheckInPlan = aBookingEN.CheckInActual;
                    aBookingRooms.CheckInActual = aBookingEN.CheckInActual;
                    aBookingRooms.CheckOutPlan = aBookingEN.CheckOutPlan;
                    aBookingRooms.CheckOutActual = aBookingEN.CheckOutActual;
                    aBookingRooms.StartTime = aBookingEN.CheckInActual;
                    aBookingRooms.EndTime = aBookingEN.CheckOutPlan;
                    aBookingRooms.BookingStatus = 1;
                    aBookingRooms.Status = aBookingEN.Status;
                    aBookingRooms.Type = 1;//Tính CheckIn sớm và CheckOut muộn
                    //add new bookingRoom
                    aBookingRoomsBO.Insert(aBookingRooms);
                }
                return true;
            }
            catch (Exception ex)
            {

                throw new Exception("ReceptionTaskBO.Booking\n" + ex.ToString());
            }
        }