protected void RebindGrid(object sender, EventArgs e)
        {
            try
            {
                //UCProductSearchService.iUCProductSearchClient productSearchService = new UCProductSearchService.iUCProductSearchClient();
                //CustomProfile profile = CustomProfile.GetProfile();
                ////List<GetProductDetail> ProductList = new List<GetProductDetail>();
                ////ProductList = productSearchService.GetProductList1(GridProductSearch.CurrentPageIndex, hdnFilterText.Value, profile.DBConnection._constr).ToList();

                //List<VW_GetSKUDetailsWithPack> ProductList = new List<VW_GetSKUDetailsWithPack>();
                //ProductList = productSearchService.GetSKUList(GridProductSearch.CurrentPageIndex, hdnFilterText.Value, profile.DBConnection._constr).ToList();

                //GridProductSearch.DataSource = ProductList;
                //GridProductSearch.GroupBy = hndgrupByGrid.Value;
                //// if (!Page.IsPostBack) { GridProductSearch.GroupBy = "ProductType"; }
                //GridProductSearch.DataBind();
                //productSearchService.Close();
                DataSet ds = new DataSet();
                ds = GetPrdLst(GridProductSearch.CurrentPageIndex, hdnFilterText.Value);

                GridProductSearch.DataSource = ds;
                GridProductSearch.GroupBy    = hndgrupByGrid.Value;
                // if (!Page.IsPostBack) { GridProductSearch.GroupBy = "ProductCode"; }
                GridProductSearch.DataBind();
            }
            catch (System.Exception ex)
            {
                Login.Profile.ErrorHandling(ex, this, "ProductSearch.aspx.cs", "RebindGrid");
            }
        }
 protected void RebindGrid(object sender, EventArgs e)
 {
     try
     {
         DataSet ds = new DataSet();
         ds = GetPrdLst(GridProductSearch.CurrentPageIndex, hdnFilterText.Value);
         GridProductSearch.DataSource = ds;
         GridProductSearch.DataBind();
     }
     catch (System.Exception ex)
     {
         Login.Profile.ErrorHandling(ex, this, "SearchProduct.aspx.cs", "RebindGrid");
     }
 }
Exemplo n.º 3
0
        protected void RebindGrid(object sender, EventArgs e)
        {
            try
            {
                BrilliantWMS.UCProductSearchService.iUCProductSearchClient productSearchService = new BrilliantWMS.UCProductSearchService.iUCProductSearchClient();
                CustomProfile profile = CustomProfile.GetProfile();

                //List<GetProductDetail> ProductList = new List<GetProductDetail>();
                //ProductList = productSearchService.GetProductList1(GridProductSearch.CurrentPageIndex, hdnFilterText.Value, profile.DBConnection._constr).ToList();

                List <VW_GetSKUDetailsWithPack> ProductList = new List <VW_GetSKUDetailsWithPack>();
                if (Session["DeptID"] != null)
                {
                    long DeptID = long.Parse(Session["DeptID"].ToString());
                    //if (profile.Personal.UserType == "Requester And Approver" || profile.Personal.UserType == "Requester" || profile.Personal.UserType == "User" || profile.Personal.UserType == "Admin")
                    //{
                    long UserID = profile.Personal.UserID;
                    ProductList = productSearchService.GetSKUListDeptWise(GridProductSearch.CurrentPageIndex, hdnFilterText.Value, UserID, DeptID, profile.DBConnection._constr).ToList();
                }
                else if (Session["WarehouseID"] != null)
                {
                    long WarehouseID = long.Parse(Session["WarehouseID"].ToString());
                    ProductList = productSearchService.GetSKUListWarehouseWise(GridProductSearch.CurrentPageIndex, hdnFilterText.Value, WarehouseID, profile.DBConnection._constr).ToList();
                }
                //}
                //else
                //{
                //    ProductList = productSearchService.GetSKUList(GridProductSearch.CurrentPageIndex, hdnFilterText.Value, DeptID, profile.DBConnection._constr).ToList();
                //}

                GridProductSearch.DataSource = ProductList;
                GridProductSearch.GroupBy    = hndgrupByGrid.Value;
                // if (!Page.IsPostBack) { GridProductSearch.GroupBy = "ProductType"; }
                GridProductSearch.DataBind();
                productSearchService.Close();
            }
            catch (System.Exception ex)
            {
                Login.Profile.ErrorHandling(ex, this, "ProductSearch.aspx.cs", "RebindGrid");
            }
        }