📄 txlj.frm
字号:
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "mscomctl.ocx"
Begin VB.Form txlj
Caption = "退学留级管理"
ClientHeight = 6810
ClientLeft = 60
ClientTop = 345
ClientWidth = 6900
Icon = "txlj.frx":0000
LinkTopic = "Form1"
ScaleHeight = 6810
ScaleWidth = 6900
StartUpPosition = 3 'Windows Default
Begin VB.PictureBox Picture2
BorderStyle = 0 'None
Height = 495
Left = 2880
ScaleHeight = 495
ScaleWidth = 3855
TabIndex = 6
Top = 6240
Width = 3855
Begin VB.CommandButton Command1
Cancel = -1 'True
Caption = "退出(&Q)"
BeginProperty Font
Name = "宋体"
Size = 9.75
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 2640
TabIndex = 9
Top = 120
Width = 1215
End
Begin VB.CommandButton Command3
Caption = "转班(&E)"
BeginProperty Font
Name = "宋体"
Size = 9.75
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 0
TabIndex = 8
Top = 120
Width = 1215
End
Begin VB.CommandButton Command5
Caption = "退学(&Y)"
BeginProperty Font
Name = "宋体"
Size = 9.75
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 1320
TabIndex = 7
Top = 120
Width = 1215
End
End
Begin VB.PictureBox Picture1
BackColor = &H00FFE09E&
Height = 6735
Left = 0
Picture = "txlj.frx":030A
ScaleHeight = 6675
ScaleWidth = 2715
TabIndex = 1
TabStop = 0 'False
Top = 0
Width = 2775
Begin VB.Image Image1
Height = 600
Left = 240
Picture = "txlj.frx":3A36E
Stretch = -1 'True
Top = 240
Width = 600
End
Begin VB.Shape Shape1
BorderColor = &H000000FF&
BorderWidth = 2
Height = 15
Left = 120
Top = 1440
Width = 2295
End
Begin VB.Shape Shape2
BorderColor = &H0000FF00&
BorderWidth = 2
Height = 15
Left = 120
Top = 1485
Width = 2175
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 = 2
Top = 1005
Width = 2535
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 = 130
TabIndex = 3
Top = 970
Width = 2655
End
End
Begin VB.CommandButton Command8
Appearance = 0 'Flat
Height = 375
Left = 6480
Picture = "txlj.frx":3A678
Style = 1 'Graphical
TabIndex = 0
Top = 60
Width = 375
End
Begin MSComctlLib.ListView ListView1
Height = 5535
Left = 2880
TabIndex = 4
Top = 480
Width = 3975
_ExtentX = 7011
_ExtentY = 9763
View = 3
Arrange = 1
LabelEdit = 1
LabelWrap = -1 'True
HideSelection = 0 'False
AllowReorder = -1 'True
FullRowSelect = -1 'True
GridLines = -1 'True
PictureAlignment= 5
_Version = 393217
Icons = "ImageList1"
SmallIcons = "ImageList1"
ForeColor = -2147483640
BackColor = -2147483634
BorderStyle = 1
Appearance = 1
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9.75
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
NumItems = 4
BeginProperty ColumnHeader(1) {BDD1F052-858B-11D1-B16A-00C0F0283628}
Text = "学号"
Object.Width = 2540
EndProperty
BeginProperty ColumnHeader(2) {BDD1F052-858B-11D1-B16A-00C0F0283628}
SubItemIndex = 1
Text = "姓名"
Object.Width = 2540
EndProperty
BeginProperty ColumnHeader(3) {BDD1F052-858B-11D1-B16A-00C0F0283628}
SubItemIndex = 2
Text = "性别"
Object.Width = 2540
EndProperty
BeginProperty ColumnHeader(4) {BDD1F052-858B-11D1-B16A-00C0F0283628}
SubItemIndex = 3
Text = "政治面貌"
Object.Width = 2540
EndProperty
Picture = "txlj.frx":3A6CD
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 = 1
BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "txlj.frx":4E5E1
Key = ""
EndProperty
EndProperty
End
Begin VB.Label Label10
BackStyle = 0 'Transparent
Caption = "请点击右边按键选择班级"
BeginProperty Font
Name = "宋体"
Size = 9.75
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00000000&
Height = 375
Left = 2880
TabIndex = 5
Top = 120
Width = 3735
End
End
Attribute VB_Name = "txlj"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim kks As Integer
Private Sub Command1_Click()
Unload Me
End Sub
Private Sub Command3_Click()
On Error GoTo 1
Dim temp As New selectclass
temp.Label1.Caption = "请选择将学生[" & ListView1.SelectedItem.SubItems(1) & "]转道那个班级"
temp.Show 1
If temp.yesno = False Then Exit Sub
id = temp.kk
Set temp = Nothing
main.connect.Execute "update [student] set [clasid]=" & id & " where [ID]=" & Right(ListView1.SelectedItem.Key, Len(ListView1.SelectedItem.Key) - 1)
MsgBox "转班成功", vbOKOnly Or vbInformation, "提示"
ListView1.ListItems.Clear
Dim itmX As ListItem
Dim bb As New ADODB.Recordset
bb.Open "select * from [student] where [clasid]=" & kks & " order by [stid]", main.connect, 3, 2
For i = 1 To bb.RecordCount
Set itmX = ListView1.ListItems.Add(, "S" & bb.Fields(0), bb.Fields(3), 1, 1)
itmX.SubItems(1) = bb.Fields(1)
If bb.Fields(2) = True Then itmX.SubItems(2) = "男" Else itmX.SubItems(2) = "女"
If bb.Fields(4) = 0 Then itmX.SubItems(3) = "无"
If bb.Fields(4) = 1 Then itmX.SubItems(3) = "中国共青团员"
If bb.Fields(4) = 2 Then itmX.SubItems(3) = "中国共产党员"
bb.MoveNext
Next
bb.Close
ListView1.SetFocus
Exit Sub
1
MsgBox "您没有选择欲处理的学生", vbOKOnly Or vbInformation, "提示"
End Sub
Private Sub Command5_Click()
On Error GoTo 1
If MsgBox("您确定将学生[" & ListView1.SelectedItem.SubItems(1) & "]进行退学处理吗?", vbYesNo Or vbQuestion, "提示") <> vbYes Then
Exit Sub
End If
If MsgBox("请再次确定是否对学生[" & ListView1.SelectedItem.SubItems(1) & "]进行退学处理吗?" & Chr(13) & Chr(10) & Chr(13) & Chr(10) & "警告" & Chr(13) & Chr(10) & "如果您选择确定后,此学生的所有文化课,学分登记都将丢失", vbYesNo Or vbQuestion, "提示") <> vbYes Then
Exit Sub
End If
dd = Right(ListView1.SelectedItem.Key, Len(ListView1.SelectedItem.Key) - 1)
main.connect.Execute "Delete from [student] where [ID]=" & dd
main.connect.Execute "Delete from [wf] where [stid]=" & dd
main.connect.Execute "Delete from [jc] where [stid]=" & dd
ListView1.ListItems.Remove ListView1.SelectedItem.Index
Exit Sub
1
MsgBox "您没有选择欲处理的学生", vbOKOnly Or vbInformation, "提示"
End Sub
Private Sub Command8_Click()
Dim temp As New selectclass
temp.Label1.Visible = False
temp.Show 1
If temp.yesno = False Then Exit Sub
Label10.Caption = temp.nn
id = temp.kk
Set temp = Nothing
kks = id
ListView1.ListItems.Clear
Dim itmX As ListItem
Dim bb As New ADODB.Recordset
bb.Open "select * from [student] where [clasid]=" & id & " order by [stid]", main.connect, 3, 2
For i = 1 To bb.RecordCount
Set itmX = ListView1.ListItems.Add(, "S" & bb.Fields(0), bb.Fields(3), 1, 1)
itmX.SubItems(1) = bb.Fields(1)
If bb.Fields(2) = True Then itmX.SubItems(2) = "男" Else itmX.SubItems(2) = "女"
If bb.Fields(4) = 0 Then itmX.SubItems(3) = "无"
If bb.Fields(4) = 1 Then itmX.SubItems(3) = "中国共青团员"
If bb.Fields(4) = 2 Then itmX.SubItems(3) = "中国共产党员"
bb.MoveNext
Next
bb.Close
ListView1.SetFocus
End Sub
Private Sub Form_Load()
Call ListView1.ListItems.Add(, "S1", "skdks", 1, 1)
ListView1.ListItems.Clear
ListView1.Refresh
End Sub
Private Sub Form_Resize()
On Error GoTo 1
If Me.Height < 7215 Then Me.Height = 7215
If Me.Width < 7020 Then Me.Width = 7020
Picture1.Height = Me.Height - 1100
Picture2.Left = Me.Width - Picture2.Width - 200
Picture2.Top = Me.Height - Picture2.Height - 500
ListView1.Height = Me.Height - ListView1.Top - Picture2.Height - 600
ListView1.Width = Me.Width - Picture1.Width - 300
Label10.Width = Me.Width - Command8.Width - Picture1.Width - 400
Command8.Left = Picture1.Width + Label10.Width + 150
1
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -