Пример #1
0
 /// <summary>
 /// Function to fill Product combobox
 /// </summary>
 public void ProductNameComboFill()
 {
     try
     {
         ProductCreationBll BllProductCreation = new ProductCreationBll();
         List<DataTable> listObjProductName = new List<DataTable>();
         listObjProductName = BllProductCreation.ProductViewAllForComboBox();
         DataRow dr = listObjProductName[0].NewRow();
         dr["ProductName"] = "All";
         dr["ProductId"] = 0;
         listObjProductName[0].Rows.InsertAt(dr, 0);
         cmbProduct.DataSource = listObjProductName[0];
         cmbProduct.ValueMember = "productId";
         cmbProduct.DisplayMember = "productName";
     }
     catch (Exception ex)
     {
         MessageBox.Show("ST:7" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Пример #2
0
 /// <summary>
 /// Funtion to fill produdct combobox
 /// </summary>
 public void ProductComboFill()
 {
     try
     {
         ProductCreationBll BllProductCreation = new ProductCreationBll();
         List<DataTable> listObjProduct = new List<DataTable>();
         listObjProduct = BllProductCreation.ProductViewAllForComboBox();
         cmbProduct.DataSource = listObjProduct[0];
         cmbProduct.ValueMember = "productId";
         cmbProduct.DisplayMember = "productName";
     }
     catch (Exception ex)
     {
         MessageBox.Show("B4:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }