예제 #1
0
 public static void CapNhat(int id, int soLuong)
 {
     using (var db = new BabyShopConnectionDB())
     {
         db.Execute("update GioHang set [SoLuong] = @0 where id = @1", soLuong, id);
     }
 }
예제 #2
0
 public static void Them(int MaSanPham, string TenTaiKhoan, string MaTaiKhoan, string NoiDung)
 {
     using (var db = new BabyShopConnectionDB())
     {
         var ds = "INSERT INTO [dbo].[BinhLuan]([MaSanPham],[TenTaiKhoan],[MaTaiKhoan],[NoiDung])VALUES(@0,@1,@2,@3)";
         db.Execute(ds, MaSanPham, TenTaiKhoan, MaTaiKhoan, NoiDung);
     }
 }