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

📄 addincome.aspx.cs

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

    public class AddIncome : AdminPage
    {
        protected Button BtnCancel;
        protected Button BtnSave;
        protected HiddenField HdnClientId;
        protected ExtendedSiteMapPath SmpNavigator;
        protected TextBox TxtBalance;
        protected TextBox TxtClientName;
        protected TextBox TxtMemo;
        protected TextBox TxtMoney;
        protected TextBox TxtRemark;
        protected PowerEasy.Controls.RequiredFieldValidator ValrMoney;
        protected PowerEasy.Controls.RequiredFieldValidator ValrRemark;
        protected MoneyValidator VmoneyMoney;

        protected void BtnCancel_Click(object sender, EventArgs e)
        {
            BasePage.ResponseRedirect("ClientShow.aspx?ClientID=" + this.HdnClientId.Value);
        }

        protected void BtnSave_Click(object sender, EventArgs e)
        {
            if (this.Page.IsValid)
            {
                int clientId = DataConverter.CLng(this.HdnClientId.Value);
                decimal money = DataConverter.CDecimal(this.TxtMoney.Text);
                string text = this.TxtRemark.Text;
                if (Client.Income(clientId, money, text, PEContext.Current.Admin.AdminName, this.TxtMemo.Text))
                {
                    AdminPage.WriteSuccessMsg("添加客户其它收入成功!", "ClientShow.aspx?ClientID=" + clientId + "&InfoType=3");
                }
                else
                {
                    AdminPage.WriteErrMsg("<li>添加客户其它收入失败!</li>", "");
                }
            }
        }

        protected void Page_Load(object sender, EventArgs e)
        {
            if (!this.Page.IsPostBack)
            {
                int clientId = BasePage.RequestInt32("ClientID");
                this.ShowInitialize(clientId);
            }
        }

        protected void ShowInitialize(int clientId)
        {
            this.HdnClientId.Value = clientId.ToString();
            ClientInfo clientById = Client.GetClientById(clientId);
            if (!clientById.IsNull)
            {
                this.TxtClientName.Text = clientById.ClientName;
                this.TxtBalance.Text = clientById.Balance.ToString();
            }
            else
            {
                AdminPage.WriteErrMsg("<li>未找到该客户的相关信息!</li>", "ClientManage.aspx");
            }
        }
    }
}

⌨️ 快捷键说明

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