/// <summary>
 /// Function to fill group combobox 
 /// </summary>
 public void GroupComboFill()
 {
     try
     {
         List<DataTable> listObj = new List<DataTable>();
         ProductGroupBll BllProductGroup = new ProductGroupBll();
         listObj = BllProductGroup.ProductGroupViewAll();
         cmbGroup.DataSource = listObj[0];
         cmbGroup.DisplayMember = "groupName";
         cmbGroup.ValueMember = "groupId";
     }
     catch (Exception ex)
     {
         MessageBox.Show("PC:59" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
예제 #2
0
 /// <summary>
 /// Function to fill ProductGroup combobox
 /// </summary>
 public void GroupComboFill()
 {
     try
     {
         List<DataTable> listObj = new List<DataTable>();
         ProductGroupBll BllProductGroup = new ProductGroupBll();
         listObj = BllProductGroup.ProductGroupViewAll();
         DataRow dr = listObj[0].NewRow();
         dr["groupName"] = "All";
         dr["groupId"] = 0;
         listObj[0].Rows.InsertAt(dr, 0);
         cmbGroup.DataSource = listObj[0];
         cmbGroup.DisplayMember = "groupName";
         cmbGroup.ValueMember = "groupId";
     }
     catch (Exception ex)
     {
         MessageBox.Show("ST:4" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
 /// <summary>
 /// Function to Fill product group or tax according to search by combo box selection in Product Group/Tax combo box 
 /// </summary>
 public void ProductGroupTaxComboFill()
 {
     try
     {
         if (cmbSearchBy.SelectedIndex == 0)
         {
             ProductGroupBll BllProductgroup = new ProductGroupBll();
             List<DataTable> listObjProductGroup = new List<DataTable>();
             listObjProductGroup = BllProductgroup.ProductGroupViewAll();
             cmbProductGroupTax.DataSource = listObjProductGroup[0];
             cmbProductGroupTax.ValueMember = "groupId";
             cmbProductGroupTax.DisplayMember = "groupName";
         }
         else
         {
             TaxBll bllTax = new TaxBll();
             List<DataTable> ListObj = new List<DataTable>();
             ListObj = bllTax.TaxViewAll();
             cmbProductGroupTax.DataSource = ListObj[0];
             cmbProductGroupTax.ValueMember = "taxId";
             cmbProductGroupTax.DisplayMember = "taxName";
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("CPT 5 : " + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }