internal void ExecuteSelectZipPostalCode() { DM.LocationDataManager dm = new DM.LocationDataManager( CS.InternalApplication.Settings.Database.Connection, CS.InternalApplication.Settings.Database.DataAreaID); if (string.IsNullOrEmpty(this.Country)) { // throw "must select state and country first" error Customer.InternalApplication.Services.Dialog.ShowMessage(902, MessageBoxButtons.OK, MessageBoxIcon.Information); return; } var names = dm.GetZipCodes(this.Country, this.State); var list = names.ToList(); string value; var dialogResult = CS.InternalApplication.Services.Dialog.GenericLookup( list, "Description", CaptionPostalCode, "Name", out value, null); if (dialogResult == DialogResult.OK && value != null) { this.Zip = value; if (string.IsNullOrEmpty(this.State)) { this.State = dm.GetStateFromZip(value); } } }