Beispiel #1
0
        public HttpResponseMessage SearchMessageConfig(EnumMessageConfigSearchOrderBy orderByAll = EnumMessageConfigSearchOrderBy.OrderById, bool isDes = true, int page = 1, int pageSize = 10)
        {
            var mDetailCondition = new MessageConfigSearchCondition()
            {
                Page         = Convert.ToInt32(page),
                PageCount    = pageSize,
                OrderBy      = orderByAll,
                isDescending = isDes
            };
            var list = _MessageConfigService.GetMessageConfigsByCondition(mDetailCondition).Select(c => new { c.Id, c.Name, c.Template }).ToList();

            var listCount = _MessageConfigService.GetMessageConfigCount(mDetailCondition);

            return(PageHelper.toJson(new { List = list, Condition = mDetailCondition, totalCount = listCount }));
        }
        public HttpResponseMessage SearchMessageConfig(EnumMessageConfigSearchOrderBy orderByAll = EnumMessageConfigSearchOrderBy .OrderById, bool isDes = true, int page = 1, int pageSize = 10)
        {

            var mDetailCondition = new MessageConfigSearchCondition()
            {
                Page = Convert.ToInt32(page),
                PageCount = pageSize,
                OrderBy =orderByAll ,
                isDescending =isDes 

            };
            var list = _MessageConfigService.GetMessageConfigsByCondition(mDetailCondition).Select(c => new { c.Id, c.Name, c.Template }).ToList();

            var listCount = _MessageConfigService.GetMessageConfigCount(mDetailCondition);
            return PageHelper.toJson(new { List = list, Condition = mDetailCondition, totalCount = listCount });
          
        }