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);
     }
 }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!this.Page.IsPostBack)
     {
         Choiceset.DropDownListDataBind("PE_Company", "StatusInField", this.DropStatusInField);
         Choiceset.DropDownListDataBind("PE_Company", "CompanySize", this.DropCompanySize);
         Choiceset.DropDownListDataBind("PE_Company", "ManagementForms", this.DropManagementForms);
         if (this.Action == "modify")
         {
             this.ModifyInitialize();
         }
         else
         {
             this.TxtCompanyName.Text = this.CompanyName;
         }
     }
 }
Beispiel #3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     this.TxtBirthday.ImageStyle.Add("float", "left");
     this.TxtBirthday.Style.Add("float", "left");
     if (!this.userSiteConfig.EnableUserReg)
     {
         this.PnlRegStep0.Visible = true;
         this.PnlRegStep1.Visible = false;
         this.PnlRegStep2.Visible = false;
     }
     else
     {
         this.callBackReference = this.Page.ClientScript.GetCallbackEventReference(this, "arg", "ReceiveServerData", "context");
         string str    = this.Page.ClientScript.GetCallbackEventReference(this, "arg", "ReceiveServerDataByCheckSameData", "context");
         string script = "function CallBackByCheckSameData(arg,context){" + str + ";}";
         this.Page.ClientScript.RegisterClientScriptBlock(base.GetType(), "CallBackByCheckSameData", script, true);
         int userNameLimit = 1;
         int userNameMax   = 20;
         if (this.userSiteConfig.UserNameLimit > 0)
         {
             userNameLimit = this.userSiteConfig.UserNameLimit;
         }
         if (this.userSiteConfig.UserNameMax >= userNameLimit)
         {
             userNameMax = this.userSiteConfig.UserNameMax;
         }
         this.ValgTextMaxLength.ValidationExpression = @"^[a-zA-Z0-9_\u4e00-\u9fa5]{" + userNameLimit.ToString() + "," + userNameMax.ToString() + "}$";
         this.InterMessageUserName.Text      = "请输入用户名。不能少于" + userNameLimit.ToString() + "个字符,不能超过" + userNameMax.ToString() + "个字符";
         this.ValgTextMaxLength.ErrorMessage = "用户名必须大于" + userNameLimit.ToString() + "个字符并且不能超过" + userNameMax.ToString() + "个字符";
         if (!base.IsPostBack)
         {
             this.LitControlTreeInfo.BeginTag = "<input name='ControlTreeInfo' type='hidden' value='";
             this.LitControlTreeInfo.Text     = this.userSiteConfig.RegFieldsMustFill + "$$$$$" + this.userSiteConfig.RegFieldsSelectFill;
             this.LitControlTreeInfo.EndTag   = "'/>";
             this.InitProtocol();
             if (this.GetDisplayStyle("Income") != "none")
             {
                 Choiceset.DropDownListDataBind("PE_Contacter", "Income", this.DropIncome);
             }
             this.PnlRegStep1.Visible = true;
         }
     }
 }
 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);
 }