heatsink.aspx.cs
上传用户:vtryaojia
上传日期:2020-04-18
资源大小:1214k
文件大小:1k
源码类别:

SCSI/ASPI

开发平台:

Others

  1. using System;
  2. using System.Data;
  3. using System.Configuration;
  4. using System.Collections;
  5. using System.Web;
  6. using System.Web.Security;
  7. using System.Web.UI;
  8. using System.Web.UI.WebControls;
  9. using System.Web.UI.WebControls.WebParts;
  10. using System.Web.UI.HtmlControls;
  11. using System.Data.OleDb;
  12. public partial class heatsink : System.Web.UI.Page
  13. {
  14.     protected void Page_Load(object sender, EventArgs e)
  15.     {
  16.     }
  17.    
  18.     protected void Button1_Click(object sender, EventArgs e)
  19.     {
  20.         string strConnection = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + Server.MapPath("~/App_Data/zzu.mdb") + ";";
  21.         OleDbConnection conn = new OleDbConnection(strConnection);
  22.         conn.Open();
  23.         OleDbCommand cmd1 = new OleDbCommand("insert   into   SpKd (ID,GoodsName,ClassName,MarktePrice) values('" + Session ["GWC_ID"] + "','" + DetailsView1.Rows[1].Cells[1].Text + "','" + "散热器" + "','" + DetailsView1.Rows[2].Cells[1].Text + "')", conn);
  24.         cmd1.ExecuteNonQuery();
  25.         conn.Close();
  26.         Session["GWC_ID"] = Convert.ToInt32(Session["GWC_ID"]) + 1;
  27.         Response.Redirect("Default.aspx");
  28.     }
  29. }