protected void Page_Load(object sender, EventArgs e) { if (!base.IsPostBack) { if (base.Request.QueryString["Type"] == "team") { try { string[] SarryLin = base.Request.QueryString["Id"].Split(new char[] { '|' }); string[] SarryZhu = base.Request.QueryString["PId"].Split(new char[] { '|' }); StringBuilder st = new StringBuilder(); for (int i = 0; i < (SarryLin.Length - 1); i++) { st.Append("insert into TemporaryCard (P_Id,Addtime,C_Id) values ('" + SarryZhu[i] + "','" + DateTime.Now.ToString() + "','" + SarryLin[i] + "')"); } PublicMethod.Execute(st.ToString()); base.Response.Write("true"); } catch { base.Response.Write("false"); } } else if (base.Request.QueryString["Type"] == "users") { try { PublicMethod.Execute("insert into TemporaryCard (Addtime,C_Id) values ('" + DateTime.Now.ToString() + "','" + base.Request.QueryString["Id"] + "')"); base.Response.Write("true"); } catch { base.Response.Write("false"); } } } }
protected void Page_Load(object sender, EventArgs e) { if (base.Request.QueryString["Type"] == "getuser") { try { DataTable dtMbr = PublicMethod.QueryDataset("select mNum,mLevel,mName,mBalance,convert(varchar(100), mPastdate,23) as 'mPastdate',mType,mPwd,mIntegral from membersinfo where mNum='" + base.Request.QueryString["Id"] + "'").Tables[0]; if (dtMbr.Rows.Count > 0) { if (int.Parse(DateTime.Parse(dtMbr.Rows[0]["mPastdate"].ToString()).ToString("yyyyMMdd")) < int.Parse(DateTime.Now.ToString("yyyyMMdd"))) { base.Response.Write("OutDate"); } else { string sql = ""; DataTable dtLevel = PublicMethod.QueryDataset("select lName,lDiscount,ljifen from memberlevel where lNum='" + dtMbr.Rows[0]["mLevel"].ToString() + "'").Tables[0]; if (dtLevel.Rows.Count > 0) { sql = dtMbr.Rows[0]["mNum"].ToString() + "@" + dtLevel.Rows[0]["lName"].ToString() + "@" + dtMbr.Rows[0]["mName"].ToString() + "@" + dtMbr.Rows[0]["mBalance"].ToString() + "@" + dtMbr.Rows[0]["mPastdate"].ToString() + "@" + dtLevel.Rows[0]["lDiscount"].ToString() + "@" + dtLevel.Rows[0]["ljifen"].ToString(); } base.Response.Write(sql); } } else { base.Response.Write("false"); } } catch { base.Response.Write("false"); } } else if (base.Request.QueryString["Type"] == "postdate") { try { DataTable dtPwd = PublicMethod.QueryDataset("select mNum from membersinfo where mNum='" + base.Request.QueryString["Id"] + "' and mPwd='" + DESEncrypt.Encrypt(base.Request.QueryString["pwd"]) + "'").Tables[0]; if (dtPwd.Rows.Count > 0) { string C_Id = base.Request.QueryString["XFId"]; string str = "insert into Consumption_Back (C_Id,Card_Id,Type,Addtime,Users,Remark,Shop,ShopId,Money,PayType,Consum_Type,ClientName) values ("; object name9 = str; name9 = string.Concat(new object[] { name9, "'", C_Id, "','", base.Request.QueryString["Id"], "','终端消费','", DateTime.Now.ToString(), "','", HttpContext.Current.Session["Webnames"], "','终端支付'" }); name9 = string.Concat(new object[] { name9, ",'", HttpContext.Current.Session["Webshopname"], "','", HttpContext.Current.Session["Webshopnum"], "','", base.Request.QueryString["money"], "','余额支付','','", base.Request.QueryString["txtname"], "')" }) + "insert into Consumption_Back_select (C_Id,Card_Id,Type,Addtime,Users,Remark,Shop,ShopId,Money,PayType,Consum_Type,ClientName) values ("; name9 = string.Concat(new object[] { name9, "'", C_Id, "','", base.Request.QueryString["Id"], "','终端消费','", DateTime.Now.ToString(), "','", HttpContext.Current.Session["Webnames"], "','终端支付'" }); string name5 = string.Concat(new object[] { name9, ",'", HttpContext.Current.Session["Webshopname"], "','", HttpContext.Current.Session["Webshopnum"], "','", base.Request.QueryString["money"], "','余额支付','','", base.Request.QueryString["txtname"], "')" }); PublicMethod.Execute(name5 + " update membersinfo set mBalance=mBalance-" + base.Request.QueryString["money"] + ",mIntegral=mIntegral+" + base.Request.QueryString["AllJifen"] + " where mNum='" + base.Request.QueryString["Id"] + "'"); base.Response.Write("true"); } else { base.Response.Write("pwd"); } } catch { base.Response.Write("false"); } } else if (base.Request.QueryString["Type"] == "getId") { base.Response.Write("XF" + base.Request.QueryString["Id"] + DateTime.Now.ToString("yyyyMMddHHmmssffff")); } else if (base.Request.QueryString["Type"] == "checkId") { DataTable dt = PublicMethod.QueryDataset("select Id from Consumption_Back where C_Id ='" + base.Request.QueryString["Id"] + "'").Tables[0]; if (dt.Rows.Count > 0) { base.Response.Write("true"); } else { base.Response.Write("false"); } } }
protected void Page_Load(object sender, EventArgs e) { DataTable dt; string name11; if (base.Request.QueryString["Type"] == "load") { try { dt = PublicMethod.QueryDataset("select Id from TemporaryCard where C_Id='" + base.Request.QueryString["Id"] + "'").Tables[0]; if (dt.Rows.Count > 0) { base.Response.Write("临时卡@"); } else { string strsp; DataTable dtLevel; DataTable dtMbr = PublicMethod.QueryDataset("select mNum,mLevel,mName,mBalance,convert(varchar(100), mPastdate,23) as 'mPastdate',mType,mPwd,mIntegral,mStates from membersinfo where mNum='" + base.Request.QueryString["Id"] + "'").Tables[0]; if (dtMbr.Rows.Count > 0) { if (dtMbr.Rows[0]["mStates"].ToString() == "0") { if ((dtMbr.Rows[0]["mPastdate"].ToString() == "永久有效") || (DateTime.Parse(dtMbr.Rows[0]["mPastdate"].ToString()) > DateTime.Now)) { strsp = dtMbr.Rows[0]["mType"].ToString() + "@" + dtMbr.Rows[0]["mLevel"].ToString() + "@" + dtMbr.Rows[0]["mName"].ToString() + "@" + dtMbr.Rows[0]["mBalance"].ToString() + "@" + dtMbr.Rows[0]["mPastdate"].ToString() + "@" + dtMbr.Rows[0]["mNum"].ToString() + "@" + DESEncrypt.Decrypt(dtMbr.Rows[0]["mPwd"].ToString()) + "@" + dtMbr.Rows[0]["mIntegral"].ToString(); dtLevel = PublicMethod.QueryDataset("select lName,lDiscount,ljifen from memberlevel where lNum='" + dtMbr.Rows[0]["mLevel"].ToString() + "'").Tables[0]; if (dtLevel.Rows.Count > 0) { name11 = strsp; strsp = name11 + "@" + dtLevel.Rows[0]["lName"].ToString() + "@" + dtLevel.Rows[0]["lDiscount"].ToString() + "@" + dtLevel.Rows[0]["ljifen"].ToString(); } base.Response.Write(strsp); } else { base.Response.Write("过期@"); } } else { base.Response.Write("挂失@"); } } else { DataTable dtMbrs = PublicMethod.QueryDataset("select mNum,mLevel,mName,mBalance,convert(varchar(100), mPastdate,23) as 'mPastdate',mType,mPwd,mIntegral,mStates,mMobile from membersinfo where mMobile='" + base.Request.QueryString["Id"] + "'").Tables[0]; if (dtMbrs.Rows.Count > 0) { if (dtMbrs.Rows[0]["mStates"].ToString() == "0") { if ((dtMbrs.Rows[0]["mPastdate"].ToString() == "永久有效") || (DateTime.Parse(dtMbrs.Rows[0]["mPastdate"].ToString()) > DateTime.Now)) { strsp = dtMbrs.Rows[0]["mType"].ToString() + "@" + dtMbrs.Rows[0]["mLevel"].ToString() + "@" + dtMbrs.Rows[0]["mName"].ToString() + "@" + dtMbrs.Rows[0]["mBalance"].ToString() + "@" + dtMbrs.Rows[0]["mPastdate"].ToString() + "@" + dtMbrs.Rows[0]["mNum"].ToString() + "@" + DESEncrypt.Decrypt(dtMbrs.Rows[0]["mPwd"].ToString()) + "@" + dtMbrs.Rows[0]["mIntegral"].ToString(); dtLevel = PublicMethod.QueryDataset("select lName,lDiscount,ljifen from memberlevel where lNum='" + dtMbrs.Rows[0]["mLevel"].ToString() + "'").Tables[0]; if (dtLevel.Rows.Count > 0) { name11 = strsp; strsp = name11 + "@" + dtLevel.Rows[0]["lName"].ToString() + "@" + dtLevel.Rows[0]["lDiscount"].ToString() + "@" + dtLevel.Rows[0]["ljifen"].ToString(); } base.Response.Write(strsp); } else { base.Response.Write("过期@"); } } else { base.Response.Write("挂失@"); } } else { base.Response.Write("不存在@"); } } } } catch { } } else if (base.Request.QueryString["Type"] == "sub") { DataTable dtPwd; string sqlf; double jifen; string C_Id; string str; string sqlsms; DataTable dtsms; StringBuilder balance; int result; string _Response; string mybalance; string sms; object name12; if ((base.Request.QueryString["CardType"] != "临时卡") && (base.Request.QueryString["PayType"] == "储值支付")) { dtPwd = PublicMethod.QueryDataset("select mNum from membersinfo where mNum='" + base.Request.QueryString["Id"] + "' and mPwd='" + DESEncrypt.Encrypt(base.Request.QueryString["pwd"]) + "'").Tables[0]; if (dtPwd.Rows.Count > 0) { sqlf = "select * from membersinfo where mNum ='" + base.Request.QueryString["Id"].ToString() + "'"; dt = this.bc.ReadTable(sqlf); if (dt.Rows.Count > 0) { jifen = double.Parse(base.Request.QueryString["JiFen"]) + double.Parse(dt.Rows[0]["mIntegral"].ToString()); C_Id = "XF" + DateTime.Now.ToString("yyyyMMddHHmmssffff"); str = " insert into Consumption_Back_select (C_Id,Card_Id,Type,Addtime,Users,Remark,Shop,ShopId,Money,PayType,Consum_Type,ClientName,CardType,BlancePay,CashPay,BankPay,JifenPay,ElsePay,hjifen) values ("; name12 = str; name12 = string.Concat(new object[] { name12, "'", C_Id, "','", base.Request.QueryString["Id"], "','快速消费','", DateTime.Now.ToString(), "','", HttpContext.Current.Session["names"], "','", base.Request.QueryString["Remark"], "'" }); name11 = string.Concat(new object[] { name12, ",'", HttpContext.Current.Session["shopname"], "','", HttpContext.Current.Session["shopnum"], "','", base.Request.QueryString["txtXFMoney"], "','", base.Request.QueryString["PayType"], "','','", base.Request.QueryString["txtname"], "','", base.Request.QueryString["CardType"], "'," }); name11 = name11 + "'" + base.Request.QueryString["txtXFMoney"] + "','0','0','0','0','" + base.Request.QueryString["JiFen"] + "') "; PublicMethod.Execute(name11 + " update membersinfo set mBalance=mBalance-" + base.Request.QueryString["txtXFMoney"] + ",mIntegral=mIntegral+" + base.Request.QueryString["JiFen"] + " where mNum='" + base.Request.QueryString["Id"] + "'"); sqlsms = "select xuhao,Pwd,type,states,contents from messageset where type = 'sms'"; dtsms = this.bc.ReadTable(sqlsms); if (dtsms.Rows[0]["states"].ToString() == "1") { balance = new StringBuilder("0000000000"); result = EUCPComm.GetBalance(dtsms.Rows[0]["xuhao"].ToString(), balance); _Response = ""; mybalance = balance.ToString(0, balance.Length - 2); if (result == 1) { _Response = mybalance; } if (int.Parse(_Response) > 1) { sms = string.Concat(new object[] { "尊敬的", dt.Rows[0]["mName"].ToString(), dt.Rows[0]["mSex"].ToString(), ",您于", DateTime.Now.ToString("yyyy-MM-dd HH:mm"), "在店面[", PublicMethod.GetSessionValue("shopname"), "]快速消费", base.Request.QueryString["txtXFMoney"], "元,获得积分", base.Request.QueryString["JiFen"], ",总积分为", jifen, ",", dtsms.Rows[0]["contents"].ToString() }); EUCPComm.SendSMS(dtsms.Rows[0]["xuhao"].ToString(), dt.Rows[0]["mMobile"].ToString(), sms, ""); } } base.Response.Write("true"); } else { base.Response.Write("false"); } } else { base.Response.Write("false"); } } else if ((base.Request.QueryString["CardType"] != "临时卡") && (base.Request.QueryString["PayType"] == "银行卡")) { dtPwd = PublicMethod.QueryDataset("select mNum from membersinfo where mNum='" + base.Request.QueryString["Id"] + "' and mPwd='" + DESEncrypt.Encrypt(base.Request.QueryString["pwd"]) + "'").Tables[0]; if (dtPwd.Rows.Count > 0) { sqlf = "select * from membersinfo where mNum ='" + base.Request.QueryString["Id"].ToString() + "'"; dt = this.bc.ReadTable(sqlf); if (dt.Rows.Count > 0) { jifen = double.Parse(base.Request.QueryString["JiFen"]) + double.Parse(dt.Rows[0]["mIntegral"].ToString()); C_Id = "XF" + DateTime.Now.ToString("yyyyMMddHHmmssffff"); str = " insert into Consumption_Back_select (C_Id,Card_Id,Type,Addtime,Users,Remark,Shop,ShopId,Money,PayType,Consum_Type,ClientName,CardType,BlancePay,CashPay,BankPay,JifenPay,ElsePay,hjifen) values ("; name12 = str; name12 = string.Concat(new object[] { name12, "'", C_Id, "','", base.Request.QueryString["Id"], "','快速消费','", DateTime.Now.ToString(), "','", HttpContext.Current.Session["names"], "','", base.Request.QueryString["Remark"], "'" }); name11 = string.Concat(new object[] { name12, ",'", HttpContext.Current.Session["shopname"], "','", HttpContext.Current.Session["shopnum"], "','", base.Request.QueryString["txtXFMoney"], "','", base.Request.QueryString["PayType"], "','','", base.Request.QueryString["txtname"], "','", base.Request.QueryString["CardType"], "'," }); name11 = name11 + "'0','0','" + base.Request.QueryString["txtXFMoney"] + "','0','0','" + base.Request.QueryString["JiFen"] + "') "; PublicMethod.Execute(name11 + " update membersinfo set mBalance=mBalance-" + base.Request.QueryString["txtXFMoney"] + ",mIntegral=mIntegral+" + base.Request.QueryString["JiFen"] + " where mNum='" + base.Request.QueryString["Id"] + "'"); sqlsms = "select xuhao,Pwd,type,states,contents from messageset where type = 'sms'"; dtsms = this.bc.ReadTable(sqlsms); if (dtsms.Rows[0]["states"].ToString() == "1") { balance = new StringBuilder("0000000000"); result = EUCPComm.GetBalance(dtsms.Rows[0]["xuhao"].ToString(), balance); _Response = ""; mybalance = balance.ToString(0, balance.Length - 2); if (result == 1) { _Response = mybalance; } if (int.Parse(_Response) > 1) { sms = string.Concat(new object[] { "尊敬的", dt.Rows[0]["mName"].ToString(), dt.Rows[0]["mSex"].ToString(), ",您于", DateTime.Now.ToString("yyyy-MM-dd HH:mm"), "在店面[", PublicMethod.GetSessionValue("shopname"), "]快速消费", base.Request.QueryString["txtXFMoney"], "元,获得积分", base.Request.QueryString["JiFen"], ",总积分为", jifen, ",", dtsms.Rows[0]["contents"].ToString() }); EUCPComm.SendSMS(dtsms.Rows[0]["xuhao"].ToString(), dt.Rows[0]["mMobile"].ToString(), sms, ""); } } base.Response.Write("true"); } else { base.Response.Write("false"); } } else { base.Response.Write("false"); } } else if ((base.Request.QueryString["CardType"] != "临时卡") && (base.Request.QueryString["PayType"] == "现金")) { sqlf = "select * from membersinfo where mNum ='" + base.Request.QueryString["Id"].ToString() + "'"; dt = this.bc.ReadTable(sqlf); if (dt.Rows.Count > 0) { jifen = double.Parse(base.Request.QueryString["JiFen"]) + double.Parse(dt.Rows[0]["mIntegral"].ToString()); C_Id = "XF" + DateTime.Now.ToString("yyyyMMddHHmmssffff"); str = " insert into Consumption_Back_select (C_Id,Card_Id,Type,Addtime,Users,Remark,Shop,ShopId,Money,PayType,Consum_Type,ClientName,CardType,BlancePay,CashPay,BankPay,JifenPay,ElsePay,hjifen) values ("; name12 = str; name12 = string.Concat(new object[] { name12, "'", C_Id, "','", base.Request.QueryString["Id"], "','快速消费','", DateTime.Now.ToString(), "','", HttpContext.Current.Session["names"], "','", base.Request.QueryString["Remark"], "'" }); name11 = string.Concat(new object[] { name12, ",'", HttpContext.Current.Session["shopname"], "','", HttpContext.Current.Session["shopnum"], "','", base.Request.QueryString["txtXFMoney"], "','", base.Request.QueryString["PayType"], "','','", base.Request.QueryString["txtname"], "','", base.Request.QueryString["CardType"], "'," }); name11 = name11 + "'0','" + base.Request.QueryString["txtXFMoney"] + "','0','0','0','" + base.Request.QueryString["JiFen"] + "') "; PublicMethod.Execute(name11 + " update membersinfo set mIntegral=mIntegral+" + base.Request.QueryString["JiFen"] + " where mNum='" + base.Request.QueryString["Id"] + "'"); sqlsms = "select xuhao,Pwd,type,states,contents from messageset where type = 'sms'"; dtsms = this.bc.ReadTable(sqlsms); if (dtsms.Rows[0]["states"].ToString() == "1") { balance = new StringBuilder("0000000000"); result = EUCPComm.GetBalance(dtsms.Rows[0]["xuhao"].ToString(), balance); _Response = ""; mybalance = balance.ToString(0, balance.Length - 2); if (result == 1) { _Response = mybalance; } if (int.Parse(_Response) > 1) { sms = string.Concat(new object[] { "尊敬的", dt.Rows[0]["mName"].ToString(), dt.Rows[0]["mSex"].ToString(), ",您于", DateTime.Now.ToString("yyyy-MM-dd HH:mm"), "在店面[", PublicMethod.GetSessionValue("shopname"), "]快速消费", base.Request.QueryString["txtXFMoney"], "元,获得积分", base.Request.QueryString["JiFen"], ",总积分为", jifen, ",", dtsms.Rows[0]["contents"].ToString() }); EUCPComm.SendSMS(dtsms.Rows[0]["xuhao"].ToString(), dt.Rows[0]["mMobile"].ToString(), sms, ""); } } base.Response.Write("true"); } else { base.Response.Write("false"); } } else { C_Id = "XF" + DateTime.Now.ToString("yyyyMMddHHmmssffff"); str = "insert into Consumption_Back (C_Id,Card_Id,Type,Addtime,Users,Remark,Shop,ShopId,Money,PayType,Consum_Type,ClientName,CardType,BlancePay,CashPay,BankPay,JifenPay,ElsePay) values ("; name12 = str; name12 = string.Concat(new object[] { name12, "'", C_Id, "','", base.Request.QueryString["Id"], "','快速消费','", DateTime.Now.ToString(), "','", HttpContext.Current.Session["names"], "','", base.Request.QueryString["Remark"], "'" }); name12 = (string.Concat(new object[] { name12, ",'", HttpContext.Current.Session["shopname"], "','", HttpContext.Current.Session["shopnum"], "','", base.Request.QueryString["txtXFMoney"], "','", base.Request.QueryString["PayType"], "','','", base.Request.QueryString["txtname"], "','", base.Request.QueryString["CardType"], "'," }) + "'0','" + base.Request.QueryString["txtXFMoney"] + "','0','0','0') ") + " insert into Consumption_Back_select (C_Id,Card_Id,Type,Addtime,Users,Remark,Shop,ShopId,Money,PayType,Consum_Type,ClientName,CardType,BlancePay,CashPay,BankPay,JifenPay,ElsePay) values ("; name12 = string.Concat(new object[] { name12, "'", C_Id, "','", base.Request.QueryString["Id"], "','快速消费','", DateTime.Now.ToString(), "','", HttpContext.Current.Session["names"], "','", base.Request.QueryString["Remark"], "'" }); PublicMethod.Execute(string.Concat(new object[] { name12, ",'", HttpContext.Current.Session["shopname"], "','", HttpContext.Current.Session["shopnum"], "','", base.Request.QueryString["txtXFMoney"], "','", base.Request.QueryString["PayType"], "','','", base.Request.QueryString["txtname"], "','", base.Request.QueryString["CardType"], "'," }) + "'0','" + base.Request.QueryString["txtXFMoney"] + "','0','0','0') "); base.Response.Write("true"); } } }
protected void Page_Load(object sender, EventArgs e) { DataTable dt; if (base.Request.QueryString["type"] == "addshop") { dt = PublicMethod.QueryDataset("select cId,cNum,cName,cPrice from consumes where cNum='" + base.Request.QueryString["cNum"] + "'").Tables[0]; if (dt.Rows.Count > 0) { base.Response.Write(dt.Rows[0]["cId"].ToString() + "@" + dt.Rows[0]["cName"].ToString() + "@" + dt.Rows[0]["cPrice"].ToString()); } else { base.Response.Write("false"); } } else { string name31; if (base.Request.QueryString["type"] == "postDate") { try { string strsp; DataTable dtLevel; DataTable dtMbr = PublicMethod.QueryDataset("select mNum,mLevel,mName,mBalance,convert(varchar(100), mPastdate,23) as 'mPastdate',mType,mPwd,mIntegral,mStates from membersinfo where mNum='" + base.Request.QueryString["cNum"] + "'").Tables[0]; if (dtMbr.Rows.Count > 0) { if (dtMbr.Rows[0]["mStates"].ToString() == "0") { if ((dtMbr.Rows[0]["mPastdate"].ToString() == "永久有效") || (DateTime.Parse(dtMbr.Rows[0]["mPastdate"].ToString()) > DateTime.Now)) { strsp = dtMbr.Rows[0]["mType"].ToString() + "@" + dtMbr.Rows[0]["mLevel"].ToString() + "@" + dtMbr.Rows[0]["mName"].ToString() + "@" + dtMbr.Rows[0]["mBalance"].ToString() + "@" + dtMbr.Rows[0]["mPastdate"].ToString() + "@" + dtMbr.Rows[0]["mNum"].ToString() + "@" + DESEncrypt.Decrypt(dtMbr.Rows[0]["mPwd"].ToString()) + "@" + dtMbr.Rows[0]["mIntegral"].ToString(); dtLevel = PublicMethod.QueryDataset("select lName,lDiscount,ljifen from memberlevel where lNum='" + dtMbr.Rows[0]["mLevel"].ToString() + "'").Tables[0]; if (dtLevel.Rows.Count > 0) { name31 = strsp; strsp = name31 + "@" + dtLevel.Rows[0]["lName"].ToString() + "@" + dtLevel.Rows[0]["lDiscount"].ToString() + "@" + dtLevel.Rows[0]["ljifen"].ToString(); } base.Response.Write(strsp); } else { base.Response.Write("过期@"); } } else { base.Response.Write("挂失@"); } } else { DataTable dtMbrs = PublicMethod.QueryDataset("select mNum,mLevel,mName,mBalance,convert(varchar(100), mPastdate,23) as 'mPastdate',mType,mPwd,mIntegral,mStates,mMobile from membersinfo where mMobile='" + base.Request.QueryString["cNum"] + "'").Tables[0]; if (dtMbrs.Rows.Count > 0) { if (dtMbrs.Rows[0]["mStates"].ToString() == "0") { if ((dtMbrs.Rows[0]["mPastdate"].ToString() == "永久有效") || (DateTime.Parse(dtMbrs.Rows[0]["mPastdate"].ToString()) > DateTime.Now)) { strsp = dtMbrs.Rows[0]["mType"].ToString() + "@" + dtMbrs.Rows[0]["mLevel"].ToString() + "@" + dtMbrs.Rows[0]["mName"].ToString() + "@" + dtMbrs.Rows[0]["mBalance"].ToString() + "@" + dtMbrs.Rows[0]["mPastdate"].ToString() + "@" + dtMbrs.Rows[0]["mNum"].ToString() + "@" + DESEncrypt.Decrypt(dtMbrs.Rows[0]["mPwd"].ToString()) + "@" + dtMbrs.Rows[0]["mIntegral"].ToString(); dtLevel = PublicMethod.QueryDataset("select lName,lDiscount,ljifen from memberlevel where lNum='" + dtMbrs.Rows[0]["mLevel"].ToString() + "'").Tables[0]; if (dtLevel.Rows.Count > 0) { name31 = strsp; strsp = name31 + "@" + dtLevel.Rows[0]["lName"].ToString() + "@" + dtLevel.Rows[0]["lDiscount"].ToString() + "@" + dtLevel.Rows[0]["ljifen"].ToString(); } base.Response.Write(strsp); } else { base.Response.Write("过期@"); } } else { base.Response.Write("挂失@"); } } else { base.Response.Write("不存在@"); } } } catch { } } else if (base.Request.QueryString["type"] == "change") { try { string sqlf = "select * from membersinfo where mNum ='" + base.Request.QueryString["CardId"].ToString() + "'"; dt = this.bc.ReadTable(sqlf); if (dt.Rows.Count > 0) { double jifen = double.Parse(base.Request.QueryString["SJiFen"]) + double.Parse(dt.Rows[0]["mIntegral"].ToString()); string C_Id = "XF" + base.Request.QueryString["liushui"]; double cash = double.Parse(base.Request.QueryString["cash"]) - double.Parse(base.Request.QueryString["zhaoling"]); string blance = base.Request.QueryString["blance"]; string bank = base.Request.QueryString["bank"]; string jifens = base.Request.QueryString["jifen"]; string elsee = base.Request.QueryString["elses"]; string str = " insert into Consumption_Back_select (C_Id,Card_Id,Type,Addtime,Users,Remark,Shop,ShopId,Money,PayType,Consum_Type,ClientName,CardType,BlancePay,CashPay,BankPay,JifenPay,ElsePay,hjifen) values ("; object name32 = str; name32 = string.Concat(new object[] { name32, "'", C_Id, "','", base.Request.QueryString["CardId"], "','冲次消费','", DateTime.Now.ToString(), "','", HttpContext.Current.Session["names"], "','", base.Request.QueryString["Remark"], "'" }); name32 = string.Concat(new object[] { name32, ",'", HttpContext.Current.Session["shopname"], "','", HttpContext.Current.Session["shopnum"], "','", base.Request.QueryString["PayMoney"], "','", base.Request.QueryString["PayType"], "','','", base.Request.QueryString["txtname"], "','", base.Request.QueryString["CardType"], "'," }); name31 = string.Concat(new object[] { name32, "'", blance, "','", cash, "','", bank, "','", jifens, "','", elsee, "','", base.Request.QueryString["SJiFen"], "') " }); PublicMethod.Execute(name31 + " update membersinfo set mBalance=mBalance-" + base.Request.QueryString["txtchuz"] + ",mIntegral=mIntegral+" + base.Request.QueryString["SJiFen"] + " where mNum='" + base.Request.QueryString["CardId"] + "'"); string ddnow = DateTime.Now.ToString(); StringBuilder st = new StringBuilder(); string detal = base.Server.UrlDecode(base.Request.QueryString["detail"].ToString()); string[] detals = detal.Substring(0, detal.Length - 1).Split(new char[] { '|' }); for (int i = 0; i < detals.Length; i++) { string[] strs = detals[i].Split(new char[] { ',' }); st.Append("insert into conscishu(uNum,uName,uPrice,uCount,uMoney,uDate,ucId,uZhe,uJifen,uMnum,uPastdate,uXiao,uAllcount)values('" + strs[4] + "','" + strs[0] + "','" + strs[1] + "','" + strs[2] + "','" + strs[3] + "','" + ddnow + "','" + C_Id + "','" + strs[5] + "','" + strs[6] + "','" + base.Request.QueryString["CardId"] + "','" + strs[7] + "','0','" + strs[2] + "')"); } PublicMethod.Execute(st.ToString()); string sqlsms = "select xuhao,Pwd,type,states,contents from messageset where type = 'sms'"; DataTable dtsms = this.bc.ReadTable(sqlsms); if (dtsms.Rows[0]["states"].ToString() == "1") { StringBuilder balance = new StringBuilder("0000000000"); int result = EUCPComm.GetBalance(dtsms.Rows[0]["xuhao"].ToString(), balance); string _Response = ""; string mybalance = balance.ToString(0, balance.Length - 2); if (result == 1) { _Response = mybalance; } if (int.Parse(_Response) > 1) { string sms = string.Concat(new object[] { "尊敬的", dt.Rows[0]["mName"].ToString(), dt.Rows[0]["mSex"].ToString(), ",您于", DateTime.Now.ToString("yyyy-MM-dd HH:mm"), "在店面[", PublicMethod.GetSessionValue("shopname"), "]冲次消费", base.Request.QueryString["PayMoney"], "元,获得积分", base.Request.QueryString["SJiFen"], ",总积分为", jifen, ",", dtsms.Rows[0]["contents"].ToString() }); EUCPComm.SendSMS(dtsms.Rows[0]["xuhao"].ToString(), dt.Rows[0]["mMobile"].ToString(), sms, ""); } } base.Response.Write("true"); } else { base.Response.Write("false"); } } catch { base.Response.Write("false"); } } } }