Пример #1
0
        public ActionResult EnrollInClass()
        {
            var model = new IndividualClassModel();

            model.classes = GetAllClasses();

            return(View(model));
        }
Пример #2
0
        public ActionResult studentclasses(IndividualClassModel model)
        {
            var user    = (LearningCenter.Website.Models.UserModel)Session["User"];
            var classes = individualClassRepository.ClassList(user.Id);

            var model1 = new ClassListViewModel
            {
                ClassLists = classes
            };

            return(View(model1));
        }
Пример #3
0
        public ActionResult EnrollInClass(IndividualClassModel model)
        {
            var user = (LearningCenter.Website.Models.UserModel)Session["User"];

            model.classes = GetAllClasses();

            if (ModelState.IsValid)
            {
                individualClassRepository.Add(user.Id, model.ClassId);
                return(RedirectToAction("studentclasses"));
            }

            return(View());
        }