public JsonResult GetAuditEvents(AuditEventPaginInfo PaginInfo)
        {
            AuditEventListFilter Filter = new AuditEventListFilter();
            Filter.CurrentPage = PaginInfo.CurrentPage;
            Filter.ItemsPerPage = PaginInfo.ItemsPerPage;
            Filter.SortOrderAsc = PaginInfo.SortOrderAsc;
            Filter.SortColumn = PaginInfo.SortColumn;
            Filter.Search = HttpUtility.UrlDecode(PaginInfo.Search);

            Filter.SortColumnName = "EventID";
            switch (PaginInfo.SortColumn)
            {
                case 1: Filter.SortColumnName = "EventType"; break;
                case 2: Filter.SortColumnName = "Created"; break;
                case 3: Filter.SortColumnName = "EventID"; break;
                case 4: Filter.SortColumnName = "EventSource"; break;
                case 5: Filter.SortColumnName = "IPAddress"; break;
                case 6: Filter.SortColumnName = "MemberEmail"; break;
                case 7: Filter.SortColumnName = "Description"; break;
            }

            var totalItems = 0;
            var events = Web.Admin.Logic.Collections.AuditEvents.Get(Filter, out totalItems);

            return Json(new
            {
                Html = this.RenderPartialView("_AuditEventList", new AuditEventListModel(PaginInfo.HolderName, events, Filter, totalItems))
            }, JsonRequestBehavior.AllowGet);
        }
Ejemplo n.º 2
0
        public JsonResult GetAuditEvents(AuditEventPaginInfo PaginInfo)
        {
            AuditEventListFilter Filter = new AuditEventListFilter();

            Filter.CurrentPage  = PaginInfo.CurrentPage;
            Filter.ItemsPerPage = PaginInfo.ItemsPerPage;
            Filter.SortOrderAsc = PaginInfo.SortOrderAsc;
            Filter.SortColumn   = PaginInfo.SortColumn;
            Filter.Search       = HttpUtility.UrlDecode(PaginInfo.Search);

            Filter.SortColumnName = "EventID";
            switch (PaginInfo.SortColumn)
            {
            case 1: Filter.SortColumnName = "EventType"; break;

            case 2: Filter.SortColumnName = "Created"; break;

            case 3: Filter.SortColumnName = "EventID"; break;

            case 4: Filter.SortColumnName = "EventSource"; break;

            case 5: Filter.SortColumnName = "IPAddress"; break;

            case 6: Filter.SortColumnName = "MemberEmail"; break;

            case 7: Filter.SortColumnName = "Description"; break;
            }

            var totalItems = 0;
            var events     = Web.Admin.Logic.Collections.AuditEvents.Get(Filter, out totalItems);

            return(Json(new
            {
                Html = this.RenderPartialView("_AuditEventList", new AuditEventListModel(PaginInfo.HolderName, events, Filter, totalItems))
            }, JsonRequestBehavior.AllowGet));
        }