Esempio n. 1
0
        public ActionResult Contact(string notification = "")
        {
            UserType user = HomeController.CheckLoginStatus();

            if (user != UserType.Student)
            {
                return(RedirectToAction(actionName: "Index", controllerName: Models.EnumValues.UserTypes[(int)user]));
            }
            //Instatiates a MessageModal object to be sent to the view
            MessageModel message = new MessageModel()
            {
                Notifications = notification
            };

            return(View(message));
        }
Esempio n. 2
0
        public ActionResult Create(string notification = "")
        {
            UserType user = HomeController.CheckLoginStatus();

            if (user != UserType.Student)
            {
                return(RedirectToAction(actionName: "Index", controllerName: Models.EnumValues.UserTypes[(int)user]));
            }
            //instatiates a list of course modals to contain all the courses a professor making a new account adds
            Courses = new List <DB.Course>();
            ProfessorModel professor = new ProfessorModel()
            {
                Notifications = notification
            };

            return(View(professor));
        }
Esempio n. 3
0
        public ActionResult Create(string notification = "")
        {
            CoursePreferences = new List <DB.Course>();
            UserType user = HomeController.CheckLoginStatus();

            if (user != UserType.Student)
            {
                return(RedirectToAction(actionName: "Index", controllerName: Models.EnumValues.UserTypes[(int)user]));
            }
            //Instatiates a TAModel object to be sent to the view
            TAModel TA = new TAModel()
            {
                Notifications = notification
            };

            return(View(TA));
        }