예제 #1
0
 /// <summary>
 /// 获取新闻列表
 /// </summary>
 /// <param name="chanleIds">频道ID</param>
 /// <param name="topNum">条数</param>
 /// <param name="keyWord">标题搜索关键字</param>
 /// <param name="orderId">排序编号</param>
 /// <param name="days">获取新闻天数</param>
 /// <returns>结果列表</returns>
 public virtual List <WcmDocument> GetWcmDocumentListByChanleId(string chanleIds, int topNum,
                                                                string keyWord    = "",
                                                                newsOrder orderId = newsOrder.RelTimeDesc,
                                                                int days          = 0)
 {
     return(GetWcmDocumentListByChanleId(chanleIds, 1, topNum, keyWord, orderId, days));
 }
예제 #2
0
 /// <summary>
 /// 获取新闻列表 去除条数
 /// </summary>
 /// <param name="chanleids"></param>
 /// <param name="pageSize"></param>
 /// <param name="order"></param>
 /// <param name="days"></param>
 /// <returns></returns>
 public virtual List <WcmDocument> GetWcmDocumentListByChanleIdRemoveCount(string chanleids, int pageSize,
                                                                           newsOrder order = newsOrder.Docorderpri,
                                                                           int days        = 0)
 {
     return(WcmdocumentData.GetWcmDocumentListByChanleIdRemoveCount(chanleids, pageSize,
                                                                    newsOrder.Docorderpri, 0));
 }
예제 #3
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="chanleIds"></param>
 /// <param name="pageSize"></param>
 /// <param name="pageIndex"></param>
 /// <param name="count"></param>
 /// <param name="keyWord"></param>
 /// <param name="order"></param>
 /// <returns></returns>
 public virtual List <WcmDocument> GetWcmDocumentsListByChanleIds(string chanleIds, int pageIndex, int pageSize,
                                                                  ref int count, string keyWord = "",
                                                                  newsOrder order = newsOrder.Docorderpri)
 {
     return(WcmdocumentData.GetWcmDocumentListByChanleId(chanleIds, pageIndex, pageSize, ref count, keyWord,
                                                         newsOrder.Docorderpri, 0));
 }
예제 #4
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="chanleids"></param>
        /// <param name="pageIndex"></param>
        /// <param name="pageSize"></param>
        /// <param name="keyWord"></param>
        /// <param name="order"></param>
        /// <param name="days"></param>
        /// <returns></returns>
        public virtual List <WcmDocument> GetWcmDocumentListByChanleId(string chanleids, int pageIndex, int pageSize,
                                                                       string keyWord  = "",
                                                                       newsOrder order = newsOrder.RelTimeDesc,
                                                                       int days        = 0)
        {
            int count = 0;

            return(GetWcmDocumentListByChanleId(chanleids, pageIndex, pageSize, ref count, keyWord, order, days));
        }
예제 #5
0
        public virtual List <WcmDocument> GetWcmDocumentListByChanleIdRemoveCount(string chanleids, int pageSize,
                                                                                  newsOrder order = newsOrder.Docorderpri,
                                                                                  int days        = 0)
        {
            DbCommand dbcommand = GetStoredProcCommand("P_Api_News_GetWcmDocumentListByChanleId");

            AddInParameter(dbcommand, "@pagesize", DbType.Int32, pageSize);
            AddInParameter(dbcommand, "@chanleid", DbType.String, chanleids);
            AddInParameter(dbcommand, "@orderId", DbType.Int32, (int)order);
            AddInParameter(dbcommand, "@days", DbType.Int32, days);
            DataSet objDs = ExecuteDataSet(dbcommand);

            if (objDs == null || objDs.Tables.Count == 0 || objDs.Tables[0].Rows.Count == 0)
            {
                return(new List <WcmDocument>());
            }
            return(BuildWcmDocumentList(objDs.Tables[0]));
        }
예제 #6
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="chanleids"></param>
        /// <param name="pageIndex"></param>
        /// <param name="pageSize"></param>
        /// <param name="count"></param>
        /// <param name="keyWord"></param>
        /// <param name="order"></param>
        /// <param name="days"></param>
        /// <returns></returns>
        public virtual List <WcmDocument> GetWcmDocumentListByChanleId(string chanleids, int pageIndex, int pageSize,
                                                                       ref int count,
                                                                       string keyWord  = "",
                                                                       newsOrder order = newsOrder.RelTimeDesc,
                                                                       int days        = 0)
        {
            DbCommand dbcommand = GetStoredProcCommand("P_Api_News_GetWcmDocumentList");

            AddInParameter(dbcommand, "@pageindex", DbType.Int32, pageIndex);
            AddInParameter(dbcommand, "@pagesize", DbType.Int32, pageSize);
            AddInParameter(dbcommand, "@chanleid", DbType.String, chanleids);
            AddInParameter(dbcommand, "@keyword", DbType.String, keyWord);
            AddInParameter(dbcommand, "@orderId", DbType.Int32, (int)order);
            AddInParameter(dbcommand, "@days", DbType.Int32, days);
            AddOutParameter(dbcommand, "@count", DbType.Int32, count);
            DataSet objDs = ExecuteDataSet(dbcommand);

            count = GetOutputParameter <int>(dbcommand, "@count");
            if (objDs == null || objDs.Tables.Count == 0 || objDs.Tables[0].Rows.Count == 0)
            {
                return(new List <WcmDocument>());
            }
            return(BuildWcmDocumentList(objDs.Tables[0]));
        }
예제 #7
0
        public virtual List <WcmDocument> GetWcmDocument(string channelIds, int pageIndex, int pageSize, ref int count,
                                                         DateTime dateTime, string keyWord, newsOrder order)
        {
            DbCommand dbcommand = GetStoredProcCommand("P_Api_News_GetWcmDocuments");

            AddInParameter(dbcommand, "@pageindex", DbType.Int32, pageIndex);
            AddInParameter(dbcommand, "@pagesize", DbType.Int32, pageSize);
            AddInParameter(dbcommand, "@chanleid", DbType.String, channelIds);
            AddInParameter(dbcommand, "@keyword", DbType.String, keyWord);
            AddInParameter(dbcommand, "@orderId", DbType.Int32, (int)order);
            AddInParameter(dbcommand, "@datetime", DbType.DateTime, dateTime);
            DataSet objDs = ExecuteDataSet(dbcommand);

            if (objDs == null || objDs.Tables.Count == 0 || objDs.Tables[0].Rows.Count == 0)
            {
                return(new List <WcmDocument>());
            }
            count = (int)objDs.Tables[0].Rows[0]["allcount"];
            return(BuildWcmDocumentListV2(objDs.Tables[0]));
        }
예제 #8
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="chanleIds"></param>
 /// <param name="pageIndex"></param>
 /// <param name="pageSize"></param>
 /// <param name="count"></param>
 /// <param name="dateTime"></param>
 /// <param name="keyWord"></param>
 /// <param name="order"></param>
 /// <returns></returns>
 public virtual List <WcmDocument> GetWcmDocument(string chanleIds, int pageIndex, int pageSize, ref int count,
                                                  DateTime dateTime, string keyWord,
                                                  newsOrder order = newsOrder.RelTimeDesc)
 {
     return(WcmdocumentData.GetWcmDocument(chanleIds, pageIndex, pageSize, ref count, dateTime, keyWord, order));
 }