public ClientIssuesPageViewModel(INavigationService navigationService, IEventAggregator eventAggregator)
        {
            _eventAggregator = eventAggregator;

            _navigationService = navigationService;
            PostIssueCommand   = new DelegateCommand(Post);
            LoadIssues().ConfigureAwait(true);
            _eventAggregator.GetEvent <DeleteIssueEvent>().Subscribe(DeleteIssue);
            ClientModule.hubProxy.On <Issue>("updateIssue", _issue =>
            {
                var item    = Issues.FirstOrDefault(p => p.IssueId == _issue.IssueId);
                var i       = Issues.IndexOf(item);
                item.Status = "Resolved";
                Issues[i]   = item;
            });
        }
Exemple #2
0
        private void MarkAsCompleted(object param)
        {
            int id;

            int.TryParse(param.ToString(), out id);

            var issue = Issues.FirstOrDefault(x => x.Id == id);

            if (issue != null)
            {
                var index       = Issues.IndexOf(issue);
                var indexSecond = TodayIssues.IndexOf(issue);

                Issues[index].IsCompleted            = true;
                TodayIssues[indexSecond].IsCompleted = true;
                FileRepository.UpdateFile <Issue>("issue", Issues.ToList());
            }
        }