/// <summary>
 /// Function to fill Designation combobox
 /// </summary>
 public void DesignationComboFill()
 {
     try
     {
         //DesignationSP SpDesignation = new DesignationSP();
         DesiginationBll  bllDesigination    = new DesiginationBll();
         List <DataTable> listObjDesignation = new List <DataTable>();
         listObjDesignation        = bllDesigination.DesignationViewAll();
         cmbDesignation.DataSource = listObjDesignation[0];
         if (listObjDesignation[0].Rows.Count > 0)
         {
             cmbDesignation.ValueMember   = "designationId";
             cmbDesignation.DisplayMember = "designationName";
             DataRow drRow = listObjDesignation[0].NewRow();
             drRow["designationId"]   = "0";
             drRow["designationName"] = "All";
             listObjDesignation[0].Rows.InsertAt(drRow, 0);
             cmbDesignation.SelectedValue = "0";
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("ER2:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// Function to fill Designation combobox
 /// </summary>
 public void DesignationComboFill()
 {
     try
     {
         //DesignationSP spDesigantion = new DesignationSP();
         DesiginationBll  bllDesigination = new DesiginationBll();
         List <DataTable> listObj         = bllDesigination.DesignationViewAll();
         DataRow          dr = listObj[0].NewRow();
         dr[1] = "All";
         listObj[0].Rows.InsertAt(dr, 0);
         cmbDesignation.DataSource    = listObj[0];
         cmbDesignation.ValueMember   = "designationId";
         cmbDesignation.DisplayMember = "designationName";
     }
     catch (Exception ex)
     {
         MessageBox.Show("MSR:3" + ex.Message, "Open Miracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }