⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 payplatforms.cs

📁 动易SiteFactory&#8482 网上商店系统1.0源代码
💻 CS
字号:
namespace PowerEasy.WebSite.Admin.Accessories
{
    using PowerEasy.Accessories;
    using PowerEasy.Common;
    using PowerEasy.Controls;
    using PowerEasy.Model.Accessories;
    using PowerEasy.Web.UI;
    using System;
    using System.Web.UI.HtmlControls;
    using System.Web.UI.WebControls;

    public class PayPlatforms : AdminPage
    {
        protected AlternateLiteral AltrTitle;
        protected AlternateButton BtnSubmit;
        protected HtmlInputCheckBox ChkIsDefault;
        protected HtmlInputCheckBox ChkIsDisabled;
        protected ExtendedSiteMapPath SmpNavigator;
        protected TextBox TxtAccountsID;
        protected TextBox TxtMD5;
        protected TextBox TxtPlatformName;
        protected TextBox TxtRate;
        protected PowerEasy.Controls.RequiredFieldValidator ValrAccountsID;
        protected PowerEasy.Controls.RequiredFieldValidator ValrMD5;
        protected PowerEasy.Controls.RequiredFieldValidator ValrPlatformName;

        protected void BtnSubmit_Click(object sender, EventArgs e)
        {
            PayPlatformInfo payPlatformInfo = new PayPlatformInfo();
            if (BasePage.RequestString("Action") == "Modify")
            {
                payPlatformInfo.PayPlatformId = BasePage.RequestInt32("ID");
                payPlatformInfo.OrderId = DataConverter.CLng(this.ViewState["orderId"]);
            }
            payPlatformInfo.PayPlatformName = this.TxtPlatformName.Text;
            payPlatformInfo.AccountsId = this.TxtAccountsID.Text;
            payPlatformInfo.MD5 = this.TxtMD5.Text;
            payPlatformInfo.Rate = DataConverter.CDouble(this.TxtRate.Text);
            payPlatformInfo.IsDisabled = this.ChkIsDisabled.Checked;
            payPlatformInfo.IsDefault = this.ChkIsDefault.Checked;
            bool flag = false;
            if (BasePage.RequestString("Action") == "Modify")
            {
                flag = PayPlatform.Update(payPlatformInfo);
            }
            else
            {
                flag = PayPlatform.Add(payPlatformInfo);
            }
            if (flag)
            {
                AdminPage.WriteSuccessMsg("保存数据成功!", "PayPlatformManage.aspx");
            }
            else
            {
                AdminPage.WriteErrMsg("保存数据失败!");
            }
        }

        protected void Page_Load(object sender, EventArgs e)
        {
            if (!this.Page.IsPostBack)
            {
                this.ChkIsDefault.Attributes.Add("onchange", "DefalutChange()");
                if (BasePage.RequestString("Action") == "Modify")
                {
                    PayPlatformInfo payPlatformById = PayPlatform.GetPayPlatformById(BasePage.RequestInt32("ID"));
                    this.TxtPlatformName.Text = payPlatformById.PayPlatformName;
                    this.TxtAccountsID.Text = payPlatformById.AccountsId;
                    this.TxtMD5.Text = payPlatformById.MD5;
                    this.TxtRate.Text = payPlatformById.Rate.ToString();
                    this.ViewState["orderId"] = payPlatformById.OrderId;
                    if (payPlatformById.IsDisabled)
                    {
                        this.ChkIsDisabled.Checked = true;
                    }
                    if (payPlatformById.IsDefault)
                    {
                        this.ChkIsDefault.Checked = true;
                        this.ChkIsDisabled.Disabled = true;
                    }
                }
            }
        }
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -