Пример #1
0
    private void BindData()
    {
        int PageCurrent = Convert.ToInt32(this.AspNetPager1.CurrentPageIndex);
        int PageNum     = 20;
        int TotalCount  = 1;
        int PageCount   = 1;

        AspNetPager1.PageSize = PageNum;
        DataTable dt = bll.GetTradeShowList("MainInfoTab", "Id", "*", "", "Id desc", ref PageCurrent, PageNum, ref TotalCount);

        if (dt != null)
        {
            this.AspNetPager1.RecordCount = Convert.ToInt32(TotalCount);
            RfList.DataSource             = dt.DefaultView;
            RfList.DataBind();
            if (TotalCount % PageNum > 0)
            {
                PageCount = TotalCount / PageNum + 1;
            }
            else
            {
                PageCount = TotalCount / PageNum;
            }
            this.pinfo.InnerText = Convert.ToString(TotalCount);//总条数
        }
    }
Пример #2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         if (Convert.ToInt32(Request["str"]) != 0)
         {
             int Id = Convert.ToInt32(Request["str"].ToString());
             DeleteLoansInfoTab(Id);
         }
         if ((bll.GetList("") != null) && bll.GetList("").Tables[0].Rows.Count > 0)
         {
             RfList.DataSource = bll.GetList("");
             RfList.DataBind();
         }
     }
 }