コード例 #1
0
 public ActionResult EditCouDetails(int id)
 {
     if (Session["UserId"] != null && Session["Accountid"] != null)
     {
         CourseRepo CouRepo = new CourseRepo();
         return(View(CouRepo.GetAllCourse().Find(Cou => Cou.courseId == id)));
     }
     else
     {
         return(RedirectToAction("Index", "Login"));
     }
 }
コード例 #2
0
 public ActionResult GetAllCourse()
 {
     if (Session["UserId"] != null && Session["Accountid"] != null)
     {
         CourseRepo Repo = new CourseRepo();
         ModelState.Clear();
         return(View(Repo.GetAllCourse()));
     }
     else
     {
         return(RedirectToAction("Index", "Login"));
     }
 }