Ejemplo n.º 1
0
        /// <summary>
        /// 初始化数据
        /// </summary>
        /// <param name="Index"></param>
        private void InitData(int Index)
        {
            AspNetPager1.AlwaysShow = false;
            AspNetPager1.PageSize   = 15;
            ViewState["PageIndex"]  = Index;
            object    RowCount    = null;
            string    strWhereAdd = string.Empty;
            DataTable dt          = _AreaBLL.SelectSystemAreaProvincePage(AspNetPager1.PageSize, Index, strWhereAdd, ref RowCount);

            if (string.IsNullOrEmpty(strWhereAdd))
            {
                DataCount = dt.Rows.Count == 0 ? "<tr><td colspan=\"4\">系统暂无数据显示</td></tr>" : DataCount;
            }
            else
            {
                DataCount = dt.Rows.Count == 0 ? "<tr><td colspan=\"4\">没有符合查询条件的数据</td></tr>" : DataCount;
            }

            rpGA03.DataSource             = dt;
            AspNetPager1.RecordCount      = Convert.ToInt32(RowCount);
            AspNetPager1.CurrentPageIndex = Index;

            rpGA03.DataBind();
        }