/// <summary> /// Function to use the Tax Combo Fill /// </summary> public void cmbTaxComboFill() { try { TaxBll bllTax = new TaxBll(); List<DataTable> ListObj = new List<DataTable>(); ListObj = bllTax.TaxViewAllByVoucherTypeIdApplicaleForProduct(DecPOSVoucherTypeId); DataRow dr = ListObj[0].NewRow(); dr[1] = "NA"; ListObj[0].Rows.InsertAt(dr, 0); cmbTax.DataSource = ListObj[0]; cmbTax.ValueMember = "taxId"; cmbTax.DisplayMember = "taxName"; } catch (Exception ex) { MessageBox.Show("POS:16" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
/// <summary> /// Function to fill DataGridView Tax combobox /// </summary> public void DGVTaxCombofill() { try { TaxBll bllTax = new TaxBll(); List<DataTable> ListObj = new List<DataTable>(); ListObj = bllTax.TaxViewAllByVoucherTypeIdApplicaleForProduct(decPurchaseReturnVoucherTypeId); strTaxComboFill = (ListObj[0].Rows.Count > 0) ? ListObj[0].Rows[0]["taxId"].ToString() : string.Empty; dgvcmbTax.DataSource = ListObj[0]; dgvcmbTax.DisplayMember = "taxName"; dgvcmbTax.ValueMember = "taxId"; } catch (Exception ex) { MessageBox.Show("PR:11" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
/// <summary> /// Tax combofill in the grid under the vouchertype id /// </summary> public void dgvSalesInvoiceTaxComboFill() { try { TaxBll bllTax = new TaxBll(); List<DataTable> ListObj = new List<DataTable>(); ListObj = bllTax.TaxViewAllByVoucherTypeIdApplicaleForProduct(DecSalesInvoiceVoucherTypeId); DataRow drow = ListObj[0].NewRow(); drow["taxName"] = string.Empty; drow["taxId"] = 0; ListObj[0].Rows.InsertAt(drow, 0); dgvcmbSalesInvoiceTaxName.DataSource = ListObj[0]; dgvcmbSalesInvoiceTaxName.ValueMember = "taxId"; dgvcmbSalesInvoiceTaxName.DisplayMember = "taxName"; } catch (Exception ex) { MessageBox.Show("SI: 31" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
/// <summary> /// Function to fill tax combobox /// </summary> public void TaxCombofill() { try { List<DataTable> ListObj = new List<DataTable>(); TaxBll bllTax = new TaxBll(); ListObj = bllTax.TaxViewAllByVoucherTypeIdApplicaleForProduct(decPurchaseInvoiceVoucherTypeId); DataRow drow = ListObj[0].NewRow(); drow["taxName"] = " "; drow["taxId"] = 0; ListObj[0].Rows.InsertAt(drow, 0); dgvcmbTax.DataSource = ListObj[0]; dgvcmbTax.DisplayMember = "taxName"; dgvcmbTax.ValueMember = "taxId"; } catch (Exception ex) { MessageBox.Show("PI17:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }