private void EmployeeRegistration_Load(object sender, EventArgs e) { _employeeBLL = new EmployeeBussiness(); RoleBussiness _roleBussines = new RoleBussiness(); cmbRoleID.DataSource = _roleBussines.GetAllBLL(); cmbRoleID.DisplayMember = "RoleName"; cmbRoleID.ValueMember = "ID"; RefreshGrid(); }
public void RefleshGrid() { try { List <Role> roleList = _roleBll.GetAllBLL(); dgvRoleNameList.DataSource = null; dgvRoleNameList.DataSource = roleList; } catch (Exception ex) { MessageBox.Show(ex.Message); } }