Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
D

Danh Le

@Danh Le
About
Posts
1
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Can you help me in this token? if(this._Item==null){ this._Item = new List<Cart>(); this._dateCreate = DateTime.Now; } }.I do not understand it and why use
    D Danh Le

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Web;

    namespace Shopping
    {
    public class Cart
    {
    private int _IDproduct;
    private string _nameProduct;
    private int _Quantity;
    private string _ImageUrl;
    private double _Price;
    private double _Total;

       public Cart(){}
       public  Cart(int IDProduct, string NameProduct, int Quantity, string ImageURL, double Price){
    
           \_IDproduct = IDProduct;
           \_nameProduct = NameProduct;
           \_Quantity = Quantity;
           \_ImageUrl = ImageURL; ;
           \_Price = Price;
           \_Total = Price\*Quantity;
                }
       public int IDProduct {
           get { return \_IDproduct; }
           set { \_IDproduct = value; }
       }
    
       public string NameProduct
       {
           get { return \_nameProduct; }
           set { \_nameProduct = value; }
       }
    
       public int Quantity
       {
           get { return \_Quantity; }
           set { \_Quantity = value; }
       }
    
       public string ImageURL
       {
           get { return \_ImageUrl; }
           set { \_ImageUrl = value; }
       }
    
       public double Price
       {
           get { return \_Price; }
           set { \_Price = value; }
       }
    
       public double Total
       {
           get { return \_Price\*\_Quantity; }
    
       }
             }
    
        public  class CartItem{
    
            private DateTime \_dateCreate;
            private DateTime \_dateUpdate;
            private List<Cart> \_Item;
            public CartItem() {
    
             if(this.\_Item==null){
    
                     this.\_Item = new List<Cart>();
                     this.\_dateCreate = DateTime.Now;
             }
                        }
    
            public List<Cart> Item {
                get { return \_Item; }
                set { \_Item = value; }
            }
    
            public void Insert(int IDProduct, int Quantity, string ImageURL, string NameProuct, double Price) {
    
    
            }
    
    
        }
    

    }

    ASP.NET csharp linq help question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups