Exemplo n.º 1
0
        protected void BindDataList(int currentPageIndex = 0)
        {
            int totalCount  = 0;
            var dataDicList = powerInfo.GetDataInfoByPage(currentPageIndex + 1, 2, out totalCount);

            this.rptDateList.DataSource = dataDicList;
            this.rptDateList.DataBind();
            PagerControl.CurrentPageIndex = currentPageIndex;
            PagerControl.IntialProperties(totalCount);
        }
Exemplo n.º 2
0
        protected void BindTeacherList(int currentPageIndex = 0)
        {
            int totalCount  = 0;
            var teacherList = TeacherInfo.GetTeacherInfoByPage(currentPageIndex + 1, 2, out totalCount);

            this.rptTeacherList.DataSource = teacherList;
            this.rptTeacherList.DataBind();
            if (totalCount == 0)
            {
                this.phNoData.Visible = true;
                this.trPage.Visible   = false;
            }
            else
            {
                this.phNoData.Visible = false;
                this.trPage.Visible   = true;
            }
            PagerControl.CurrentPageIndex = currentPageIndex;
            PagerControl.IntialProperties(totalCount);
        }