⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 frmscorequery.frm

📁 毕业前的一点小程序
💻 FRM
字号:
VERSION 5.00
Object = "{F0D2F211-CCB0-11D0-A316-00AA00688B10}#1.0#0"; "MSDATLST.OCX"
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Object = "{CDE57A40-8B86-11D0-B3C6-00A0C90AEA82}#1.0#0"; "MSDATGRD.OCX"
Begin VB.Form frmScoreQuery 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "学生成绩查询"
   ClientHeight    =   7290
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   10935
   LinkTopic       =   "Form1"
   LockControls    =   -1  'True
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   7290
   ScaleWidth      =   10935
   StartUpPosition =   2  '屏幕中心
   Begin VB.CommandButton btnEvaluate 
      Caption         =   "评估"
      Height          =   375
      Left            =   7800
      TabIndex        =   8
      Top             =   6600
      Width           =   2055
   End
   Begin MSAdodcLib.Adodc AdoTerm 
      Height          =   375
      Left            =   240
      Top             =   6600
      Visible         =   0   'False
      Width           =   2655
      _ExtentX        =   4683
      _ExtentY        =   661
      ConnectMode     =   0
      CursorLocation  =   3
      IsolationLevel  =   -1
      ConnectionTimeout=   15
      CommandTimeout  =   30
      CursorType      =   3
      LockType        =   3
      CommandType     =   8
      CursorOptions   =   0
      CacheSize       =   50
      MaxRecords      =   0
      BOFAction       =   0
      EOFAction       =   0
      ConnectStringType=   1
      Appearance      =   1
      BackColor       =   -2147483643
      ForeColor       =   -2147483640
      Orientation     =   0
      Enabled         =   -1
      Connect         =   ""
      OLEDBString     =   ""
      OLEDBFile       =   ""
      DataSourceName  =   ""
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   ""
      Caption         =   "AdoTerm"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      _Version        =   393216
   End
   Begin MSAdodcLib.Adodc Adodc1 
      Height          =   330
      Left            =   2520
      Top             =   6600
      Visible         =   0   'False
      Width           =   2895
      _ExtentX        =   5106
      _ExtentY        =   582
      ConnectMode     =   0
      CursorLocation  =   3
      IsolationLevel  =   -1
      ConnectionTimeout=   15
      CommandTimeout  =   30
      CursorType      =   3
      LockType        =   3
      CommandType     =   8
      CursorOptions   =   0
      CacheSize       =   50
      MaxRecords      =   0
      BOFAction       =   0
      EOFAction       =   0
      ConnectStringType=   1
      Appearance      =   1
      BackColor       =   -2147483643
      ForeColor       =   -2147483640
      Orientation     =   0
      Enabled         =   -1
      Connect         =   ""
      OLEDBString     =   ""
      OLEDBFile       =   ""
      DataSourceName  =   ""
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   ""
      Caption         =   "Adodc1"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      _Version        =   393216
   End
   Begin MSDataGridLib.DataGrid DataGrid1 
      Bindings        =   "frmScoreQuery.frx":0000
      Height          =   4575
      Left            =   120
      TabIndex        =   4
      Top             =   1800
      Width           =   10695
      _ExtentX        =   18865
      _ExtentY        =   8070
      _Version        =   393216
      AllowUpdate     =   0   'False
      HeadLines       =   1
      RowHeight       =   15
      BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      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.TextBox txtStuNo 
      Height          =   375
      Left            =   1440
      TabIndex        =   0
      Top             =   600
      Width           =   2175
   End
   Begin VB.Frame Frame1 
      Caption         =   "查询条件"
      Height          =   1575
      Left            =   120
      TabIndex        =   1
      Top             =   120
      Width           =   10695
      Begin MSDataListLib.DataCombo DataCombo1 
         Bindings        =   "frmScoreQuery.frx":0015
         Height          =   330
         Left            =   5040
         TabIndex        =   7
         Top             =   480
         Width           =   2415
         _ExtentX        =   4260
         _ExtentY        =   582
         _Version        =   393216
         Style           =   2
         Text            =   ""
      End
      Begin VB.CommandButton Command1 
         Caption         =   "查询"
         Height          =   375
         Left            =   8280
         TabIndex        =   5
         Top             =   480
         Width           =   1215
      End
      Begin VB.Label Label4 
         AutoSize        =   -1  'True
         Caption         =   "学期"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00FF0000&
         Height          =   210
         Left            =   4200
         TabIndex        =   6
         Top             =   600
         Width           =   450
      End
      Begin VB.Label Label2 
         AutoSize        =   -1  'True
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00FF0000&
         Height          =   210
         Left            =   4320
         TabIndex        =   3
         Top             =   480
         Width           =   120
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         Caption         =   "学生证号"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00FF0000&
         Height          =   210
         Left            =   240
         TabIndex        =   2
         Top             =   600
         Width           =   900
      End
   End
End
Attribute VB_Name = "frmScoreQuery"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False


Private Sub btnEvaluate_Click()

frmVote.TmpId = Adodc1.Recordset.Fields(5)
frmVote.tmpNo = Adodc1.Recordset.Fields(6)
frmVote.Show 1
End Sub

Private Sub Command1_Click()
If Len(Trim(txtStuNo.Text)) = 0 Then
MsgBox "请输入学生学号!", vbExclamation
txtStuNo.SetFocus
Exit Sub
End If

If Len(Trim(DataCombo1.Text)) = 0 Then
MsgBox "请选择学期!", vbExclamation
DataCombo1.SetFocus
Exit Sub
End If

Call Refresh_Scores

If Adodc1.Recordset.EOF = False Then
btnEvaluate.Enabled = True
End If

End Sub

Private Sub Refresh_Scores()

Adodc1.ConnectionString = conn
'查询课程名称,课程分数,开课学期,教师姓名
Adodc1.RecordSource = "select a.LessonName as 课程名称,b.Score as 课程分数,g.Class_Name as 所在班级,c.TermName as 学期名称,f.teacher_name as 教师姓名,f.teacher_Idendity,a.LessonId from Lessons a,Scores b,Terms c,Arrangement d,Students e,teacherInfo f,Classes g" _
                       & " where a.LessonId=d.LessonId and b.ArrangeId=d.ArrangeId and c.TermId=d.TermId and b.Student_Id=e.Student_Id and d.Teacher_Idendity=f.teacher_Idendity and g.Class_id=e.Class_Id and " _
                       & "e.BadgeId='" & MakeStr(Trim(txtStuNo.Text)) & "'" _
                       & " and c.TermId=" & Val(DataCombo1.BoundText)
Adodc1.Refresh

If Adodc1.Recordset.EOF = True Then
MsgBox "没有成绩记录!", vbInformation
Exit Sub
Else
'绑定到DataGrid控件
With DataGrid1
.Columns(0).Width = 3500
.Columns(1).Width = 3500
.Columns(2).Width = 3500
.Columns(3).Width = 3500
.Columns(4).Width = 0
.Columns(5).Width = 0
End With

End If
End Sub



Private Sub Form_Load()

AdoTerm.ConnectionString = conn
AdoTerm.RecordSource = "select * from Terms order by TermId"
AdoTerm.Refresh

DataCombo1.ListField = "TermName"
DataCombo1.BoundColumn = "TermId"

btnEvaluate.Enabled = False

End Sub

Private Sub Label3_Click()

End Sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -