DAL/ROLETABLE_DAL.vb

(完整代码) 1KB

Imports System
Imports System.Data
Imports System.Configuration
Imports System.Web
Imports System.Text
Imports System.Collections.Generic
Imports System.Data.SqlClient
Imports SQLHelper
Imports Model
Public Class ROLETABLE_DAL
    Public Function Add_ROLETABLE(ByVal strrole As ROLETABLE) As Integer

        Dim sqlHelper As New Global.SQLHelper.SQLHelper()
        Dim ParamList As SqlParameter() = {sqlHelper.CreateInParam("@USERID", SqlDbType.NVarChar, 50, strrole.USERID), _
                                           sqlHelper.CreateInParam("@GROUPID", SqlDbType.NVarChar, 50, strrole.GROUPID)}
        Try
            Return (sqlHelper.RunProc("Add_ROLETABLE", ParamList))
        Catch ex As Exception
            SystemError.CreateErrorLog(ex.Message)
            Throw New Exception(ex.Message, ex)
        End Try
    End Function

    Public Function Update_ROLETABLE(ByVal strrole As ROLETABLE) As Integer
        Dim sqlHelper As New Global.SQLHelper.SQLHelper()
        Dim ParamList As SqlParameter() = {sqlHelper.CreateInParam("@USERID", SqlDbType.NVarChar, 50, strrole.USERID), _
                                           sqlHelper.CreateInParam("@GROUPID", SqlDbType.NVarChar, 50, strrole.GROUPID)}
        Try
            Return (sqlHelper.RunProc("Update_ROLETABLE", ParamList))
        Catch ex As Exception
            SystemError.CreateErrorLog(ex.Message)
            Throw New Exception(ex.Message, ex)
        End Try
    End Function

    Public Sub Delete_ROLETABLE(ByVal struserid As String)
        Dim sqlHelper As New Global.SQLHelper.SQLHelper()
        Dim ParamList As SqlParameter() = {sqlHelper.CreateInParam("@ID", SqlDbType.NVarChar, 50, struserid)}
        Try
            sqlHelper.RunProc("Delete_ROLETABLE", ParamList)
        Catch ex As Exception
            SystemError.CreateErrorLog(ex.Message)
            Throw New Exception(ex.Message, ex)
        End Try
    End Sub

End Class





24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。