private void treeView1_AfterSelect(object sender, TreeViewEventArgs e)
{
string name;
name = e.Node.Name;
switch(name)
{
case "NodeStd": f = new frmStudents(); break;
case "NodeTch": f = new frmTeachers(); break;
case "NodeDep": f = new frmDept(); break;
case "NodeSub": f = new frmSubjects(); break;
default: return;
}
showForm(f);
}
Private Sub treeView1_AfterSelect(sender As Object, e As TreeViewEventArgs)
Dim name As String
name = e.Node.Name
Select Case name
Case "NodeStd"
f = New frmStudents()
Exit Select
Case "NodeTch"
f = New frmTeachers()
Exit Select
Case "NodeDep"
f = New frmDept()
Exit Select
Case "NodeSub"
f = New frmSubjects()
Exit Select
Case Else
Return
End Select
showForm(f)
End Sub