Пример #1
0
 /// <summary>
 /// 教师删除提交的课程信息
 /// </summary>
 /// <param name="courseNum"></param>
 /// <returns></returns>
 public ActionResult DelCourseInfo(string courseNum)
 {
     if (Session["UserType"] != null && Session["UserType"].ToString() == "Teacher")
     {
         if (Session["UserNum"] != null)
         {
             if (courseNum != "")
             {
                 //执行删除操作
                 if (CourseInfo.DelCourseInfoByCourseNum(courseNum, Session["UserNUm"].ToString()) > 0)
                 {
                     return(Content("Success"));
                 }
                 else
                 {
                     return(Content("Error"));
                 }
             }
             else
             {
                 return(Content("Error"));
             }
         }
         else
         {
             return(RedirectToAction("../Home/Login"));
         }
     }
     else
     {
         return(RedirectToAction("../Home/Login"));
     }
 }