db/clsIndustryAccountDbAccess.vb
(开头部分) 4KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
Imports System.Data.OleDb
''' <summary>
''' 行业科目
''' 对应表-S_IndustryAccount
''' </summary>
Public Class ClsIndustryAccountDbAccess
Inherits ClsBaseDbAccess
Public Sub New(ByVal s As String)
MyBase.New(s, TABLE_NAME_INDUSTRY_ACCOUNT)
End Sub
Public Sub New(ByVal s As String, ByVal n As String)
MyBase.New(s, n)
End Sub
''' <summary>
''' 返回指定行业编号 和 科目编号 的科目对象
''' </summary>
''' <param name="industryId"></param>
''' <param name="acct"></param>
''' <returns></returns>
Public Function GetAcctByIdCode(ByVal industryId As Integer, ByVal acct As String) As ClsIndustryAccount
Dim tmpCls As ClsIndustryAccount = Nothing
Try
Dim tmpSql As String
Dim tmpDbAccess = GetConnection()
Dim tmpList As List(Of ClsIndustryAccount)
Dim tmpParas(1) As OleDb.OleDbParameter
'打开数据库
tmpDbAccess.DbOpen()
'构造查询语句
tmpSql = "select * from [" & TABLE_NAME_INDUSTRY_ACCOUNT & "] "
tmpSql &= "where [IndustryId]=@IndustryId "
tmpSql &= " and [AcctCode]=@AcctCode "
tmpParas(0) = New OleDbParameter("", OleDb.OleDbType.Integer)
tmpParas(1) = New OleDbParameter("", OleDb.OleDbType.VarWChar)
tmpParas(0).Value = industryId
tmpParas(1).Value = acct
'查询并将返回数据解析为List对象
tmpList = TryCast(ConvertRecordToClass(tmpDbAccess.ExecuteSqlReturnDataSet(tmpSql, tmpParas)), List(Of ClsIndustryAccount))
If tmpList.Count > 0 Then
tmpCls = tmpList.Item(0)
End If
'关闭数据库
tmpDbAccess.DbClose()
Catch ex As OleDb.OleDbException
mErrorNumber = ex.ErrorCode
mErrorMessage = ex.Message
mErrorCreater = "ClsIndustryAccountDbAccess - GetAllAcctByIndustryId"
后面还有 84 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
