public void Bind(string FromUserName) { CUST_INFO cust = mss.GetCust(FromUserName); if (cust != null) { Z_LOY_BP_GETDETAILResponse zloy = SelectMember(cust.MOBILE); if (zloy.T_CENTRAL != null && zloy.T_CENTRAL.Length > 0) { string DesRet = Encrypt3DES(cust.MOBILE); string mobile = Server.UrlEncode(DesRet); string redirectUrlSM = Server.UrlEncode("http://www.censh.com/jifen/index/list/39"); string redirectUrlSH = Server.UrlEncode("http://www.censh.com/jifen/index/list/40"); string redirectUrlLY = Server.UrlEncode("http://www.censh.com/jifen/index/list/41"); string redirectUrlWX = Server.UrlEncode("http://www.censh.com/jifen/index/list/42"); string SM = "http://www.censh.com/crm/weiXin/index?mobile=" + mobile + "&redirectUrl=" + redirectUrlSM; string SH = "http://www.censh.com/crm/weiXin/index?mobile=" + mobile + "&redirectUrl=" + redirectUrlSH; string LY = "http://www.censh.com/crm/weiXin/index?mobile=" + mobile + "&redirectUrl=" + redirectUrlLY; string WX = "http://www.censh.com/crm/weiXin/index?mobile=" + mobile + "&redirectUrl=" + redirectUrlWX; string html = @"<span><a href='" + SM + "'>数码<br />产品</a></span><span><a href='" + SH + "'>生活<br />日用</a></span><span><a href='" + LY + "'>旅游<br />健身</a></span><span><a href='" + WX + "'>维修<br />服务</a></span>"; conjfsc.InnerHtml = html; name.InnerHtml = "姓名:" + zloy.T_CENTRALDATAPERSON[0].LASTNAME; jf.InnerHtml = "积分:" + string.Format("{0:N0}", zloy.E_POINT); endtime.InnerHtml = "有效期:" + zloy.E_ENDDAT; phone.InnerHtml = "手机:" + cust.MOBILE; cardno.InnerHtml = zloy.E_USER_NO; if (zloy.E_LEVEL == "Register") { imagecon.InnerHtml = "<img src='images/01.png'>"; } else if (zloy.E_LEVEL == "Common") { imagecon.InnerHtml = "<img src='images/02.png'>"; } else if (zloy.E_LEVEL == "Primary") { imagecon.InnerHtml = "<img src='images/03.png'>"; } else if (zloy.E_LEVEL == "Medium") { imagecon.InnerHtml = "<img src='images/04.png'>"; } else if (zloy.E_LEVEL == "Senior") { imagecon.InnerHtml = "<img src='images/05.png'>"; } else { imagecon.InnerHtml = "<img src='images/01.png'>"; } } } else { Response.Redirect("https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx32364024f2c86185&redirect_uri=http://wechat.censh.com/wechat/Member/Reg.aspx&response_type=code&scope=snsapi_base&state=STATE&connect_redirect=1#wechat_redirect"); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { if (Request.QueryString["s"] == null) { //Session["FromUserName"] = "******"; //Session["ToUserName"] = "******"; Base(); if ((Request.QueryString["FromUserName"] != null || Session["FromUserName"] != null) && (Request.QueryString["ToUserName"] != null || Session["ToUserName"] != null)) { string user = Request.QueryString["FromUserName"] == null ? Session["FromUserName"].ToString() : Request.QueryString["FromUserName"].ToString(); string user2 = Request.QueryString["ToUserName"] == null ? Session["ToUserName"].ToString() : Request.QueryString["ToUserName"].ToString(); Session["FromUserName"] = user; Session["ToUserName"] = user2; CUST_INFO c = mss.GetCust(user); if (c != null) { Response.Redirect("https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx32364024f2c86185&redirect_uri=http://wechat.censh.com/wechat/NewMember/ka.aspx&response_type=code&scope=snsapi_base&state=STATE&connect_redirect=1#wechat_redirect"); } } 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())); } } else if (Request.QueryString["s"] != null) { string html = "<option value='0'>请选择城市</option>"; List <City> list = mss.GetCityByReg(Request.QueryString["s"]); foreach (City c in list) { html += "<option value='" + c.CityCode + "'>" + c.CityName + "</option>"; } Response.Write(html); Response.End(); } } }
protected void Page_Load(object sender, EventArgs e) { //Session["FromUserName"] = "******"; if (!IsPostBack) { Base(); if ((Request.QueryString["FromUserName"] != null || Session["FromUserName"] != null) && (Request.QueryString["ToUserName"] != null || Session["ToUserName"] != null)) { string user = Request.QueryString["FromUserName"] == null ? Session["FromUserName"].ToString() : Request.QueryString["FromUserName"].ToString(); string user2 = Request.QueryString["ToUserName"] == null ? Session["ToUserName"].ToString() : Request.QueryString["ToUserName"].ToString(); Session["FromUserName"] = user; Session["ToUserName"] = user2; CUST_INFO c = mss.GetCust(user); if (c != null) { Response.Redirect("https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx32364024f2c86185&redirect_uri=http://wechat.censh.com/wechat/NewMember/ka.aspx&response_type=code&scope=snsapi_base&state=STATE&connect_redirect=1#wechat_redirect"); } } } }
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"); } }
public void Bind(string FromUserName) { CUST_INFO cust = mss.GetCust(FromUserName); if (cust != null) { Z_LOY_BP_GETDETAILResponse zloy = SelectMember(cust.MOBILE); if (zloy.T_CENTRAL != null && zloy.T_CENTRAL.Length > 0) { cardno.InnerHtml = "<em>" + zloy.E_USER_NO + "</em>"; name.InnerHtml = "<em>" + zloy.T_CENTRALDATAPERSON[0].LASTNAME + "</em>"; phone.InnerHtml = "<em>" + zloy.T_TELEFONDATA[0].TELEPHONE + "</em>"; if (zloy.T_CENTRAL[0].TITLE_KEY == "Z001") { sex.InnerHtml = "<span class='nandeicon'><em>先生</em></span>"; } else { sex.InnerHtml = "<span class='nvdeicon'><em>女士</em></span>"; } //jf.InnerHtml = string.Format("{0:N0}", zloy.E_POINT); //timeend.InnerHtml = string.Format(zloy.E_ENDDAT); //Z_LOY_BP_GETORDERResponse zws = SelectOrder("1000000011", "20151101", ""); //正式的 Z_LOY_BP_GETORDERResponse zws = SelectOrder(zloy.E_USER_NO, "", ""); string conval1 = ""; string conval2 = ""; string conval3 = ""; string conval4 = ""; for (int i = 0; i < zws.T_ZCRMD_ORDER.Count(); i++) { if (zws.T_ZCRMD_ORDER[i].ZAUART == "ZO03" || zws.T_ZCRMD_ORDER[i].ZAUART == "ZO07" || zws.T_ZCRMD_ORDER[i].ZAUART == "ZR05" || zws.T_ZCRMD_ORDER[i].ZAUART == "ZR07") { if (zws.T_ZCRMD_ORDER[i].ZZBRD.Length >= 8) { conval1 += "<li><span>" + (mss.GetNameByBrand(zws.T_ZCRMD_ORDER[i].ZZBRD.Substring(0, 8)) == "" ? "无" : mss.GetNameByBrand(zws.T_ZCRMD_ORDER[i].ZZBRD.Substring(0, 8))) + "</span></li>"; } else { conval1 += "<li><span>" + (zws.T_ZCRMD_ORDER[i].ZZBRD == "" ? "无" : zws.T_ZCRMD_ORDER[i].ZZBRD) + "</span></li>"; } conval1 += "<li><span>" + (zws.T_ZCRMD_ORDER[i].ZORZ == "" ? "无" : zws.T_ZCRMD_ORDER[i].ZORZ) + "</span></li>"; //conval1 += "<li style='width:12.5%'><span>" + (zws.T_ZCRMD_ORDER[i].ZORA == "" ? "无" : zws.T_ZCRMD_ORDER[i].ZORA) + "</span></li>"; if (zws.T_ZCRMD_ORDER[i].ZAUART == "ZR07" || zws.T_ZCRMD_ORDER[i].ZAUART == "ZR05") { //conval1 += "<li style='width:12.5%'><span>退货</span></li>"; conval1 += "<li style='width:12.5%'><span>" + "-" + (zws.T_ZCRMD_ORDER[i].ZORA == "" ? "无" : zws.T_ZCRMD_ORDER[i].ZORA) + "</span></li>"; } else { //conval1 += "<li style='width:12.5%'><span>完成</span></li>"; conval1 += "<li style='width:12.5%'><span>" + (zws.T_ZCRMD_ORDER[i].ZORA == "" ? "无" : zws.T_ZCRMD_ORDER[i].ZORA) + "</span></li>"; } conval1 += "<li style='width:12.5%'><span>" + (zws.T_ZCRMD_ORDER[i].ZLSK == "" ? "无" : zws.T_ZCRMD_ORDER[i].ZLSK) + "</span></li>"; string sj = ""; if (zws.T_ZCRMD_ORDER[i].ZORE.Length == 8) { sj += zws.T_ZCRMD_ORDER[i].ZORE.ToString().Substring(0, 4); sj += "."; sj += zws.T_ZCRMD_ORDER[i].ZORE.ToString().Substring(4, 2); sj += "."; sj += zws.T_ZCRMD_ORDER[i].ZORE.ToString().Substring(6, 2); } conval1 += "<li><span>" + (sj == "" ? "无" : sj) + "</span></li>"; } else if (zws.T_ZCRMD_ORDER[i].ZAUART == "ZO08" || zws.T_ZCRMD_ORDER[i].ZAUART == "ZR08") { if (zws.T_ZCRMD_ORDER[i].ZZBRD.Length >= 8) { conval2 += "<li><span>" + (mss.GetNameByBrand(zws.T_ZCRMD_ORDER[i].ZZBRD.Substring(0, 8)) == "" ? "无" : mss.GetNameByBrand(zws.T_ZCRMD_ORDER[i].ZZBRD.Substring(0, 8))) + "</span></li>"; } else { conval2 += "<li><span>" + (zws.T_ZCRMD_ORDER[i].ZZBRD == "" ? "无" : zws.T_ZCRMD_ORDER[i].ZZBRD) + "</span></li>"; } conval2 += "<li><span>" + (zws.T_ZCRMD_ORDER[i].ZORZ == "" ? "无" : zws.T_ZCRMD_ORDER[i].ZORZ) + "</span></li>"; //conval2 += "<li><span>" + (zws.T_ZCRMD_ORDER[i].ZORA == "" ? "无" : zws.T_ZCRMD_ORDER[i].ZORA) + "</span></li>"; //conval2 += "<li style='width:12.5%'><span>" + (zws.T_ZCRMD_ORDER[i].ZORA == "" ? "无" : zws.T_ZCRMD_ORDER[i].ZORA) + "</span></li>"; if (zws.T_ZCRMD_ORDER[i].ZAUART == "ZR08") { //conval2 += "<li style='width:12.5%'><span>退货</span></li>"; conval2 += "<li style='width:12.5%'><span>" + "-" + (zws.T_ZCRMD_ORDER[i].ZORA == "" ? "无" : zws.T_ZCRMD_ORDER[i].ZORA) + "</span></li>"; } else { conval2 += "<li style='width:12.5%'><span>" + (zws.T_ZCRMD_ORDER[i].ZORA == "" ? "无" : zws.T_ZCRMD_ORDER[i].ZORA) + "</span></li>"; //conval2 += "<li style='width:12.5%'><span>完成</span></li>"; } conval2 += "<li style='width:12.5%'><span>" + (zws.T_ZCRMD_ORDER[i].ZLSK == "" ? "无" : zws.T_ZCRMD_ORDER[i].ZLSK) + "</span></li>"; string sj = ""; if (zws.T_ZCRMD_ORDER[i].ZORE.Length == 8) { sj += zws.T_ZCRMD_ORDER[i].ZORE.ToString().Substring(0, 4); sj += "."; sj += zws.T_ZCRMD_ORDER[i].ZORE.ToString().Substring(4, 2); sj += "."; sj += zws.T_ZCRMD_ORDER[i].ZORE.ToString().Substring(6, 2); } conval2 += "<li><span>" + (sj == "" ? "无" : sj) + "</span></li>"; } else if (zws.T_ZCRMD_ORDER[i].ZAUART == "ZZ02") { if (zws.T_ZCRMD_ORDER[i].ZZBRD.Length >= 8) { conval3 += "<li><span>" + (mss.GetNameByBrand(zws.T_ZCRMD_ORDER[i].ZZBRD.Substring(0, 8)) == "" ? "无" : mss.GetNameByBrand(zws.T_ZCRMD_ORDER[i].ZZBRD.Substring(0, 8))) + "</span></li>"; } else { conval3 += "<li><span>" + (zws.T_ZCRMD_ORDER[i].ZZBRD == "" ? "无" : zws.T_ZCRMD_ORDER[i].ZZBRD) + "</span></li>"; } string zorr = ""; if (zws.T_ZCRMD_ORDER[i].ZORR == "Z012") { zorr = "预约成功"; } else if (zws.T_ZCRMD_ORDER[i].ZORR == "Z013") { zorr = "预约取消"; } conval3 += "<li><span>" + (zorr == "" ? "无" : zorr) + "</span></li>"; conval3 += "<li><span>" + (zws.T_ZCRMD_ORDER[i].ZORA == "" ? "无" : zws.T_ZCRMD_ORDER[i].ZORA) + "</span></li>"; string sj = ""; if (zws.T_ZCRMD_ORDER[i].ZORE.Length == 8) { sj += zws.T_ZCRMD_ORDER[i].ZORE.ToString().Substring(0, 4); sj += "."; sj += zws.T_ZCRMD_ORDER[i].ZORE.ToString().Substring(4, 2); sj += "."; sj += zws.T_ZCRMD_ORDER[i].ZORE.ToString().Substring(6, 2); } conval3 += "<li><span>" + (sj == "" ? "无" : sj) + "</span></li>"; } else if (zws.T_ZCRMD_ORDER[i].ZAUART == "ZZ01") { if (zws.T_ZCRMD_ORDER[i].ZZBRD.Length >= 8) { conval4 += "<li><span>" + (mss.GetNameByBrand(zws.T_ZCRMD_ORDER[i].ZZBRD.Substring(0, 8)) == "" ? "无" : mss.GetNameByBrand(zws.T_ZCRMD_ORDER[i].ZZBRD.Substring(0, 8))) + "</span></li>"; } else { conval4 += "<li><span>" + (zws.T_ZCRMD_ORDER[i].ZZBRD == "" ? "无" : zws.T_ZCRMD_ORDER[i].ZZBRD) + "</span></li>"; } string zorr = ""; if (zws.T_ZCRMD_ORDER[i].ZORR == "Z009") { zorr = "待处理"; } else if (zws.T_ZCRMD_ORDER[i].ZORR == "Z010") { zorr = "维修中"; } else if (zws.T_ZCRMD_ORDER[i].ZORR == "Z011") { zorr = "维修完成"; } conval4 += "<li><span>" + (zorr == "" ? "无" : zorr) + "</span></li>"; conval4 += "<li><span>" + (zws.T_ZCRMD_ORDER[i].ZORA == "" ? "无" : zws.T_ZCRMD_ORDER[i].ZORA) + "</span></li>"; string sj = ""; if (zws.T_ZCRMD_ORDER[i].ZORE.Length == 8) { sj += zws.T_ZCRMD_ORDER[i].ZORE.ToString().Substring(0, 4); sj += "."; sj += zws.T_ZCRMD_ORDER[i].ZORE.ToString().Substring(4, 2); sj += "."; sj += zws.T_ZCRMD_ORDER[i].ZORE.ToString().Substring(6, 2); } conval4 += "<li><span>" + (sj == "" ? "无" : sj) + "</span></li>"; } } con1.InnerHtml = conval1; con2.InnerHtml = conval2; con3.InnerHtml = conval3; con4.InnerHtml = conval4; } } else { Response.Redirect("https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx32364024f2c86185&redirect_uri=http://wechat.censh.com/wechat/Member/Band.aspx&response_type=code&scope=snsapi_base&state=STATE&connect_redirect=1#wechat_redirect"); } }
public void Bind(string FromUserName) { CUST_INFO cust = mss.GetCust(FromUserName); if (cust != null) { Z_LOY_BP_GETDETAILResponse zloy = SelectMember(cust.MOBILE); if (zloy.T_CENTRAL != null && zloy.T_CENTRAL.Length > 0) { cardno.InnerHtml = "<em>" + zloy.E_USER_NO + "</em>"; name.InnerHtml = "<em>" + zloy.T_CENTRALDATAPERSON[0].LASTNAME + "</em>"; phone.InnerHtml = "<em>" + zloy.T_TELEFONDATA[0].TELEPHONE + "</em>"; if (zloy.T_CENTRAL[0].TITLE_KEY == "Z001") { sex.InnerHtml = "<span class='nandeicon'><em>先生</em></span>"; } else { sex.InnerHtml = "<span class='nvdeicon'><em>女士</em></span>"; } jf.InnerHtml = string.Format("{0:N0}", zloy.E_POINT); //有效期暂且不知道哪个字段 //Z_LOY_BP_GETORDERResponse zws = SelectOrder("1000000011", "20150101", "20150301"); //正式的 Z_LOY_BP_GETORDERResponse zws = SelectOrder(zloy.E_USER_NO, "", ""); string conval = ""; for (int i = 0; i < zws.T_ZCRMD_ORDER.Count(); i++) { if (zws.T_ZCRMD_ORDER[i].ZZBRD.Length >= 8) { conval += "<li><span>" + (mss.GetNameByBrand(zws.T_ZCRMD_ORDER[i].ZZBRD.Substring(0, 8)) == "" ? "无" : mss.GetNameByBrand(zws.T_ZCRMD_ORDER[i].ZZBRD.Substring(0, 8))) + "</span></li>"; } else { conval += "<li><span>" + (zws.T_ZCRMD_ORDER[i].ZZBRD == "" ? "无" : zws.T_ZCRMD_ORDER[i].ZZBRD) + "</span></li>"; } conval += "<li><span>" + (zws.T_ZCRMD_ORDER[i].ZORZ == "" ? "无" : zws.T_ZCRMD_ORDER[i].ZORZ) + "</span></li>"; conval += "<li><span>" + (zws.T_ZCRMD_ORDER[i].ZORE == "" ? "无" : zws.T_ZCRMD_ORDER[i].ZORE) + "</span></li>"; string sj = ""; if (zws.T_ZCRMD_ORDER[i].ZORE.Length == 8) { sj += zws.T_ZCRMD_ORDER[i].ZORE.ToString().Substring(0, 4); sj += "."; sj += zws.T_ZCRMD_ORDER[i].ZORE.ToString().Substring(4, 2); sj += "."; sj += zws.T_ZCRMD_ORDER[i].ZORE.ToString().Substring(6, 2); } conval += "<li><span>" + (sj == "" ? "无" : sj) + "</span></li>"; } con.InnerHtml = conval; } } else { Response.Redirect("https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx32364024f2c86185&redirect_uri=http://wechat.censh.com/wechat/Member/Band.aspx&response_type=code&scope=snsapi_base&state=STATE&connect_redirect=1#wechat_redirect"); } }