コード例 #1
0
 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());
     }
 }
コード例 #2
0
        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());
            }
        }
コード例 #3
0
 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);
     }
 }
コード例 #4
0
 private void DistinctStatesSetup()
 {
     BusinessSearchQueries.GetDistinctStates(this.AddStates);
 }