【VB开源代码栏目提醒】:网学会员在VB开源代码频道为大家收集整理了D成绩评审.frm提供大家参考,希望对大家有所帮助!
VERSION 5.00
Object = "{CDE57A40-8B86-11D0-B3C6-00A0C90AEA82}#1.0#0"; "MSDATGRD.OCX"
Begin VB.Form frmResult
Caption = "成绩评审"
ClientHeight = 5055
ClientLeft = 4770
ClientTop = 3240
ClientWidth = 8850
LinkTopic = "Form1"
ScaleHeight = 5055
ScaleWidth = 8850
Begin VB.Frame Frame1
Caption = "成绩评审"
Height = 4635
Index = 0
Left = 120
TabIndex = 0
Top = 120
Width = 8655
Begin MSDataGridLib.DataGrid DataGrid1
Height = 3075
Left = 3600
TabIndex = 13
Top = 240
Width = 4815
_ExtentX = 8493
_ExtentY = 5424
_Version = 393216
HeadLines = 1
RowHeight = 15
BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Caption = "成绩评审结果"
ColumnCount = 2
BeginProperty Column00
DataField = ""
Caption = ""
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column01
DataField = ""
Caption = ""
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
SplitCount = 1
BeginProperty Split0
BeginProperty Column00
EndProperty
BeginProperty Column01
EndProperty
EndProperty
End
Begin VB.ComboBox CboQuery
Height = 315
Index = 4
Left = 1080
TabIndex = 12
Top = 2400
Width = 2295
End
Begin VB.CommandButton CmdExit
Caption = "退出"
Height = 495
Left = 5460
TabIndex = 6
Top = 3720
Width = 1455
End
Begin VB.CommandButton CmdResult
Caption = "评审"
Height = 495
Left = 1800
TabIndex = 5
Top = 3720
Width = 1635
End
Begin VB.ComboBox CboQuery
Height = 315
Index = 3
Left = 1080
TabIndex = 4
Top = 1920
Width = 2295
End
Begin VB.ComboBox CboQuery
Height = 315
Index = 2
Left = 1080
TabIndex = 3
Top = 1440
Width = 2295
End
Begin VB.ComboBox CboQuery
Height = 315
Index = 0
Left = 1080
TabIndex = 2
Top = 480
Width = 2295
End
Begin
VB.ComboBox CboQuery
Height = 315
Index = 1
Left = 1080
TabIndex = 1
Top = 960
Width = 2295
End
Begin VB.Label Label2
Caption = "评审类型:"
Height = 375
Left = 120
TabIndex = 11
Top = 2400
Width = 1095
End
Begin VB.Label LblCourse
Caption = "课程:"
Height = 375
Index = 1
Left = 480
TabIndex = 10
Top = 1920
Width = 1335
End
Begin VB.Label Label1
Caption = "班级:"
Height = 255
Left = 480
TabIndex = 9
Top = 1440
Width = 975
End
Begin VB.Label Label8
Caption = ":"
Height = 255
Index = 0
Left = 480
TabIndex = 8
Top = 480
Width = 735
End
Begin VB.Label Label9
Caption = "系:"
Height = 240
Left = 600
TabIndex = 7
Top = 960
Width = 495
End
End
End
Attribute VB_Name = "frmResult"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim SQLStr As String
Dim msg As String
Dim rs As ADODB.Recordset
Private Sub FixData()
'在comboBox载入课程列表
Dim rst As ADODB.Recordset
Dim strItem As String
SQLStr = "select courseID,nameCourse from
课程信息表 where courseID in("
SQLStr = SQLStr & "select courseID from 课程分配信息表 where classID='"
SQLStr = SQLStr & Left(Trim(CboQuery(2).Text), 6) & "') order by courseID"
Set rst = SelectSQL(SQLStr, msg)
CboQuery(3).Clear
If rst.RecordCount > 0 Then
CboQuery(3).AddItem ("全部")
Do While Not rst.EOF
strItem = rst.Fields(0) & " " & rst.Fields(1)
CboQuery(3).AddItem (strItem)
rst.MoveNext
Loop
rst.Close
CboQuery(3).ListIndex = 0
End If
End Sub
Private Sub SelectData(Index As Integer)
Dim rst As ADODB.Recordset
Dim strItem As String
'初始化系ComboBox
If Index = 0 Then '如果是选择院
SQLStr = " select departmentID,nameD from 系信息表 where collegeID='"
SQLStr = SQLStr & Left(Trim(CboQuery(0).Text), 2) & "' order by departmentID"
Set rst = SelectSQL(SQLStr, msg)
CboQuery(1).Clear
If rst.RecordCount > 0 Then
Do While Not rst.EOF
strItem = rst.Fields(0) & " " & rst.Fields(1)
CboQuery(1).AddItem (strItem)
rst.MoveNext
Loop
rst.Close
CboQuery(1).ListIndex = 0
Else
Exit Sub
End If
ElseIf Index = 1 Then '如果是选择系
SQLStr = " select classID,classname from 班级信息表 where departmentID='"
SQLStr = SQLStr & Left(Trim(CboQuery(1).Text), 4) & "' order by classID"
Set rst = SelectSQL(SQLStr, msg)
CboQuery(2).Clear
If rst.RecordCount > 0 Then
Do While Not rst.EOF
st