protected override void OnInitialized() { EventTypes = Enum.GetValues(typeof(WorkstationEventType)).Cast <WorkstationEventType>().Select(s => s.ToString()).ToList(); EventSeverities = Enum.GetValues(typeof(WorkstationEventSeverity)).Cast <WorkstationEventSeverity>().Select(s => s.ToString()).ToList(); AccountTypes = Enum.GetValues(typeof(AccountType)).Cast <AccountType>().Select(s => s.ToString()).ToList(); Filter = new WorkstationEventFilter(); }
private async Task ClearAsync() { Filter = new WorkstationEventFilter(); await FilterChanged.Invoke(Filter); }
public async Task <ActionResult <IEnumerable <WorkstationEvent> > > GetFilteredEvents(WorkstationEventFilter workstationEventFilter) { var count = await _workstationAuditService.GetWorkstationEventsCountAsync(new DataLoadingOptions <WorkstationEventFilter> { Filter = workstationEventFilter }); return(await _workstationAuditService.GetWorkstationEventsAsync(new DataLoadingOptions <WorkstationEventFilter> { Take = count, SortedColumn = nameof(WorkstationEvent.Date), SortDirection = ListSortDirection.Descending, Filter = workstationEventFilter })); }