示例#1
0
        /// <summary>
        /// 获取小说抓取参数列表
        /// </summary>
        /// <param name="webId">站点编号</param>
        /// <param name="novelId">小说编号</param>
        /// <returns></returns>
        public List <Model.Novels> CrawlList(string webId, string novelId)
        {
            List <Model.Novels> list = null;
            DataSet             ds   = NovelDal.CrawlData(webId, novelId);

            if (ds != null && ds.Tables[0].Rows.Count > 0)
            {
                list = new DataTableToList <Model.Novels>(ds.Tables[0]).ToList();
            }
            return(list);
        }
示例#2
0
        /// <summary>
        /// 获取小说抓取参数实体
        /// </summary>
        /// <param name="webId">站点编号</param>
        /// <param name="novelId">小说编号</param>
        /// <returns></returns>
        public Model.Novels CrawlModel(string webId, string novelId)
        {
            Model.Novels model = null;
            DataSet      ds    = NovelDal.CrawlData(webId, novelId);

            if (ds != null && ds.Tables[0].Rows.Count > 0)
            {
                model = new DataTableToList <Model.Novels>(ds.Tables[0]).ToList().FirstOrDefault();
            }
            return(model);
        }