//-------------------------------------------------------------TaxComboFill--------------------------- public void TaxComboFill() { try { List<DataTable> Listobj = new List<DataTable>(); TaxBll bllTax = new TaxBll(); Listobj = bllTax.TaxViewAllForProduct(); cmbTax.DataSource = Listobj[0]; cmbTax.DisplayMember = "taxName"; cmbTax.ValueMember = "taxId"; } catch (Exception ex) { MessageBox.Show("PC:47" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
/// <summary> /// Function to fill Tax combobox /// </summary> public void TaxComboFill() { try { TaxBll bllTax = new TaxBll(); List<DataTable> ListObj = new List<DataTable>(); ListObj = bllTax.TaxViewAllForProduct(); DataRow dr = ListObj[0].NewRow(); dr["taxname"] = "All"; dr["taxId"] = 0; ListObj[0].Rows.InsertAt(dr, 0); cmbTax.DataSource = ListObj[0]; cmbTax.DisplayMember = "taxName"; cmbTax.ValueMember = "taxId"; } catch (Exception ex) { MessageBox.Show("ST:2" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
/// <summary> /// Function to fill Tax combobox /// </summary> public void TaxComboFill() { try { TaxBll bllTax = new TaxBll(); List<DataTable> ListObj = new List<DataTable>(); ListObj = bllTax.TaxViewAllForProduct(); cmbTax.DataSource = ListObj[0]; cmbTax.DisplayMember = "taxName"; cmbTax.ValueMember = "taxId"; if (TaxStatus()) { cmbTax.Enabled = true; } else { cmbTax.Enabled = false; } } catch (Exception ex) { MessageBox.Show("MPC2:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }