Sie sind auf Seite 1von 3

'Button4

'If MsgBox("Warning: Close the Form?", MsgBoxStyle.Question + MsgBoxStyle.YesNo) =


MsgBoxResult.Yes Then
'Me.Close()
'Else

'End If

'************************************** Procedure Sub Program


*************************************
'Private Sub RefreshDetails()

' Dim STU As New StudentsClass


' Panel3.Enabled = False

' TextBox2.Text = ""


' TextBox3.Text = ""
' TextBox4.Text = ""
' TextBox5.Text = ""

' ComboBox2.Items.Clear()
' ComboBox2.Items.Add("MALE")
' ComboBox2.Items.Add("FEMALE")

' ComboBox3.Items.Clear()
' ComboBox3.Items.Add("I")
' ComboBox3.Items.Add("II")
' ComboBox3.Items.Add("III")
' ComboBox3.Items.Add("IV")
' ComboBox3.Items.Add("V")

' DateTimePicker1.Value = DateSerial(DateTime.Now.Year - 18, DateTime.Now.Month,


DateTime.Now.Day)

' Label13.Text = DateDiff(DateInterval.Year, DateTimePicker1.Value,


DateTime.Now.Date).ToString()
' Label12.Text = ""

' STU.Fill_StudentRecordByAnyName_GradeLevel(TextBox1.Text, ComboBox1.Text,


DataGridView1)

' If DataGridView1.RowCount <> 0 Then

' FillDetails()

' Else

' End If

'End Sub

'****************************** Form Load Event ******************************


'RefreshDetails()

'****************************** Textbox1 TextChanged Event


'Dim STU As New StudentsClass
'STU.Fill_StudentRecordByAnyName_GradeLevel(TextBox1.Text, ComboBox1.Text,
DataGridView1)

'FillDetails()

'****************************** Procedure Sub Program ************************


'Private Sub FillDetails()
' Dim STU As New StudentsClass
' If DataGridView1.RowCount <> 0 Then
' STU.Fill_StudentRecordByAnyName_GradeLevel(TextBox1.Text, ComboBox1.Text,
DataGridView1)

' STU.ShowStudentRecordByRecordID(DataGridView1.Item(0, 0).Value.ToString())


' Label12.Text = STU.RecordID
' TextBox2.Text = STU.LastName
' TextBox3.Text = STU.FirstName
' TextBox4.Text = STU.MiddleName
' TextBox5.Text = STU.Address
' ComboBox2.Text = STU.Gender
' DateTimePicker1.Text = STU.DateOfBirth
' Label13.Text = DateDiff(DateInterval.Year,
Convert.ToDateTime(STU.DateOfBirth), DateTime.Now.Date).ToString()
' ComboBox3.Text = STU.GradeLevel

' Else

' End If
'End Sub

'******************************** ComboBox1 SelectionChangedCommitted Event


**********************************
'Dim STU As New StudentsClass
'STU.Fill_StudentRecordByAnyName_GradeLevel(TextBox1.Text, ComboBox1.Text,
DataGridView1)
'FillDetails()

'******************************** Button1 Click Event


********************************************************
'Panel1.Enabled = False
'DataGridView1.Enabled = False

'Panel3.Enabled = True

'Button1.Enabled = False
'Button2.Enabled = False
'Button3.Enabled = True

'******************************** BUtton2 Click Event


********************************************************
'Dim STU As New StudentsClass

'If MsgBox("Warning: You are about to delete a Student Record, Do you really want
to continue?", MsgBoxStyle.YesNo + MsgBoxStyle.Exclamation) = MsgBoxResult.Yes Then
'STU.DeleteStudentRecord(Label12.Text)
'STU.Fill_StudentRecordByAnyName_GradeLevel(TextBox1.Text, ComboBox1.Text,
DataGridView1)

'RefreshDetails()

'Else

'End If

'********************************* Button3 Click Event


********************************************************
'Dim STU As New StudentsClass
'If Label12.Text <> "" Then
'STU.UpdateStudentRecordByRecordID(Label12.Text, TextBox2.Text.Replace("'", ""),
TextBox3.Text.Replace("'", ""), TextBox4.Text.Replace("'", ""),
TextBox5.Text.Replace("'", ""), ComboBox2.Text, DateTimePicker1.Text,
ComboBox3.Text)

'RefreshDetails()
'Else
'MsgBox("Error! No Record Selected for Update.", MsgBoxStyle.Critical +
MsgBoxStyle.OkOnly, "Update Error...")
'End If

'********************************* DatagridView1 CellClick Event


***********************************************
'Dim STU As New StudentsClass
'STU.ShowStudentRecordByRecordID(DataGridView1.Item(0,
e.RowIndex).Value.ToString())

'********************************* DatagridView1 SelectionChanged Event


****************************************
'Dim STU As New StudentsClass
'STU.ShowStudentRecordByRecordID(DataGridView1.Item(0,
DataGridView1.CurrentRow.Index).Value.ToString())

Das könnte Ihnen auch gefallen