Пример #1
0
 /// <summary>
 /// Function to fill batch combobox
 /// </summary>
 public void BatchComboFill()
 {
     try
     {
         BatchSP spBatch = new BatchSP();
         DataTable dtblBatch = new DataTable();
         dtblBatch = spBatch.BatchViewAll();
         dgvcmbConsumptionBatch.DataSource = dtblBatch;
         dgvcmbConsumptionBatch.ValueMember = "batchId";
         dgvcmbConsumptionBatch.DisplayMember = "batchNo";
         dgvcmbProductionBatch.DataSource = dtblBatch;
         dgvcmbProductionBatch.ValueMember = "batchId";
         dgvcmbProductionBatch.DisplayMember = "batchNo";
     }
     catch (Exception ex)
     {
         MessageBox.Show("SJ:23" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Пример #2
0
 public void DGVBatchComboFill()
 {
     try
     {
         BatchSP spBatch = new BatchSP();
         DataTable dtblBatch = new DataTable();
         dtblBatch = spBatch.BatchViewAll();
         dgvcmbBatch.DataSource = dtblBatch;
         DataRow dr = dtblBatch.NewRow();
         dr[0] = 0;
         dr[1] = "NA";
         dtblBatch.Rows.InsertAt(dr, 0);
         dgvcmbBatch.ValueMember = "batchId";
         dgvcmbBatch.DisplayMember = "batchNo";
     }
     catch (Exception ex)
     {
         MessageBox.Show("SO34:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
 /// <summary>
 /// Batch combobox fill
 /// </summary>
 public void BatchComboFill()
 {
     try
     {
         BatchSP spBatch = new BatchSP();
         DataTable dtbl = spBatch.BatchViewAll();
         cmbBatchNo.DataSource = dtbl;
         cmbBatchNo.DisplayMember = "batchNo";
         cmbBatchNo.ValueMember = "batchId";
         DataRow dr = dtbl.NewRow();
         dr["batchId"] = -1;
         dr["batchNo"] = "All";
         dtbl.Rows.InsertAt(dr, 0);
         cmbBatchNo.SelectedIndex = 0;
     }
     catch (Exception ex)
     {
         MessageBox.Show(" PVSBR:6" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Пример #4
0
 /// <summary>
 /// Function to fill Batch combobox
 /// </summary>
 public void BatchAllComboFill()
 {
     try
     {
         DataTable dtbl = new DataTable();
         BatchSP spBatch = new BatchSP();
         dtbl = spBatch.BatchViewAll();
         dgvcmbBatch.DataSource = dtbl;
         dgvcmbBatch.ValueMember = "batchId";
         dgvcmbBatch.DisplayMember = "batchNo";
     }
     catch (Exception ex)
     {
         MessageBox.Show("PI16:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }