示例#1
0
文件: Member.aspx.cs 项目: Thn123/hmj
        public void Bind(string FromUserName)
        {
            List <Region> list = mss.GetRegion();

            DataTable dt = ListToDataTable(list);

            ddlS.Items.Clear();
            ddlS.Items.Add(new ListItem("请选择省份", "0"));
            foreach (DataRow dr in dt.Rows)
            {
                ddlS.Items.Add(new ListItem(dr["RegionName"].ToString(), dr["RegionCode"].ToString()));
            }
            CUST_INFO cust = mss.GetCust(FromUserName);

            if (cust != null && !string.IsNullOrEmpty(cust.CardNo))
            {
                Z_LOY_BP_GETDETAILResponse zloy = SelectMember(cust.CardNo);
                if (zloy.T_CENTRAL != null && zloy.T_CENTRAL.Length > 0)
                {
                    address   = zloy.T_ADDRESSDATA[0].STREET;
                    nameval   = zloy.T_CENTRALDATAPERSON[0].LASTNAME;
                    cardnoval = zloy.E_USER_NO;
                    City c = mss.GetCityByCode(int.Parse(zloy.T_ADDRESSDATA[0].CITY));
                    ddlC.Items.Clear();
                    ddlC.Items.Add(new ListItem(c.CityName, c.CityCode.ToString()));
                    ddlS.SelectedValue = zloy.T_ADDRESSDATA[0].REGION;
                    cardno.InnerHtml   = "<em id='cardval'>" + zloy.E_USER_NO + "</em>";
                    name.InnerHtml     = "<em id='nameval'>" + zloy.T_CENTRALDATAPERSON[0].LASTNAME + "</em>";
                    phone.InnerHtml    = "<em id='phoneval'>" + zloy.T_TELEFONDATA[0].TELEPHONE + "</em>";
                    if (zloy.T_CENTRAL[0].TITLE_KEY == "Z001")
                    {
                        sex.InnerHtml = "<span class='nandeicon'><em id='sexval'>先生</em></span>";
                    }
                    else
                    {
                        sex.InnerHtml = "<span class='nvdeicon'><em id='sexval'>女士</em></span>";
                    }
                    string birth  = zloy.T_CENTRALDATAPERSON[0].BIRTHDATE;
                    string zctime = zloy.T_ADDRESSDATA[0].STR_SUPPL3;
                    if (birth.Length > 6)
                    {
                        bir.InnerHtml = "<strong>您的生日</strong><span><bdo>" + birth.Substring(0, 4) + "年" + birth.Substring(4, 2) + "月" + birth.Substring(6, 2) + "日</bdo></span>";
                    }
                    else
                    {
                        create.InnerHtml = "<strong>您的生日</strong><span><bdo>未填写</bdo></span>";
                    }
                    if (zctime.Length > 6)
                    {
                        create.InnerHtml = "<strong>注册时间</strong><span><bdo>" + zctime.Substring(0, 4) + "年" + zctime.Substring(4, 2) + "月" + zctime.Substring(6, 2) + "日</bdo></span>";
                    }
                    else
                    {
                        create.InnerHtml = "<strong>注册时间</strong><span><bdo>未填写</bdo></span>";
                    }
                    guitai.InnerHtml = "<strong>注册柜台</strong><span><bdo>" + zloy.T_CENTRAL[0].TITLELETTER + "</bdo></span>";

                    if (zloy.T_CUSTOMER06[0].ZA39 == "X")
                    {
                        radsj.InnerHtml = "<input name='' type='radio' value='手机' class='radiocss checked2'>";
                    }
                    if (zloy.T_CUSTOMER06[0].ZA40 == "X")
                    {
                        raddx.InnerHtml = "<input name='' type='radio' value='短信' class='radiocss checked2'>";
                    }
                    if (zloy.T_CUSTOMER06[0].ZA41 == "X")
                    {
                        radyj.InnerHtml = "<input name='' type='radio' value='邮件' class='radiocss checked2'>";
                    }
                    if (zloy.T_CUSTOMER06[0].ZA42 == "X")
                    {
                        radlp.InnerHtml = "<input name='' type='radio' value='礼品' class='radiocss checked2'>";
                    }
                    if (zloy.T_CUSTOMER06[0].ZA43 == "X")
                    {
                        radzy.InnerHtml = "<input name='' type='radio' value='直邮' class='radiocss checked2'>";
                    }
                    if (zloy.T_CUSTOMER06[0].ZA44 == "X")
                    {
                        radhd.InnerHtml = "<input name='' type='radio' value='活动' class='radiocss checked2'>";
                    }
                }
            }
            else
            {
                Response.Redirect("https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx32364024f2c86185&redirect_uri=http://wechat.censh.com/wechat/NewMember/Band.aspx&response_type=code&scope=snsapi_base&state=STATE&connect_redirect=1#wechat_redirect");
            }
        }