private void BindGridView() { _tm.CompanyId = Convert.ToInt16(Session["CompanyId"]); _ds.Tables.Add(_sobj.SelectTax(_tm)); gvTax.DataSource = _ds; gvTax.DataBind(); }
private void BindTax() { _tm.CompanyId = Convert.ToInt16(Session["CompanyId"]); _dt = _sobj.SelectTax(_tm); foreach (DataRow row in _dt.Rows) { if (row["TaxStatus"].ToString() == "False") { row.Delete(); } } _dt.AcceptChanges(); ddlTax1.DataSource = _dt; ddlTax1.DataTextField = "TaxName"; ddlTax1.DataValueField = "TaxId"; ddlTax2.DataSource = _dt; ddlTax2.DataTextField = "TaxName"; ddlTax2.DataValueField = "TaxId"; ddlTax1.DataBind(); ddlTax2.DataBind(); ddlTax1.Items.Insert(0, new ListItem("Select")); ddlTax2.Items.Insert(0, new ListItem("Select")); ViewState["Tax_dt"] = _dt; }