コード例 #1
0
        public void Reload()
        {
            BookingRoomsBO aBookingRoomsBO = new BookingRoomsBO();
            RoomsBO aRoomsBO = new RoomsBO();

            BookingRoomsEN aBookingRoomsEN = new BookingRoomsEN();
            BookingRooms aBookingRooms = aBookingRoomsBO.Select_ByID(IDBookingRoom);
            aBookingRoomsEN.SetValue(aBookingRooms);
            aBookingRoomsEN.ID = aBookingRooms.ID;
            aBookingRoomsEN.RoomSku = aRoomsBO.Select_ByCodeRoom(aBookingRooms.CodeRoom, 1).Sku;
            this.lbCurrentRoom.Text = "Phòng số : " + aBookingRoomsEN.RoomSku;

            aListBookingRoom.Add(aBookingRoomsEN);
            dgvRooms.DataSource = aListBookingRoom;
            dgvRooms.RefreshDataSource();

            ServicesBO aServicesBO = new ServicesBO();
            aListService = aServicesBO.Select_ByType(2);
            dgvServices.DataSource = aListService;
            dgvServices.RefreshDataSource();
        }
        public void Reload()
        {
            try
            {
                BookingHallsBO aBookingHallsBO = new BookingHallsBO();
                List<BookingHallsEN> aListBookingHall = new List<BookingHallsEN>();
                BookingHallsEN aBookingHallsEN = new BookingHallsEN();
                BookingHalls aBookingHalls = aBookingHallsBO.Select_ByID(IDBookingHall);
                aBookingHallsEN.ID = aBookingHalls.ID;
                aBookingHallsEN.HallSku = aHallsBO.Select_ByCodeHall(aBookingHalls.CodeHall, 1).Sku;
                aListBookingHall.Add(aBookingHallsEN);

                dtpDate.DateTime = aBookingHalls.Date.GetValueOrDefault();
                dgvHalls.DataSource = aListBookingHall;
                dgvHalls.RefreshDataSource();

                ServicesBO aServicesBO = new ServicesBO();
                aListAvailable = aServicesBO.Select_ByType(1);
                dgvService.DataSource = aListAvailable;
                dgvService.RefreshDataSource();

            }
            catch (Exception ex)
            {
                MessageBox.Show("frmIns_BookingHalls_Services.Reload\n" + ex.ToString(), "Error ", MessageBoxButtons.OK, MessageBoxIcon.Error);

            }
        }