示例#1
0
        public static void ThemDoUongVaoBan(DoUong sp, int soLuong = 1)
        {
            var kq = ChiTietBan.TimDoUong(sp.IDDoUong);

            //if (kq.Quantity < sp.SoLuongDaMua) return;

            if (kq == null)
            {
                kq = sp;
                ds.Add(kq);
                kq.SoLuong = soLuong;
            }
            else
            {
                kq.SoLuong += soLuong;
            }
        }
示例#2
0
 public static void XoaDoUong(int idDuUong)
 {
     DSDoUong.Remove(ChiTietBan.TimDoUong(idDuUong));
 }