Hi All,
I'm kinda of stuck. I'm designing an MVC framework. I'm trying to pass back a dataset back to a dataview, but I having a hell of a time trying to figure out how to do this. Don't know why?
I'm able to create the dataset it's just that I can't pass it back to the Dataview. Keep in mind that this is generic Model.
Thanks in advanced
Here is what I have in the Model Object:
Code:Option Strict On Imports DSA Friend Class ModelData Private _ds As DataSet Private _DataInfo As New DataTable("tablename") Public Sub New() Try Dim oRequest As New DSARequest Dim oParam As New DSARequest.Parameter Dim oFactory As DSAAbstractFactory Dim oDataSet As DSADataSet oFactory = New DSASqlFactory With oRequest .Command = "dbo.spr_Accounts" .CommandType = CommandType.StoredProcedure 'oParam.ParamName = 'oParam.ParamValue = '.Parameters.Add(oParam) .Role = DSARequest.UserRole.Admin .Transactional = False End With oDataSet = oFactory.ExecuteDataSet(oRequest) _ds = oDataSet.ReturnedDataSet Catch ex As Exception Exit Sub End Try End Sub Public ReadOnly Property DataInfo() As DataTable Get Return _DataInfo End Get End Property End Class Public Class DataInformation Private _modelData As ModelData Private _infoData As New DataView Public Sub New() Try _modelData = New ModelData With _infoData .Table = _modelData.DataInfo End With Catch ex As Exception Debug.WriteLine(ex.Message) Exit Sub End Try End Sub Public ReadOnly Property infoData() As DataView Get Return _infoData End Get End Property 'Public Function getchildData(ByVal childID As Integer) As ChildData ' Return New ChildData(childID, _modelData) 'End Function End Class Public Class ChildData End Class![]()




Reply With Quote