public MobileConfig GetMobileCodfings(int productSetId, string language = "en", bool isLite = false) { SqlConnection con = null; SqlDataReader reader = null; MobileConfig mobile = new MobileConfig(); mobile.ProductSetId = productSetId; int parseInt; try { con = Connect(); SqlCommand cmd = new SqlCommand("knsp_smmx_mobile_config_get", con); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.AddWithValue("@productset_id", productSetId); reader = cmd.ExecuteReader(); while (reader.Read()) { try { bool lite = GetInt(reader, "lite") == 1; if (isLite && !lite) { continue; } string configName = GetString(reader, "config_name").ToLower(); string configValue = GetString(reader, "config_value"); if (!Int32.TryParse(configValue, out parseInt)) { if (!string.IsNullOrEmpty(configValue) && configValue.ToLower().Equals("true")) { configValue = "1"; } else if (!string.IsNullOrEmpty(configValue) && configValue.ToLower().Equals("false")) { configValue = "0"; } configValue = string.IsNullOrEmpty(configValue) ? "0" : configValue; } switch (configName) { case "access_counpons": mobile.AccessCounpons = configValue.Equals("1"); break; case "application_name": mobile.ApplicationName = configValue; break; case "color_avatar_ring": mobile.ColorAvatarRing = configValue; break; case "color_background_text": mobile.ColorBackgroundText = configValue; break; case "color_button_primary_background": mobile.ColorButtonPrimaryBackground = configValue; break; case "color_button_primary_text": mobile.ColorButtonPrimaryText = configValue; break; case "color_header_primary_icon": mobile.ColorHeaderPrimaryIcon = configValue; break; case "color_header_primary_text": mobile.ColorHeaderPrimaryText = configValue; break; case "color_login_banner_background": mobile.ColorLoginBannerBackground = configValue; break; case "color_login_banner_primary_text": mobile.ColorLoginBannerPrimaryText = configValue; break; case "color_login_banner_secondary_text": mobile.ColorLoginBannerSecondaryText = configValue; break; case "color_login_hamburger": mobile.ColorLoginHamburger = configValue; break; case "color_login_menu_background": mobile.ColorLoginMenuBackground = configValue; break; case "color_login_menu_text": mobile.ColorLoginMenuText = configValue; break; case "color_main_hamburger": mobile.ColorMainHamburger = configValue; break; case "color_main_menu_background": mobile.ColorMainMenuBackground = configValue; break; case "color_main_menu_text": mobile.ColorMainMenuText = configValue; break; case "color_popup_background": mobile.ColorPopupBackground = configValue; break; case "color_popup_button_background": mobile.ColorPopupButtonBackground = configValue; break; case "color_popup_button_text": mobile.ColorPopupButtonText = configValue; break; case "color_popup_text": mobile.ColorPopupText = configValue; break; case "color_primary_overlay": mobile.ColorPrimaryOverlay = configValue; break; case "color_primary_overlay_primary_text": mobile.ColorPrimaryOverlayPrimaryText = configValue; break; case "color_primary_overlay_secondary_text": mobile.ColorPrimaryOverlaySecondaryText = configValue; break; case "color_secondary_overlay": mobile.ColorSecondaryOverlay = configValue; break; case "color_secondary_overlay_text": mobile.ColorSecondaryOverlaytext = configValue; break; case "color_splashbackground": mobile.ColorSplashBackground = configValue; break; case "color_textbox_primary_background": mobile.ColorTextboxPrimaryBackground = configValue; break; case "customer_support_number": mobile.CustomerSupportNumber = configValue; break; case "enrollmentportal": mobile.EnrollmentPortal = configValue; break; case "enrollmentportalt2p": mobile.EnrollmentPortalTemp2Perm = configValue; break; case "enrollmentportald2p": mobile.EnrollmentPortalDirect2Perm = configValue; break; case "password_regex": mobile.PasswordRegex = configValue; break; case "username_regex": mobile.UserNameRegex = configValue; break; case "cfpb_compliance": mobile.CFPBCompliance = configValue.Equals("1"); break; case "ingo": mobile.Ingo = configValue.Equals("1"); break; case "owner_logo": mobile.OwnerLogo = configValue; break; case "owner_name": mobile.OwnerName = configValue; break; case "url_background": mobile.UrlBackground = configValue; break; case "url_cardholder_agreement": mobile.UrlCardholderAgreement = configValue; break; case "url_disclaimer": mobile.UrlDisclaimer = configValue; break; case "url_eula": mobile.UrlEula = configValue; break; case "url_faq": mobile.UrlFaq = configValue; break; case "url_header_primary_background": mobile.UrlHeaderPrimaryBackground = configValue; break; case "url_issuer_statement": mobile.UrlIssuerStatement = configValue; break; case "url_online_security": mobile.UrlOnlineSecurity = configValue; break; case "url_privacy_policy": mobile.UrlPrivacyPolicy = configValue; break; case "url_splash": mobile.UrlSplash = configValue; break; case "url_splashlogo": mobile.UrlSplashlogo = configValue; break; case "url_terms_conditions": mobile.UrlTermsConditions = configValue; break; case "viamericas": mobile.Viamericas = configValue.Equals("1"); break; case "url_login_header_background": mobile.UrlLoginHeaderBackground = configValue; break; case "url_login_header_logo": mobile.UrlLoginHeaderLogo = configValue; break; case "dda_prefix": mobile.SetDdaPrefix(configValue); break; case "color_textbox_primary_text": mobile.ColorTextboxPrimaryText = configValue; break; case "color_textbox_hint_text": mobile.ColorTextboxHintText = configValue; break; case "forgot_password_url": mobile.ForgotPasswordUrl = configValue; break; case "register_info_type": mobile.RegisterInfoType = Convert.ToInt32(configValue); break; case "locator_moneypass": mobile.LocatorMoneypass = Convert.ToInt32(configValue); break; case "locator_preset_rapid": mobile.LocatorPresetRapid = Convert.ToInt32(configValue); break; case "transfer_c2c": mobile.TransferC2C = Convert.ToInt32(configValue); break; case "locator_moneygram": mobile.LocatorMoneygram = Convert.ToInt32(configValue); break; case "locator_moneygram_url": mobile.LocatorMoneygramUrl = configValue; break; case "forgot_password_type": mobile.ForgotPasswordType = Convert.ToInt32(configValue); break; case "reload_moneygram": mobile.ReloadMoneygram = Convert.ToInt32(configValue); break; case "reload_visa_readylink": mobile.ReloadVisaReadyLink = Convert.ToInt32(configValue); break; case "reload_cashpass_retailer": mobile.ReloadCashpassRetailer = Convert.ToInt32(configValue); break; case "reload_western_union": mobile.ReloadWesterUnion = Convert.ToInt32(configValue); break; case "reload_directdeposit": mobile.ReloadDirectDeposit = Convert.ToInt32(configValue); break; case "reload_greendot": mobile.ReloadGreenDot = Convert.ToInt32(configValue); break; case "reload_banktransfer": mobile.ReloadBankTransfer = Convert.ToInt32(configValue); break; case "locator_cashpass": mobile.LocatorCashpass = Convert.ToInt32(configValue); break; case "locator_western_union": mobile.LocatorWesterUnion = Convert.ToInt32(configValue); break; case "locator_visa_readylink": mobile.LocatorVisaReadylink = Convert.ToInt32(configValue); break; case "locator_western_union_url": mobile.LocatorWesterUnionUrl = configValue; break; case "login_option": mobile.LoginOption = Convert.ToInt32(configValue); break; case "bank_fund": mobile.BankFunding = Convert.ToInt32(configValue); break; case "multi_language": mobile.MultiLanguage = Convert.ToInt32(configValue); break; case "bank_name": mobile.BankName = configValue; break; case "locator_atm": mobile.LocatorAtm = Convert.ToInt32(configValue); break; case "budget_tool": mobile.BudgetTool = Convert.ToInt32(configValue); break; case "locator_branch": mobile.LocatorBranch = Convert.ToInt32(configValue); break; case "reload_swipe": mobile.ReloadSwipe = Convert.ToInt32(configValue); break; case "rewards": mobile.Rewards = Convert.ToInt32(configValue); break; case "login_option_pin": mobile.LoginOptionPin = Convert.ToInt32(configValue); break; case "reload_government": mobile.GovernmentLoad = Convert.ToInt32(configValue); break; case "forgot_username": mobile.ForgotUsername = Convert.ToInt32(configValue); break; case "change_email": mobile.ChangeEmail = Convert.ToInt32(configValue); break; case "sole_bank_info": mobile.SetSoleBankInfo(configValue); break; case "reload_recharge_card": mobile.ReloadRechargeCard = Convert.ToInt32(configValue); break; case "locator_speedycash_atm": mobile.LocatorSpeedycashAtm = Convert.ToInt32(configValue); break; case "locator_speedycash_branch": mobile.LocatorSpeedycashBranch = Convert.ToInt32(configValue); break; case "reload_banktransfer_text": mobile.ReloadBankTransferText = configValue.Equals("0") ? string.Empty : configValue; break; case "reload_banktransfer_url": mobile.ReloadBankTransferUrl = configValue.Equals("0") ? string.Empty : configValue; break; case "owner_routing_number": mobile.RountingNumber = configValue.Equals("0") ? string.Empty : configValue; break; case "reload_directdeposit_text": mobile.ReloadDirectDepositText = configValue.Equals("0") ? string.Empty : configValue; break; case "reload_directdeposit_url": mobile.ReloadDirectDepositUrl = configValue.Equals("0") ? string.Empty : configValue; break; case "reload_directdeposit_address": mobile.ReloadDirectDepositAddress = configValue.Equals("0") ? string.Empty : configValue; break; case "reload_directdeposit_phone": mobile.ReloadDirectDepositPhone = configValue.Equals("0") ? string.Empty : configValue; break; case "budget_primary_text_color": mobile.ColorBudgetPrimaryText = configValue; break; case "budget_title_text_color": mobile.ColorBudgetTitleText = configValue; break; case "budget_progress_bar_color": mobile.ColorBudgetProgressbar = configValue; break; case "budget_savingprogress_bar_color": mobile.ColorBudgetSavingProgressbar = configValue; break; case "budget_savineprogress_bar_light_color": mobile.ColorBudgetSavingProgressbarLight = configValue; break; case "budget_alert_text_color": mobile.ColorBudgetAlertText = configValue; break; case "budget_overlay_color": mobile.ColorBudgetOverlay = configValue; break; default: break; } } catch (Exception ex) { //Logger.Instance.Error(this, "GetMobileCodfings", ex); } } mobile = GetLanguageConfig(productSetId, language, mobile); mobile.Popovers = GetPopover(productSetId, mobile.GetLanguageSetId()); return(mobile); } catch (Exception ex) { //Logger.Instance.Error(this, "GetMobileCodfings", ex); return(null); } finally { CloseReader(reader); Disconnect(con); } }