コード例 #1
0
ファイル: PMPaymentBill.aspx.cs プロジェクト: qimengcheng/xi
    protected void Gridview_PMSupply_PageIndexChanging(object sender, GridViewPageEventArgs e)
    {
        GridView theGrid      = sender as GridView; // refer to the GridView
        int      newPageIndex = 0;

        if (-2 == e.NewPageIndex)
        {
            TextBox     txtNewPageIndex = null;
            GridViewRow pagerRow        = Gridview_PMSupply.BottomPagerRow;


            if (null != pagerRow)
            {
                txtNewPageIndex = (TextBox)pagerRow.FindControl("textbox");   // refer to the TextBox with the NewPageIndex value
            }

            if (null != txtNewPageIndex && txtNewPageIndex.Text != "")
            {
                newPageIndex = int.Parse(txtNewPageIndex.Text) - 1; // get the NewPageIndex
            }
        }
        else
        {
            newPageIndex = e.NewPageIndex;
        }
        BindGridview_PMSupply("");

        newPageIndex = newPageIndex < 0 ? 0 : newPageIndex;
        newPageIndex = newPageIndex >= Gridview_PMSupply.PageCount ? Gridview_PMSupply.PageCount - 1 : newPageIndex;
        Gridview_PMSupply.PageIndex = newPageIndex;
        Gridview_PMSupply.DataBind();
    }
コード例 #2
0
 //绑定供应商列表
 private void BindGridview_PMSupply(string Condition)
 {
     try
     {
         Gridview_PMSupply.DataSource = pl.SelectPMSupplyInfo(Condition);
         Gridview_PMSupply.DataBind();
     }
     catch (Exception)
     {
         throw;
     }
 }
コード例 #3
0
ファイル: PMPaymentBill.aspx.cs プロジェクト: qimengcheng/xi
 //供应商查询表
 private void BindGridview_PMSupply(string condition)
 {
     Gridview_PMSupply.DataSource = ppl.SelectPMSupplyInfo(condition);
     Gridview_PMSupply.DataBind();
 }
コード例 #4
0
 private void BindGridview_PMSupply()
 {
     Gridview_PMSupply.DataSource = ccl.SelectCRMCustomerInfo_New();
     Gridview_PMSupply.DataBind();
 }