public async Task SearchRisAsync() { UpdateInProgress = true; DocumentReferences = null; UpdateSearchResultInfo(); var localQueryParam = QueryParameter; var result = await RisQueryWithIncrementalLoading.LoadPage(localQueryParam, 1); UpdateInProgress = false; if (result.Succeeded) { DocumentReferences = new RisQueryWithIncrementalLoading(localQueryParam, result, IncrementalLoadingStarted, IncrementalLoadingCompleted, IncrementalLoadingFailed); UpdateSearchResultInfo(); var ctx = new RisDbContext(); ctx.InsertSearchHistoryEntry(new DbRisQueryParameter(localQueryParam, DocumentReferences.Hits)); } else { UpdateSearchResultInfo("Abfrage fehlgeschlagen"); } }
public async Task SearchRisAsync() { UpdateInProgress = true; DocumentReferences = null; UpdateSearchResultInfo(); var localQueryParam = QueryParameter; var result = await RisQueryWithIncrementalLoading.LoadPage(localQueryParam, 1); UpdateInProgress = false; if (result.Succeeded) { DocumentReferences = new RisQueryWithIncrementalLoading(localQueryParam, result, IncrementalLoadingStarted, IncrementalLoadingCompleted, IncrementalLoadingFailed); UpdateSearchResultInfo(); var ctx = new RisDbContext(); ctx.InsertSearchHistoryEntry(new DbRisQueryParameter(localQueryParam, DocumentReferences.Hits)); } else { UpdateSearchResultInfo("Abfrage fehlgeschlagen"); } }
public void LoadState(SearchPageState state) { if (null != state.QueryParameter) { QueryParameter = state.QueryParameter; } if (!String.IsNullOrWhiteSpace(state.SearchResultInfo)) { SearchResultInfo = state.SearchResultInfo; } if (null != state.DocumentReferencesList) { var resultTemp = new SearchResult() { Hits = state.Hits, Page = state.Page, PageSize = state.PageSize, DocumentReferences = state.DocumentReferencesList }; DocumentReferences = new RisQueryWithIncrementalLoading( QueryParameter, resultTemp, IncrementalLoadingStarted, IncrementalLoadingCompleted, IncrementalLoadingFailed); UpdateSearchResultInfo(); } }
public void LoadState(SearchPageState state) { if (null != state.QueryParameter) { QueryParameter = state.QueryParameter; } if (!String.IsNullOrWhiteSpace(state.SearchResultInfo)) { SearchResultInfo = state.SearchResultInfo; } if (null != state.DocumentReferencesList) { var resultTemp = new SearchResult() { Hits = state.Hits, Page = state.Page, PageSize = state.PageSize, DocumentReferences = state.DocumentReferencesList }; DocumentReferences = new RisQueryWithIncrementalLoading( QueryParameter, resultTemp, IncrementalLoadingStarted, IncrementalLoadingCompleted, IncrementalLoadingFailed); UpdateSearchResultInfo(); } }