www.pudn.com > new xsc.rar > frmupluru.frm
VERSION 5.00
Begin VB.Form frmupluru
Caption = "修改录入信息"
ClientHeight = 6900
ClientLeft = 60
ClientTop = 345
ClientWidth = 9690
LinkTopic = "Form1"
ScaleHeight = 6900
ScaleWidth = 9690
StartUpPosition = 3 '窗口缺省
Begin VB.Frame Frame2
Caption = "考核信息"
Height = 4815
Left = 360
TabIndex = 13
Top = 1200
Width = 8895
Begin VB.TextBox Text2
Height = 375
Left = 1800
TabIndex = 38
Top = 360
Width = 1335
End
Begin VB.TextBox Text3
Height = 375
Left = 1800
TabIndex = 37
Top = 1080
Width = 1335
End
Begin VB.TextBox Text4
Height = 1335
Left = 4440
MultiLine = -1 'True
TabIndex = 36
Top = 3240
Width = 3975
End
Begin VB.Frame Frame3
Caption = "参加班主任例会(次)"
Height = 1215
Left = 3720
TabIndex = 32
Top = 240
Width = 2055
Begin VB.OptionButton Option2
Caption = "一次"
Height = 255
Index = 0
Left = 480
TabIndex = 35
Top = 360
Width = 855
End
Begin VB.OptionButton Option2
Caption = "两次"
Height = 255
Index = 1
Left = 480
TabIndex = 34
Top = 600
Value = -1 'True
Width = 855
End
Begin VB.OptionButton Option2
Caption = "无"
Height = 255
Index = 2
Left = 480
TabIndex = 33
Top = 840
Width = 855
End
End
Begin VB.Frame Frame4
Caption = "参加班会(次)"
Height = 1215
Left = 6360
TabIndex = 26
Top = 240
Width = 2055
Begin VB.OptionButton Option4
Caption = "1"
Height = 255
Index = 0
Left = 240
TabIndex = 31
Top = 360
Width = 855
End
Begin VB.OptionButton Option4
Caption = "2"
Height = 255
Index = 1
Left = 240
TabIndex = 30
Top = 600
Width = 855
End
Begin VB.OptionButton Option4
Caption = "3"
Height = 255
Index = 2
Left = 1080
TabIndex = 29
Top = 360
Width = 855
End
Begin VB.OptionButton Option4
Caption = "4"
Height = 255
Index = 3
Left = 1080
TabIndex = 28
Top = 600
Value = -1 'True
Width = 855
End
Begin VB.OptionButton Option4
Caption = "没有参加过"
Height = 255
Index = 4
Left = 240
TabIndex = 27
Top = 840
Width = 1335
End
End
Begin VB.Frame Frame5
Caption = "有无集体通报批评"
Height = 975
Left = 240
TabIndex = 23
Top = 2400
Width = 3135
Begin VB.OptionButton Option1
Caption = "无"
Height = 375
Index = 0
Left = 480
TabIndex = 25
Top = 360
Value = -1 'True
Width = 975
End
Begin VB.OptionButton Option1
Caption = "有"
Height = 375
Index = 2
Left = 1800
TabIndex = 24
Top = 360
Width = 975
End
End
Begin VB.Frame Frame7
Caption = "上交材料"
Height = 1335
Left = 3720
TabIndex = 20
Top = 1680
Width = 2055
Begin VB.OptionButton Option5
Caption = "是"
Height = 255
Index = 0
Left = 480
TabIndex = 22
Top = 360
Value = -1 'True
Width = 735
End
Begin VB.OptionButton Option5
Caption = "否"
Height = 255
Index = 1
Left = 480
TabIndex = 21
Top = 840
Width = 735
End
End
Begin VB.Frame Frame8
Caption = "有无重大事故"
Height = 1335
Left = 6360
TabIndex = 17
Top = 1680
Width = 2055
Begin VB.OptionButton Option6
Caption = "无"
Height = 375
Index = 0
Left = 360
TabIndex = 19
Top = 360
Value = -1 'True
Width = 855
End
Begin VB.OptionButton Option6
Caption = "有"
Height = 255
Index = 1
Left = 360
TabIndex = 18
Top = 840
Width = 735
End
End
Begin VB.Frame Frame9
Caption = "指导参加“成才杯”活动"
Height = 1095
Left = 240
TabIndex = 15
Top = 3480
Width = 3135
Begin VB.OptionButton Option7
Caption = "是"
Height = 375
Index = 0
Left = 480
TabIndex = 16
Top = 480
Value = -1 'True
Width = 735
End
End
Begin VB.ComboBox Combo4
Height = 300
ItemData = "frmupluru.frx":0000
Left = 1800
List = "frmupluru.frx":001F
TabIndex = 14
Text = "选择"
Top = 1800
Width = 1335
End
Begin VB.Label Label3
Caption = "班级月扣分"
Height = 375
Left = 360
TabIndex = 42
Top = 480
Width = 1335
End
Begin VB.Label Label4
Caption = "通报批评(次)"
Height = 375
Left = 360
TabIndex = 41
Top = 1080
Width = 1095
End
Begin VB.Label Label12
Caption = "备注"
Height = 615
Left = 3720
TabIndex = 40
Top = 3240
Width = 615
End
Begin VB.Label Label7
AutoSize = -1 'True
Caption = "寝室到位(次)"
Height = 180
Left = 360
TabIndex = 39
Top = 1800
Width = 1260
End
End
Begin VB.OptionButton Option7
Caption = "否"
Height = 375
Index = 1
Left = 2400
TabIndex = 12
Top = 5160
Width = 735
End
Begin VB.Frame Frame1
Caption = "班主任基本信息"
Height = 855
Left = 360
TabIndex = 7
Top = 240
Width = 4815
Begin VB.TextBox Text1
Height = 375
Left = 2880
TabIndex = 9
Top = 360
Width = 1575
End
Begin VB.ComboBox Combo1
Height = 300
Left = 840
TabIndex = 8
Text = "请选择"
Top = 360
Width = 1095
End
Begin VB.Label Label2
Caption = "姓名"
BeginProperty Font
Name = "楷体_GB2312"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 2280
TabIndex = 11
Top = 360
Width = 855
End
Begin VB.Label Label1
Caption = "班级"
BeginProperty Font
Name = "楷体_GB2312"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 120
TabIndex = 10
Top = 360
Width = 735
End
End
Begin VB.Frame Frame10
Caption = "考核月份"
Height = 855
Left = 5520
TabIndex = 2
Top = 240
Width = 3735
Begin VB.ComboBox Combo2
Height = 300
ItemData = "frmupluru.frx":003E
Left = 120
List = "frmupluru.frx":004E
TabIndex = 4
Top = 360
Width = 1335
End
Begin VB.ComboBox Combo3
Height = 300
ItemData = "frmupluru.frx":006A
Left = 2040
List = "frmupluru.frx":0092
TabIndex = 3
Top = 360
Width = 1095
End
Begin VB.Label Label5
Caption = "年"
Height = 375
Left = 1560
TabIndex = 6
Top = 360
Width = 495
End
Begin VB.Label Label6
Caption = "月"
Height = 255
Left = 3240
TabIndex = 5
Top = 360
Width = 375
End
End
Begin VB.CommandButton Command1
Caption = "确定"
Height = 495
Left = 2400
TabIndex = 1
Top = 6240
Width = 2175
End
Begin VB.CommandButton Command2
Caption = "取消"
Height = 495
Left = 5400
TabIndex = 0
Top = 6240
Width = 2175
End
End
Attribute VB_Name = "frmupluru"
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 Combo3_Click()
Dim mrccc As ADODB.Recordset
Dim msgtext As String
Dim txtSQL As String
Dim aa As String
aa = Format(CDate(Combo2 & "-" & Combo3 & "-" & "1"), "yyyy-mm-dd")
txtSQL = "select * from kaohe where class='" & Combo1 & "' and yuefen='" & aa & "' "
Set mrccc = ExecuteSQL(txtSQL, msgtext)
If mrccc.EOF = True Then
MsgBox "该班主任本月考核信息还未录入,请录入!", vbOKOnly + vbExclamation, "警告"
Exit Sub
End If
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 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
txtSQL = "delete from kaohe where class='" & Trim(Combo1) & "' and yuefen='" & smg & "'"
Set mr = ExecuteSQL(txtSQL, msgtext)
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 & "'"
Set mr = ExecuteSQL(txtSQL, msgtext)
Unload Me
frmupluru.Show
MsgBox "修改纪录成功!", vbOKOnly + vbExclamation, "修改纪录"
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
Private Sub Form_Load()
Me.Width = 9810
Me.Height = 7305
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