protected void uxButtonUpdateConfig_Click(object sender, EventArgs e) { try { string totalSearch = ""; foreach (GridViewRow row in uxGridContent.Rows) { CheckBox insertCheck = (CheckBox)row.FindControl("uxCheck"); if (insertCheck.Checked) { string nameSearch = row.Cells[1].Text.Trim(); totalSearch = totalSearch + nameSearch + ","; } } if (String.IsNullOrEmpty(totalSearch)) { uxMessage.DisplayError("Error:<br/>Please select"); return; } DataAccessContext.ConfigurationRepository.UpdateValue(DataAccessContext.Configurations["ContentSearchBy"], totalSearch); uxMessage.DisplayMessage(Resources.SearchMessages.UpdateSuccess); AdminUtilities.LoadSystemConfig(); } catch (Exception ex) { uxMessage.DisplayException(ex); } }
protected void uxUpdateConfigButton_Click(object sender, EventArgs e) { try { if (Page.IsValid) { string message; if (VerifyCountry(out message)) { UpdateUpsShipping(); AdminUtilities.LoadSystemConfig(); uxMessage.DisplayMessage(Resources.ShippingMessages.UpdateSuccess); } else { uxMessage.DisplayError(message); } } } catch (Exception ex) { uxMessage.DisplayException(ex); } }
protected void uxUpdateButton_Click(object sender, EventArgs e) { try { string message = string.Empty; if (!uxEmailSetup.Update(out message)) { uxMessage.DisplayError(message); return; } uxDisplay.Update(); uxStoreLayoutConfig.Update(); uxStoreProfileConfig.Update(); uxFacebook.Update(); uxBlogConfig.Update(); uxPointSystemConfig.Update(); uxSeoConfig.Update(); DataAccessContext.ClearConfigurationCache(); AdminUtilities.LoadSystemConfig(); uxMessage.DisplayMessage(Resources.SetupMessages.UpdateSuccess); PopulateControls(); SystemConfig.Load(); } catch (Exception ex) { uxMessage.DisplayException(ex); } }
protected void uxUpdateButton_Click(object sender, EventArgs e) { try { DataAccessContext.ConfigurationRepository.UpdateValue( DataAccessContext.Configurations["EnableErrorLogEmail"], uxEnableErrorLogEmailDrop.SelectedValue); DataAccessContext.ConfigurationRepository.UpdateValue( DataAccessContext.Configurations["ErrorLogEmail"], uxErrorLogEmailText.Text); uxMessage.DisplayMessage(Resources.SetupMessages.UpdateSuccess); } catch (DataAccessException ex) { uxMessage.DisplayError("Error:<br/>" + ex.Message); } catch { uxMessage.DisplayError(Resources.SetupMessages.UpdateError); } AdminUtilities.LoadSystemConfig(); RefreshDetails(); }
protected void uxTopContentMenuGrid_RowUpdating(object sender, GridViewUpdateEventArgs e) { try { GridViewRow rowGrid = uxTopContentMenuGrid.Rows[e.RowIndex]; string contentmenuID = ((Label)rowGrid.FindControl("uxContentMenuIDLabel")).Text; ContentMenu contentMenu = DataAccessContext.ContentMenuRepository.GetOne(contentmenuID); contentMenu.IsEnabled = ((CheckBox)rowGrid.FindControl("uxContentEnabledCheck")).Checked; ContentMenuItem contentMenuItem = GetReferringContentMenuItem(DataAccessContext.CultureRepository.GetOne( DataAccessContext.CultureRepository.GetIDByName(SystemConst.USCultureName)), contentmenuID); contentMenuItem.IsEnabled = contentMenu.IsEnabled; DataAccessContext.ContentMenuItemRepository.Save(contentMenuItem); string menuType = ((DropDownList)rowGrid.FindControl("uxContentMenuTypeDrop")).SelectedValue; DataAccessContext.ContentMenuRepository.Save(contentMenu); Store store = DataAccessContext.StoreRepository.GetOne(uxStoreFilterDrop.SelectedValue); if (contentmenuID == DataAccessContext.Configurations.GetValue("TopContentMenu", CurrentStore)) { DataAccessContext.ConfigurationRepository.UpdateValue( DataAccessContext.Configurations["TopContentMenuType"], menuType, CurrentStore); } else if (contentmenuID == DataAccessContext.Configurations.GetValue("LeftContentMenu", CurrentStore)) { DataAccessContext.ConfigurationRepository.UpdateValue( DataAccessContext.Configurations["LeftContentMenuType"], menuType, CurrentStore); } else if (contentmenuID == DataAccessContext.Configurations.GetValue("RightContentMenu", CurrentStore)) { DataAccessContext.ConfigurationRepository.UpdateValue( DataAccessContext.Configurations["RightContentMenuType"], menuType, CurrentStore); } AdminUtilities.LoadSystemConfig(); uxTopContentMenuGrid.EditIndex = -1; RefreshGrid(); uxMessage.DisplayMessage(Resources.ContentMenuItemMessages.ItemUpdateSuccess); } finally { // Avoid calling Update() automatically by GridView e.Cancel = true; } }
private void UpdateDatabase() { if (Page.IsValid) { try { UpdateOrderSettings(); UpdateStoreDetail(); AdminUtilities.LoadSystemConfig(); uxMessage.DisplayMessage(Resources.SetupMessages.UpdateSuccess); } catch (Exception ex) { uxMessage.DisplayException(ex); } } }
protected void uxUpdateButton_Click(object sender, EventArgs e) { if (DataAccessContext.Configurations.GetValue("BaseWebsiteCurrency") == CurrentCurrencyCode) { if (uxIsEnabledCheck.Checked == false) { uxMessage.DisplayError(Resources.CurrencyMessages.UpdateDefaultError); return; } } try { Currency currency = DataAccessContext.CurrencyRepository.GetOne(CurrentCurrencyCode); currency = SetUpCurrency(currency); DataAccessContext.CurrencyRepository.Save(currency, uxCurrencyCodeText.Text.Trim()); if (DataAccessContext.Configurations.GetValue("BaseWebsiteCurrency") == CurrentCurrencyCode && uxCurrencyCodeText.Text != CurrentCurrencyCode) { DataAccessContext.ConfigurationRepository.UpdateValue(DataAccessContext.Configurations["BaseWebsiteCurrency"], uxCurrencyCodeText.Text); AdminUtilities.LoadSystemConfig(); } AdminUtilities.ClearCurrencyCache(); uxMessage.DisplayMessage(Resources.CurrencyMessages.UpdateSuccess); CurrentCurrencyCode = uxCurrencyCodeText.Text.Trim(); PopulateControl(); } catch (Exception ex) { uxMessage.DisplayException(ex); } }
protected void uxUpdateConfigButton_Click(object sender, EventArgs e) { try { if (Page.IsValid) { string message; if (VerifyStateCountry(out message)) { UpdateShippingMethod(); DataAccessContext.ConfigurationRepository.UpdateValue( DataAccessContext.Configurations["RTShippingFedExMerchantZip"], uxMerchantZipText.Text); DataAccessContext.ConfigurationRepository.UpdateValue( DataAccessContext.Configurations["RTShippingFedExMerchantState"], uxStateList.CurrentSelected); DataAccessContext.ConfigurationRepository.UpdateValue( DataAccessContext.Configurations["RTShippingFedExMerchantCountry"], uxCountryList.CurrentSelected); DataAccessContext.ConfigurationRepository.UpdateValue( DataAccessContext.Configurations["RTShippingFedExKey"], uxKeyText.Text); DataAccessContext.ConfigurationRepository.UpdateValue( DataAccessContext.Configurations["RTShippingFedExPassword"], uxPasswordText.Text); DataAccessContext.ConfigurationRepository.UpdateValue( DataAccessContext.Configurations["RTShippingFedExAccountNumber"], uxAccountNumberText.Text); DataAccessContext.ConfigurationRepository.UpdateValue( DataAccessContext.Configurations["RTShippingFedExMeterNumber"], uxMeterNumberText.Text); DataAccessContext.ConfigurationRepository.UpdateValue( DataAccessContext.Configurations["RTShippingFedExUrl"], uxFedExTestModeDrop.SelectedValue); DataAccessContext.ConfigurationRepository.UpdateValue( DataAccessContext.Configurations["RTShippingFedExRateRequest"], uxRateRequestDrop.SelectedValue); DataAccessContext.ConfigurationRepository.UpdateValue( DataAccessContext.Configurations["RTShippingFedExIncludeInsurance"], uxInsuranceValueDrop.SelectedValue); DataAccessContext.ConfigurationRepository.UpdateValue( DataAccessContext.Configurations["RTShippingFedExCustoms"], uxCustomsDrop.SelectedValue); DataAccessContext.ConfigurationRepository.UpdateValue( DataAccessContext.Configurations["RTShippingFedExServiceEnabled"], GetServiceSelected(uxFedExServiceCheckList)); DataAccessContext.ConfigurationRepository.UpdateValue( DataAccessContext.Configurations["RTShippingFedExFreeShippingCostService"], GetServiceSelected(uxFreeShippingServiceCheckList)); DataAccessContext.ConfigurationRepository.UpdateValue( DataAccessContext.Configurations["RTShippingFedExFreeShipping"], uxFreeShippingDrop.SelectedValue); DataAccessContext.ConfigurationRepository.UpdateValue( DataAccessContext.Configurations["RTShippingFedExFreeShippingCost"], Currency.ConvertPriceToUSFormat(uxFreeShippingCostText.Text)); DataAccessContext.ConfigurationRepository.UpdateValue( DataAccessContext.Configurations["RTShippingFedExDropoffType"], uxDropoffTypeDrop.SelectedValue); DataAccessContext.ConfigurationRepository.UpdateValue( DataAccessContext.Configurations["RTShippingFedExPackingType"], uxPickupTypeDrop.SelectedValue); DataAccessContext.ConfigurationRepository.UpdateValue( DataAccessContext.Configurations["RTShippingFedExUseMinOrderWeight"], uxMinimumWeightDrop.SelectedValue); DataAccessContext.ConfigurationRepository.UpdateValue( DataAccessContext.Configurations["RTShippingFedExMinOrderWeight"], uxMinimumWeightText.Text); DataAccessContext.ConfigurationRepository.UpdateValue( DataAccessContext.Configurations["RTShippingFedExMarkup"], Currency.ConvertPriceToUSFormat(uxMarkupText.Text)); DataAccessContext.ConfigurationRepository.UpdateValue( DataAccessContext.Configurations["RTShippingFedExServiceAllowedSetFree"], GetServiceSelected(uxFedExAllowedSetFreeCheckList)); DataAccessContext.ConfigurationRepository.UpdateValue( DataAccessContext.Configurations["RTShippingFedExServiceAllowedUseCouponFree"], GetServiceSelected(uxFedExAllowedUseFreeCouponCheckList)); AdminUtilities.LoadSystemConfig(); uxMessage.DisplayMessage(Resources.ShippingMessages.UpdateSuccess); PopulateControls(); } else { uxMessage.DisplayError(message); } } } catch (Exception ex) { uxMessage.DisplayException(ex); } }
protected void uxUpdateButton_Click(object sender, EventArgs e) { try { uxTaxConfig.Update(); uxProductImageSizeConfig.Update(); uxDisplay.Update(); uxRatingReview.Update(); uxGiftCertificate.Update(); uxWholesale.Update(); uxEmailNotification.Update(); uxUploadConfig.Update(); uxSeo.Update(); uxSystemConfig.Update(); uxAffiliateConfig.Update(); uxShippingTracking.Update(); uxDownloadCount.Update(); uxeBayConfig.Update(); DataAccessContext.ConfigurationRepository.UpdateValue( DataAccessContext.Configurations["UseCustomTimeZone"], uxUseTimeZoneDrop.SelectedValue); DataAccessContext.ConfigurationRepository.UpdateValue( DataAccessContext.Configurations["CustomTimeZone"], uxCustomTimeZoneDrop.SelectedValue); DataAccessContext.ConfigurationRepository.UpdateValue( DataAccessContext.Configurations["WebServiceAdminUser"], uxWebServiceAdminUserText.Text); AdminUtilities.LoadSystemConfig(); AdminUtilities.ClearCurrencyCache(); uxMessage.DisplayMessage(Resources.SetupMessages.UpdateSuccess); SiteMapManager.ClearCache(); PopulateControls(); SetUpUrlCultureID(); DataAccessContext.ConfigurationRepository.UpdateValue( DataAccessContext.Configurations["DownloadExpirePeriod"], uxDownloadExpirePeriodText.Text); DataAccessContext.ConfigurationRepository.UpdateValue( DataAccessContext.Configurations["AnonymousCheckoutAllowed"], uxAllowAnonymousCheckoutDropDown.SelectedValue); DataAccessContext.ConfigurationRepository.UpdateValue( DataAccessContext.Configurations["ShippingMerchantCountry"], uxMerchantCountryList.CurrentSelected); DataAccessContext.ConfigurationRepository.UpdateValue( DataAccessContext.Configurations["ShippingIncludeDiscount"], uxShippingIncludeDiscountDrop.SelectedValue); SetDefaultCurrency(); SystemConfig.Load(); UpdatePanel headerPanel = (UpdatePanel)WebUtilities.FindControlRecursive(this.Page, "uxHeaderUpdatePanel"); if (headerPanel != null) { Control paymentLink = (Control)WebUtilities.FindControlRecursive(headerPanel, "PaymentLink"); if (paymentLink != null) { paymentLink.Visible = DataAccessContext.Configurations.GetBoolValue("VevoPayPADSSMode"); headerPanel.Update(); } } } catch (Exception ex) { uxMessage.DisplayException(ex); } }
protected void uxSubmitButton_Click(object sender, EventArgs e) { try { if (Page.IsValid) { UpdateShippingMethod(); DataAccessContext.ConfigurationRepository.UpdateValue( DataAccessContext.Configurations["RTShippingUspsUserID"], uxUserIDText.Text); DataAccessContext.ConfigurationRepository.UpdateValue( DataAccessContext.Configurations["RTShippingUspsMerchantZip"], uxUspsMerchantZipText.Text); DataAccessContext.ConfigurationRepository.UpdateValue( DataAccessContext.Configurations["RTShippingUspsUrl"], uxUrlDrop.SelectedValue); DataAccessContext.ConfigurationRepository.UpdateValue( DataAccessContext.Configurations["RTShippingUspsMailType"], uxMailTypeDrop.SelectedValue); DataAccessContext.ConfigurationRepository.UpdateValue( DataAccessContext.Configurations["RTShippingUspsIsFreeShipping"], uxIsFreeShippingCostDrop.SelectedValue); DataAccessContext.ConfigurationRepository.UpdateValue( DataAccessContext.Configurations["RTShippingUspsFreeShippingCost"], uxFreeShippingCostText.Text); DataAccessContext.ConfigurationRepository.UpdateValue( DataAccessContext.Configurations["RTShippingUspsIsMinWeight"], uxIsMinWeightDrop.SelectedValue); DataAccessContext.ConfigurationRepository.UpdateValue( DataAccessContext.Configurations["RTShippingUspsMinWeightOrder"], uxMinWeightOrderText.Text); DataAccessContext.ConfigurationRepository.UpdateValue( DataAccessContext.Configurations["RTShippingUspsMarkUpPrice"], uxMarkUpPriceText.Text); DataAccessContext.ConfigurationRepository.UpdateValue( DataAccessContext.Configurations["RTShippingUspsServiceEnabledList"], GetServiceSelected(uxServiceEnabledCheckList)); DataAccessContext.ConfigurationRepository.UpdateValue( DataAccessContext.Configurations["RTShippingUspsServiceFreeShipping"], GetServiceSelected(uxServiceFreeShippingCheckList)); DataAccessContext.ConfigurationRepository.UpdateValue( DataAccessContext.Configurations["RTShippingUspsServiceAllowedSetFree"], GetServiceSelected(uxUspsAllowedSetFreeCheckList)); DataAccessContext.ConfigurationRepository.UpdateValue( DataAccessContext.Configurations["RTShippingUspsServiceAllowedUseCouponFree"], GetServiceSelected(uxUspsAllowedUseFreeCouponCheckList)); AdminUtilities.LoadSystemConfig(); uxMessage.DisplayMessage(Resources.ShippingMessages.UpdateSuccess); } } catch (Exception ex) { uxMessage.DisplayException(ex); } }