public void Reload() { try { BookingRsBO aBookingRsBO = new BookingRsBO(); List<BookingRsEN> aList_BookingRsEN = new List<BookingRsEN>(); List<vw__PaymentInfo__BookingRs_BookingRooms_Customers> aList = aBookingRsBO.Select_ByStatusAndDateAndCustomerType(2, DateTime.Now, this.customerType);// status = 2 :Checked ; customerType =1 : khach nha nuoc ; customerType =2 : khach doan ; customerType =3 : khach le BookingRsEN item; for (int i = 0; i < aList.Count; i++) { item = new BookingRsEN(); item.StatusDisplay = CORE.CONSTANTS.SelectedBookingRoomStatus(aList[i].BookingRooms_Status.GetValueOrDefault()).Name; item.CustomerTypeDisplay = CORE.CONSTANTS.SelectedCustomerType(aList[i].BookingRs_CustomerType.GetValueOrDefault()).Name; item.SetValue(aList[i]); aList_BookingRsEN.Add(item); } if (this.IDBookingR == 0) { dgvBookingRs.DataSource = aList_BookingRsEN; dgvBookingRs.RefreshDataSource(); } else { dgvBookingRs.DataSource = aList_BookingRsEN.Where(b=>b.BookingRs_ID == this.IDBookingR); dgvBookingRs.RefreshDataSource(); } } catch (Exception ex) { MessageBox.Show("frmTsk_BookingRs.ReLoad.\n" + ex.ToString(), "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error); } }