public void FillGrid(string CompCode)
        {
            try
            {
                DataTable Dt = new DataTable();

                Dt = ACCOUNTS_STOCKMASLogicLayer.GetAllACCOUNTS_STOCKMASDetials(Convert.ToInt32(Session["USERCODE"].ToString()), Convert.ToInt32(Session["COMP_CODE"].ToString()));
                DataView Dv = new DataView(Dt);
                if (CompCode != string.Empty)
                {
                    Dv.RowFilter = "COMP_CODE=" + Session["COMP_CODE"].ToString();
                }
                GvPartyStockMaster.DataSource = Dv.ToTable();
                GvPartyStockMaster.DataBind();
                DtSearch = Dt;
            }
            catch (Exception)
            {
                throw;
            }
        }
 protected void TxtSearch_TextChanged(object sender, EventArgs e)
 {
     try
     {
         if (TxtSearch.Text != string.Empty)
         {
             DataView Dv = new DataView(DtSearch);
             Dv.RowFilter = "ProductName LIKE '%" + TxtSearch.Text.Trim() + "%' OR ProductCode like '%" + TxtSearch.Text.Trim() + "%' OR AccountName like '%" + TxtSearch.Text.Trim() + "%' OR CategoryName like '%" + TxtSearch.Text.Trim() + "%' ";
             GvPartyStockMaster.DataSource = Dv.ToTable();
             GvPartyStockMaster.DataBind();
         }
         else
         {
             GvPartyStockMaster.DataSource = DtSearch;
             GvPartyStockMaster.DataBind();
         }
     }
     catch (Exception)
     {
         throw;
     }
 }