Thursday, February 25, 2010

making another class

ok this lesson we are making a new class and is for productID the same thing we did for categoryID and a new table for product in the data base and then displaying them in the grid view and making sure that the url changes if we hover on another data.

this is the properties for the new class

Public Class Product
'this is the properties of this class
Private intProductID As Integer
Private strProductName As String
Private decPrice As Decimal

' this is creating a new properties
Public Sub New(ByVal productID As Integer, ByVal ProductName As String, ByVal Price As Decimal)
intProductID = productID
strProductName = ProductName
decPrice = Price
End Sub

'is setting an id inside of inproductID so we are like making a propertey in inproductID
Public Sub setProductID(ByVal ID As Integer)
intProductID = ID
End Sub
'this is calling the ID in the intProductID properties
Public Function getProductID() As Integer
Return intProductID
End Function


Public Sub setProductName(ByVal Name As String)
strProductName = Name
End Sub

Public Function getProductName() As String
Return strProductName
End Function

Public Sub setPrice(ByVal Price As Decimal)
decPrice = price
End Sub

Public Function decPrice() As Decimal
Return decPrice
End Function
End Class

No comments:

Post a Comment