示例#1
0
        protected override void AttachChildControls()
        {
            this.WAPLocateAddress        = (Common_WAPLocateAddress)this.FindControl(Common_WAPLocateAddress.TagId);
            this.WAPLocateAddressUpgrade = (Common_WAPLocateAddressUpgrade)this.FindControl(Common_WAPLocateAddressUpgrade.TagId);
            this.shipTo    = (HtmlInputText)this.FindControl("shipTo");
            this.cellphone = (HtmlInputText)this.FindControl("cellphone");
            this.hidIsOpenCertification = (HtmlInputHidden)this.FindControl("hidIsOpenCertification");
            SiteSettings masterSettings = SettingsManager.GetMasterSettings();

            if (masterSettings.OpenMultStore)
            {
                this.WAPLocateAddress.Visible        = false;
                this.WAPLocateAddressUpgrade.Visible = true;
            }
            else
            {
                this.WAPLocateAddress.Visible        = true;
                this.WAPLocateAddressUpgrade.Visible = false;
            }
            if (!string.IsNullOrWhiteSpace(this.Page.Request.QueryString["shipTo"]))
            {
                this.shipTo.Value = HttpUtility.UrlDecode(this.Page.Request.QueryString["shipTo"]);
            }
            if (!string.IsNullOrWhiteSpace(this.Page.Request.QueryString["cellphone"]))
            {
                this.cellphone.Value = HttpUtility.UrlDecode(this.Page.Request.QueryString["cellphone"]);
            }
            this.hidIsOpenCertification.Value = (masterSettings.IsOpenCertification ? "下一步" : "保存收货地址");
            PageTitle.AddSiteNameTitle("添加收货地址");
        }
示例#2
0
        protected override void AttachChildControls()
        {
            this.hidUserPicture   = (HtmlInputHidden)this.FindControl("hidUserPicture");
            this.txtRealName      = (HtmlInputControl)this.FindControl("txtRealName");
            this.txtSex           = (HtmlInputControl)this.FindControl("txtSex");
            this.txtBirthday      = (HtmlInputControl)this.FindControl("txtBirthday");
            this.txtQQ            = (HtmlInputControl)this.FindControl("txtQQ");
            this.txtMSN           = (HtmlInputControl)this.FindControl("txtMSN");
            this.WapLocateAddress = (Common_WAPLocateAddress)this.FindControl(Common_WAPLocateAddress.TagId);
            MemberInfo user = HiContext.Current.User;

            if (!string.IsNullOrEmpty(user.Picture))
            {
                this.hidUserPicture.Value = user.Picture;
            }
            else
            {
                this.hidUserPicture.Value = "/templates/common/images/headerimg.png";
            }
            if (!string.IsNullOrEmpty(user.RealName))
            {
                this.txtRealName.Value = user.RealName;
            }
            switch (user.Gender)
            {
            case Gender.NotSet:
                this.txtSex.Value = "";
                break;

            case Gender.Male:
                this.txtSex.Value = "男士";
                break;

            case Gender.Female:
                this.txtSex.Value = "女士";
                break;
            }
            if (user.BirthDate.HasValue)
            {
                this.txtBirthday.Value = user.BirthDate.Value.ToString("yyyy-MM-dd");
            }
            if (!string.IsNullOrEmpty(user.QQ))
            {
                this.txtQQ.Value = user.QQ;
            }
            if (!string.IsNullOrEmpty(user.NickName))
            {
                this.txtMSN.Value = user.NickName;
            }
            if (this.WapLocateAddress != null)
            {
                this.WapLocateAddress.RegionId = user.RegionId;
                this.WapLocateAddress.Address  = user.Address;
            }
            PageTitle.AddSiteNameTitle("个人信息");
        }
示例#3
0
        protected override void AttachChildControls()
        {
            this.shipTo                  = (HtmlInputText)this.FindControl("shipTo");
            this.cellphone               = (HtmlInputText)this.FindControl("cellphone");
            this.Hiddenshipid            = (HtmlInputHidden)this.FindControl("shipId");
            this.WapLocateAddress        = (Common_WAPLocateAddress)this.FindControl(Common_WAPLocateAddress.TagId);
            this.WAPLocateAddressUpgrade = (Common_WAPLocateAddressUpgrade)this.FindControl(Common_WAPLocateAddressUpgrade.TagId);
            SiteSettings masterSettings = SettingsManager.GetMasterSettings();

            this.chkIsDefault           = (HtmlInputCheckBox)this.FindControl("chkIsDefault");
            this.hidIsOpenCertification = (HtmlInputHidden)this.FindControl("hidIsOpenCertification");
            ShippingAddressInfo shippingAddress = MemberProcessor.GetShippingAddress(this.shippingid);
            string fullRegion = RegionHelper.GetFullRegion(shippingAddress.RegionId, " ", true, 0);

            if (masterSettings.OpenMultStore)
            {
                this.WapLocateAddress.Visible        = false;
                this.WAPLocateAddressUpgrade.Visible = true;
                if (this.WAPLocateAddressUpgrade != null)
                {
                    this.WAPLocateAddressUpgrade.RegionId       = shippingAddress.RegionId;
                    this.WAPLocateAddressUpgrade.Address        = shippingAddress.RegionLocation + shippingAddress.Address;
                    this.WAPLocateAddressUpgrade.RegionLocation = fullRegion;
                    this.WAPLocateAddressUpgrade.BuildingNumber = shippingAddress.BuildingNumber;
                    this.WAPLocateAddressUpgrade.LatLng         = shippingAddress.LatLng;
                }
            }
            else
            {
                this.WapLocateAddress.Visible        = true;
                this.WAPLocateAddressUpgrade.Visible = false;
                if (this.WapLocateAddress != null)
                {
                    this.WapLocateAddress.RegionId       = shippingAddress.RegionId;
                    this.WapLocateAddress.Address        = shippingAddress.Address;
                    this.WapLocateAddress.BuildingNumber = shippingAddress.BuildingNumber;
                }
            }
            if (this.shipTo != null)
            {
                this.shipTo.Value = shippingAddress.ShipTo;
            }
            if (this.cellphone != null)
            {
                this.cellphone.Value = shippingAddress.CellPhone;
            }
            if (this.Hiddenshipid != null)
            {
                this.Hiddenshipid.Value = this.shippingid.ToString();
            }
            this.chkIsDefault.Checked = shippingAddress.IsDefault;
            if (!string.IsNullOrWhiteSpace(this.Page.Request.QueryString["shipTo"]))
            {
                this.shipTo.Value = HttpUtility.UrlDecode(this.Page.Request.QueryString["shipTo"]);
            }
            if (!string.IsNullOrWhiteSpace(this.Page.Request.QueryString["cellphone"]))
            {
                this.cellphone.Value = HttpUtility.UrlDecode(this.Page.Request.QueryString["cellphone"]);
            }
            this.hidIsOpenCertification.Value = (masterSettings.IsOpenCertification ? "下一步" : "保存收货地址");
            PageTitle.AddSiteNameTitle("编辑收货地址");
        }