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) { //Session["FromUserName"] = "******"; //Session["ToUserName"] = "******"; 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 && !string.IsNullOrEmpty(c.CardNo)) { 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"); } } else { Response.Redirect(AuthCode(Request.Url.AbsoluteUri)); } //来源url string fromUrl = Request.QueryString["from_url"] ?? ""; if (!string.IsNullOrEmpty(fromUrl)) { this.FromUrl = HttpUtility.UrlDecode(fromUrl); } } }
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 && !string.IsNullOrEmpty(c.CardNo)) { 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"); } } else { Response.Redirect(AuthCode(Request.Url.AbsoluteUri)); } 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(); } //来源url string fromUrl = Request.QueryString["from_url"] ?? ""; if (!string.IsNullOrEmpty(fromUrl)) { this.FromUrl = HttpUtility.UrlDecode(fromUrl); } } }
/// <summary> /// 修改会员绑定 /// </summary> /// <param name="cust"></param> /// <returns></returns> public int UpdateCust(CUST_INFO cust) { if (cust.ID == 0) { return((int)Insert(cust)); } else { return(Update(cust)); } }
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) { CUST_INFO cust = mss.GetCust(FromUserName); if (cust != null && !string.IsNullOrEmpty(cust.CardNo)) { Z_LOY_BP_GETDETAILResponse zloy = SelectMember(cust.MOBILE); if (zloy.T_CENTRAL != null && zloy.T_CENTRAL.Length > 0) { string DesRet = CenshEncryption.Encrypt3DES(cust.MOBILE); string mobile = Server.UrlEncode(DesRet); string redirectUrlWX = Server.UrlEncode("http://www.censh.com/jifen/"); string WX = "http://www.censh.com/crm/weiXin/index?mobile=" + mobile + "&redirectUrl=" + redirectUrlWX; Response.Redirect(WX); } } else { Response.Redirect("https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx32364024f2c86185&redirect_uri=http://wechat.censh.com/wechat/NewMember/Reg.aspx&response_type=code&scope=snsapi_base&state=STATE&connect_redirect=1#wechat_redirect"); } }
/// <summary> /// 更新会员(用于demo操作) /// </summary> /// <param name="openid"></param> /// <returns></returns> public int UpdateCustInfoS(CUST_INFO entity) { return(_set.UpdateCustInfoS(entity)); }
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"); } }
/// <summary> /// 修改会员绑定 /// </summary> /// <param name="cust"></param> /// <returns></returns> public int UpdateCust(CUST_INFO cust) { return(_op.UpdateCust(cust)); }
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"); } }
public void ProcessRequest(HttpContext context) { if (GetQeuryString("para", context) == "jsapi") //获取js接口凭证 { try { ORG_INFO m = mss.GetWD(context.Session["ToUserName"].ToString()); if (m != null) { } } catch (Exception ex) { context.Response.Write(ex.Message + "," + ex.StackTrace); } } else if (GetQeuryString("para", context) == "SaveLocation") //保存地理位置 { try { ORG_INFO m = mss.GetWD(context.Session["ToUserName"].ToString()); if (m != null) { WD_Location l = new WD_Location(); l.accuracy = context.Request.Params["accuracy"]; l.Createdate = DateTime.Now; l.FromUserName = context.Session["FromUserName"].ToString(); l.latitude = context.Request.Params["latitude"]; l.longitude = context.Request.Params["longitude"]; l.speed = context.Request.Params["speed"]; l.ToUserName = context.Session["ToUserName"].ToString(); new WeiPage().GetBaiDuMap(ref l); mss.SaveLocation(l); context.Response.Write("0"); } } catch (Exception ex) { context.Response.Write(ex.Message + "," + ex.StackTrace); } } else if (GetQeuryString("para", context) == "GetScratch") //获取刮刮乐数据 { try { if ((context.Request.QueryString["FromUserName"] != null || context.Session["FromUserName"] != null) && (context.Request.QueryString["ToUserName"] != null || context.Session["ToUserName"] != null)) { string user = context.Request.QueryString["FromUserName"] == null ? context.Session["FromUserName"].ToString() : context.Request.QueryString["FromUserName"].ToString(); string user2 = context.Request.QueryString["ToUserName"] == null ? context.Session["ToUserName"].ToString() : context.Request.QueryString["ToUserName"].ToString(); CUST_INFO cust = op.GetCustinfoByFromusername(user); if (cust == null) { string url = "../../Member/Index.aspx?tousername=gh_60153a15d878&fromusername="******"{\"message\":\"你尚未绑定,请先绑定\",\"url\":\"" + url + "\",\"status\":\"" + 0 + "\"}"); } else if (cust.LAST_MODI_DATE != null && (cust.LAST_MODI_DATE < DateTime.Parse("2015-05-5") || cust.LAST_MODI_DATE > DateTime.Parse("2015-06-16"))) { //5月15至7月15 context.Response.Write("{\"message\":\"仅5.13-6.15期间绑定的会员方可参与此活动。\",\"url\":\"\",\"status\":\"" + 1 + "\"}"); } else { Scratch scr = mss.GetScratch(user); if (scr != null) { context.Response.Write("{\"message\":\"每人仅可参加一次此活动,感谢您的参与。\",\"url\":\"\",\"status\":\"" + 1 + "\"}"); } else { Random r = new Random(); int num = r.Next(0, 50); switch (num) { case 0: List <Scratch> slist = mss.GetScratchList("1", DateTime.Now.AddDays(-3)); //每三天只中一个 if (slist.Count > 0) { mss.SaveScratch(new Scratch { CreateDate = DateTime.Now, FromUserName = user, JP = "0", Code = -1 }); context.Response.Write("{\"message\":\"未中奖\",\"status\":\"" + -1 + "\"}"); } else { try { Hmj.WebApp.TicketService.VoucherWebServiceSoapClient d = new Hmj.WebApp.TicketService.VoucherWebServiceSoapClient(); string a = d.SendSignVoucherByFromUserName(user, 3924); server ser = JsonConvert.DeserializeObject <server>(a); //if (ser.Code == 0) //{ mss.SaveScratch(new Scratch { CreateDate = DateTime.Now, FromUserName = user, JP = "1", Code = ser.Code }); context.Response.Write("{\"message\":\"价值680元的护理免券1张\",\"status\":\"" + 3 + "\"}"); //} } catch (Exception) { mss.SaveScratch(new Scratch { CreateDate = DateTime.Now, FromUserName = user, JP = "0", Code = -1 }); context.Response.Write("{\"message\":\"未中奖\",\"status\":\"" + -1 + "\"}"); } } break; default: mss.SaveScratch(new Scratch { CreateDate = DateTime.Now, FromUserName = user, JP = "0", Code = -1 }); context.Response.Write("{\"message\":\"未中奖\",\"status\":\"" + -1 + "\"}"); break; } } } } } catch (Exception ex) { context.Response.Write(ex.Message + "," + ex.StackTrace); } } }
public int SaveCustInfo(CUST_INFO c) { return((int)_set.Insert(c)); }
protected void Page_Load(object sender, EventArgs e) { 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) { //获取优惠券列表 Z_CRM_LOY_WELFAREResponse DiscountList = SelectDiscount(c.CardNo, ""); var query1 = DiscountList.ET_LOY_WELFARE.Where(n => n.ZCPSTATE == "J01"); var query2 = DiscountList.ET_LOY_WELFARE.Where(n => n.ZCPSTATE == "J03"); var query3 = DiscountList.ET_LOY_WELFARE.Where(n => { return(n.ZCPSTATE == "J02" || n.ZCPSTATE == "J04"); }); string[] str1 = new string[5] { "J01", "J02", "J03", "J03", "J03" }; var query4 = str1.Where(n => { return(n == "J02" || n == "J01"); }); var query5 = str1.Where(n => { return(n == "J03" || n == "J01"); }); var query6 = str1.Where(n => { return(n == "J03" || n == "J02"); }); foreach (var item in query1) { quan1.InnerHtml += "<li>"; quan1.InnerHtml += "<a href=\"DiscountDetail.aspx?did=" + item.ZCPIDO + "\"><div class=\"quanbg\">"; //quan1.InnerHtml += "<div class=\"quanbg\">"; quan1.InnerHtml += "<div class=\"quanLeft\">"; quan1.InnerHtml += "<h2>" + item.ZCPTYPET + "<span>券号:" + item.ZCPIDO + "</span></h2>"; quan1.InnerHtml += "<p><strong>适用范围:</strong>" + item.ZCPMS + "<br/>"; quan1.InnerHtml += "<strong>适用门店:</strong>" + GetStoreName(item.ZCPSTORE) + "</p>"; quan1.InnerHtml += "<em></em>"; quan1.InnerHtml += "</div>"; quan1.InnerHtml += "<div class=\"quanRight\">"; quan1.InnerHtml += " <h2><em>¥</em>" + item.ZCPVALUE.ToString("0") + "</h2>"; quan1.InnerHtml += " <p class=\"padd\"></p>"; quan1.InnerHtml += " <p>有效期至<br/>" + item.ZCPEND + "</p>"; quan1.InnerHtml += "</div>"; quan1.InnerHtml += "</div></a>"; quan1.InnerHtml += "</li>"; } foreach (var item in query2) { quan2.InnerHtml += "<li>"; quan2.InnerHtml += "<div class=\"quanBluebg\">"; quan2.InnerHtml += "<div class=\"quanLeft\">"; quan2.InnerHtml += "<h2>" + item.ZCPTYPET + "<span >券号:" + item.ZCPIDO + "</span></h2>"; quan2.InnerHtml += "<p><strong>适用范围:</strong>" + item.ZCPMS + "<br/>"; quan2.InnerHtml += "<strong>适用门店:</strong>" + GetStoreName(item.ZCPSTORE) + "</p>"; quan2.InnerHtml += "<em></em>"; quan2.InnerHtml += " </div>"; quan2.InnerHtml += " <div class=\"quanRight\">"; quan2.InnerHtml += " <h2><em>¥</em>" + item.ZCPVALUE.ToString("0") + "</h2>"; quan2.InnerHtml += " <p class=\"padd\"></p>"; quan2.InnerHtml += " <p>有效期至<br/>" + item.ZCPEND + "</p>"; quan2.InnerHtml += " </div>"; quan2.InnerHtml += " </div>"; quan2.InnerHtml += " </li>"; } foreach (var item in query3) { quan3.InnerHtml += "<li class=\"guoqi\">"; quan3.InnerHtml += "<div class=\"quanbg\">"; quan3.InnerHtml += "<div class=\"quanLeft\">"; quan3.InnerHtml += "<h2>" + item.ZCPTYPET + "<span >券号:" + item.ZCPIDO + "</span></h2>"; quan3.InnerHtml += "<p><strong>适用范围:</strong>" + item.ZCPMS + "<br/>"; quan3.InnerHtml += "<strong>适用门店:</strong>" + GetStoreName(item.ZCPSTORE) + "</p>"; quan3.InnerHtml += " <em></em>"; quan3.InnerHtml += "</div>"; quan3.InnerHtml += " <div class=\"quanRight\">"; quan3.InnerHtml += " <h2><em>¥</em>" + item.ZCPVALUE.ToString("0") + "</h2>"; quan3.InnerHtml += " <p class=\"padd\"></p>"; quan3.InnerHtml += " <p>有效期至<br/>" + item.ZCPEND + "</p>"; quan3.InnerHtml += " </div>"; quan3.InnerHtml += "</div>"; quan3.InnerHtml += " <div class=\"guoqiicon\"></div>"; quan3.InnerHtml += "</li>"; } if (query1.ToList <ZST_LOY_WELFARE>().Count == 0) { quan1.InnerHtml += "<li>"; quan1.InnerHtml += "<div class=\"nodata\">"; quan1.InnerHtml += "<p>暂无记录</p>"; quan1.InnerHtml += "</ div > "; quan1.InnerHtml += "</li>"; } if (query2.ToList <ZST_LOY_WELFARE>().Count == 0) { quan2.InnerHtml += "<li>"; quan2.InnerHtml += "<div class=\"nodata\">"; quan2.InnerHtml += "<p>暂无记录</p>"; quan2.InnerHtml += "</ div > "; quan2.InnerHtml += "</li>"; } if (query3.ToList <ZST_LOY_WELFARE>().Count == 0) { quan3.InnerHtml += "<li>"; quan3.InnerHtml += "<div class=\"nodata\">"; quan3.InnerHtml += "<p>暂无记录</p>"; quan3.InnerHtml += "</ div > "; quan3.InnerHtml += "</li>"; } } } else { Response.Redirect(AuthCode(Request.Url.AbsoluteUri)); } } }
public int UpdateCustInfoS(CUST_INFO entity) { string sql = "update CUST_INFO set CustLevel='" + entity.CustLevel + "',CustCity='" + entity.CustCity + "' where ID=" + entity.ID; return(base.Excute(sql, null)); }
public void Bind(string FromUserName) { CUST_INFO cust = mss.GetCust(FromUserName); if (cust != null && !string.IsNullOrEmpty(cust.CardNo)) { 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/69"); 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 = @"<h2>积分商城</h2><ol><a href='" + WX + "' onclick='zhugeclick('wx_C-菜单-我的盛时-会员卡-品牌礼品-点击')'><span class='icon13'></span></a><p>品牌礼品</p></ol>" + "<ol><a href='" + SM + "' onclick='zhugeclick('wx_C-菜单-我的盛时-会员卡-数码产品-点击')'><span class='icon01'></span></a><p>数码产品</p></ol>" + "<ol><a href='" + SH + "' onclick='zhugeclick('wx_C-菜单-我的盛时-会员卡-生活日用-点击')'><span class='icon02'></span></a><p>生活日用</p></ol>" + "<ol><a href='" + LY + "' onclick='zhugeclick('wx_C-菜单-我的盛时-会员卡-旅游健身-点击')'><span class='icon03'></span></a><p>旅游健身</p></ol>"; conjfsc.InnerHtml = html; string level = ""; if (zloy.E_LEVEL == "Register") { imagecon.InnerHtml = "<img src='images/01.png'>"; level = "盛时会员"; } else if (zloy.E_LEVEL == "Common") { imagecon.InnerHtml = "<img src='images/02.png'>"; level = "银卡会员"; } else if (zloy.E_LEVEL == "Primary") { imagecon.InnerHtml = "<img src='images/03.png'>"; level = "金卡会员"; } else if (zloy.E_LEVEL == "Medium") { imagecon.InnerHtml = "<img src='images/04.png'>"; level = "白金会员"; } else if (zloy.E_LEVEL == "Senior") { imagecon.InnerHtml = "<img src='images/05.png'>"; level = "钻石会员"; } else { imagecon.InnerHtml = "<img src='images/01.png'>"; level = "盛时会员"; } name.InnerHtml = zloy.T_CENTRALDATAPERSON[0].LASTNAME + "<em>〖" + level + "〗</em>"; jf.InnerHtml = string.Format("{0:N0}", zloy.E_POINT); if (zloy.E_ENDDAT == "9999-12-31") { endtime.InnerHtml = "有效期:长期有效"; } else { endtime.InnerHtml = "有效期:" + zloy.E_ENDDAT; } phone.InnerHtml = "手机号:" + cust.MOBILE; cardno.InnerHtml = "NO." + zloy.E_USER_NO; string image = ""; if (mss.GetNickImg(FromUserName) == "" || mss.GetNickImg(FromUserName) == null) { image = "images/renwu.jpg"; } else { image = mss.GetNickImg(FromUserName); } nickname.Src = image; } } else { Response.Redirect("https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx32364024f2c86185&redirect_uri=http://wechat.censh.com/wechat/NewMember/Reg.aspx&response_type=code&scope=snsapi_base&state=STATE&connect_redirect=1#wechat_redirect"); } }