📄 frmluru.frm
字号:
Top = 840
Width = 1335
End
Begin VB.OptionButton Option4
Caption = "4"
Height = 255
Index = 3
Left = 960
TabIndex = 37
Top = 600
Value = -1 'True
Width = 855
End
Begin VB.OptionButton Option4
Caption = "3"
Height = 255
Index = 2
Left = 960
TabIndex = 36
Top = 360
Width = 855
End
Begin VB.OptionButton Option4
Caption = "2"
Height = 255
Index = 1
Left = 240
TabIndex = 14
Top = 600
Width = 855
End
Begin VB.OptionButton Option4
Caption = "1"
Height = 255
Index = 0
Left = 240
TabIndex = 13
Top = 360
Width = 855
End
End
Begin VB.Frame Frame3
Caption = "参加班主任例会(次)"
Height = 1215
Left = 3720
TabIndex = 9
Top = 240
Width = 2055
Begin VB.OptionButton Option2
Caption = "无"
Height = 255
Index = 2
Left = 480
TabIndex = 40
Top = 840
Width = 855
End
Begin VB.OptionButton Option2
Caption = "两次"
Height = 255
Index = 1
Left = 480
TabIndex = 11
Top = 600
Value = -1 'True
Width = 855
End
Begin VB.OptionButton Option2
Caption = "一次"
Height = 255
Index = 0
Left = 480
TabIndex = 10
Top = 360
Width = 855
End
End
Begin VB.TextBox Text4
Height = 1335
Left = 840
MultiLine = -1 'True
TabIndex = 6
Top = 4680
Width = 7575
End
Begin VB.TextBox Text3
Height = 375
Left = 1800
TabIndex = 4
Top = 1080
Width = 1335
End
Begin VB.TextBox Text2
Height = 375
Left = 1800
TabIndex = 2
Top = 360
Width = 1335
End
Begin VB.Label Label7
AutoSize = -1 'True
Caption = "寝室到位(次)"
Height = 180
Left = 360
TabIndex = 38
Top = 1800
Width = 1260
End
Begin VB.Label Label12
Caption = "备注"
BeginProperty Font
Name = "宋体"
Size = 15.75
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 615
Left = 240
TabIndex = 5
Top = 5040
Width = 375
End
Begin VB.Label Label4
Caption = "通报批评(次)"
Height = 375
Left = 360
TabIndex = 3
Top = 1080
Width = 1095
End
Begin VB.Label Label3
Caption = "班级月扣分"
Height = 375
Left = 360
TabIndex = 1
Top = 480
Width = 1335
End
End
End
Attribute VB_Name = "frmluru"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Combo1_Click()
Dim mrccc As ADODB.Recordset
Dim msgtext As String
Dim txtSQL As String
' Combo1.Clear
txtSQL = "select name1 from teacher where class='" & Combo1 & "'"
Set mrccc = ExecuteSQL(txtSQL, msgtext)
Text1.Text = mrccc.Fields(0)
mrccc.MoveNext
mrccc.Close
End Sub
Private Sub Command1_Click()
Dim intcount As Integer
Dim smg As String
Dim mr As ADODB.Recordset
Dim msgtext As String
If Trim(Combo1 & "") = "请选择" Then
MsgBox "请选择班级", vbOKOnly + vbExclamation, "警告"
Exit Sub
End If
If Trim(Combo2 & "") = "" Then
MsgBox "请选择年份", vbOKOnly + vbExclamation, "警告"
Exit Sub
End If
If Trim(Combo3 & "") = "" Then
MsgBox "请选择月份", vbOKOnly + vbExclamation, "警告"
Exit Sub
End If
If Trim(Combo4 & "") = "选择" Then
MsgBox "选择次数!", vbOKOnly + vbExclamation, "警告"
Exit Sub
End If
If Trim(Text2.Text & "") = "" Then
MsgBox "班级月扣分不能为空!", vbOKOnly + vbExclamation, "警告"
Exit Sub
End If
If Not IsNumeric(Trim(Text2.Text)) Then
MsgBox "必须是数字!", vbOKOnly + vbExclamation, "警告"
Text2.SetFocus
Exit Sub
End If
If Trim(Text3.Text & "") = "" Then
MsgBox "通报批评次数不能为空!没有用0代替", vbOKOnly + vbExclamation, "警告"
Exit Sub
End If
If Not IsNumeric(Trim(Text3.Text)) Then
MsgBox "必须是数字!", vbOKOnly + vbExclamation, "警告"
Text3.SetFocus
Exit Sub
End If
smg = Format(CDate(Combo2 & "-" & Combo3 & "-" & "1"), "yyyy-mm-dd")
Dim a, b, c, d, e, f, g, h, j As Integer
If Option6(0).Value Then
a = 0
ElseIf Option6(1).Value Then
a = 1
End If
If Option1(0).Value Then
b = 0
ElseIf Option1(1).Value Then
b = 1
End If
If Option2(0).Value Then
c = 1
ElseIf Option2(1).Value Then
c = 2
ElseIf Option2(2).Value Then
c = 0
End If
If Option4(0).Value Then
d = 1
ElseIf Option4(1).Value Then
d = 2
ElseIf Option4(2).Value Then
d = 3
ElseIf Option4(3).Value Then
d = 4
ElseIf Option4(4).Value Then
d = 0
End If
If Option5(0).Value Then
e = 0
ElseIf Option5(1).Value Then
e = 1
End If
If Option7(0).Value Then
g = 0
ElseIf Option7(1).Value Then
g = 1
End If
If Option3(0).Value Then
h = 1
ElseIf Option3(1).Value Then
h = 0
End If
If Option8(0).Value Then
j = 1
ElseIf Option8(1).Value Then
j = 0
End If
txtSQL = "select * from kaohe where class='" & Trim(Combo1) & "' and yuefen='" & smg & "'"
Set mr = ExecuteSQL(txtSQL, msgtext)
If mr.EOF = False Then
MsgBox "该班主任本月考核信息已经录入!如需要修改请执行修改操作", vbOKOnly + vbExclamation, "警告"
Combo1 = "请选择"
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Combo4 = "0"
Combo2 = ""
Combo3 = ""
Exit Sub
End If
txtSQL = "execute kaohesetup'"
txtSQL = txtSQL & Trim(Text2.Text) & "','"
txtSQL = txtSQL & Trim(Text3.Text) & "','"
txtSQL = txtSQL & a & "','"
txtSQL = txtSQL & b & "','"
txtSQL = txtSQL & c & "','"
txtSQL = txtSQL & d & "','"
txtSQL = txtSQL & e & "','"
txtSQL = txtSQL & Trim(Combo4) & "','"
txtSQL = txtSQL & g & "','"
txtSQL = txtSQL & Trim(Text4.Text) & "','"
txtSQL = txtSQL & Trim(Combo1) & "','"
txtSQL = txtSQL & smg & "','"
txtSQL = txtSQL & h & "','"
txtSQL = txtSQL & j & "'"
Set mr = ExecuteSQL(txtSQL, msgtext)
Unload Me
frmluru.Show
MsgBox "添加纪录成功!", vbOKOnly + vbExclamation, "添加纪录"
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
Private Sub Form_Load()
Me.Width = 9810
Me.Height = 8835
Dim mrccc1 As ADODB.Recordset
Dim msgtext1 As String
Dim txtSQL As String
' Combo1.Clear
txtSQL = "select class from teacher"
Set mrccc1 = ExecuteSQL(txtSQL, msgtext1)
Do While Not mrccc1.EOF
Combo1.AddItem mrccc1.Fields(0)
mrccc1.MoveNext
Loop
mrccc1.Close
End Sub
Private Sub Label8_Click()
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -