Hi,
Sorry, it's me again.
I think I am getting closer but i am still getting errors...
Can anyone help me with what I am doing wrong please?
So far I have added the following section to my TaxiRouteInfo.vb file:
Public Class FareCostsInfo
Private _TaxiType As Integer
Public Property TaxiType() As Integer
Get
Return _TaxiType
End Get
Set(ByVal value As Integer)
_TaxiType = value
End Set
End Property
Private _TariffType As Integer
Public Property TariffType() As Integer
Get
Return _TariffType
End Get
Set(ByVal value As Integer)
_TariffType = value
End Set
End Property
Private _AuthorityID As Integer
Public Property AuthorityID() As Integer
Get
Return _AuthorityID
End Get
Set(ByVal value As Integer)
_AuthorityID = value
End Set
End Property
End Class
And I have added the following to my TaxiRouteController.vb
<DataObjectMethod(DataObjectMethodType.Select)> _
Public Shared Function TaxiRoute_GetFareCosts(ByVal TaxiType As Integer,ByVal TariffType As Integer,ByVal AuthorityID As Integer) As List(Of FareCostsInfo)
Return CBO.FillCollection(Of FareCostsInfo)(CType(DataProvider.Instance().ExecuteReader("TaxiRoute_GetFareCosts", TaxiType,TariffType,AuthorityID), IDataReader))
End Function
But I get the following error
Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: BC30456: 'ExecuteReader' is not a member of 'YourCompany.Modules.TaxiRoute.DataProvider'.
Source Error:
|
Line 49: <DataObjectMethod(DataObjectMethodType.Select)> _
Line 50: Public Shared Function TaxiRoute_GetFareCosts(ByVal TaxiType As Integer,ByVal TariffType As Integer,ByVal AuthorityID As Integer) As List(Of FareCostsInfo)
Line 51: Return CBO.FillCollection(Of FareCostsInfo)(CType(DataProvider.Instance().ExecuteReader("TaxiRoute_GetFareCosts", TaxiType,TariffType,AuthorityID), IDataReader))
Line 52: End Function
Line 53:
|
I also have a dataprovider.vb and a sqldataprovider.vb in my app_code/TaxiRoute directory which the tutorial seems to say I dont need.
Trev