Ante todo muchas gracias por los aportes que habeis realizado sobre este tema. Ahora tengo las siguientes clases
Código PHP:
Public Class DataGridBL
Private Shared m_current As New DataGridBL
Dim dl As New DataGridDL
Public Shared ReadOnly Property Current() As DataGridBL
Get
Return m_current
End Get
End Property
Private Sub New()
End Sub
Public Function getDataGrid(ByVal ProductoID As String) As DataGridEEList
Return Current.dl.DataGridEntidad(ProductoID)
End Function
End Class
Y en esta última clase (la capa datos) es donde me he quedado estancado ¿cómo podría continuar? según esta estructura que he seguido igual me estoy liando demasiado.
Muchas gracias.
Código PHP:
Public Class DataGridEE
Private m_productsID As String
Private m_productsName As String
Private m_UnitPrice As Integer
Private m_QtyAvailable As Integer
Sub New()
End Sub
Property ProductsID As String
Get
Return m_productsID
End Get
Set(ByVal value As String)
m_productsID = value
End Set
End Property
Property ProdcutsName As String
Get
Return m_productsName
End Get
Set(ByVal value As String)
m_productsName = value
End Set
End Property
Property UnitPrice As Integer
Get
Return m_UnitPrice
End Get
Set(ByVal value As Integer)
m_UnitPrice = value
End Set
End Property
Property QtyAvailable As Integer
Get
Return m_QtyAvailable
End Get
Set(ByVal value As Integer)
m_QtyAvailable = value
End Set
End Property
Public Sub New(ByVal pProductsID As String,
ByVal pProdcutsName As String,
ByVal pUnitPrice As Integer,
ByVal pQtyAvailable As Integer)
m_productsID = pProductsID
m_productsName = pProdcutsName
m_UnitPrice = pUnitPrice
m_QtyAvailable = pQtyAvailable
End Sub
End Class
Public Class DataGridEEList
Inherits SortableList(Of DataGridEE)
End Class
Código PHP:
Imports System.Data.SqlClient
Imports System.Data
Friend Class DataGridDL
Dim con As New SqlConnection
Sub abrir()
con = New SqlConnection(ConfigurationManager.ConnectionStrings("CadenaConexion").ConnectionString)
con.Open()
End Sub
Public Function DataGridEntidad(ByVal productoId As String) As DataGridEEList
abrir()
Dim ret As DataGridEEList = New DataGridEEList
Dim oDataGridEE As DataGridEE
Dim param As New SqlParameter
Using bd As New SqlConnection(ConfigurationManager.ConnectionStrings("cadenaConexion").ConnectionString)
Using cmd As New SqlCommand("productos", bd)
Return ret
End Using
End Using
Return ret
End Function
End Class