Beispiel #1
0
 public ItemGioHang(int id)
 {
     using (LIMUPAStoreEntities db = new LIMUPAStoreEntities())
     {
         this.MaSP = id;
         PRODUCT product = db.PRODUCTs.Single(s => s.PRODUCT_ID == id);
         TenSP     = product.PRODUCT_NAME;
         HinhAnh   = product.PRODUCT_IMAGE;
         DonGia    = (decimal)product.PRICE;
         SoLuong   = 1;
         ThanhTien = DonGia * SoLuong;
     }
 }