Beispiel #1
0
        public MainViewModel()
        {
            _queries = new ObservableCollection <Query>();
            List <Query> UserQueries = GenericEntityWrapper.GetTextRequests(SessionContext.CurrentUser.Id);

            foreach (var wallet in UserQueries)
            {
                _queries.Add(wallet);
            }
            if (_queries.Count > 0)
            {
                _selectedQuery = Queries[0];
            }

            UpdCurrUser();
            //  FillQueries();

            PropertyChanged += OnPropertyChanged;
        }
Beispiel #2
0
        private async void FillQueries()
        {
            LoaderManager.Instance.ShowLoader();
            var result = await Task.Run(() =>
            {
                List <Query> UserQueries = GenericEntityWrapper.GetTextRequests(SessionContext.CurrentUser.Id);

                foreach (var wallet in UserQueries)
                {
                    _queries.Add(wallet);
                }
                if (_queries.Count > 0)
                {
                    _selectedQuery = Queries[0];
                }
                return(true);
            });

            LoaderManager.Instance.HideLoader();
        }
Beispiel #3
0
 public List <TextRequest> GetTextRequests(Guid userId)
 {
     return(GenericEntityWrapper.GetTextRequests(userId));
 }