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

Tuesday, February 23, 2010

Tuesday, February 16, 2010

Category and category naviagtion

to day we learnt how to incorporate sql and grid view into our prototype website. some of the code also seem similar to wat we done last year
like some of these codes
Dim DBConnection As New MyConn
Dim MyConnection As New Data.SqlClient.SqlConnection(DBConnection.geConnString)
Dim cmdGetCategories As New Data.SqlClient.SqlCommand
With cmdGetCategories
.Connection = MyConnection
'alloe us to creat a query\
.CommandType = Data.CommandType.Text
.CommandText = "SELECT * FROM XYZCategories"

End With
' this is store in memory
Dim dsResults As New Data.DataSet
'this is telling the adress of were the data is or what other langauge is avaible does not have to be
' SQL
Dim daDataAdapter As New Data.SqlClient.SqlDataAdapter(cmdGetCategories)

daDataAdapter.Fill(dsResults, "AllCategoryNames")
MyConnection.Open()
MyConnection.Close()

Tuesday, February 9, 2010

sessions&Response Request & Query Strings

R OK today lesson we learn how to use 2 different types of way to send data around

sessions variables- are permently on the server and will be there every time until you get out of it

Response Request & Query Strings- only last from a page to another and the user can only see it

first day

ok well this is my first day back and in a diploma cource
lols this is gona be hard

diploma in programming

hi this is a blog for diploma in programming