hello
i learn with article
http://msdn.microsoft.com/practices/apptype/webapps/default.aspx?pull=/library/en-us/dnpag/html/diforwc-ap02.asp#diforwc-ap02_plag_howtodesigncrudform
THE SECTION
How To: Design Data Maintenance Forms to Support Create, Read, Update, and Delete Operations
i found this article very good my objective is design the data access layer with application block
The article is very nice but i have some problem ..
Idont know what is the problem
LAYER BUSINESS ENTITY
----------------------------------
i have a dataset typed CustomerDS
LAYER DATA ACCESS
-----------------------------------------------------
Public Function GetById(ByVal customerId As Integer) As CustomerDS.Customer * I HAVE ERROR ONLY I CAN PUT customerDataTable AND CustomerDS.customerDataRow
Try
Dim customer As New CustomerDS
' Execute the "select single entity" stored procedure
Dim reader As SqlDataReader = SqlHelper.ExecuteReader(Me.connectionStr, "Customer_SelectByID", customerId)
Try
' Populate the dataset with reader rows
SQLHelperExtension.Fill(reader, customer, customer.Customers.TableName, 0, 1)
*THE SQLHELPEREXTENSION I HAVE ERROR WITH THIS
Finally
reader.Dispose()
End Try
' Return the first row
Return customer.Customers(0)
Catch e As SqlException
End Try
COMO DEVUELVO EL DATASET CON LA TABLA CUSTOMER
LAYER BUSINESS LOGIC
----------------------------------
' Return the customer with the specified ID
Public Function GetById(ByVal customerId As Integer) As CustomerDS.Customer * I HAVE ERROR IS NOT DEFINED
' Create the DALC component
Dim customerDalc As New CustomerDalc
' Get the specified customer using the DALC component
Return customerDalc.GetById(customerId)
End Function 'GetById
IN MY PAGE ASPX
------------
' Create a "customer" business component
Dim customerBc As New CustomerBc()
' Get the specified customer's details from the data store
Dim customer As CustomerDs.Customer = customerBc.GetById(CInt(ViewState("CustomerId"))) *******I HAVE ERROR CustomerDS.Customer
' Populate the form controls with customer details
txtCompany.Text = customer.CompanyName
txtContact.Text = customer.ContactName
i dont understan why i dont have CustomerDS.Customer