public JsonResult GetClassScheduleByDepartmentId(int departmentId)
        {
            AllocateClass            allocateClass         = new AllocateClass();
            List <ClassScheduleView> courseBy              = classScheduleManager.GetCourseByDepartmentId(departmentId);
            List <ClassScheduleView> GetCourseByDepartment = classScheduleManager.GetCourseByDepartmentId(departmentId);
            List <ClassScheduleView> schedules             = classScheduleManager.GetClassSchedule(departmentId);

            //string getSchedule = classScheduleManager.GetAllSchedule(departmentId);
            //foreach (var course in GetCourseByDepartment)
            //{

            //    if (getSchedule == "")
            //    {
            //        getSchedule = "Not Scheduled Yet";
            //    }
            //    ClassScheduleView schedule = new ClassScheduleView();
            //    schedule.CourseCode = course.CourseCode;
            //    schedule.CourseName = course.CourseName;
            //    schedule.Schedule = getSchedule;
            //    schedules.Add(schedule);
            //}
            return(Json(schedules));
        }
Exemplo n.º 2
0
        public JsonResult GetClassScheduleByDepartment(int departmentId)
        {
            var clsSches = classScheduleManager.GetClassSchedule(departmentId);

            return(Json(clsSches, JsonRequestBehavior.AllowGet));
        }