예제 #1
0
        public ActionResult StudentEdit(int id)
        {
            var model = new StudentEditModel();

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

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

            model = ProfileManageRepo.loadTeacherProfile(HttpUtil.UserProfile.ID);
            return(View(model));
        }
예제 #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));
        }