예제 #1
0
        /// <summary>
        /// 公告查询
        /// </summary>
        /// <param name="filter">id</param>
        /// <returns></returns>
        public static QueryResult <BulletinVO> SearchBulletinPageLists(BulletinFilter filter)
        {
            var cmd = new DataCommand("InfoManage.SearchBulletinLists");

            SetCondition(cmd, filter);
            return(cmd.Query <BulletinVO>(filter, "t.create_time", null, true));
        }
예제 #2
0
        /// <summary>
        /// 设置条件
        /// </summary>
        /// <param name="command"></param>
        /// <param name="filter"></param>
        private static void SetCondition(DataCommand command, BulletinFilter filter)
        {
            command.QuerySetCondition("t.is_delete", ConditionOperation.Equal, DbType.Int32, 0);
            //测验类型
            if (filter.CreateTimeStart.HasValue)
            {
                command.QuerySetCondition("t.create_time", ConditionOperation.MoreThanEqual, DbType.DateTime, filter.CreateTimeStart.Value);
            }
            if (filter.CreateTimeEnd.HasValue)
            {
                command.QuerySetCondition("t.create_time", ConditionOperation.LessThan, DbType.DateTime, filter.CreateTimeEnd.Value.AddDays(1));
            }

            command.CommandText = command.CommandText.Replace("#STRWHERE#", command.QueryConditionString);
        }
 /// <summary>
 /// 公告查询
 /// </summary>
 /// <param name="filter">id</param>
 /// <returns></returns>
 public QueryResult <BulletinVO> SearchBulletinPageLists(BulletinFilter filter)
 {
     return(InfoManageDA.SearchBulletinPageLists(filter));
 }
        public ActionResult BulletinQuery()
        {
            BulletinFilter filter = BuildQueryFilterEntity <BulletinFilter>();

            return(AjaxGridJson(_basisService.SearchBulletinPageLists(filter)));
        }