Guest User

Untitled

a guest
May 27th, 2016
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.29 KB | None | 0 0
  1. Imports System.Data
  2. Imports System.Data.SqlClient
  3.  
  4. Partial Class Bevestiging
  5. Inherits System.Web.UI.Page
  6. Dim con As New SqlConnection(" server=BOYANSQLEXPRESS; Initial Catalog=GipDatabase; User ID=sa; Password=DitIs1SuperGoedW8woord!")
  7. Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
  8.  
  9. LblFilmnaam.Text = Session("filmnaam")
  10. LblDatum.Text = Session("datum")
  11. Lbltijd.Text = Session("tijd")
  12. LblAantalKin.Text = Session("Aantalkin")
  13. LblAantalVol.Text = Session("AantalVol")
  14. LblTypeZaal.Text = Session("Zaaltype")
  15. LblPrijs.Text = Session("prijs")
  16. End Sub
  17.  
  18. Protected Sub BtnBevestigen_Click(sender As Object, e As EventArgs) Handles BtnBevestigen.Click
  19. Dim cmd As New SqlCommand()
  20. cmd.Connection = con
  21. cmd.CommandType = CommandType.Text
  22. con.Open()
  23. cmd.CommandText = "insert into TblReserveren(Filmnaam,datum, tijd, Aantalvolwassenen, Aantalkinderen, TypeZaal, Prijs, GebruikerID) Values('" + LblFilmnaam.Text.ToString + "','" + LblDatum.Text + "','" + Lbltijd.Text + "','" + LblAantalVol.Text + "','" + LblAantalKin.Text + "', '" + LblTypeZaal.Text + "', " + LblPrijs.Text + " , (Select ID from TblGebruiker Where Username = '" + Session("Username") + "'))"
  24.  
  25. cmd.ExecuteNonQuery()
  26. 'MessageBox("De film Is gereserveerd!")
  27. 'Response.Write("De film Is gereserveerd!")
  28. con.Close()
  29. End Sub
  30. End Class
Add Comment
Please, Sign In to add comment