-' This is a comment
+
Imports System.Data
Imports System.Drawing
Imports System.IO
If imgpath <> "" Then
Dim img As Image = Image.FromFile(imgpath)
Dim bArr As Byte() = imgToByteArray(img)
- ' da.InsertQuery(txtFirstName.Text, txtLastName.Text, txtAddress.Text, txtTown.Text, txtPostcode.Text, CardNum, CVC, txtIGN.Text, txtEmail.Text, bArr)
dr.Item("ProfilePic") = bArr
End If
- '
+
dt.AddUser_DetailsRow(dr)
da.Update(dt)
MsgBox("Your data has been successfully added")
MsgBox(ex.Message.ToString())
End Try
End Sub
-
- ' Private Sub txtIGN_LostFocus(sender As Object, e As RoutedEventArgs) Handles txtIGN.LostFocus
- ' If txtIGN.Text <> "In Game Name" Then
- ' lblIGN.Content = txtIGN
- ' End If
- 'End Sub
-
- 'convert image to bytearray
Private Function imgToByteArray(ByVal img As Image) As Byte()
Using mStream As New MemoryStream()
img.Save(mStream, Imaging.ImageFormat.Jpeg)