Ejemplo n.º 1
0
 /// <summary>
 /// Function to fill Rack combobox
 /// </summary>
 public void RackComboFill()
 {
     try
     {
         RackSP    spRack = new RackSP();
         DataTable dtbl   = new DataTable();
         if (cmbGodown.SelectedValue.ToString() != "System.Data.DataRowView")
         {
             dtbl = spRack.RackFillForStock(Convert.ToDecimal(cmbGodown.SelectedValue.ToString()));
             cmbRack.DataSource    = dtbl;
             cmbRack.DisplayMember = "rackName";
             cmbRack.ValueMember   = "rackId";
         }
     }
     catch (Exception ex)
     {
         formMDI.infoError.ErrorString = "ST:8" + ex.Message;
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Function to Rack Godown Combobox
 /// </summary>
 public void RackComboFillForLoad()
 {
     try
     {
         RackSP    spRack = new RackSP();
         DataTable dtbl   = new DataTable();
         if (cmbGodown.SelectedValue.ToString() != "System.Data.DataRowView")
         {
             dtbl = spRack.RackFillForStock(Convert.ToDecimal(cmbGodown.SelectedValue.ToString()));
             DataRow dr = dtbl.NewRow();
             dr["rackName"] = "All";
             dr["rackId"]   = 0;
             dtbl.Rows.InsertAt(dr, 0);
             cmbRack.DataSource    = dtbl;
             cmbRack.DisplayMember = "rackName";
             cmbRack.ValueMember   = "rackId";
         }
     }
     catch (Exception ex)
     {
         formMDI.infoError.ErrorString = "PS:10" + ex.Message;
     }
 }