Пример #1
0
    public void BindCheckList()
    {
        int PAGE_SIZE  = ucCustomPager1.PageSize;
        int PAGE_INDEX = ucCustomPager1.CurrentPageIndex;

        int SelectRecordCount = ucCustomPager.isCountRecord;

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

        DataSet ds = BLL_Crew_CrewList.Get_ChechList_Search(int.Parse(Request.QueryString["ID"].ToString()), int.Parse(Request.QueryString["VESSELID"].ToString()), txtSearchText.Text, sortbycoloumn, sortdirection, PAGE_SIZE, PAGE_INDEX, ref SelectRecordCount);

        gvCheckList.DataSource = ds.Tables[0];
        gvCheckList.DataBind();

        if (ucCustomPager1.isCountRecord == 1)
        {
            ucCustomPager1.CountTotalRec = SelectRecordCount.ToString();
            ucCustomPager1.BuildPager();
        }
    }