/// <summary> /// Function to the search Role Combo box /// </summary> public void SearchRoleComboFill() { try { RoleBll BllRole = new RoleBll(); List<DataTable> listObjSearchRoleCombo = new List<DataTable>(); listObjSearchRoleCombo = BllRole.RoleViewAll(); DataRow dr = listObjSearchRoleCombo[0].NewRow(); dr[1] = "All"; listObjSearchRoleCombo[0].Rows.InsertAt(dr, 0); cmbSearchRole.DataSource = listObjSearchRoleCombo[0]; cmbSearchRole.ValueMember ="roleId"; cmbSearchRole.DisplayMember = "role"; } catch (Exception ex) { MessageBox.Show("UC:2" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
/// <summary> /// Function to fill the Role ComboFill /// </summary> public void RoleComboFill() { try { RoleBll BllRole = new RoleBll(); List<DataTable> listObjRoleCombo = new List<DataTable>(); listObjRoleCombo = BllRole.RoleViewAll(); cmbRole.DataSource = listObjRoleCombo[0]; cmbRole.ValueMember = "roleId"; cmbRole.DisplayMember = "role"; cmbRole.SelectedIndex = -1; } catch (Exception ex) { MessageBox.Show("UC:1" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }