MCPcopy Create free account
hub / github.com/NatLabRockies/SAM / QueryUtilitiesByZipCode

Method QueryUtilitiesByZipCode

src/urdb.cpp:1274–1294  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1272}
1273
1274void 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
1296int OpenEIUtilityRateDialog::ShowModal()
1297{

Callers

nothing calls this directly

Calls 5

CountMethod · 0.80
SetLabelMethod · 0.45
GetValueMethod · 0.45
ClearMethod · 0.45

Tested by

no test coverage detected