Example #1
0
 public void Refresh()
 {
     if (StartDate.Year == 1)
     {
         StartDate = DateTime.Today;
         EndDate   = DateTime.Now;
     }
     Tickets = _ticketServiceBase.GetFilteredTickets(StartDate, EndDate, Filters).Select(
         x => new TicketExplorerRowData(x, _ticketServiceBase)).ToList();
     Total = Tickets.Sum(x => x.Sum);
     RaisePropertyChanged(() => CanChanageDateFilter);
 }
        public void Refresh()
        {
            if (StartDate.Year == 1)
            {
                StartDate = DateTime.Today;
                EndDate   = DateTime.Now;
            }
            var tickets = _ticketServiceBase.GetFilteredTickets(StartDate, EndDate, Filters);

            if (!_userService.IsUserPermittedFor(PermissionNames.DisplayOtherWaitersTickets))
            {
                tickets = tickets.Where(x => x.LastModifiedUserName == _applicationState.CurrentLoggedInUser.Name);
            }
            Tickets = tickets.Select(x => new TicketExplorerRowData(x, _ticketServiceBase)).ToList();
            Total   = Tickets.Sum(x => x.Sum);
            RaisePropertyChanged(nameof(CanChanageDateFilter));
        }