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

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

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

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