Esempio n. 1
0
 private void RefreshMunicipalityList()
 {
     try
     {
         var api = new ApiConsumer();
         AvailableMunicipalities = api.GetAllMunicipalities();
         TaxSearchMunicipalityComboBox.Items.Clear();
         TaxInsertMunicipalityComboBox.Items.Clear();
         foreach (var munip in AvailableMunicipalities)
         {
             TaxSearchMunicipalityComboBox.Items.Add(munip);
             TaxInsertMunicipalityComboBox.Items.Add(munip);
         }
         TaxSearchMunicipalityComboBox.Items.Refresh();
         TaxInsertMunicipalityComboBox.Items.Refresh();
     }
     catch (Exception ex)
     {
         MessageBox.Show("Failed to get municipalities");
     }
 }