public ActionResult EnrollInClass(FinalProject.Models.EnrollClassModel enrollClassModel)
        {
            var user      = Session["User"] as FinalProject.Models.UserModel;
            var userClass = classManager.AddClass(enrollClassModel.SelectedClassId, user.UserId);

            return(RedirectToAction("StudentClasses"));
        }
 public ActionResult EnrollInClass()
 {
     if (Session["User"] != null)
     {
         var classList   = classManager.ClassList();
         var select      = new SelectList(classList, "ClassId", "ClassName");
         var enrollModel = new FinalProject.Models.EnrollClassModel()
         {
             ClassList = select
         };
         return(View(enrollModel));
     }
     else
     {
         return(RedirectToAction("Login"));
     }
 }