private void lueIDCompanies_EditValueChanged(object sender, EventArgs e) { if (lueIDCompanies.EditValue == null) { MessageBox.Show("Vui lòng chọn tên công ty."); lueIDCompanies.Focus(); } BookingRsBO aBookingRsBO = new BookingRsBO(); BookingRs aBookingRs = new BookingRs(); List<PaymentExt_GetAllDataEN> aListPaymentExt_GetAllDataEN = new List<PaymentExt_GetAllDataEN>(); int IDCompany = Convert.ToInt32(lueIDCompanies.EditValue.ToString()); CustomerGroupsBO aCustomerGroupBO = new CustomerGroupsBO(); List<int> aListIDCustomerGroup = aCustomerGroupBO.Select_All().Where(x => x.IDCompany == IDCompany).Select(p => p.ID).ToList(); CompaniesBO aCompaniesBO = new CompaniesBO(); List<int> ListIDBookingR = aBookingRsBO.Select_ByIDCompany(int.Parse(lueIDCompanies.EditValue.ToString())).Select(p=>p.ID).ToList(); dgvPaymentViewAll.DataSource = this.aListPaymentExt_GetAllDataEN.Where(p => ListIDBookingR.Contains(p.BookingRs_ID)); }