| 1272 | } |
| 1273 | |
| 1274 | void OpenEIUtilityRateDialog::QueryUtilitiesByZipCode(wxString *err) |
| 1275 | { |
| 1276 | lblStatus->SetLabel("Loading companies..."); |
| 1277 | wxBusyInfo busy("Getting list of companies...", this); |
| 1278 | wxString zip_code = txtZipCode->GetValue(); |
| 1279 | lstUtilities->Clear(); |
| 1280 | lstRates->Clear(); |
| 1281 | lblUtilityCount->SetLabel(""); |
| 1282 | lblRateStatus->SetLabel(""); |
| 1283 | chkActiveOnly->SetLabel("Show active"); |
| 1284 | |
| 1285 | if (api.QueryUtilityCompaniesbyZipcode(zip_code, mUtilityCompanies, err)) { |
| 1286 | lstUtilities->Freeze(); |
| 1287 | lstUtilities->Clear(); |
| 1288 | lstUtilities->Append(mUtilityCompanies); |
| 1289 | lstUtilities->Thaw(); |
| 1290 | lblUtilityCount->SetLabel(wxString::Format("%d companies", (int)lstUtilities->Count())); |
| 1291 | lstUtilities->SetFocus(); |
| 1292 | } |
| 1293 | lblStatus->SetLabel("Ready."); |
| 1294 | } |
| 1295 | |
| 1296 | int OpenEIUtilityRateDialog::ShowModal() |
| 1297 | { |
nothing calls this directly
no test coverage detected