internal async void HandleMoreResultsQueryCommand(SearchQueryViewModel parameter) { //this.debugQuery = (parameter); if (parameter != null) { //DisplayJobsCollection = this.ResultJobsCollection; //for (int i = 0; i < 5; i++) //{ parameter.SkipPages = 20; try { var newResults = await RemoteDataManager.SearchForJobs(parameter); foreach (var item in newResults) { resultJobsCollection.Add(item); } } catch (Exception e) { //dont break the app :) errorLog.AppendLine(e.ToString()); } //} DisplayJobsCollection = SearchManager.SearchForJobsInCollection(CurrentQuery, this.ResultJobsCollection); this.OnPropertyChanged("ResultCount"); //foreach (var item in this.ResultJobsCollection) //{ //item.CurrJobMatch = item.ChechMatchings(parameter.LookupSkills, parameter.NotMandatoryLookupSkills); //} } }
//Command Handlers internal async void HandleSearchQuerryCommand(SearchQueryViewModel parameter) { //this.debugQuery = (parameter); this.CurrentQuery = new SearchQueryViewModel( parameter.Keyword, parameter.PublishDate, parameter.LookupSkills, parameter.NotMandatoryLookupSkills ); parameter.SkipPages = -50000; try { var results = await RemoteDataManager.SearchForJobs(parameter); this.ResultJobsCollection = results; } catch (Exception e) { errorLog.AppendLine(e.ToString()); } DisplayJobsCollection = SearchManager.SearchForJobsInCollection(NewQuery, this.ResultJobsCollection); parameter.SkipPages = 0; //foreach (var item in this.ResultJobsCollection) //{ //item.CurrJobMatch = item.ChechMatchings(parameter.LookupSkills, parameter.NotMandatoryLookupSkills); //} this.OnPropertyChanged("ResultCount"); }