⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sellershopinfo.aspx.cs

📁 This is not a very mean things.
💻 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;
using System.Data.SqlClient;

public partial class SellerShopInfo : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        SqlConnection myConnection = new SqlConnection(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString);
        string str = "insert into Shop(CoalID, SellerID, BuyName, BuyTotal, BuyMoney) values(" + Convert.ToInt32(TextBox1.Text) + "," + Request.QueryString["SellerID"]
                        + ",'" + TextBox2.Text + "'," + Convert.ToInt32(TextBox3.Text) + "," + Convert.ToInt32(TextBox4.Text) + ")"; 
        SqlCommand myCommand = new SqlCommand(str, myConnection);

        try
        {
            myConnection.Open();
            myCommand.ExecuteNonQuery();
            myCommand.Dispose();
        }
        catch (SqlException ex)
        {
            Response.Write("Error:" + ex.Message);
        }
        finally
        {
            myConnection.Dispose();
            Response.Redirect("SellerShopInfo.aspx?SellerID=" + Session["SellerID"]);
        }
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -