📄 checkout.aspx.cs
字号:
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
public partial class User_CheckOut : System.Web.UI.Page
{
UserInfo ui = new UserInfo();
protected void Page_Load(object sender, EventArgs e)
{
if (!this.IsPostBack)
{
}
}
protected void LinkButton1_Click(object sender, EventArgs e)
{
ClientScript.RegisterClientScriptBlock(this.GetType(), "", "window.open('ShipTypeDetails.aspx','','width=640,height=640')", true);
}
protected void btnSummit_Click(object sender, EventArgs e)
{
//Page.RegisterClientScriptBlock("信息", "<SCRIPT>if(confirm('是否确定提交?'));else location='index.aspx'</SCRIPT>");
DataSet dsToDS=ui.reTotalDs(Session["UID"].ToString(), "TotalDS");
DataSet dsShipType=ui.reShipType((ddlShipType.SelectedIndex+1));
double sumPrice=(double)dsToDS.Tables["TotalDS"].Rows[0][0];
double shipFee = (double)dsShipType.Tables["tb_ShipType"].Rows[0][2];
if (ddlPayType.SelectedItem.Text == "会员卡")
{
if (ui.isUserCart(Session["UID"].ToString(), Convert.ToDouble(dsToDS.Tables["TotalDS"].Rows[0][0].ToString()),shipFee))
{
ui.sumitOrderInfo(sumPrice, shipFee, (ddlShipType.SelectedIndex + 1), (ddlPayType.SelectedIndex + 1), Session["UID"].ToString()
, txtName.Text, txtPhone.Text, txtPostCode.Text, txtAddress.Text, txtEmail.Text,true);
ui.delShopCart(Convert.ToInt32(Session["UID"]));
ui.ConfirmMessageBox(Page, "订单提交成功");
}
else
{
ui.MessageBox(Page, "订单提交失败,会员卡中余额不足");
}
}
else
{
ui.sumitOrderInfo(sumPrice, shipFee, (ddlShipType.SelectedIndex + 1), (ddlPayType.SelectedIndex + 1), Session["UID"].ToString()
, txtName.Text, txtPhone.Text, txtPostCode.Text, txtAddress.Text, txtEmail.Text, false);
ui.delShopCart(Convert.ToInt32(Session["UID"]));
ui.ConfirmMessageBox(Page, "订单提交成功");
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -