Backup/WEB/Student.aspx.cs

(开头部分) 2KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using BLL;
using Model;

namespace WEB
{
    public partial class Student : System.Web.UI.Page
    {
        private GradeBll gradeBll = new GradeBll();
        private StuBll stuBll = new StuBll();
        private TeacherBll teacherBll = new TeacherBll();
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!this.IsPostBack)
            {
                if (Request.QueryString["stuId"] != null)
                {
                    StuLinq();
                }
            }
        }
        void StuLinq()
        {
            if (Cache["stuId"] != null)
            {
                int stuId = int.Parse(Request.QueryString["stuId"]);
                List<StuInfo> stuInfo = stuBll.GetStuInfo();
                List<Grade> grade = gradeBll.GetGrade();
                List<Teacher> teacher = teacherBll.GetTeacherInfo();
            
                var result = from t in teacher
                             join g in grade on t.teaId equals g.gSubject
                             join i in stuInfo on g.stuId equals i.stuId
                             where i.stuId==stuId
                             select new
                             {
                                 i.stuId,
                                 i.stuName,
                                 i.stuPwd,
                                 t.teaSubject,
                                 g.gScore,

                             };
                //var result = from i in stuInfo
                //             join s in grade on i.stuId equals s.stuId
                //             select new
                //             {
                //                 i.stuId,
                //                 i.stuName,
                //                 i.stuPwd,
                //                 s.gSubject,
                //                 s.gScore
                //             };
                this.RtList.DataSource = result;
                RtList.DataBind();
后面还有 4 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。