Protected Sub Button6_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button6.Click
a = "insert into sales values('" + TextBox15.Text + "','" + TextBox22.Text + "','" + TextBox16.Text + "','" + TextBox17.Text + "','" + TextBox18.Text + "','" + TextBox19.Text + "','" + TextBox20.Text + "','" + TextBox21.Text + "','" + Label13.Text + "','" + Label18.Text + "')"
cmd = New SqlCommand(a, con)
con.Open()
cmd.ExecuteNonQuery()
cmd.Dispose()
con.Close()
MsgBox("insert successfully")
Dim s As Integer
s = TextBox20.Text
a = "update product set quantityavailable=quantityavailable - '" + s + "' where productid='" + TextBox15.Text + "'"
cmd = New SqlCommand(a, con)
con.Open()
cmd.ExecuteNonQuery()
cmd.Dispose()
con.Close()
MsgBox("update successfully")
End Sub
问问题
87 次