Example #1
0
        protected void dgvVenderList_RowDeleting(object sender, GridViewDeleteEventArgs e)
        {
            string sql             = "delete from Vendor where vendor_id = '" + ((Label)dgvVenderList.Rows[e.RowIndex].Cells[0].FindControl("Label1")).Text + "'";
            DeleteCommandBuilder u = new DeleteCommandBuilder();

            u.ExecuteNonQuery(sql);
            dgvVenderList.DataSource = getAllVendor("");
            dgvVenderList.DataBind();
        }
Example #2
0
        //if (e.Row.RowType != DataControlRowType.DataRow)
        //    {
        //        return;
        //    }
        //    DataRowView drv = e.Row.DataItem as DataRowView;

        protected void GridView1_RowDeleting(object sender, GridViewDeleteEventArgs e)
        {
            int    id                = e.RowIndex;
            string userId            = GridView1.Rows[id].Cells[1].Text;
            string sqldel            = "delete from shatter_Parts_Password where userid = '" + userId + "'";
            DeleteCommandBuilder dcb = new DeleteCommandBuilder();

            dcb.ExecuteNonQuery(sqldel);
            Response.Redirect("UserManage.aspx");
        }
Example #3
0
 protected void ButtonDelete_Click(object sender, EventArgs e)
 {
     if (TextBoxPwd.Text.Equals("123456"))
     {
         string id = Request.QueryString["id"];
         DeleteCommandBuilder dcb = new DeleteCommandBuilder();
         string sql = "delete  from shatter_Parts where id = " + id + "";
         dcb.ExecuteNonQuery(sql);
         Response.Redirect("index.aspx");
     }
     else
     {
         Response.Write("<script>alert('密码不正确')</script>");
     }
 }