private void RefreshSearch() { if (!string.IsNullOrEmpty(this.businessSearchEngine.businessSearch.State) && !string.IsNullOrEmpty(this.businessSearchEngine.businessSearch.City) && !string.IsNullOrEmpty(this.businessSearchEngine.businessSearch.Zipcode)) { this.SearchResults.Items.Clear(); this.businessSearchEngine.ClearSearchResults(); BusinessSearchQueries.GetBusinesses(this.AddSearchResult, this.businessSearchEngine.GetBusinessSearch()); } }
private void SelectedZipcodeChanged(object sender, SelectionChangedEventArgs e) { // Clear the Lists this.ClearSelectedBusiness(); this.businessSearchEngine.ClearBusinessLocation(); if (this.ZipcodeList.SelectedIndex > -1) { this.businessSearchEngine.SetBusinessLocation(this.StateList.SelectedItem.ToString(), this.CityList.SelectedItem.ToString(), this.ZipcodeList.SelectedItem.ToString()); BusinessSearchQueries.GetBusinessCategoriesInSelectedZipcode(this.AddBusinessCategory, this.StateList.SelectedItem.ToString(), this.CityList.SelectedItem.ToString(), this.ZipcodeList.SelectedItem.ToString()); } }
private void BusinessRowSelected(object sender, SelectionChangedEventArgs e) { if (this.SearchResults.Items.Count != 0) { this.ClearSelectedBusinessInfo(); this.businessSearchEngine.AddSelectedBusinss((Business)this.SearchResults.CurrentCell.Item); this.BusinessNameTextBox.Content = this.businessSearchEngine.GetSelectedBusiness().BusinessName; this.BusinessAddressTextBox.Content = this.businessSearchEngine.GetSelectedBusiness().Address; BusinessSearchQueries.GetBusinessHours(this.ShowBusinessHours, this.businessSearchEngine.GetSelectedBusiness().BusinessID, DateTime.Today.DayOfWeek.ToString()); BusinessSearchQueries.GetBusinessCategories(this.AddSelectedBusinessCategory, this.businessSearchEngine.GetSelectedBusiness().BusinessID); BusinessSearchQueries.GetBusinessAttributes(this.AddSelectedBusinessAttribute, this.businessSearchEngine.GetSelectedBusiness().BusinessID); } }
private void DistinctStatesSetup() { BusinessSearchQueries.GetDistinctStates(this.AddStates); }