protected void SaveButton_Click(object sender, EventArgs e) { if (Page.IsValid) { try { PaymentMethod paymentMethod = PaymentMethodManager.GetPaymentMethodByID(this.PaymentMethodID); if (paymentMethod != null) { paymentMethod = PaymentMethodManager.UpdatePaymentMethod(paymentMethod.PaymentMethodID, txtName.Text, txtVisibleName.Text, txtDescription.Text, txtConfigureTemplatePath.Text, txtUserTemplatePath.Text, txtClassName.Text, txtSystemKeyword.Text, cbActive.Checked, txtDisplayOrder.Value); IConfigurePaymentMethodModule configureModule = GetConfigureModule(); if (configureModule != null) { configureModule.Save(); } Response.Redirect("PaymentMethodDetails.aspx?PaymentMethodID=" + paymentMethod.PaymentMethodID.ToString()); } else { Response.Redirect("PaymentMethods.aspx"); } } catch (Exception exc) { ProcessException(exc); } } }
protected void SaveButton_Click(object sender, EventArgs e) { if (Page.IsValid) { try { var paymentMethod = PaymentMethodManager.GetPaymentMethodById(this.PaymentMethodId); if (paymentMethod != null) { paymentMethod = PaymentMethodManager.UpdatePaymentMethod(paymentMethod.PaymentMethodId, txtName.Text, txtVisibleName.Text, txtDescription.Text, txtConfigureTemplatePath.Text, txtUserTemplatePath.Text, txtClassName.Text, txtSystemKeyword.Text, cbHidePaymentInfoForZeroOrders.Checked, cbActive.Checked, txtDisplayOrder.Value); var configureModule = GetConfigureModule(); if (configureModule != null) { configureModule.Save(); } CustomerActivityManager.InsertActivity( "EditPaymentMethod", GetLocaleResourceString("ActivityLog.EditPaymentMethod"), paymentMethod.Name); Response.Redirect(string.Format("PaymentMethodDetails.aspx?PaymentMethodID={0}&TabID={1}", paymentMethod.PaymentMethodId, this.GetActiveTabId(this.PaymentTabs))); } else { Response.Redirect("PaymentMethods.aspx"); } } catch (Exception exc) { ProcessException(exc); } } }