|
Server : Microsoft-IIS/10.0 System : Windows NT EBS-6136 10.0 build 17763 (Windows Server 2016) i586 User : jxgj ( 0) PHP Version : 7.0.33 Disable Function : passthru,exec,system,shell_exec,proc_open,popen,pcntl_exec,socket_bind,stream_socket_server Directory : D:/tmp_aspnet/root/c87b3efd/cc6243dc/ |
?#pragma checksum "D:\wwwroot\zgyzd233com\wwwroot\UserOrder.aspx.cs" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "4F3594BD471BA66DDDF9AEFA8742BFAF"
#line 1 "D:\wwwroot\zgyzd233com\wwwroot\UserOrder.aspx.cs"
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Data.OleDb;
using System.Text;
using Com.Alipay;
using System.IO;
using System.Xml;
using System.Collections.Generic;
public partial class UserOrder : System.Web.UI.Page
{
private int productID;
public int ProductID
{
get { return PageBase.getRequestID(Page, "ProductID"); }
set { productID = value; }
}
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
if (Session["userid"] == null)
{
SqlHelper.MessageShow(Page, "只有注册会员登录后能力在线预约!", "Login.aspx");
return;
}
Master.Title = "在线预约";
DataTable dt = SqlHelper.Query("select c.CategoryName,p.* from ProductInfo as p,PCategory as c where c.CategoryID=p.CategoryID and ProductID=" + ProductID).Tables[0];
if (dt.Rows.Count > 0)
{
litpname.Text = "<a class=\"red\" href=\"PictureDetails.aspx?ProductID=" + dt.Rows[0]["ProductID"].ToString() + "\">" + dt.Rows[0]["PName"].ToString() + "</a>";
hidden.Value = dt.Rows[0]["Price"].ToString();
}
}
}
protected void btnok_Click(object sender, EventArgs e)
{
if (String.Compare(Request.Cookies["code"].Value, txbcode.Text.Trim(), true) == 0)
{
OleDbParameter[] par = new OleDbParameter[] {
new OleDbParameter("@ProductID",ProductID),
new OleDbParameter("@PName",hidden.Value),
new OleDbParameter("@CAS",""),
new OleDbParameter("@HL",""),
new OleDbParameter("@BZ",""),
new OleDbParameter("@UserName",txbusername.Text),
new OleDbParameter("@CompanyName", ""),
new OleDbParameter("@TelePhone",txbtelephone.Text),
new OleDbParameter("@CellPhone",""),
new OleDbParameter("@Email",txbemail.Text),
new OleDbParameter("@MSN",""),
new OleDbParameter("@Address",txbaddress.Text),
new OleDbParameter("@ZCode",""),
new OleDbParameter("@Country",""),
new OleDbParameter("@Details",txbdetails.Text)
};
StringBuilder sb = new StringBuilder();
sb.Append("insert into OrderInfo(ProductID,PName,CAS,HL,BZ,UserName,CompanyName,TelePhone,CellPhone,Email,MSN,Address,Zcode,Country,Details,PubDate,IsJudge,UserID)");
sb.Append(" values (@ProductID,@PName,@CAS,@HL,@BZ,@UserName,@CompanyName,@TelePhone,@CellPhone,@Email,@MSN,@Address,@ZCode,@Country,@Details,Now(),0," + PageBase.UserID(Page) + ")");
if (Comm.returnExecuteSql(sb.ToString(), par))
{
DataTable dt = SqlHelper.Query("select top 1 * from OrderInfo where UserID=" + PageBase.UserID(Page) + " order by OrderID DESC").Tables[0];
if (dt.Rows.Count > 0)
{
string OrderID = dt.Rows[0]["OrderID"].ToString();
//
string payment_type = "1";
//必填,不能批改
string notify_url = "http://www.zgyzd.com/Alipay/notify_url.aspx";
string return_url = "http://www.zgyzd.com/Alipay/return_url.aspx";
//商户订单号
string out_trade_no = PageBase.UserID(Page) + "-" + OrderID + "-0";
//商户网站订单系统中唯一订单号,必填
//订单名称
string subject = " 善水宜家";
//必填
//付款金额
string total_fee = hidden.Value;
//必填
//订单描述
string body = "";
//商品展示地址
string show_url = "http://www.zgyzd.com";
//需以http://开头的齐全蹊径,例如:http://www.商户网址.com/myorder.html
//防垂钓功夫戳
string anti_phishing_key = "";
//若要使用请挪用类文件submit中的query_timestamp函数
//客户端的IP地址
string exter_invoke_ip = "";
//把要求参数打包成数组
SortedDictionary<string, string> sParaTemp = new SortedDictionary<string, string>();
sParaTemp.Add("partner", Config.Partner);
sParaTemp.Add("seller_email", Config.Seller_email);
sParaTemp.Add("_input_charset", Config.Input_charset.ToLower());
sParaTemp.Add("service", "create_direct_pay_by_user");
sParaTemp.Add("payment_type", payment_type);
sParaTemp.Add("notify_url", notify_url);
sParaTemp.Add("return_url", return_url);
sParaTemp.Add("out_trade_no", out_trade_no);
sParaTemp.Add("subject", subject);
sParaTemp.Add("total_fee", total_fee);
sParaTemp.Add("body", body);
sParaTemp.Add("show_url", show_url);
sParaTemp.Add("anti_phishing_key", anti_phishing_key);
sParaTemp.Add("exter_invoke_ip", exter_invoke_ip);
//成立要求
string sHtmlText = Submit.BuildRequest(sParaTemp, "get", "确认");
Response.Write(sHtmlText);
//实现付款
//
}
}
}
else
labmess.Text = "验证码谬误!";
}
}
#line default
#line hidden