Hi,
I have created a database layer and a business layer. I have created a function in the database layer and rebuild > added the dll in business layer > when I call the function in the business layer it is not calling.
The database layer coding where the function CheckReportData is not being created:
Imports System.Globalization
Imports System.Collections
Imports System.Data.Common
Imports Microsoft.Practices.EnterpriseLibrary.Data
Imports Care21.BaseFramework
Imports Care21.BusinessObjects
Imports Care21.Utilities
#End Region
Public Class ReportDB
Public Function CheckReportData(ByVal iMonth, ByVal iYear, ByVal iUserid) As Boolean
Dim ReturnCode As Boolean = False
Dim ReturnValues As New Dictionary(Of String, Object)
Dim result As Boolean
Try
Dim DbObject As Database = DatabaseFactory.CreateDatabase()
Dim DbCommand As DbCommand = DbObject.GetStoredProcCommand("usp_Rpt_InpatientReturns")
Data.AddInParameter(DbCommand, "@paMonthIn", DbType.String, iMonth, DbObject)
Data.AddInParameter(DbCommand, "@paYearIn", DbType.String, iYear, DbObject)
Data.AddInParameter(DbCommand, "@paUserIdIn", DbType.String, iUserid, DbObject)
Dim dt As DataTable
Dim ds As New DataSet("tt")
Dim DataReaderObject As IDataReader = DbObject.ExecuteReader(DbCommand)
dt.Load(DataReaderObject)
If dt.Rows.Count = 0 Then
result = False
Else
result = True
End If
DbCommand.Parameters.Clear()
Catch ex As Exception
Throw
End Try
Return result
End Function
End Class
The business layer coding where I call the database layer function here:
#Region "Imports"
Imports Care21.Utilities
Imports Care21.BusinessObjects
Imports System.Globalization
Imports System.Data.Common
Imports System.Transactions
Imports Microsoft.Practices.EnterpriseLibrary.Data
Imports Care21.BaseFramework
Imports Care21.DataAccessLogic.RegistrationDB
#End Region
Public Class Report
#Region "Public Methods"
Public Function CheckReportData(ByVal iMonth, ByVal iYear, ByVal iUserid) As Boolean
Dim DbObject As ReportDB = New ReportDB()
Return DbObject.
End Function
#End Region
End Class