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

📄 conectioninformation.vb

📁 ADO.net项目“教师信息管理系统”
💻 VB
字号:
Imports System.Data.SqlClient
Public Class ConectionInformation
    Implements IBLL.IConectionInformation

#Region "定义成员 "
    Dim myIDAL As IDAL.IDAL
    Dim m_Title As String = "联系方式设置与管理"
    Dim m_TableName As String = "教师联系方式"
    Dim m_StoredProcedure As String = "查询教师联系方式"
    Dim m_DataSet As New DataSet
    Dim m_Class As String
    Dim m_Code As String
    Dim m_Mode As String
    Dim m_Mark As String
#End Region

#Region "构造函数"
    Public Sub New()
        myIDAL = CType( _
        System.Reflection.Assembly.Load("DataAccessTire"). _
        CreateInstance("DataAccessTire.DataAccess"), IDAL.IDAL)
    End Sub
#End Region

#Region "定义属性 "

    Public ReadOnly Property Title() As String _
    Implements IBLL.IConectionInformation.Title
        Get
            Return m_Title
        End Get
    End Property

    Public ReadOnly Property DataSet() As System.Data.DataSet _
    Implements IBLL.IConectionInformation.DataSet
        Get
            Return m_DataSet
        End Get
    End Property

    Public Property TableName() As String _
    Implements IBLL.IConectionInformation.TableName
        Get
            Return m_TableName
        End Get
        Set(ByVal Value As String)
            m_TableName = Value
        End Set
    End Property

    Public Property ClassID() As String _
    Implements IBLL.IConectionInformation.ClassID
        Get
            Return m_Class
        End Get
        Set(ByVal Value As String)
            m_Class = Value
        End Set
    End Property
    Public Property Code() As String _
    Implements IBLL.IConectionInformation.Code
        Get
            Return m_Code
        End Get
        Set(ByVal Value As String)
            m_Code = Value
        End Set
    End Property

    Public Property Mode() As String _
    Implements IBLL.IConectionInformation.Mode
        Get
            Return m_Mode
        End Get
        Set(ByVal Value As String)
            m_Mode = Value
        End Set
    End Property

    Public Property Mark() As String _
    Implements IBLL.IConectionInformation.Mark
        Get
            Return m_Mark
        End Get
        Set(ByVal Value As String)
            m_Mark = Value
        End Set
    End Property

#End Region

#Region "定义方法 "
    Public Function myFill(ByRef ClassCode As String, _
    ByRef Code As String) As Boolean _
    Implements IBLL.IConectionInformation.myFill
        Try
            Dim myParameters As SqlParameter() = { _
            New SqlParameter("@ClassCode", SqlDbType.VarChar, 2), _
            New SqlParameter("@Code", SqlDbType.VarChar, 4)}
            myParameters(0).Value = ClassCode
            myParameters(1).Value = Code
            myIDAL.myFill(m_DataSet, m_StoredProcedure, m_TableName, myParameters)
            Return True
        Catch ex As Exception
            Throw New Exception(ex.Message)
            Return False
        End Try
    End Function


    Public Function myFill() As Boolean _
    Implements IBLL.IConectionInformation.myFill
        Try
            myIDAL.myFill(m_DataSet, "显示全部教师联系方式", "教师联系方式", Nothing)
            Return True
        Catch ex As Exception
            Throw New Exception(ex.Message)
            Return False
        End Try
    End Function

    Public Function myUpdate(ByRef ClassCode As String, _
    ByRef Code As String) As Boolean _
    Implements IBLL.IConectionInformation.myUpdate
        Try
            Dim myParameters As SqlParameter() = { _
            New SqlParameter("@ClassCode", SqlDbType.VarChar, 2), _
            New SqlParameter("@Code", SqlDbType.VarChar, 4)}
            myParameters(0).Value = ClassCode
            myParameters(1).Value = Code
            myIDAL.myUpdate(m_DataSet, m_StoredProcedure, m_TableName, myParameters)
            Return True
        Catch ex As Exception
            Throw New Exception(ex.Message)
            Return False
        End Try
    End Function

    Public Function myDataRelation() As Boolean _
    Implements IBLL.IConectionInformation.myDataRelation
        Try
            myIDAL.myDataRelation( _
            m_DataSet, "查询部门管理", "部门管理", "部门编码", _
                       "查询教师基本情况", "教师基本情况表", "部门编码", _
                       "部门教师")
            Return True
        Catch ex As Exception
            Throw New Exception(ex.Message)
            Return False
        End Try
    End Function
#End Region

End Class

⌨️ 快捷键说明

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