private void SetDefaults(UserSettings settings) { SelectedCountry = CountryList?.FirstOrDefault( country => country.CountryCode == settings.ReceiveSettings.CountryCode) ?? CountryList?.FirstOrDefault(); SelectedCountrySubdivision = CountrySubdivisionList.FirstOrDefault( countrySubdivision => countrySubdivision.CountrySubdivisionCode == settings.ReceiveSettings.CountrySubdivisionCode) ?? CountrySubdivisionList.FirstOrDefault(); SelectedCurrency = CurrencyList?.FirstOrDefault(curr => curr.CurrencyCode == settings.ReceiveSettings.CurrencyCode) ?? CurrencyList?.FirstOrDefault(); SelectedAmountRange = AmountRangeList?.FirstOrDefault(ar => ar.Code == settings.ReceiveSettings.AmountRange) ?? AmountRangeList?.FirstOrDefault(); CustomAmount = settings.ReceiveSettings.CustomAmount; SelectedItemChoice = ItemChoiceList?.FirstOrDefault(ic => ic.Code == settings.ReceiveSettings.ItemChoice) ?? ItemChoiceList?.FirstOrDefault(); SelectedServiceOption = ServiceOptionList?.FirstOrDefault(so => so.Key == settings.ReceiveSettings.ServiceOption) ?? ServiceOptionList?.FirstOrDefault(); SelectedThirdPartyType = ThirdPartyTypeList?.FirstOrDefault(tp => tp == settings.ReceiveSettings.ThirdPartyType) ?? ThirdPartyTypeList?.FirstOrDefault(); }
private void SetDefaults(UserSettings settings) { SelectedCountry = CountryList?.FirstOrDefault(c => c.CountryCode == settings.BillPaySettings.CountryCode) ?? CountryList?.FirstOrDefault(); SelectedAmountRange = AmountRangeList?.FirstOrDefault(ar => ar.Code == settings.StagedBillPaySettings.AmountRange) ?? AmountRangeList?.FirstOrDefault(); CustomAmount = settings.StagedBillPaySettings.CustomAmount; SelectedThirdPartyType = ThirdPartyTypeList?.FirstOrDefault(tp => tp == settings.StagedBillPaySettings.ThirdPartyType) ?? ThirdPartyTypeList?.FirstOrDefault(); BillerList = new List <TestBiller> { Billers.HubbardAttorney, Billers.Ford, Billers.ComcastCableXfinity, new TestBiller { Code = "ManualEntry", Name = "Manual Entry" } }; SelectedBiller = BillerList?.FirstOrDefault(b => b.Code == settings.StagedBillPaySettings.Biller) ?? BillerList.FirstOrDefault(); ManualBillerCode = settings.StagedBillPaySettings.ManualBillerCode; ManualBillerAccountNumber = settings.StagedBillPaySettings.ManualBillerAccountNumber; }
private void SetDefaults(UserSettings settings) { SelectedRefundReason = RefundReasonList?.FirstOrDefault(reason => reason.Identifier == settings.SendReversalSettings.RefundReasonCode) ?? RefundReasonList?.FirstOrDefault(); RefundFee = settings.SendReversalSettings.RefundFee; SelectedCountry = CountryList?.FirstOrDefault(country => country.CountryCode == settings.SendReversalSettings.CountryCode); SelectedCountrySubdivision = CountrySubdivisionList.FirstOrDefault(countrySubdivision => countrySubdivision.CountrySubdivisionCode == settings.SendReversalSettings.CountrySubdivisionCode) ?? CountrySubdivisionList.FirstOrDefault(); SelectedCurrency = CurrencyList?.FirstOrDefault(curr => curr.CurrencyCode == settings.SendReversalSettings.CurrencyCode) ?? CurrencyList?.FirstOrDefault(); SelectedAmountRange = AmountRangeList?.FirstOrDefault(ar => ar.Code == settings.SendReversalSettings.AmountRange) ?? AmountRangeList?.FirstOrDefault(); SelectedItemChoice = ItemChoiceList?.FirstOrDefault(ic => ic.Code == settings.SendReversalSettings.ItemChoice) ?? ItemChoiceList?.FirstOrDefault(); SelectedServiceOption = ServiceOptionList?.FirstOrDefault(so => so.Key == settings.SendReversalSettings.ServiceOption) ?? ServiceOptionList?.FirstOrDefault(); SelectedThirdPartyType = ThirdPartyTypeList?.FirstOrDefault(tp => tp == settings.SendReversalSettings.ThirdPartyType) ?? ThirdPartyTypeList?.FirstOrDefault(); }
private void SetDefaults(UserSettings settings) { SendSettings settingsSource = _transactionName == StaticTransactionNames.Send ? settings.SendSettings : settings.StagedSendSettings; SelectedCountry = CountryList?.FirstOrDefault(country => country.CountryCode == settingsSource.CountryCode) ?? CountryList?.FirstOrDefault(); SelectedCountrySubdivision = CountrySubdivisionList.FirstOrDefault( countrySubdivision => countrySubdivision.CountrySubdivisionCode == settingsSource.CountrySubdivisionCode) ?? CountrySubdivisionList.First(); SelectedCurrency = CurrencyList?.FirstOrDefault(curr => curr.CurrencyCode == settingsSource.CurrencyCode) ?? CurrencyList?.FirstOrDefault(); SelectedAmountRange = AmountRangeList?.FirstOrDefault(ar => ar.Code == settingsSource.AmountRange) ?? AmountRangeList?.FirstOrDefault(); CustomAmount = settingsSource.CustomAmount; SelectedItemChoice = ItemChoiceList?.FirstOrDefault(ic => ic.Code == settingsSource.ItemChoice) ?? ItemChoiceList?.FirstOrDefault(); SelectedServiceOption = ServiceOptionList?.FirstOrDefault(so => so.Key == settingsSource.ServiceOption) ?? ServiceOptionList?.FirstOrDefault(); SelectedThirdPartyType = ThirdPartyTypeList?.FirstOrDefault(tp => tp == settingsSource.ThirdPartyType) ?? ThirdPartyTypeList?.FirstOrDefault(); }