Esempio n. 1
0
        public ActionResult StudentEdit(int id)
        {
            var model = new StudentEditModel();

            model = ProfileManageRepo.editStudentProfile(id);
            return(View(model));
        }
Esempio n. 2
0
        public ActionResult TeacherEdit(int id)
        {
            var model = new TeacherEditModel();

            model = ProfileManageRepo.editTeacherProfile(id);
            return(View(model));
        }
Esempio n. 3
0
        public ActionResult TeacherProfile()
        {
            var model = new TeacherProfileModel();

            model = ProfileManageRepo.loadTeacherProfile(HttpUtil.UserProfile.ID);
            return(View(model));
        }
Esempio n. 4
0
        public ActionResult TeacherEdit(TeacherEditModel model)
        {
            if (!ModelState.IsValid)
            {
                return(View(model));
            }
            var result = ProfileManageRepo.saveTeacherProfile(model, HttpUtil.UserProfile.ID);

            if (result.HasError)
            {
                ViewBag.Error = result.Message;
                return(View(model));
            }
            return(View(model));
        }