Exemplo n.º 1
0
        /// <summary>
        /// 查询推文列表
        /// </summary>
        /// <param name="filter">过滤条件</param>
        /// <returns>返回推文列表</returns>
        public static QueryResult <ArticleEntity> SearchPageList(QF_Article filter)
        {
            var cmd = new DataCommand("Article.SearchPageList");

            cmd.QuerySetCondition("title", ConditionOperation.Like, DbType.String, filter.Title);
            cmd.QuerySetCondition("is_delete", ConditionOperation.Equal, DbType.Int32, (int)DeletedEnums.Actived);
            if (filter.StartTime.HasValue)
            {
                cmd.QuerySetCondition("create_time", ConditionOperation.MoreThanEqual, DbType.DateTime, filter.StartTime);
            }
            if (filter.EndTime.HasValue)
            {
                cmd.QuerySetCondition("create_time", ConditionOperation.LessThan, DbType.DateTime, filter.EndTime.Value.AddDays(1));
            }
            cmd.CommandText = cmd.CommandText.Replace("#STRWHERE#", cmd.QueryConditionString);
            return(cmd.Query <ArticleEntity>(filter, "create_time DESC", null, true));
        }
Exemplo n.º 2
0
 /// <summary>
 /// 查询推文列表
 /// </summary>
 /// <param name="filter">过滤条件</param>
 /// <returns>返回推文列表</returns>
 public QueryResult <ArticleVO> SearchPageList(QF_Article filter)
 {
     return(ArticleDA.SearchPageList(filter).ToArticleVOPageList());
 }
Exemplo n.º 3
0
        public JsonResult Query()
        {
            QF_Article filter = BuildQueryFilterEntity <QF_Article>();

            return(AjaxGridJson(ArticleBasisService.SearchPageList(filter)));
        }