Пример #1
0
        public ActionResult Edit(Teacher teacher)
        {
            if (teacher == null)
            {
                return(RedirectToAction("Index)"));
            }

            if (!ModelState.IsValid)
            {
                return(View(teacher));
            }

            teacherService = new TeacherService();
            teacherService.EditTeacher(teacher, teacher.Id);

            return(RedirectToAction("Index"));
        }