📄 form_per_info.frm
字号:
Height = 255
Left = 120
TabIndex = 16
Top = 615
Width = 1095
End
Begin VB.Label Label2
Alignment = 1 'Right Justify
Caption = "学生学号:"
BeginProperty Font
Name = "宋体"
Size = 9.75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = -74880
TabIndex = 14
Top = 615
Width = 1095
End
Begin VB.Label Label1
Alignment = 1 'Right Justify
Caption = "学生名称:"
BeginProperty Font
Name = "宋体"
Size = 9.75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = -74880
TabIndex = 6
Top = 608
Width = 1095
End
End
Begin VB.PictureBox Picture1
BackColor = &H00FFE09E&
Height = 4455
Left = 0
Picture = "form_per_info.frx":28CE8
ScaleHeight = 4395
ScaleWidth = 2475
TabIndex = 0
Top = 0
Width = 2535
Begin VB.Image Image1
Height = 600
Left = 120
Picture = "form_per_info.frx":62D4C
Stretch = -1 'True
Top = 120
Width = 600
End
Begin VB.Label Label5
BackStyle = 0 'Transparent
Caption = "个人数据查询"
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 700
Underline = 0 'False
Italic = -1 'True
Strikethrough = 0 'False
EndProperty
ForeColor = &H00800000&
Height = 375
Index = 1
Left = 165
TabIndex = 1
Top = 765
Width = 2175
End
Begin VB.Shape Shape1
BorderColor = &H000000FF&
BorderWidth = 2
Height = 15
Left = 120
Top = 1080
Width = 1215
End
Begin VB.Shape Shape2
BorderColor = &H0000FF00&
BorderWidth = 2
Height = 15
Left = 120
Top = 1125
Width = 1095
End
Begin VB.Label Label5
BackStyle = 0 'Transparent
Caption = "个人数据查询"
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 700
Underline = 0 'False
Italic = -1 'True
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FFFFFF&
Height = 375
Index = 0
Left = 135
TabIndex = 2
Top = 735
Width = 2535
End
End
Begin MSComctlLib.ImageList ImageList1
Left = 0
Top = 0
_ExtentX = 1005
_ExtentY = 1005
BackColor = -2147483643
ImageWidth = 16
ImageHeight = 16
MaskColor = 12632256
_Version = 393216
BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628}
NumListImages = 2
BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "form_per_info.frx":63B8E
Key = ""
EndProperty
BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "form_per_info.frx":63CEA
Key = ""
EndProperty
EndProperty
End
Begin MSComctlLib.ImageList ImageList2
Left = 0
Top = 0
_ExtentX = 1005
_ExtentY = 1005
BackColor = -2147483643
ImageWidth = 16
ImageHeight = 16
MaskColor = 12632256
_Version = 393216
BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628}
NumListImages = 2
BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "form_per_info.frx":6400E
Key = ""
EndProperty
BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "form_per_info.frx":64462
Key = ""
EndProperty
EndProperty
End
End
Attribute VB_Name = "form_per_info"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'个人数据查询
'2002-3-17
Private Sub Combo1_Click()
TreeView1.Nodes.Clear
Dim temp1 As New ADODB.Recordset
temp1.Open "select * from [gz] where [xn]='" & Combo1.Text & "' order by [ID] ", main.connect, 3, 2
Dim nodX As Node
Set nodX = TreeView1.Nodes.Add(, , "R0", "西安科技学院学分评测制度", 2)
For i = 1 To temp1.RecordCount
If temp1.Fields(7) = True Then
Set nodX = TreeView1.Nodes.Add("R" & temp1.Fields(5), tvwChild, "R" & temp1.Fields(0), temp1.Fields(1), 2)
Else
Set nodX = TreeView1.Nodes.Add("R" & temp1.Fields(5), tvwChild, "G" & temp1.Fields(0), temp1.Fields(1), 1)
End If
temp1.MoveNext
Next
temp1.Close
End Sub
Private Sub Command1_Click()
Unload Me
End Sub
Private Sub Command2_Click()
Dim itmX As ListItem
ListView1.ListItems.Clear
Dim recordset_temp As New ADODB.Recordset
recordset_temp.Open "select * from [student] where [na] like ""%" & Trim(Text1.Text) & "%""", main.connect, 3, 2
For i = 1 To recordset_temp.RecordCount
Set itmX = ListView1.ListItems.Add(, "b" & recordset_temp.Fields(0), recordset_temp.Fields(3), 1, 1)
itmX.SubItems(1) = recordset_temp.Fields(1)
itmX.SubItems(2) = getclass(recordset_temp.Fields(5))
If recordset_temp.Fields(2) = True Then
itmX.SubItems(3) = "男"
Else
itmX.SubItems(3) = "女"
End If
Select Case recordset_temp.Fields(4)
Case 1
itmX.SubItems(4) = "团员"
Case 2
itmX.SubItems(4) = "党员"
Case 0
itmX.SubItems(4) = "无"
End Select
recordset_temp.MoveNext
Next
recordset_temp.Close
End Sub
Private Function getclass(id As Integer) As String
Dim cc As New ADODB.Recordset
Dim temp As String
temp = ""
cc.Open "select * from [class] where [ID]=" & id, main.connect, 3, 2
If cc.RecordCount <> 0 Then
temp = cc.Fields(1) & "班"
id = cc.Fields(2)
End If
cc.Close
cc.Open "select * from [yc] where [ID]=" & id, main.connect, 3, 2
If cc.RecordCount <> 0 Then
temp = cc.Fields(1) & "级" & temp
id = cc.Fields(2)
End If
cc.Close
cc.Open "select * from [zy] where [ID]=" & id, main.connect, 3, 2
If cc.RecordCount <> 0 Then
temp = cc.Fields(1) & "专业" & temp
id = cc.Fields(2)
End If
cc.Close
cc.Open "select * from [zy] where [ID]=" & id, main.connect, 3, 2
If cc.RecordCount <> 0 Then
temp = cc.Fields(1) & "系" & temp
End If
cc.Close
getclass = temp
End Function
Private Sub Command3_Click()
On Error GoTo 1
Dim myform As New form_one_info
kk = ListView1.SelectedItem.Key
ll = Right(kk, Len(kk) - 1)
myform.student_id = ll
myform.Show 1
1
End Sub
Private Sub Command4_Click()
On Error GoTo 1
Dim myform As New form_one_info
kk = ListView2.SelectedItem.Key
ll = Right(kk, Len(kk) - 1)
myform.student_id = ll
myform.Show 1
1
End Sub
Private Sub Command5_Click()
Dim itmX As ListItem
ListView2.ListItems.Clear
Dim recordset_temp As New ADODB.Recordset
recordset_temp.Open "select * from [student] where [stid] like ""%" & Trim(Text2.Text) & "%""", main.connect, 3, 2
For i = 1 To recordset_temp.RecordCount
Set itmX = ListView2.ListItems.Add(, "b" & recordset_temp.Fields(0), recordset_temp.Fields(3), 1, 1)
itmX.SubItems(1) = recordset_temp.Fields(1)
itmX.SubItems(2) = getclass(recordset_temp.Fields(5))
If recordset_temp.Fields(2) = True Then
itmX.SubItems(3) = "男"
Else
itmX.SubItems(3) = "女"
End If
Select Case recordset_temp.Fields(4)
Case 1
itmX.SubItems(4) = "团员"
Case 2
itmX.SubItems(4) = "党员"
Case 0
itmX.SubItems(4) = "无"
End Select
recordset_temp.MoveNext
Next
recordset_temp.Close
End Sub
Private Sub Command6_Click()
On Error GoTo 1
If TreeView1.SelectedItem.Image = 1 Then
id = Right(TreeView1.SelectedItem.Key, Len(TreeView1.SelectedItem.Key) - 1)
Dim temp As New form_pj_list
temp.jl_id = id
temp.Show 1
End If
1
End Sub
Private Sub Form_Load()
ListView1.ListItems.Clear
ListView2.ListItems.Clear
Combo1.Clear
TreeView1.Nodes.Clear
Dim recordset_temp As New ADODB.Recordset
recordset_temp.Open "select distinct [xn] from [gz] order by [xn]", main.connect, 3, 2
For i = 1 To recordset_temp.RecordCount
Combo1.AddItem recordset_temp.Fields(0)
recordset_temp.MoveNext
Next
recordset_temp.Close
End Sub
Private Sub Form_Resize()
Picture1.Height = Me.Height - 400
Command1.Top = Me.Height - Command1.Height - 450
Command1.Left = Me.Width - Command1.Width - 200
SSTab1.Width = Me.Width - Picture1.Width - 250
SSTab1.Height = Me.Height - Command1.Height - 500
ListView1.Width = SSTab1.Width - 150
ListView1.Height = SSTab1.Height - 1000
ListView2.Width = SSTab1.Width - 150
ListView2.Height = SSTab1.Height - 1000
TreeView1.Width = SSTab1.Width - 150
TreeView1.Height = SSTab1.Height - 1000
End Sub
Private Sub ListView1_DblClick()
Command3_Click
End Sub
Private Sub ListView2_DblClick()
Command4_Click
End Sub
Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then Command2_Click
End Sub
Private Sub Text2_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then Command5_Click
End Sub
Private Sub TreeView1_DblClick()
Command6_Click
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -