📄 frmstuman.frm
字号:
BackColor = &H00FFC0C0&
BackStyle = 0 'Transparent
Caption = "性别"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 180
Left = 2520
TabIndex = 1
Top = 360
Width = 390
End
End
Begin VB.CommandButton Cmd_Experience
Caption = "教育经历"
Height = 400
Left = 6756
MouseIcon = "FrmStuMan.frx":27A2
Style = 1 'Graphical
TabIndex = 37
Top = 3840
Width = 1300
End
Begin VB.CommandButton Cmd_Back
Cancel = -1 'True
Caption = "返 回"
Height = 400
Left = 8343
MouseIcon = "FrmStuMan.frx":2AAC
Style = 1 'Graphical
TabIndex = 34
Top = 3840
Width = 1300
End
Begin VB.CommandButton Cmd_Del
Caption = "删除学生"
Height = 400
Left = 5170
MouseIcon = "FrmStuMan.frx":2DB6
Style = 1 'Graphical
TabIndex = 33
Top = 3840
Width = 1300
End
Begin VB.CommandButton Cmd_Modi
Caption = "修改资料"
Height = 400
Left = 3584
MouseIcon = "FrmStuMan.frx":30C0
Style = 1 'Graphical
TabIndex = 32
Top = 3840
Width = 1300
End
Begin VB.CommandButton Cmd_Add
Caption = "添加学生"
Default = -1 'True
Height = 400
Left = 1998
MouseIcon = "FrmStuMan.frx":33CA
Style = 1 'Graphical
TabIndex = 31
Top = 3840
Width = 1300
End
Begin MSDataListLib.DataList DataList1
Bindings = "FrmStuMan.frx":36D4
Height = 1530
Left = 120
TabIndex = 35
Top = 2040
Width = 2415
_ExtentX = 4260
_ExtentY = 2699
_Version = 393216
ListField = "Student_Name"
BoundColumn = "Student_Id"
End
Begin MSAdodcLib.Adodc AdoStuNameList
Height = 330
Left = 3120
Top = 4200
Visible = 0 'False
Width = 3135
_ExtentX = 5530
_ExtentY = 582
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 1
LockType = 3
CommandType = 8
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 3
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = "DSN=StudentSys"
OLEDBString = ""
OLEDBFile = ""
DataSourceName = "StudentSys"
OtherAttributes = ""
UserName = "sa"
Password = "sa"
RecordSource = "SELECT Student_Id,Student_Name FROM Students ORDER BY Student_Id"
Caption = "AdoEmpNameList"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
_Version = 393216
End
Begin MSComctlLib.ImageList ImageList3
Left = 0
Top = 840
_ExtentX = 1005
_ExtentY = 1005
BackColor = -2147483628
ImageWidth = 16
ImageHeight = 16
MaskColor = 16777215
_Version = 393216
BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628}
NumListImages = 5
BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "FrmStuMan.frx":370E
Key = ""
EndProperty
BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "FrmStuMan.frx":60A0
Key = ""
EndProperty
BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "FrmStuMan.frx":8A32
Key = ""
EndProperty
BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "FrmStuMan.frx":B3C4
Key = ""
EndProperty
BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "FrmStuMan.frx":DB76
Key = ""
EndProperty
EndProperty
End
Begin MSComctlLib.TreeView TreeView1
Height = 1695
Left = 120
TabIndex = 36
Top = 240
Width = 2415
_ExtentX = 4260
_ExtentY = 2990
_Version = 393217
HideSelection = 0 'False
LabelEdit = 1
Sorted = -1 'True
Style = 7
HotTracking = -1 'True
SingleSel = -1 'True
ImageList = "ImageList3"
BorderStyle = 1
Appearance = 1
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
MouseIcon = "FrmStuMan.frx":10508
End
Begin MSAdodcLib.Adodc AdoStuDetail
Height = 330
Left = 120
Top = 4200
Visible = 0 'False
Width = 2775
_ExtentX = 4895
_ExtentY = 582
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 1
LockType = 3
CommandType = 8
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 3
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = "DSN=StudentSys"
OLEDBString = ""
OLEDBFile = ""
DataSourceName = "StudentSys"
OtherAttributes = ""
UserName = "sa"
Password = "sa"
RecordSource = "SELECT * FROM Students"
Caption = "AdoEmpDetail"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
_Version = 393216
End
End
Attribute VB_Name = "StuMan"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public TmpOk As Boolean
Private Sub Cmd_Add_Click()
TmpOk = False
If CurClass.Class_Id <= 0 Then
MsgBox "请选择所属院系班级", 48, "警告"
Exit Sub
End If
StuEdit.Modify = False
StuEdit.Show 1
If TmpOk = True Then
TreeView1_Click
End If
End Sub
Private Sub Cmd_Back_Click()
If PhotoMenu.Visible = True Then
Unload PhotoMenu
End If
Unload Me
End Sub
Private Sub Cmd_Del_Click()
If CurStu.Student_Id <= 0 Then
MsgBox "请选择要删除的学生", 48, "警告"
Exit Sub
End If
If MsgBox("姓名:" + Lbl_Stu_Name + Chr(13), vbYesNo, "是否删除") = vbNo Then
Exit Sub
End If
CurStu.Delete (CurStu.Student_Id)
CurStu.Student_Id = 0
TreeView1_Click
End Sub
Private Sub Cmd_Experience_Click()
If CurStu.Student_Id <= 0 Then
MsgBox "请选择学生", 48, "警告"
Exit Sub
End If
ExpMan.OriStuId = CurStu.Student_Id
ExpMan.Show 1
End Sub
Private Sub Cmd_Modi_Click()
If CurStu.Student_Id <= 0 Then
MsgBox "请选择要修改的学生", 48, "警告"
Exit Sub
End If
StuEdit.Modify = True
StuEdit.Show 1
DataList1_Click
End Sub
Private Sub DataList1_Click()
If DataList1.BoundText = "" Then
CurStu.Init
Image1.Picture = LoadPicture("")
AdoStuDetail.RecordSource = "SELECT * FROM Students WHERE Student_Id<0"
AdoStuDetail.Refresh
Exit Sub
End If
AdoStuDetail.RecordSource = "SELECT * FROM Students " _
+ "WHERE Student_Id=" + Trim(Str(DataList1.BoundText))
AdoStuDetail.Refresh
Call ShowImage(Image1, AdoStuDetail)
CurStu.GetInfo (DataList1.BoundText)
End Sub
Private Sub Form_Load()
Set TmpNode = TreeView1.Nodes.Add(, , "a0", "班级信息", 1, 3)
TmpNode.Selected = True
TmpNode.ExpandedImage = 2
Call Add_ClassToTree(TreeView1, "a0")
TreeView1_Click
DataList1_Click
End Sub
Private Sub Image1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 1 Then
If PhotoMenu.Visible = True Then
Unload PhotoMenu
End If
End If
If Button = 2 Then
If CurStu.Student_Id <= 0 Then
Exit Sub
End If
PhotoMenu.Left = X + Image1.Left + 200 ' - 1610
PhotoMenu.Top = Y + Image1.Top + 1900
PhotoMenu.Show
End If
End Sub
Private Sub TreeView1_Click()
Dim Focuskey As String
Focuskey = TreeView1.SelectedItem.Key
CurClass.Class_Name = TreeView1.SelectedItem.Text
CurClass.Class_Id = Val(Right(TreeView1.SelectedItem.Key, Len(TreeView1.SelectedItem.Key) - 1))
If Focuskey = "a0" Then '根结点
AdoStuNameList.RecordSource = "SELECT * FROM Students WHERE Class_Id<0"
AdoStuNameList.Refresh
DataList1.ReFill
Exit Sub
End If
If CurClass.HaveSon(CurClass.Class_Id) = False Then
TreeView1.SelectedItem.ExpandedImage = 4
TreeView1.SelectedItem.Image = 4
TreeView1.SelectedItem.SelectedImage = 5
End If
CurClass.GetInfo (CurClass.Class_Id)
AdoStuNameList.RecordSource = "SELECT Student_Id, Student_Name FROM Students WHERE Class_Id=" _
+ Trim(Str(CurClass.Class_Id))
AdoStuNameList.Refresh
DataList1.ReFill
DataList1_Click
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -