Beispiel #1
0
        //rows 10
        //page 1
        //sidx SetTime
        //levelID -1
        //statusCode -1
        //sord desc
        public ActionResult GetCoursePageList(string keyword, Pagination pagination, string levelID, int statusCode)
        {
            var list = courseApp.GetCourseList(keyword, pagination, levelID, statusCode);
            var data = new {
                CourseList = list,
                Page       = pagination,
                LevelID    = levelID,
                StatusCode = statusCode
            };

            return(Success("", data));
        }
        public ActionResult  GetCourseTree()
        {
            CourseApp courseapp = new CourseApp();
            var       list      = courseapp.GetCourseList();
            var       treeList  = new List <TreeSelectModel>();

            foreach (Course item in list)
            {
                TreeSelectModel treeModel = new TreeSelectModel();
                treeModel.id       = item.ID;
                treeModel.text     = item.CourseName;
                treeModel.parentId = item.PreCourse;
                treeList.Add(treeModel);
            }
            return(Content(treeList.ToJson()));
        }
Beispiel #3
0
        public ActionResult GetGridJson()
        {
            var list = courseApp.GetCourseList();

            return(Content(list.ToJson()));
        }