Beispiel #1
0
        // GET: Administration/SemesterCourses
        public ActionResult Index(int?DepID)
        {
            Session["DepID"] = DepID;

            if (DepID == null)
            {
                ViewBag.Departments = new SelectList(_DepartmentsServices.ReadAll(), "DepID", "DepName", 0);
            }
            else
            {
                ViewBag.Departments = new SelectList(_DepartmentsServices.ReadAll(), "DepID", "DepName", DepID.Value);
            }

            if (DepID == null || Session["SemesterID"] == null)
            {
                return(View());
            }
            else
            {
                int Depid      = DepID.Value;
                int SemesterID = int.Parse(Session["SemesterID"].ToString());

                IEnumerable <Cours> courses = _coursesService.GetCousrsDepartmentTerm(Depid, SemesterID);
                return(View(courses));
            }
        }
Beispiel #2
0
 // GET: Administration/Student
 public ActionResult Index()
 {
     ViewBag.DepID = new SelectList(_DepartmentsServicesvices.ReadAll(), "DepID", "DepName");
     return(View(_UsersServices.ReadAllStudent().OrderBy(x => x.DepartmentID)));
 }
Beispiel #3
0
 // GET: Administration/User/Create
 public ActionResult Create()
 {
     ViewBag.DepartmentID = new SelectList(_DepartmentsServicesvices.ReadAll(), "DepID", "DepName");
     //ViewBag.PermissionID = new SelectList(db.Permissions, "PermissionID", "PermissionRole", user.PermissionID);
     return(PartialView("_Create"));
 }
Beispiel #4
0
 // GET: Administration/Departments
 public ActionResult Index()
 {
     return(View(_DepartmentsServices.ReadAll()));
 }