public class CartItem:IEquatable<CartItem> { public int qty{get;set;} private int _cartid; public int Cart_ID { get { return _cartid; } set { _cartid = value; } } private cat_detail _book = null; public cat_detail cat { get { if (_book== null) { _book =new cat_detail(Cart_ID); } return _book; } } public string Name { get { return cat.name; } } public string Type { get { return cat.type; } } public decimal Price { get { return cat.price; } } public string Description { get { return cat.description; } } public decimal TotalPrice { get { return Price * qty; } } public CartItem(int id) { this.Cart_ID = id; } public bool Equals(CartItem id) { return id.Cart_ID ==this.Cart_ID; } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)