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

📄 clientui.cs

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

    public class ClientUI : AdminPage
    {
        protected Button BtnSave;
        protected CrmSelectControl ClientSelect;
        protected DropDownList DropArea;
        protected DropDownList DropClientField;
        protected DropDownList DropCompanySize;
        protected DropDownList DropConnectionLevel;
        protected DropDownList DropCreditLevel;
        protected DropDownList DropGroupID;
        protected DropDownList DropImportance;
        protected DropDownList DropManagementForms;
        protected DropDownList DropPhaseType;
        protected DropDownList DropSourceType;
        protected DropDownList DropStatusInField;
        protected DropDownList DropValueLevel;
        protected HiddenField HdnAction;
        protected HiddenField HdnAdminName;
        protected HiddenField HdnClientId;
        protected HiddenField HdnClientType;
        protected HiddenField HdnCompanyId;
        protected HiddenField HdnContacterId;
        protected LiaisonInformation LiaisonInformation1;
        private string m_Action;
        protected PersonalInformation PersonalInformation1;
        protected RadioButtonList RadlClientType;
        protected RegionControl Region;
        protected ScriptManager SmgeRegion;
        protected ExtendedSiteMapPath SmpNavigator;
        protected TextBox TxtAddress;
        protected TextBox TxtAnnualSales;
        protected TextBox TxtBankAccount;
        protected TextBox TxtBankOfDeposit;
        protected TextBox TxtBusinessScope;
        protected TextBox TxtClientName;
        protected TextBox TxtClientNum;
        protected TextBox TxtCompany;
        protected TextBox TxtCompanyAddress;
        protected TextBox TxtDepartment;
        protected TextBox TxtFax1;
        protected TextBox TxtHomepage1;
        protected TextBox TxtOperation;
        protected TextBox TxtPhone;
        protected TextBox TxtPosition;
        protected TextBox TxtRegisteredCapital;
        protected TextBox TxtRemark;
        protected TextBox TxtShortedForm;
        protected TextBox TxtTaxNum;
        protected TextBox TxtTitle;
        protected TextBox TxtZipCode;
        protected PowerEasy.Controls.RequiredFieldValidator ValrClientName;
        protected PowerEasy.Controls.RequiredFieldValidator ValrShortedForm;
        protected ValidationSummary ValsFormErrors;
        protected ZipCodeValidator VzipZipCode;

        protected void AddInitialize()
        {
            this.TxtClientNum.Text = Client.GetClientNum();
            Choiceset.DropDownListDataBind("PE_Client", "Area", this.DropArea);
            Choiceset.DropDownListDataBind("PE_Client", "Area", this.DropArea);
            Choiceset.DropDownListDataBind("PE_Client", "ClientField", this.DropClientField);
            Choiceset.DropDownListDataBind("PE_Client", "ValueLevel", this.DropValueLevel);
            Choiceset.DropDownListDataBind("PE_Client", "CreditLevel", this.DropCreditLevel);
            Choiceset.DropDownListDataBind("PE_Client", "Importance", this.DropImportance);
            Choiceset.DropDownListDataBind("PE_Client", "ConnectionLevel", this.DropConnectionLevel);
            Choiceset.DropDownListDataBind("PE_Client", "SourceType", this.DropSourceType);
            Choiceset.DropDownListDataBind("PE_Client", "PhaseType", this.DropPhaseType);
            Choiceset.DropDownListDataBind("PE_Client", "GroupID", this.DropGroupID);
            Choiceset.DropDownListDataBind("PE_Company", "StatusInField", this.DropStatusInField);
            Choiceset.DropDownListDataBind("PE_Company", "CompanySize", this.DropCompanySize);
            Choiceset.DropDownListDataBind("PE_Company", "ManagementForms", this.DropManagementForms);
        }

        protected void BtnSave_Click(object sender, EventArgs e)
        {
            if (this.Page.IsValid)
            {
                ClientInfo clientInfo = new ClientInfo();
                ContacterInfo contacterInfo = new ContacterInfo();
                CompanyInfo companyInfo = new CompanyInfo();
                this.m_Action = this.HdnAction.Value;
                int num = DataConverter.CLng(this.HdnClientId.Value);
                int num2 = DataConverter.CLng(this.RadlClientType.SelectedValue);
                if (this.m_Action != "Modify")
                {
                    num = Client.GetMaxId() + 1;
                }
                clientInfo.ClientId = num;
                clientInfo.ClientName = this.TxtClientName.Text;
                clientInfo.ClientNum = this.TxtClientNum.Text;
                clientInfo.ShortedForm = this.TxtShortedForm.Text;
                clientInfo.ParentId = DataConverter.CLng(this.ClientSelect.DataKey);
                clientInfo.Area = DataConverter.CLng(this.DropArea.SelectedValue);
                clientInfo.ClientField = DataConverter.CLng(this.DropClientField.SelectedValue);
                clientInfo.ValueLevel = DataConverter.CLng(this.DropValueLevel.SelectedValue);
                clientInfo.CreditLevel = DataConverter.CLng(this.DropCreditLevel.SelectedValue);
                clientInfo.Importance = DataConverter.CLng(this.DropImportance.SelectedValue);
                clientInfo.ConnectionLevel = DataConverter.CLng(this.DropConnectionLevel.SelectedValue);
                clientInfo.SourceType = DataConverter.CLng(this.DropSourceType.SelectedValue);
                clientInfo.PhaseType = DataConverter.CLng(this.DropPhaseType.SelectedValue);
                clientInfo.GroupId = DataConverter.CLng(this.DropGroupID.SelectedValue);
                clientInfo.ClientType = num2;
                clientInfo.Remark = this.TxtRemark.Text;
                clientInfo.Owner = this.HdnAdminName.Value;
                if (num2 == 0)
                {
                    if (this.m_Action == "Modify")
                    {
                        companyInfo.CompanyId = DataConverter.CLng(this.HdnCompanyId.Value);
                    }
                    companyInfo.ClientId = num;
                    companyInfo.Country = this.Region.Country;
                    companyInfo.Province = this.Region.Province;
                    companyInfo.City = this.Region.City;
                    companyInfo.Address = this.TxtAddress.Text;
                    companyInfo.ZipCode = this.TxtZipCode.Text;
                    companyInfo.Phone = this.TxtPhone.Text;
                    companyInfo.Fax = this.TxtFax1.Text;
                    companyInfo.Homepage = this.TxtHomepage1.Text;
                    companyInfo.BankOfDeposit = this.TxtBankOfDeposit.Text;
                    companyInfo.BankAccount = this.TxtBankAccount.Text;
                    companyInfo.TaxNum = this.TxtTaxNum.Text;
                    companyInfo.StatusInField = DataConverter.CLng(this.DropStatusInField.SelectedValue);
                    companyInfo.CompanySize = DataConverter.CLng(this.DropCompanySize.SelectedValue);
                    companyInfo.BusinessScope = this.TxtBusinessScope.Text;
                    companyInfo.AnnualSales = this.TxtAnnualSales.Text;
                    companyInfo.ManagementForms = DataConverter.CLng(this.DropManagementForms.SelectedValue);
                    companyInfo.RegisteredCapital = this.TxtRegisteredCapital.Text;
                }
                else
                {
                    if (this.m_Action == "Modify")
                    {
                        contacterInfo.ContacterId = DataConverter.CLng(this.HdnContacterId.Value);
                    }
                    contacterInfo.ClientId = num;
                    contacterInfo.Department = this.TxtDepartment.Text;
                    contacterInfo.Position = this.TxtPosition.Text;
                    contacterInfo.Operation = this.TxtOperation.Text;
                    contacterInfo.Title = this.TxtTitle.Text;
                    contacterInfo.Owner = PEContext.Current.Admin.AdminName;
                    contacterInfo.TrueName = this.TxtClientName.Text;
                    contacterInfo.Company = this.TxtCompany.Text;
                    contacterInfo.Department = this.TxtDepartment.Text;
                    contacterInfo.Position = this.TxtPosition.Text;
                    contacterInfo.Operation = this.TxtOperation.Text;
                    contacterInfo.Title = this.TxtTitle.Text;
                    contacterInfo.CompanyAddress = this.TxtCompanyAddress.Text;
                    this.PersonalInformation1.GetContacter(contacterInfo);
                    this.LiaisonInformation1.GetContacter(contacterInfo);
                }
                bool flag = false;
                bool flag2 = false;
                bool flag3 = false;
                if (this.m_Action == "Modify")
                {
                    flag = Client.Update(clientInfo);
                    if (flag)
                    {
                        if (num2 == DataConverter.CLng(this.HdnClientType.Value))
                        {
                            if (num2 == 0)

⌨️ 快捷键说明

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