Exemplo n.º 1
0
    private void LoadData(int page)
    {
        int    recordNum = 100;
        int    pageSize  = Variable.DefaultPageSize;
        string retValue  = string.Empty;

        bool isFirstSearch = false;

        if (ViewState["IsFirstSearch"] != null)
        {
            isFirstSearch = bool.Parse(ViewState["IsFirstSearch"].ToString());
        }

        Resource.QueryZXPlaceList(GetQueryZXPlaceInfo(), pageSize, page, null, isFirstSearch, out recordNum, out retValue);
        GridView1.DataSource = Helper.ConvertXmlStrToDataTable(retValue);
        GridView1.DataBind();
        //因为查询之后第二点击下一页不需要统计总数,只需要取之前的就可以
        if (bool.Parse(ViewState["IsFirstSearch"].ToString()) == false)
        {
            recordNum = int.Parse(ViewState["RecordNum"].ToString());
        }
        else
        {
            ViewState["RecordNum"] = recordNum;
        }

        lblRecordNum.Text      = recordNum.ToString();
        lblPresentPageNum.Text = page.ToString();
        lblTotalPageNum.Text   = (Math.Ceiling(Convert.ToDouble(recordNum) / pageSize)).ToString();

        WSDataLayer.EnablePageControl(lbtFirstPage, lbtPreviousPage, lbtNextPage, lbtLastPage, recordNum, pageSize, Convert.ToInt32(lblTotalPageNum.Text), page);
    }
Exemplo n.º 2
0
    private void LoadData(int page)
    {
        int recordNum = 0;
        int pageSize  = Variable.DefaultPageSize;

        GridView1.DataSource = Grain.QueryGrainListByStorage(QueryCondition(), pageSize, page, out recordNum);
        GridView1.DataBind();

        lblRecordNum.Text      = recordNum.ToString();
        lblPresentPageNum.Text = page.ToString();
        lblTotalPageNum.Text   = (Math.Ceiling(Convert.ToDouble(recordNum) / pageSize)).ToString();

        WSDataLayer.EnablePageControl(lbtFirstPage, lbtPreviousPage, lbtNextPage, lbtLastPage, recordNum, pageSize, Convert.ToInt32(lblTotalPageNum.Text), page);
    }
Exemplo n.º 3
0
    private void LoadData(int page)
    {
        int    recordNum = 100;
        int    pageSize  = Variable.DefaultPageSize;
        string roleName  = txtRoleName.Text.Trim();

        GridView1.DataSource = Role.QueryRoleList(roleName, pageSize, page, out recordNum);
        GridView1.DataBind();

        lblRecordNum.Text      = recordNum.ToString();
        lblPresentPageNum.Text = page.ToString();
        lblTotalPageNum.Text   = (Math.Ceiling(Convert.ToDouble(recordNum) / pageSize)).ToString();
        WSDataLayer.EnablePageControl(lbtFirstPage, lbtPreviousPage, lbtNextPage, lbtLastPage, recordNum, pageSize, Convert.ToInt32(lblTotalPageNum.Text), page);
    }
Exemplo n.º 4
0
    private void LoadData(int page)
    {
        int    recordNum     = 100;
        int    pageSize      = Variable.DefaultPageSize;
        string retValue      = string.Empty;
        bool   isFirstSearch = true;

        BatchPlan.QueryMovePlanList(QueryCondition(), pageSize, page, null, isFirstSearch, out recordNum, out retValue);
        GridView1.DataSource = Helper.ConvertXmlStrToDataTable(retValue);
        GridView1.DataBind();

        lblRecordNum.Text      = recordNum.ToString();
        lblPresentPageNum.Text = page.ToString();
        lblTotalPageNum.Text   = (Math.Ceiling(Convert.ToDouble(recordNum) / pageSize)).ToString();


        WSDataLayer.EnablePageControl(lbtFirstPage, lbtPreviousPage, lbtNextPage, lbtLastPage, recordNum, pageSize, Convert.ToInt32(lblTotalPageNum.Text), page);
    }