Exemple #1
0
        /// <summary>
        /// Function to get all the values from Role Table
        /// </summary>
        /// <returns></returns>
        public List <DataTable> RoleViewAll()
        {
            List <DataTable> ListObj = new List <DataTable>();

            try
            {
                ListObj = spRole.RoleViewAll();
            }
            catch (Exception ex)
            {
                MessageBox.Show("RL1:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            return(ListObj);
        }
Exemple #2
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)
     {
         MessageBox.Show(ex.Message);
     }
 }
Exemple #3
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)
     {
         MessageBox.Show("UC:1" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Exemple #4
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)
     {
         MessageBox.Show("UC:2" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }