Imports System
Imports System.Web.UI
Imports Northwind45.BusinessObject
Imports System.Web.Services
Imports System.Runtime.InteropServices
 
Namespace Northwind45
    Partial Public Class GridViewMoreInfo_Products
        Inherits System.Web.UI.Page
 
        Protected Sub GridView1_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs)
            Functions.GridViewRowDataBound(sender, e, 1)
        End Sub
 
        Protected Sub GridView1_RowCreated(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs)
            Functions.GridViewRowCreated(sender, e, 1)
        End Sub
 
        Public Function GetGridData(maximumRows As Integer, startRowIndex As Integer, <Out()> ByRef totalRowCount As Integer, sortByExpression As StringAs ProductsCollection
            Return Products.SelectSkipAndTake(maximumRows, startRowIndex, totalRowCount, sortByExpression)
        End Function
 
        <WebMethod()> _
        Public Shared Function GetProducts(productID As StringAs Products
            Return Northwind45.BusinessObject.Products.SelectByPrimaryKey(Convert.ToInt32(productID))
        End Function
    End Class
End Namespace