//Hiennv public void LoadData(DateTime createDate) { try { List<CustomerEN> aListCustomersCurrentInRooms = new List<CustomerEN>(); ReceptionTaskBO aReceptionTaskBO = new ReceptionTaskBO(); List<CustomerEN> aListCustomerEN = aReceptionTaskBO.GetListCustomersCurrentInRooms_ByCreateDateBookingR(createDate); CustomerEN aCustomerEN; foreach (CustomerEN items in aListCustomerEN) { aCustomerEN = new CustomerEN(); aCustomerEN.SetValue(items); if (String.IsNullOrEmpty(items.Gender) == false) { aCustomerEN.GenderDisplay = CORE.CONSTANTS.SelectedGender(Convert.ToInt32(items.Gender)).Name; } if (String.IsNullOrEmpty(items.Nationality) == false) { aCustomerEN.NationalityDisplay = CORE.CONSTANTS.SelectedCountry(Convert.ToString(items.Nationality)).Name; } if (items.Citizen != null) { aCustomerEN.CitizenDisplay = CORE.CONSTANTS.SelectedCitizen(Convert.ToInt32(items.Citizen)).Name; } aCustomerEN.IDCompany = items.IDCompany; aCustomerEN.NameCompany = items.NameCompany; aCustomerEN.IDGroup = items.IDGroup; aCustomerEN.NameGroup = items.NameGroup; aCustomerEN.CodeRoom = items.CodeRoom; aCustomerEN.SkuRoom = items.SkuRoom; aListCustomersCurrentInRooms.Add(aCustomerEN); } dgvCustomers.DataSource = aListCustomersCurrentInRooms; dgvCustomers.RefreshDataSource(); } catch (Exception ex) { MessageBox.Show("frmTsk_ListCustomersCurrentInRoom.LoadData\n" + ex.ToString(), "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error); } }