private void BindGridView() { _itm.CompanyId = Convert.ToInt16(Session["CompanyId"]); _ds.Tables.Add(_sobj.SelectItem(_itm)); gvItem.DataSource = _ds; gvItem.DataBind(); }
private void BindItem() { _itm.CompanyId = Convert.ToInt16(Session["CompanyId"]); _dt = _sobj.SelectItem(_itm); foreach (DataRow row in _dt.Rows) { if (row["ItemStatus"].ToString() == "False") { row.Delete(); } } _dt.AcceptChanges(); ddlItemName.DataSource = _dt; ddlItemName.DataTextField = "ItemName"; ddlItemName.DataValueField = "ItemId"; ddlItemName.DataBind(); ddlItemName.Items.Insert(0, new ListItem("----SELECT----")); ViewState["Item_dt"] = _dt; }