cls_course.cls
来自「学生信息的管理是学校经常遇到的问题。学生数量的积聚增加和学生认识制度的改革」· CLS 代码 · 共 53 行
CLS
53 行
VERSION 1.0 CLASS
BEGIN
MultiUse = -1 'True
Persistable = 0 'NotPersistable
DataBindingBehavior = 0 'vbNone
DataSourceBehavior = 0 'vbNone
MTSTransactionMode = 0 'NotAnMTSObject
END
Attribute VB_Name = "Cls_Course"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = True
Option Explicit
Dim mycnt As Cls_Connect
Private Sub Class_Initialize()
Set mycnt = New Cls_Connect
End Sub
Public Function QueryCourseById(mystr As String)
'按课程编号查询,用于修改和删除
Dim i As Integer
mycnt.QryName = "select * from CourseInfo where CourseID='" & mystr & " '"
mycnt.openQry
End Function
Public Property Get GetQryCourseByIdRs() As Recordset
'返回按课程编号查询的记录
Set GetQryCourseByIdRs = mycnt.MQueryRs
End Property
Public Sub OpenCourse()
' 打开课程表
mycnt.RcdName = "CourseInfo "
mycnt.openRcd
End Sub
Public Property Get GetCourseRs() As Recordset
'返回课程表的记录
Set GetCourseRs = mycnt.MRecordset
End Property
Public Function PrcCourseById(mycourseid As String)
'**该存储过程的原理:**
'根据 seminfo中的学期名称,再到courseinfo表中找符合该两表共同字段semid的记录
mycnt.PrcName = "QueryCourse"
mycnt.PrcPra = "@pra"
mycnt.OpenPrc mycourseid
End Function
Public Property Get GetPrcCourseByIdRs() As Recordset
'返回课程表的记录
Set GetPrcCourseByIdRs = mycnt.MStoreProcRS
End Property
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?