Exemplo n.º 1
0
    public void BindAssignScreen()
    {
        int rowcount = ucCustomPager.isCountRecord;

        string sortbycoloumn = (ViewState["SORTBYCOLOUMN"] == null) ? null : (ViewState["SORTBYCOLOUMN"].ToString());
        int?   sortdirection = null; if (ViewState["SORTDIRECTION"] != null)
        {
            sortdirection = Int32.Parse(ViewState["SORTDIRECTION"].ToString());
        }

        string Class_Name = Request.QueryString["Class_Name"].ToString();

        //DataTable dt = BLL_Infra_ShipSettings.Get_Screen_Assign_Search(txtSearch.Text, Class_Name, sortbycoloumn, sortdirection
        //     , ucCustomPager.CurrentPageIndex, ucCustomPager.PageSize, ref rowcount);

        DataTable dt = BLL_Infra_ShipSettings.Get_Screen_Assign_Search(txtSearch.Text, Class_Name, sortbycoloumn, sortdirection
                                                                       , null, null, ref rowcount);


        //if (ucCustomPager.isCountRecord == 1)
        //{
        //    ucCustomPager.CountTotalRec = rowcount.ToString();
        //    ucCustomPager.BuildPager();
        //}

        if (dt.Rows.Count > 0)
        {
            gvAssignScreen.DataSource = dt;
            gvAssignScreen.DataBind();
        }
        else
        {
            gvAssignScreen.DataSource = dt;
            gvAssignScreen.DataBind();
        }
    }