protected void ReadAllNewComment_Button_Click(object sender, EventArgs e) { if (Session["UserInfo"] != null) { MessageInfo comment = new MessageInfo(); comment.UserID = user.UserID; comment.Type = 1; comment.ReadType(); mynewcomment = user.GetNewComment(); AspNetPager.RecordCount = mynewcomment.Tables["NewComment"].Rows.Count; AllMyNewComment_DataList.DataSource = FilterTable(mynewcomment.Tables["NewComment"], AspNetPager.StartRecordIndex - 1, AspNetPager.EndRecordIndex - 1); AllMyNewComment_DataList.DataBind(); //Response.Redirect("/aspx/MyNewComment.aspx"); } }
protected void ReadAllNewAdviceReply_Button_Click(object sender, EventArgs e) { if (Session["UserInfo"] != null) { MessageInfo replyadvice = new MessageInfo(); replyadvice.UserID = user.UserID; replyadvice.Type = 4; replyadvice.ReadType(); mynewadvicereply = user.GetNewAdviceReply(); AspNetPager.RecordCount = mynewadvicereply.Tables["NewAdviceReply"].Rows.Count; AllMyNewAdviceReply_DataList.DataSource = FilterTable(mynewadvicereply.Tables["NewAdviceReply"], AspNetPager.StartRecordIndex - 1, AspNetPager.EndRecordIndex - 1); AllMyNewAdviceReply_DataList.DataBind(); //Response.Redirect("/aspx/MyNewAdviceReply.aspx"); } }