Пример #1
0
 /// <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)
         {
             ProductGroupSP spProductGroup   = new ProductGroupSP();
             DataTable      dtblProductGroup = new DataTable();
             dtblProductGroup = spProductGroup.ProductGroupViewAll();
             cmbProductGroupTax.DataSource    = dtblProductGroup;
             cmbProductGroupTax.ValueMember   = "groupId";
             cmbProductGroupTax.DisplayMember = "groupName";
         }
         else
         {
             TaxSP     spTax   = new TaxSP();
             DataTable dtblTax = new DataTable();
             dtblTax = spTax.TaxViewAll();
             cmbProductGroupTax.DataSource    = dtblTax;
             cmbProductGroupTax.ValueMember   = "taxId";
             cmbProductGroupTax.DisplayMember = "taxName";
         }
     }
     catch (Exception ex)
     {
         formMDI.infoError.ErrorString = "CPT 5 : " + ex.Message;
     }
 }
 /// <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)
         {
             ProductGroupSP spProductGroup   = new ProductGroupSP();
             DataTable      dtblProductGroup = new DataTable();
             dtblProductGroup = spProductGroup.ProductGroupViewAll();
             cmbProductGroupTax.DataSource    = dtblProductGroup;
             cmbProductGroupTax.ValueMember   = "groupId";
             cmbProductGroupTax.DisplayMember = "groupName";
         }
         else
         {
             TaxSP     spTax   = new TaxSP();
             DataTable dtblTax = new DataTable();
             dtblTax = spTax.TaxViewAll();
             cmbProductGroupTax.DataSource    = dtblTax;
             cmbProductGroupTax.ValueMember   = "taxId";
             cmbProductGroupTax.DisplayMember = "taxName";
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("CPT 5 : " + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Пример #3
0
 /// <summary>
 /// Function to fill the ProductGroup combobox
 /// </summary>
 public void ProductGroupComboFill()
 {
     try
     {
         ProductGroupSP spProductGroup   = new ProductGroupSP();
         DataTable      dtblProductGroup = new DataTable();
         dtblProductGroup = spProductGroup.ProductGroupViewAll();
         DataRow dr = dtblProductGroup.NewRow();
         dr[2] = "All";
         dtblProductGroup.Rows.InsertAt(dr, 0);
         cmbProductGroup.DataSource    = dtblProductGroup;
         cmbProductGroup.ValueMember   = "groupId";
         cmbProductGroup.DisplayMember = "groupName";
     }
     catch (Exception ex)
     {
         formMDI.infoError.ErrorString = "PSP2:" + ex.Message;
     }
 }
 /// <summary>
 /// Function to fill the ProductGroup combobox
 /// </summary>
 public void ProductGroupComboFill()
 {
     try
     {
         ProductGroupSP spProductGroup   = new ProductGroupSP();
         DataTable      dtblProductGroup = new DataTable();
         dtblProductGroup = spProductGroup.ProductGroupViewAll();
         DataRow dr = dtblProductGroup.NewRow();
         dr[2] = "All";
         dtblProductGroup.Rows.InsertAt(dr, 0);
         cmbProductGroup.DataSource    = dtblProductGroup;
         cmbProductGroup.ValueMember   = "groupId";
         cmbProductGroup.DisplayMember = "groupName";
     }
     catch (Exception ex)
     {
         MessageBox.Show("PSP2:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Пример #5
0
 /// <summary>
 /// Function to fill the Productgroup combobox
 /// </summary>
 public void ProductGroupComboFill()
 {
     try
     {
         DataTable dtbl = new DataTable();
         ProductGroupSP spProductGroup = new ProductGroupSP();
         dtbl = spProductGroup.ProductGroupViewAll();
         DataRow dr = dtbl.NewRow();
         dr["groupName"] = "All";
         dr["groupId"] = 0;
         dtbl.Rows.InsertAt(dr, 0);
         cmbProductGroup.DataSource = dtbl;
         cmbProductGroup.DisplayMember = "groupName";
         cmbProductGroup.ValueMember = "groupId";
     }
     catch (Exception ex)
     {
         MessageBox.Show("SER:1" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Пример #6
0
        /// <summary>
        /// Function to fill group combobox 
        /// </summary>
        public void GroupComboFill()
        {

            try
            {
                DataTable dtbl = new DataTable();
                ProductGroupSP spProductGroup = new ProductGroupSP();
                dtbl = spProductGroup.ProductGroupViewAll();
                cmbGroup.DataSource = dtbl;
                cmbGroup.DisplayMember = "groupName";
                cmbGroup.ValueMember = "groupId";
            }
            catch (Exception ex)
            {
                MessageBox.Show("PC:59" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }

        }
Пример #7
0
 /// <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)
         {
             ProductGroupSP spProductGroup = new ProductGroupSP();
             DataTable dtblProductGroup = new DataTable();
             dtblProductGroup = spProductGroup.ProductGroupViewAll();
             cmbProductGroupTax.DataSource = dtblProductGroup;
             cmbProductGroupTax.ValueMember = "groupId";
             cmbProductGroupTax.DisplayMember = "groupName";
         }
         else
         {
             TaxSP spTax = new TaxSP();
             DataTable dtblTax = new DataTable();
             dtblTax = spTax.TaxViewAll();
             cmbProductGroupTax.DataSource = dtblTax;
             cmbProductGroupTax.ValueMember = "taxId";
             cmbProductGroupTax.DisplayMember = "taxName";
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("CPT 5 : " + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }