-
Notifications
You must be signed in to change notification settings - Fork 0
/
AdminCourse.vb
34 lines (29 loc) · 1.39 KB
/
AdminCourse.vb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
Imports System.ComponentModel
Public Class AdminCourse
Private Sub AdminCourse_Load(sender As Object, e As EventArgs) Handles MyBase.Load
If Not CheckAdmin.IsAdmin Then
Dim viewForm As New ViewCourse(CheckAdmin.CurrentStudentID)
viewForm.Show()
Me.Close()
End If
End Sub
Private Sub ViewCourseButton_Click(sender As Object, e As EventArgs) Handles OkButton.Click
Dim Department As String = DepartmentListBox.SelectedItem.ToString()
Dim CourseYear As String = CourseYearListBox.SelectedItem.ToString()
Dim adminView As New ViewCourse(Nothing, Department, CourseYear)
adminView.Show()
End Sub
Private Sub UpdateCourseButton_Click(sender As Object, e As EventArgs) Handles UpdateButton.Click
If DepartmentListBox.SelectedItem = Nothing And CourseYearListBox.SelectedItem = Nothing Then
MessageBox.Show("Select Department and Course Year")
Return
End If
Dim Department As String = DepartmentListBox.SelectedItem.ToString()
Dim CourseYear As String = CourseYearListBox.SelectedItem.ToString()
Dim updateCourse As New UpdateCourse(Department, CourseYear)
updateCourse.Show()
End Sub
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Me.Close()
End Sub
End Class