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

📄 classtime.vb

📁 学生信息管理系统
💻 VB
字号:
Imports CommonDBImports System.DataPublic Class ClassTime    Private m_iId As Integer    Public m_sCaption As String    Public m_sDuringTime As String    Public ReadOnly Property Id() As Integer
        Get
            Id = m_iId
        End Get
    End Property    Public Sub New(ByVal iId As Integer)        Dim drTmp As DataRow = DbBase.DataInterface.Execute4DS("select caption, during_time from class_time where id = " & iId).Tables(0).Rows(0)        Me.m_iId = iId        Me.m_sCaption = drTmp(0)        Me.m_sDuringTime = drTmp(1)    End Sub    '更新上课时间信息:增加上课时间、修改上课时间    Public Function Update() As Integer        If DbBase.DataInterface.Execute4Value("select count(id) from class_time where id = " & Me.m_iId) = 0 Then            DbBase.DataInterface.ExecuteSql("insert into class_time (caption,during_time) values ('" & Me.m_sCaption & "','" & Me.m_sDuringTime & "')")
        Else
            DbBase.DataInterface.ExecuteSql("update class_time set caption = '" & Me.m_sCaption & "', during_time = '" & Me.m_sDuringTime & "'")
        End If    End Function    '删除上课时间    Public Function Delete() As Integer        Delete = DbBase.DataInterface.ExecuteSql("delete from class_time where id = " & Me.m_iId)    End FunctionEnd Class 

⌨️ 快捷键说明

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