示例#1
0
        public ActionResult  GetChapterContentJson(string keyValue)
        {
            ChapterContentApp          chaptercontentApp = new ChapterContentApp();
            List <ChapterContentModel> list = chaptercontentApp.GetListByCourseID(keyValue);

            return(Content(list.ToJson()));
        }
示例#2
0
        public ActionResult SubmitCourseContent(ChapterContent chaptercontent)
        {
            ChapterContentApp chaptercontentApp = new ChapterContentApp();

            if (chaptercontent.FileID.Contains(','))
            {
                string[] fileArr = chaptercontent.FileID.Split(',');
                for (int i = 0; i < fileArr.Length; i++)
                {
                    ChapterContent model = new ChapterContent();
                    model.FileID    = fileArr[i];
                    model.ChapterID = chaptercontent.ChapterID;
                    model.CourserID = chaptercontent.CourserID;
                    model.TypeID    = Path.GetExtension(fileArr[i]);
                    chaptercontentApp.AddChapterContent(model);
                }
            }
            else
            {
                chaptercontentApp.AddChapterContent(chaptercontent);
            }

            return(Success("操作成功"));
        }