예제 #1
0
        /// <summary>
        /// 根据小说编号获取小说章节数据
        /// </summary>
        /// <param name="novelId">小说编号</param>
        /// <returns></returns>
        public List <Chapters> ChapterList(string novelId)
        {
            var     list = new List <Chapters>();
            DataSet ds   = ChapterDal.ChapterData(novelId);

            if (ds != null && ds.Tables[0].Rows.Count > 0)
            {
                list = new DataTableToList <Chapters>(ds.Tables[0]).ToList();
            }
            return(list);
        }
예제 #2
0
        /// <summary>
        /// 根据章节编号获取章节数据
        /// </summary>
        /// <param name="chapterId">章节编号</param>
        /// <returns></returns>
        public Chapters ChapterModel(string chapterId)
        {
            Chapters model = null;
            DataSet  ds    = ChapterDal.ChapterDataByChapterId(chapterId);

            if (ds != null && ds.Tables[0].Rows.Count > 0)
            {
                model = new DataTableToList <Chapters>(ds.Tables[0]).ToList().FirstOrDefault();
            }
            return(model);
        }
예제 #3
0
        /// <summary>
        /// 获取小说章节分页数据
        /// </summary>
        /// <param name="paramList">查询及分页参数</param>
        /// <returns></returns>
        public List <Chapters> PageChapterList(Dictionary <string, string> paramList)
        {
            var     list = new List <Chapters>();
            DataSet ds   = ChapterDal.PageChapterData(paramList);

            if (ds != null && ds.Tables[0].Rows.Count > 0)
            {
                list = new DataTableToList <Chapters>(ds.Tables[0]).ToList();
            }
            return(list);
        }
예제 #4
0
 /// <summary>
 /// 清空小说数据
 /// </summary>
 /// <param name="novelId">小说编号</param>
 public int ClearData(string novelId)
 {
     return(ChapterDal.ClearData(novelId));
 }
예제 #5
0
 /// <summary>
 /// 清空小说内容
 /// </summary>
 /// <param name="novelId">小说编号</param>
 public int ClearContent(string novelId)
 {
     return(ChapterDal.ClearContent(novelId));
 }
예제 #6
0
 /// <summary>
 /// 批量删除章节
 /// </summary>
 /// <param name="ids">章节编号集合</param>
 public int BatchDelete(string ids)
 {
     return(ChapterDal.BatchDelete(ids));
 }
예제 #7
0
 /// <summary>
 /// 删除章节
 /// </summary>
 /// <param name="id">章节编号</param>
 public int Delete(string id)
 {
     return(ChapterDal.Delete(id));
 }
예제 #8
0
 /// <summary>
 /// 编辑章节数据
 /// </summary>
 /// <param name="model">章节实体</param>
 /// <returns></returns>
 public int Edit(Chapters model)
 {
     return(ChapterDal.Edit(model));
 }
예제 #9
0
 /// <summary>
 /// 添加章节信息
 /// </summary>
 /// <param name="model">章节实体</param>
 public int Add(Chapters model)
 {
     return(ChapterDal.Add(model));
 }