/// <summary> /// 初始化信息 /// </summary> /// <param name="Index"></param> private void InitData(int Index) { AspNetPager1.AlwaysShow = false; AspNetPager1.PageSize = 15; ViewState["PageIndex"] = Index; string strWhereAdd = string.Empty; object RowCount = null; DataTable dt = _AreaBLL.SelectSystemAreaCityPage(AspNetPager1.PageSize, Index, strWhereAdd, ref RowCount); if (string.IsNullOrEmpty(strWhereAdd)) { DataCount = dt.Rows.Count == 0 ? "<tr><td colspan=\"5\">系统暂无数据显示</td></tr>" : DataCount; } else { DataCount = dt.Rows.Count == 0 ? "<tr><td colspan=\"5\">没有符合查询条件的数据</td></tr>" : DataCount; } rpGA03.DataSource = dt; AspNetPager1.RecordCount = Convert.ToInt32(RowCount); AspNetPager1.CurrentPageIndex = Index; rpGA03.DataBind(); }