Пример #1
0
 public itemGioHang(int iMaSP, int sl)
 {
     using (QuanLyBanHangModel db = new QuanLyBanHangModel())
     {
         this.MaSP = iMaSP;
         SanPham sp = db.SanPhams.Single(n => n.MaSP == iMaSP);
         this.TenSP     = sp.TenSP;
         this.DonGia    = sp.DonGia.Value;
         this.HinhAnh   = sp.HinhAnh;
         this.SoLuong   = sl;
         this.ThanhTien = DonGia * SoLuong;
     }
 }