Vb.Net Enrollment

Only available on StudyMode
  • Topic: Class, String theory
  • Pages : 3 (409 words )
  • Download(s) : 70
  • Published : December 14, 2012
Open Document
Text Preview
Public Class Form1
Private Sub Table1BindingNavigatorSaveItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Table1BindingNavigatorSaveItem.Click Me.Validate()
Me.Table1BindingSource.EndEdit()
Me.TableAdapterManager.UpdateAll(Me.PhoneBookDataSet) End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 'TODO: This line of code loads data into the 'PhoneBookDataSet.Table1' table. You can move, or remove it, as needed. Me.Table1TableAdapter.Fill(Me.PhoneBookDataSet.Table1) loadpic()

End Sub
Private Sub BindingNavigatorMoveNextItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BindingNavigatorMoveNextItem.Click End Sub
Private Sub Button1_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Table1TableAdapter.Fill(PhoneBookDataSet.Table1)
loadpic()
End Sub
Sub loadpic()
Dim FirstN As String = ""
Dim LastN As String = ""
Dim fileName As String = ""
FirstN = FirstNameTextBox.Text
LastN = LastNameTextBox.Text
fileName = FirstN & LastN & ".jpg"
Try
PictureBox1.Image = Image.FromFile(fileName)
Catch
PictureBox1.Image = Image.FromFile("default.jpg") End Try
End Sub
Private Sub Button2_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click Table1BindingSource.MoveNext()
loadpic()
End Sub
Private Sub Button3_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click Table1BindingSource.MoveLast()
loadpic()
End Sub
Private Sub Button4_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click Table1BindingSource.AddNew()...
tracking img