示例#1
0
        public PagedListViewModel <Data.Logging.SqlLog> List(ApiCall apiCall)
        {
            var pageIndex = apiCall.GetIntValue("pageIndex");

            var list = SqlLogService.QueryByWeek(
                apiCall.GetValue("week"),
                apiCall.GetValue("keyword"),
                apiCall.GetValue("type"),
                apiCall.WebSite.Id,
                pageIndex, PageSize, out var total);

            return(new PagedListViewModel <Data.Logging.SqlLog>
            {
                List = list,
                PageNr = pageIndex,
                PageSize = PageSize,
                TotalCount = total,
                TotalPages = (total / PageSize) + (total % PageSize > 0 ? 1 : 0)
            });
        }
示例#2
0
 public IEnumerable <string> Weeks()
 {
     return(SqlLogService.GetWeeks());
 }