Example #1
0
        /// <summary>Retrieves filter values from a web service or file</summary>
        private void ResetFilter(string repositoryType)
        {
            try
            {
                LoggingService.Log("Resetting Filter", "Log.txt");

                Mouse.OverrideCursor = Cursors.Wait;
                IFilterRepository filterRepo = FilterRepositoryFactory.GetRepository(repositoryType);
                FilterBound             = filterRepo.GetFilter();
                FilterPanel.DataContext = FilterBound;

                FilterBound.Validate();
                FilterError.Text       = "";
                FilterError.Visibility = Visibility.Collapsed;
            }
            catch (Exception ex)
            {
                FilterError.Text       = ex.Message;
                FilterError.Visibility = Visibility.Visible;
                LoggingService.Log(ex, "Log.txt");
            }
            Mouse.OverrideCursor = Cursors.Arrow;
        }
Example #2
0
 private async Task <Filter> GetFilterByIdInternal(string id)
 {
     return(await _filterRepository.GetFilter(id) ?? new Filter());
 }