Пример #1
0
        public ActionResult Create([Bind(Include = "MajorID,MajorName,YearDegreeID")] Major major)
        {
            if (ModelState.IsValid)
            {
                db.Majors.Add(major);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(major));
        }
Пример #2
0
        public ActionResult Create([Bind(Include = "TrimesterID,TrimesterValue")] Trimester trimester)
        {
            if (ModelState.IsValid)
            {
                db.Trimesters.Add(trimester);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(trimester));
        }
        public ActionResult Create([Bind(Include = "ProgramStructureID,DateCreated,DateModified,UserID")] ProgramStructure programStructure)
        {
            if (ModelState.IsValid)
            {
                db.ProgramStructures.Add(programStructure);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(programStructure));
        }
        public ActionResult Create([Bind(Include = "UniversityID,UniName")] University university)
        {
            if (ModelState.IsValid)
            {
                db.Universities.Add(university);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(university));
        }
Пример #5
0
        public ActionResult Create([Bind(Include = "Email,Password")] User user)
        {
            if (ModelState.IsValid)
            {
                db.Users.Add(user);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(user));
        }
Пример #6
0
        public ActionResult Create([Bind(Include = "YearDegreeID,Year,DegreeID,Units")] YearDegree yearDegree)
        {
            if (ModelState.IsValid)
            {
                db.YearDegrees.Add(yearDegree);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            ViewBag.DegreeID = new SelectList(db.Degrees, "DegreeID", "DegreeName", yearDegree.DegreeID);
            return(View(yearDegree));
        }
Пример #7
0
        public ActionResult Create([Bind(Include = "StudyAreaID,StudyAreaName,UniversityID")] StudyArea studyArea)
        {
            if (ModelState.IsValid)
            {
                db.StudyAreas.Add(studyArea);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            ViewBag.UniversityID = new SelectList(db.Universities, "UniversityID", "UniName", studyArea.UniversityID);
            return(View(studyArea));
        }
Пример #8
0
        public ActionResult Create([Bind(Include = "DegreeID,DegreeName,Duration,UniversityID")] Degree degree)
        {
            if (ModelState.IsValid)
            {
                db.Degrees.Add(degree);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            ViewBag.UniversityID = new SelectList(db.Universities, "UniversityID", "UniName", degree.UniversityID);
            return(View(degree));
        }
        public ActionResult Create([Bind(Include = "DegreeCoreSlotID,numOfOptions,YearDegreeID")] DegreeCoreSlot degreeCoreSlot)
        {
            if (ModelState.IsValid)
            {
                db.DegreeCoreSlots.Add(degreeCoreSlot);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            ViewBag.YearDegreeID = new SelectList(db.YearDegrees, "YearDegreeID", "YearDegreeID", degreeCoreSlot.YearDegreeID);
            return(View(degreeCoreSlot));
        }
Пример #10
0
        public ActionResult Create([Bind(Include = "AbbreviationID,AbbrevName,StudyAreaID")] Abbreviation abbreviation)
        {
            if (ModelState.IsValid)
            {
                db.Abbreviations.Add(abbreviation);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            ViewBag.StudyAreaID = new SelectList(db.StudyAreas, "StudyAreaID", "StudyAreaName", abbreviation.StudyAreaID);
            return(View(abbreviation));
        }
        public ActionResult Create([Bind(Include = "SemesterID,CourseID,Year")] SemesterCourse semesterCourse)
        {
            if (ModelState.IsValid)
            {
                db.SemesterCourses.Add(semesterCourse);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            ViewBag.CourseID   = new SelectList(db.Courses, "CourseID", "CourseName", semesterCourse.CourseID);
            ViewBag.SemesterID = new SelectList(db.Semesters, "SemesterID", "SemesterID", semesterCourse.SemesterID);
            return(View(semesterCourse));
        }
        public ActionResult Create([Bind(Include = "ProgramStructureID,MajorID")] ProgramMajor programMajor)
        {
            if (ModelState.IsValid)
            {
                db.ProgramMajors.Add(programMajor);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            ViewBag.MajorID            = new SelectList(db.Majors, "MajorID", "MajorName", programMajor.MajorID);
            ViewBag.ProgramStructureID = new SelectList(db.ProgramStructures, "ProgramStructureID", "Email", programMajor.ProgramStructureID);
            return(View(programMajor));
        }
Пример #13
0
        public ActionResult Create([Bind(Include = "CourseID,ProgramStructureID,Completed")] ProgramElective programElective)
        {
            if (ModelState.IsValid)
            {
                db.ProgramElectives.Add(programElective);
                db.SaveChanges();
                return RedirectToAction("Index");
            }

            ViewBag.CourseID = new SelectList(db.Courses, "CourseID", "CourseName", programElective.CourseID);
            ViewBag.ProgramStructureID = new SelectList(db.ProgramStructures, "ProgramStructureID", "Email", programElective.ProgramStructureID);
            return View(programElective);
        }
Пример #14
0
        public ActionResult Create([Bind(Include = "CourseID,MajorID")] MajorCore majorCore)
        {
            if (ModelState.IsValid)
            {
                db.MajorCores.Add(majorCore);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            ViewBag.CourseID = new SelectList(db.Courses, "CourseID", "CourseName", majorCore.CourseID);
            ViewBag.MajorID  = new SelectList(db.Majors, "MajorID", "MajorName", majorCore.MajorID);
            return(View(majorCore));
        }
Пример #15
0
        public ActionResult Create([Bind(Include = "CourseID,YearDegreeID")] DegreeCore degreeCore)
        {
            if (ModelState.IsValid)
            {
                db.DegreeCores.Add(degreeCore);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            ViewBag.CourseID     = new SelectList(db.Courses, "CourseID", "CourseName", degreeCore.CourseID);
            ViewBag.YearDegreeID = new SelectList(db.YearDegrees, "YearDegreeID", "YearDegreeID", degreeCore.YearDegreeID);
            return(View(degreeCore));
        }
        public ActionResult Create([Bind(Include = "OptionalDirectedID,CourseID,DirectedSlotID")] OptionalDirected optionalDirected)
        {
            if (ModelState.IsValid)
            {
                db.Directeds.Add(optionalDirected);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            ViewBag.CourseID       = new SelectList(db.Courses, "CourseID", "CourseName", optionalDirected.CourseID);
            ViewBag.DirectedSlotID = new SelectList(db.DirectedSlots, "DirectedSlotID", "rule", optionalDirected.DirectedSlotID);
            return(View(optionalDirected));
        }
        public ActionResult Create([Bind(Include = "ProgramStructureID,OptionalDirectedID,Completed")] ProgramDirected programDirected)
        {
            if (ModelState.IsValid)
            {
                db.ProgramDirecteds.Add(programDirected);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            ViewBag.OptionalDirectedID = new SelectList(db.Directeds, "OptionalDirectedID", "OptionalDirectedID", programDirected.OptionalDirectedID);
            ViewBag.ProgramStructureID = new SelectList(db.ProgramStructures, "ProgramStructureID", "Email", programDirected.ProgramStructureID);
            return(View(programDirected));
        }
Пример #18
0
        public ActionResult Create([Bind(Include = "OptionalCoreCourseID,DegreeCoreSlotID,CourseID")] OptionalCoreCourse optionalCoreCourse)
        {
            if (ModelState.IsValid)
            {
                db.OptionalCoreCourses.Add(optionalCoreCourse);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            ViewBag.CourseID         = new SelectList(db.Courses, "CourseID", "CourseCode", optionalCoreCourse.CourseID);
            ViewBag.DegreeCoreSlotID = new SelectList(db.DegreeCoreSlots, "DegreeCoreSlotID", "DegreeCoreSlotID", optionalCoreCourse.DegreeCoreSlotID);
            return(View(optionalCoreCourse));
        }
Пример #19
0
        public ActionResult Create([Bind(Include = "CourseID,Code,CourseName,Units,UniversityID,AbbreviationID")] Course course)
        {
            if (ModelState.IsValid)
            {
                db.Courses.Add(course);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            ViewBag.AbbreviationID = new SelectList(db.Abbreviations, "AbbreviationID", "AbbrevName", course.AbbreviationID);
            ViewBag.UniversityID   = new SelectList(db.Universities, "UniversityID", "UniName", course.UniversityID);
            return(View(course));
        }