public void ReloadData()
 {
     try
     {
         DivisionsBO aDivisionBO = new DivisionsBO();
         dgvDivisions.DataSource = aDivisionBO.Select_All();
     }
     catch (Exception ex)
     {
         MessageBox.Show("frmLst_Divisions.ReloadData\n" + ex.ToString(), "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
 private void frmLst_SystemUsers_Divisions_Load(object sender, EventArgs e)
 {
     try
     {
         dtpChooseDate.DateTime = DateTime.Now;
         DivisionsBO aDivisonsBO = new DivisionsBO();
         List<Divisions> aListDivisions = aDivisonsBO.Select_All();
         cboDivisions.Properties.Items.Add("Tất cả");
         foreach(Divisions aDivisions in aListDivisions)
         {
             cboDivisions.Properties.Items.Add(aDivisions.Name);
         }
         ReloadData();
     }
     catch (Exception ex)
     {
         MessageBox.Show("frmLst_SystemUsers_Divisions.frmLst_SystemUsers_Divisions_Load\n" + ex.ToString(), "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
        private void frmIns_SystemUsers_Divisions_Load(object sender, EventArgs e)
        {
            try
            {
                DivisionsBO aDivisionsBO = new DivisionsBO();
                List<Divisions> aListDivisions = aDivisionsBO.Select_All();
                lueIDDivision.Properties.DataSource = aListDivisions;
                lueIDDivision.Properties.DisplayMember = "Name";
                lueIDDivision.Properties.ValueMember = "ID";

                if (aListDivisions.Count > 0)
                {
                    lueIDDivision.EditValue = aListDivisions[0].ID;
                }
                SystemUsersBO aSystemUsersBO = new SystemUsersBO();
                this.aListAvailableSystemUsers = aSystemUsersBO.Select_ByDisable(false); //Disable = false
                this.LoadListAvailableSystemUsers();
            }
            catch (Exception ex)
            {
                MessageBox.Show("frmIns_SystemUsers_Divisions.frmIns_SystemUsers_Divisions_Load\n" + ex.ToString(), "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }