Advertisement
Advertisement
| 05.29.2008 at 01:15AM PDT, ID: 23440667 |
|
[x]
Attachment Details
|
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: 57: 58: 59: 60: 61: 62: 63: 64: 65: 66: 67: 68: 69: 70: 71: 72: 73: 74: 75: 76: 77: 78: 79: 80: 81: 82: 83: 84: 85: 86: 87: 88: 89: 90: 91: 92: 93: 94: |
'''''''''''''
Cartitmes.vb
''''''''''''
Imports Microsoft.VisualBasic
Imports System
Imports System.ComponentModel
Namespace Sample.OopShop.BO
Public Class CartItems
#Region "Private Property"
Private _intCartItemID As Integer = -1
Private _strCartItemName As String = String.Empty
Private _intCartCost As Integer = -1
Private _intCartQuantity As Integer = -1
#End Region
#Region "Public Property"
Public Property CartItemID() As Integer
Get
Return _intCartItemID
End Get
Set(ByVal value As Integer)
_intCartItemID = value
End Set
End Property
Public Property CartItemName() As String
Get
Return _strCartItemName
End Get
Set(ByVal value As String)
_strCartItemName = value
End Set
End Property
Public Property CartCost() As Integer
Get
Return _intCartCost
End Get
Set(ByVal value As Integer)
_intCartCost = value
End Set
End Property
Public Property CartQuantity() As Integer
Get
Return _intCartQuantity
End Get
Set(ByVal value As Integer)
_intCartQuantity = value
End Set
End Property
#End Region
End Class
End Namespace
''''''''''''''''''
index.vb
''''''''''''''''''
Imports System
Imports System.Data
Imports System.Collections.Generic
Imports System.Reflection
Imports System.Web.UI.WebControls
Imports Sample.OopShop.BO
Imports System.Data.OleDb
Partial Class index
Inherits System.Web.UI.Page
Private CartArray As ArrayList ' Declared Arraylist
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
End Sub
Sub AddToCart(ByVal s As Object, ByVal e As DataListCommandEventArgs)
Dim ItemID As Integer = DataList1.DataKeys(e.Item.ItemIndex)
' Creating object of CartItems
Dim ObjCartItem As CartItems = New CartItems
' Bellow code is not hold items comming from Gridview in to this object
ObjCartItem.CartItemID = Item will come from Datalist<<<<<<<<< here i am stuck <<<<<<<<<<<<<<<<<How i will Retrive Selected Items from Datalist
ObjCartItem.CartItemName =Item will Come from datalist<<<<<<<<< here i am stuck <<<<<<<<<<<<<How i will Retrive Selected Items from Datalist
End Sub
End Class
|