public async Task BeginSearch() { try { if (!string.IsNullOrEmpty(SearchQuery.SearchText) || !string.IsNullOrEmpty(SearchQuery.ActorName) || SearchQuery.Batch != null || !string.IsNullOrEmpty(SearchQuery.Mood)) { EventAgg.PublishOnUIThread(new StartLoadingMessage("Searching for movies...")); MovieList = await OnlineDB.Search(SearchQuery); if (MovieList != null || MovieList.Count != 0) { EventAgg.PublishOnUIThread(new MovieListMessage(MovieList, true, SearchQuery.SearchText)); } } } catch { StatusMessage.Enqueue("Unknow error occured while searchig for movies!"); } finally { EventAgg.PublishOnUIThread(new StopLoadingMessage()); } }
public OnlineNegocio(string conexao) { EmpConexao = conexao; online = new OnlineDB(EmpConexao); }