Esempio n. 1
0
 /// <summary>
 /// Function to fill the Role ComboFill
 /// </summary>
 public void RoleComboFill()
 {
     try
     {
         RoleSP    spRole        = new RoleSP();
         DataTable dtblRoleCombo = new DataTable();
         dtblRoleCombo         = spRole.RoleViewAll();
         cmbRole.DataSource    = dtblRoleCombo;
         cmbRole.ValueMember   = "roleId";
         cmbRole.DisplayMember = "role";
         cmbRole.SelectedIndex = -1;
     }
     catch (Exception ex)
     {
         formMDI.infoError.ErrorString = "UC:1" + ex.Message;
     }
 }
Esempio n. 2
0
 /// <summary>
 /// Function to the search Role Combo box
 /// </summary>
 public void SearchRoleComboFill()
 {
     try
     {
         RoleSP    spRole = new RoleSP();
         DataTable dtblSearchRoleCombo = new DataTable();
         dtblSearchRoleCombo = spRole.RoleViewAll();
         DataRow dr = dtblSearchRoleCombo.NewRow();
         dr[1] = "All";
         dtblSearchRoleCombo.Rows.InsertAt(dr, 0);
         cmbSearchRole.DataSource    = dtblSearchRoleCombo;
         cmbSearchRole.ValueMember   = "roleId";
         cmbSearchRole.DisplayMember = "role";
     }
     catch (Exception ex)
     {
         formMDI.infoError.ErrorString = "UC:2" + ex.Message;
     }
 }