//----------------------------------update images--------------- public static void UpdateImages(string id, string images) { var db = new ShopOnlineConnectionDB(); var sp = ShopOnlineBUS.ChiTiet(id); sp.MoreImages = images; db.Update(sp, id); }
//---------khoi phuc-------------// public static void KhoiPhuc(string id) { using (var db = new ShopOnlineConnectionDB()) { var lsp = db.Single <SanPham>("select * from SanPham where Masanpham = @0", id); lsp.Tinhtrang = "0"; db.Update("SanPham", "Masanpham", lsp); } }
//---------khoi phuc-------------// public static void KhoiPhuc(string id) { using (var db = new ShopOnlineConnectionDB()) { var lsp = db.Single <NhaSanXuat>("select * from NhaSanXuat where Manhasanxuat = @0", id); lsp.TinhTrang = 0; db.Update("NhaSanXuat", "Manhasanxuat", lsp); } }
//---------khoi phuc-------------// public static void KhoiPhuc(string id) { using (var db = new ShopOnlineConnectionDB()) { var lsp = db.Single <LoaiSanPham>("select * from LoaiSanPham where MaLoaiSanPham = @0", id); lsp.TinhTrang = 0; db.Update("LoaiSanPham", "MaLoaiSanPham", lsp); } }
public static void CapNhat(string masanpham, string mataikhoan, int soluong, int gia, string tensanpham) { using (var db = new ShopOnlineConnectionDB()) { GioHang giohang = new GioHang() { MaSanPham = masanpham, MaTaiKhoan = mataikhoan, SoLuong = soluong, Gia = gia, TenSanPham = tensanpham, TongTien = gia * soluong }; var tamp = db.Query <GioHang>("Select idGH from GioHang Where MaTaiKhoan = '" + mataikhoan + "' and MaSanPham = '" + masanpham + "'").FirstOrDefault(); db.Update(giohang, tamp.IdGH); } }
public static void UpdateSP(String id, SanPham sp) { var db = new ShopOnlineConnectionDB(); db.Update(sp, id); }
public static void UpdateNSX(String id, NhaSanXuat nsx) { var db = new ShopOnlineConnectionDB(); db.Update(nsx, id); }
public static void UpdateDS(LoaiSanPham sx) { var sql = new ShopOnlineConnectionDB(); sql.Update("LoaiSanPham", "Maloaisanpham", sx); }
public static void DeleteLSP(String id, LoaiSanPham lsp) { var db = new ShopOnlineConnectionDB(); db.Update(lsp, id); }
public static void UpdateDS(NhaSanXuat sx) { var sql = new ShopOnlineConnectionDB(); sql.Update("NhaSanXuat", "Manhasanxuat", sx); }