///<summary> /// Populate the Provider and Address UI fields with the relevant information /// from the given providerName argument. If this provider does not exist, or /// providerName is null, populate the fields with the first element in the ProviderList. ///</summary> ///<param name="providerName">he name of the provider whose information we want to load into the UI</param> ///<returns>void</returns> public void PopulateProviderFields(String providerName) { // VATRP1271 - TODO - add a check to ensure that this has not changed prior to doing anything further. VATRPServiceProvider serviceProvider = ServiceManager.Instance.ProviderService.FindProviderLooseSearch(providerName); if (serviceProvider == null && ProviderList.Count() > 0) { serviceProvider = ProviderList[0]; } ProviderComboBox.SelectedItem = serviceProvider; }