Beispiel #1
0
        public ActionResult EditTeacher(int?ind)
        {
            if (ind == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Teacher teacher = db.Teacher.Find(ind);

            if (teacher == null)
            {
                return(HttpNotFound());
            }

            FacultyDepartmentInfo facultyDeptInfo = new FacultyDepartmentInfo();

            ViewBag.faculties = facultyDeptInfo.getFaculty();
            return(View(teacher));
        }
Beispiel #2
0
        public ActionResult EditTeacher(int?ind)
        {
            if (!HasSession())
            {
                return(RedirectToAction("Index", "Home"));
            }

            if (ind == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Teacher teacher = db.Teacher.Find(ind);

            if (teacher == null)
            {
                return(HttpNotFound());
            }

            FacultyDepartmentInfo facultyDeptInfo = new FacultyDepartmentInfo();

            ViewBag.faculties = db.Faculty.ToList();
            return(View(teacher));
        }