delete.aspx.cs
上传用户:shjujing
上传日期:2022-07-28
资源大小:11244k
文件大小:1k
源码类别:

Email客户端

开发平台:

Visual C++

  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.SqlClient;
  12. public partial class Manage_delete : System.Web.UI.Page
  13. {
  14.     SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings["TZroomConnectionString"].ConnectionString);
  15.     protected void Page_Load(object sender, EventArgs e)
  16.     {
  17.     }
  18.     protected void delbtn_Command(object sender, CommandEventArgs e)
  19.     {
  20.         String sql = "delete from tb_GoodsInfo where GoodsID=" + e.CommandArgument + "";
  21.         SqlCommand cmd = new SqlCommand(sql, conn);
  22.         int Result = -1;
  23.         try
  24.         {
  25.             conn.Open();
  26.             Result = cmd.ExecuteNonQuery();
  27.         }
  28.         catch (Exception ex)
  29.         {
  30.             throw (ex);
  31.         }
  32.         finally {
  33.             conn.Close();
  34.         }
  35.     }
  36. }