/// <summary> /// 展示教师修改课程信息 /// </summary> /// <returns></returns> public ActionResult UpdateCourseInfo() { if (Session["UserType"] != null && Session["UserType"].ToString() == "Teacher") { if (Session["UserNum"] != null) { TeacherInfo t1 = TeacherInfo.GetTeacherInfo(Session["UserNum"].ToString()); string sql = "Select * from CourseInfo where TeacherNum = @TeacherNum and DelFlag = 0"; List <CourseInfo> list = CourseInfo.GetCourseInfoByTeacherNum(Session["UserNum"].ToString(), sql); ViewBag.Teacher = t1; ViewBag.CourseList = list; return(View()); } else { return(RedirectToAction("../Home/Login")); } } else { return(RedirectToAction("../Home/Login")); } }
/// <summary> /// 【学生管理】 /// </summary> /// <returns></returns> public ActionResult StudentManage() { if (Session["UserType"] != null && Session["UserType"].ToString() == "Teacher") { if (Session["UserNum"] != null) { TeacherInfo t1 = TeacherInfo.GetTeacherInfo(Session["UserNum"].ToString()); //获取教师发布的课程,并且通过管理员的验证的(State:待检验-----> 正常) string sql = "Select * from CourseInfo where TeacherNum = @TeacherNum and DelFlag = 0 and State = '正常' "; List <CourseInfo> list = CourseInfo.GetCourseInfoByTeacherNum(Session["UserNum"].ToString(), sql); ViewBag.Teacher = t1; ViewBag.CourseList = list; return(View()); } else { return(RedirectToAction("../Home/Login")); } } else { return(RedirectToAction("../Home/Login")); } }