Exemplo n.º 1
0
        public ActionResult ListTeacherLessons(int id)
        {
            var model = new bat.logic.ViewModels.Homepage.SubjectList();

            try
            {
                model = _homeService.LoadSubjectListByTeacher(id);
            }
            catch (Exception ex)
            {
                ViewBag.Error = ex.Message;
            }

            return(View(model));
        }
Exemplo n.º 2
0
        public ActionResult ListLessons(string subject)
        {
            var user  = new logic.Rules.Authentication(Request.GetOwinContext()).GetLoggedInUser();
            var model = new bat.logic.ViewModels.Homepage.SubjectList();

            try
            {
                model = _homeService.LoadSubjectList(subject, user?.ID);
            }
            catch (Exception ex)
            {
                ViewBag.Error = ex.Message;
            }

            return(View(model));
        }