public override async Task InitializeAsync(object navigationData) { var pop = await _dialogService.OpenLoadingPopup(); LoadMoreIsVisible = false; CompaniesLoadMoreIsVisible = false; RenderLandingPage(); SelectedIndex = 0; //Init filter search var objSearchDifinition = await _candidateExploreService.GetSavedSearchDefinition(); if (objSearchDifinition["parameter"] != null) { FilterParameters.JobTypeIds = objSearchDifinition["parameter"]["JobTypeIds"].ToString(); FilterParameters.CategoryIds = objSearchDifinition["parameter"]["CategoryIds"].ToString(); FilterParameters.LocationIds = objSearchDifinition["parameter"]["LocationIds"].ToString(); FilterParameters.PositionIds = objSearchDifinition["parameter"]["PositionIds"].ToString(); FilterParameters.SkillsIds = objSearchDifinition["parameter"]["SkillsIds"].ToString(); FilterParameters.QualificationsIds = objSearchDifinition["parameter"]["QualificationsIds"].ToString(); FilterParameters.TicketLicensesIds = objSearchDifinition["parameter"]["TicketLicensesIds"].ToString(); } RecentExploreItems = new ObservableCollection <ExploreItem>(); RecentExploreListViewHeightRequest = RecentExploreItems.Count * 40 + 40; LoadMoreIsVisible = false; CompaniesLoadMoreIsVisible = false; CandidateMainViewModel.Current.IsExplorePageRendered = true; await _dialogService.CloseLoadingPopup(pop); }
public override async Task InitializeAsync(object navigationData) { var pop = await _dialogService.OpenLoadingPopup(); InitDataFilter = await _iDDLService.GetInitDataFilter(); JobTypeCollection = InitDataFilter.JobTypeDLL.Cast <object>().ToObservableCollection(); CategoryCollection = InitDataFilter.ClassificationDLL.Cast <object>().ToObservableCollection(); LocationCollection = InitDataFilter.LocationDDL.Cast <object>().ToObservableCollection(); PositionCollection = InitDataFilter.PositionDLL.Cast <object>().ToObservableCollection(); SkillCollection = InitDataFilter.SkillsDLL.Cast <object>().ToObservableCollection(); QualificationCollection = InitDataFilter.QualificationDLL.Cast <object>().ToObservableCollection(); LicenceCollection = InitDataFilter.TicketsDLL.Cast <object>().ToObservableCollection(); dynamic objSearchDifinition = await _candidateExploreService.GetSavedSearchDefinition(); if (objSearchDifinition["parameter"] != null) { string[] jobTypeIds = objSearchDifinition["parameter"]["JobTypeIds"].ToString().Split(','); JobTypeSelected = new ObservableCollection <object>(JobTypeCollection.Where(x => Array.IndexOf(jobTypeIds, (x as LookupItem).Id) >= 0)); string[] categoryIds = objSearchDifinition["parameter"]["CategoryIds"].ToString().Split(','); CategorySelected = new ObservableCollection <object>(CategoryCollection.Where(x => Array.IndexOf(categoryIds, (x as LookupItem).Id) >= 0)); string[] locationIds = objSearchDifinition["parameter"]["LocationIds"].ToString().Split(','); LocationSelected = new ObservableCollection <object>(LocationCollection.Where(x => Array.IndexOf(locationIds, (x as LookupItem).Id) >= 0)); string[] positionIds = objSearchDifinition["parameter"]["PositionIds"].ToString().Split(','); PositionSelected = new ObservableCollection <object>(PositionCollection.Where(x => Array.IndexOf(positionIds, (x as LookupItem).Id) >= 0)); string[] skillIds = objSearchDifinition["parameter"]["SkillsIds"].ToString().Split(','); SkillSelected = new ObservableCollection <object>(SkillCollection.Where(x => Array.IndexOf(skillIds, (x as LookupItem).Id) >= 0)); string[] qualificationIds = objSearchDifinition["parameter"]["QualificationsIds"].ToString().Split(','); QualificationSelected = new ObservableCollection <object>(QualificationCollection.Where(x => Array.IndexOf(qualificationIds, (x as LookupItem).Id) >= 0)); string[] licenceIds = objSearchDifinition["parameter"]["TicketLicensesIds"].ToString().Split(','); LicenceSelected = new ObservableCollection <object>(LicenceCollection.Where(x => Array.IndexOf(licenceIds, (x as LookupItem).Id) >= 0)); } else { JobTypeSelected = new ObservableCollection <object>(); CategorySelected = new ObservableCollection <object>(); LocationSelected = new ObservableCollection <object>(); PositionSelected = new ObservableCollection <object>(); SkillSelected = new ObservableCollection <object>(); QualificationSelected = new ObservableCollection <object>(); LicenceSelected = new ObservableCollection <object>(); } await _dialogService.CloseLoadingPopup(pop); }