Ejemplo n.º 1
0
        public HttpResponseMessage GetEventList(bool isDes = true, EnumEventSearchOrderBy orderByAll = EnumEventSearchOrderBy.OrderById)
        {
            EventSearchCondition eventcoCondition = new EventSearchCondition
            {
                IsDescending = isDes,
                OrderBy      = orderByAll,
            };
            var eventList = _eventService.GetEventByCondition(eventcoCondition).Select(a => new
            {
                a.Id,
                a.EventContent,
                a.Starttime,
                a.Endtime,
                a.State
            }).ToList();

            return(PageHelper.toJson(eventList));
        }
Ejemplo n.º 2
0
          public HttpResponseMessage GetEventList(bool isDes = true, EnumEventSearchOrderBy orderByAll = EnumEventSearchOrderBy.OrderById)
        {
            EventSearchCondition eventcoCondition = new EventSearchCondition
            {
                IsDescending = isDes,
                OrderBy = orderByAll,

            };
            var eventList = _eventService.GetEventByCondition(eventcoCondition).Select(a => new
            {
                a.Id,
                a.EventContent,
                a.Starttime,
                a.Endtime,
                a.State
            }).ToList();
            return PageHelper.toJson(eventList);
            
        }