WebSite3/student/seeCourseDetail.aspx.cs
(完整代码) 1KBusing System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using CheckOnWork.Model;
using CheckOnWork.BusinessLogicLayer;
public partial class student_seeCourseDetail : System.Web.UI.Page
{
CheckOnWork.BusinessLogicLayer.CourseDetailBLL cdBll = new CourseDetailBLL();
CheckOnWork.BusinessLogicLayer.CourseBLL cBll = new CourseBLL();
CheckOnWork.BusinessLogicLayer.StudentBLL stuBll = new StudentBLL();
public operation operate = new operation();
static int PageSize = 10;
static int courseID = 0;
static string studentId;
static int professionalId;
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
if (Session["State"].ToString() != "student")
{
Response.Write("<script type='text/javascript'>alert('您还没有登录!无法访问');self.parent.location.href('../default.aspx') </script>");
}
courseID = cBll.GetCourseByName(Request.QueryString["courseName"]).courseID;
studentId = Session["studentId"].ToString();
professionalId = (stuBll.GetStudentById(studentId)).professionalID;
DoDataBand(PageSize);
}
}
void DoDataBand(int size)
{
IList<CheckOnWork.Model.CourseDetail> list = cdBll.GetDetailByProfessAndCourse(professionalId.ToString(),courseID);
WebUserControl1.PDataSource = operate.GetPageDataSourceByModel(size, list);
// UserControl1.RepeaterName = "rptAssistant";
}
protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
{
PageSize = Convert.ToInt32(TextBox1.Text);
DoDataBand(PageSize);
WebUserControl1.dataBind(0);
WebUserControl1.PageIndex = 0;
}
}
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。