예제 #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                txb_NickName.Attributes.Add("style", "width:10vw");
                txb_Grade.Attributes.Add("style", "width:10vw");
                txb_BriefQuestion.Attributes.Add("style", "width:40vw");
                txb_DetailQuestion.Attributes.Add("style", "width:40vw; height:15vw;");
                rbl_Sex.Attributes.Add("style", "width:10vw");

                //ddl_TeacherName.DataSource = userBLL.GetTeacher();
                //ddl_TeacherName.Items.FindByText("不指定老师").Selected = true;
                //ddl_TeacherName
                DataBinding();


                int pageIndex = int.Parse(Request["pageIndex"] ?? "1");
                int pageSize  = int.Parse(Request["pageSize"] ?? "3");
                int total     = 0;
                int category  = int.Parse(Request.QueryString["category"] ?? "0"); // 借用文章按类别分页

                if (category == 0)
                {
                    MessageList = messageBLL.GetAllMessageListString(pageIndex, pageSize, out total);
                    NavHtml     = COMMON.CjsPager.ShowPageNavigate(pageSize, pageIndex, total);
                }
                else
                {
                    MessageList = messageBLL.GetMessageListString(pageIndex, pageSize, category, out total);
                    NavHtml     = COMMON.CjsPager.ShowPageNavFront(pageSize, pageIndex, category, total);
                }
            }
        }