File: ShoppingCart.vb
Imports Microsoft.VisualBasic
_
Public Class ShoppingCart
Private PID As String
Private CompanyProductName As String
Private Number As Integer
Private Price As Decimal
Private DateAdded As DateTime
Public Property ProductID() As String
Get
Return PID
End Get
Set(ByVal value As String)
PID = value
End Set
End Property
Public Property ProductName() As String
Get
Return CompanyProductName
End Get
Set(ByVal value As String)
CompanyProductName = value
End Set
End Property
Public Property NumberSelected() As Integer
Get
Return Number
End Get
Set(ByVal value As Integer)
Number = value
End Set
End Property
Public Property ItemPrice() As Decimal
Get
Return Price
End Get
Set(ByVal value As Decimal)
Price = value
End Set
End Property
Public Property DateItemAdded() As DateTime
Get
Return DateAdded
End Get
Set(ByVal value As DateTime)
DateAdded = value
End Set
End Property
End Class
File: ShoppingCart.cs
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System;
[Serializable]
public class ShoppingCart
{
private string PID;
private string CompanyProductName;
private int Number;
private decimal Price;
private DateTime DateAdded;
public ShoppingCart() { }
public string ProductID
{
get { return PID; }
set { PID = value; }
}
public string ProductName
{
get { return CompanyProductName; }
set { CompanyProductName = value; }
}
public int NumberSelected
{
get { return Number; }
set { Number = value; }
}
public decimal ItemPrice
{
get { return Price; }
set { Price = value; }
}
public DateTime DateItemAdded
{
get { return DateAdded; }
set { DateAdded = value; }
}
}
File: Web.config