예제 #1
0
        public ApprenticeshipSearchViewModel Build()
        {
            var viewModel = new ApprenticeshipSearchViewModel
            {
                SortTypes = SearchMediatorBase.GetSortTypes(),
                ResultsPerPageSelectList = SearchMediatorBase.GetResultsPerPageSelectList(5)
            };

            return(viewModel);
        }
예제 #2
0
        public ApprenticeshipSearchViewModel Build()
        {
            var viewModel = new ApprenticeshipSearchViewModel
            {
                SearchMode          = _searchMode,
                Keywords            = _keywords,
                Location            = _location,
                Latitude            = _latitude,
                Longitude           = _longitude,
                WithinDistance      = _withinDistance,
                ApprenticeshipLevel = _apprenticeshipLevel,
                Category            = _category,
                SubCategories       = _subCategories,
                SearchField         = _searchField,

                SortTypes = SearchMediatorBase.GetSortTypes(),
                SortType  = _sortType,

                ResultsPerPageSelectList = SearchMediatorBase.GetResultsPerPageSelectList(5),
                Categories       = _categories,
                ViewModelMessage = _viewModelMessage,

                SavedSearches = _savedSearches,

                DisplaySubCategory         = _displaySubCategory,
                DisplayDescription         = _displayDescription,
                DisplayDistance            = _displayDistance,
                DisplayClosingDate         = _displayClosingDate,
                DisplayStartDate           = _displayStartDate,
                DisplayApprenticeshipLevel = _displayApprenticeshipLevel,
                DisplayWage = _displayWage
            };

            if (viewModel.Latitude.HasValue && viewModel.Longitude.HasValue)
            {
                viewModel.Hash = viewModel.LatLonLocHash();
            }

            return(viewModel);
        }