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

📄 personalinformation.cs

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

    public class PersonalInformation : BaseUserControl
    {
        protected DatePicker DpkBirthday;
        protected DropDownList DropEducation;
        protected DropDownList DropIncome;
        protected RadioButtonList RadlMarriage;
        protected RadioButtonList RadlSex;
        protected TextBox TxtFamily;
        protected TextBox TxtGraduateFrom;
        protected TextBox TxtIDCard;
        protected TextBox TxtInterestsOfAmusement;
        protected TextBox TxtInterestsOfCulture;
        protected TextBox TxtInterestsOfLife;
        protected TextBox TxtInterestsOfOther;
        protected TextBox TxtInterestsOfSport;
        protected TextBox TxtNation;
        protected TextBox TxtNativePlace;
        protected DateValidator Vdate;

        public void GetContacter(ContacterInfo contacterInfo)
        {
            contacterInfo.Birthday = DataConverter.CDate(this.DpkBirthday.Text, null);
            contacterInfo.IdCard = this.TxtIDCard.Text;
            contacterInfo.NativePlace = this.TxtNativePlace.Text;
            contacterInfo.Nation = this.TxtNation.Text;
            contacterInfo.Sex = (UserSexType) Enum.Parse(typeof(UserSexType), this.RadlSex.SelectedValue);
            contacterInfo.Marriage = (UserMarriageType) Enum.Parse(typeof(UserMarriageType), this.RadlMarriage.SelectedValue);
            contacterInfo.Education = DataConverter.CLng(this.DropEducation.SelectedValue);
            contacterInfo.GraduateFrom = this.TxtGraduateFrom.Text;
            contacterInfo.InterestsOfLife = this.TxtInterestsOfLife.Text;
            contacterInfo.InterestsOfCulture = this.TxtInterestsOfCulture.Text;
            contacterInfo.InterestsOfAmusement = this.TxtInterestsOfAmusement.Text;
            contacterInfo.InterestsOfSport = this.TxtInterestsOfSport.Text;
            contacterInfo.InterestsOfOther = this.TxtInterestsOfOther.Text;
            contacterInfo.Income = DataConverter.CLng(this.DropIncome.SelectedValue);
            contacterInfo.Family = this.TxtFamily.Text;
        }

        protected void Page_Load(object sender, EventArgs e)
        {
            if (!this.Page.IsPostBack && (this.DropIncome.Items.Count == 0))
            {
                Choiceset.DropDownListDataBind("PE_Contacter", "InCome", this.DropIncome);
                Choiceset.DropDownListDataBind("PE_Contacter", "Education", this.DropEducation);
            }
        }

        public void SetContacter(ContacterInfo contacterInfo)
        {
            if (contacterInfo.Birthday.HasValue)
            {
                this.DpkBirthday.Text = contacterInfo.Birthday.Value.ToString("yyyy-MM-dd");
            }
            this.TxtIDCard.Text = contacterInfo.IdCard;
            this.TxtNativePlace.Text = contacterInfo.NativePlace;
            this.TxtNation.Text = contacterInfo.Nation;
            this.RadlSex.SelectedValue = contacterInfo.Sex.ToString("D");
            this.RadlMarriage.SelectedValue = contacterInfo.Marriage.ToString("D");
            this.TxtGraduateFrom.Text = contacterInfo.GraduateFrom;
            this.TxtInterestsOfLife.Text = contacterInfo.InterestsOfLife;
            this.TxtInterestsOfCulture.Text = contacterInfo.InterestsOfCulture;
            this.TxtInterestsOfAmusement.Text = contacterInfo.InterestsOfAmusement;
            this.TxtInterestsOfSport.Text = contacterInfo.InterestsOfSport;
            this.TxtInterestsOfOther.Text = contacterInfo.InterestsOfOther;
            this.TxtFamily.Text = contacterInfo.Family;
            Choiceset.DropDownListDataBind("PE_Contacter", "Education", this.DropEducation, contacterInfo.Education);
            Choiceset.DropDownListDataBind("PE_Contacter", "Income", this.DropIncome, contacterInfo.Income);
        }

        public UserSexType UserSex
        {
            get
            {
                return (UserSexType) DataConverter.CLng(this.RadlSex.SelectedValue);
            }
        }
    }
}

⌨️ 快捷键说明

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