コード例 #1
0
ファイル: frmBatch.cs プロジェクト: jsoques/openmiracle
 /// <summary>
 /// Funtion to fill produdct combobox
 /// </summary>
 public void ProductViewAllForBatchByAllowBatch()
 {
     try
     {
         ProductSP spproduct = new ProductSP();
         DataTable dtblProductName = new DataTable();
         dtblProductName = spproduct.ProductViewAllForBatchByAllowBatch();
         cmbProduct.DataSource = dtblProductName;
         cmbProduct.ValueMember = "productId";
         cmbProduct.DisplayMember = "productName";
     }
     catch (Exception ex)
     {
         MessageBox.Show("B3:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
コード例 #2
0
ファイル: frmBatch.cs プロジェクト: jsoques/openmiracle
 /// <summary>
 /// Function to fill product combobox
 /// </summary>
 public void ProductNameComboFill()
 {
     try
     {
         ProductSP spproduct = new ProductSP();
         DataTable dtblProductName = new DataTable();
         dtblProductName = spproduct.ProductViewAllForBatchByAllowBatch();
         DataRow dr = dtblProductName.NewRow();
         dr[1] = "All";
         dtblProductName.Rows.InsertAt(dr, 0);
         cmbProductName.DataSource = dtblProductName;
         cmbProductName.ValueMember = "productId";
         cmbProductName.DisplayMember = "productName";
     }
     catch (Exception ex)
     {
         MessageBox.Show("B2:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }