admin/orderinfo.aspx.cs

(开头部分) 3KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

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;
using System.Data.SqlClient;

public partial class admin_orderinfo : System.Web.UI.Page
{
    string orderid1;
    protected void Page_Load(object sender, EventArgs e)
    {
        orderid1 = Request.QueryString["id"].ToString();
        if (!IsPostBack)
        {
            check_login();
            bind_ordertables(); 
            BindShopBasket();
        }
    }
    void check_login()
    {
        if (Session["admin"] == null || Session["admin"].ToString() == "")
        {
            Response.Write("<script language='javascript'>alert('请先登录!');</script>");
            Response.Redirect("login.aspx");
        }
    }

    //获取订单表格
    private void bind_ordertables()
    {
        string strConn = ConfigurationManager.ConnectionStrings["sq_chaletshopConnectionString"].ToString();
        SqlConnection conn = new SqlConnection(strConn);
        string strSql = "select * from orderinfo where orderid='" + orderid1 + "' order by id desc";
        SqlDataAdapter da = new SqlDataAdapter(strSql, conn);
        DataSet ds = new DataSet();
        da.Fill(ds);
        this.gvProducts.DataSource = ds;
        this.gvProducts.DataKeyNames = new string[] { "id" };
        this.gvProducts.DataBind();
        da.Dispose();
        conn.Dispose();
    }
    //计算商品总价格,运费,总花费
    protected void Total()
    {
        double allmoney1 = 0;
        double allmoney2, allmoney2_discount;
        double allmoney3;
        double discount;

        string strConn = ConfigurationManager.ConnectionStrings["sq_chaletshopConnectionString"].ToString();
        SqlConnection conn = new SqlConnection(strConn);
        string strSql = "select * from orderinfo where orderid='" + orderid1 + "' order by id desc";
后面还有 43 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。