public static void UpdateSP(String id, NHOM8.SanPham sp) { var db = new NHOM8DB(); db.Update(sp, id); }
public static NHOM8.SanPham ChiTietAdmin(String id) { var db = new NHOM8DB(); return(db.SingleOrDefault <NHOM8.SanPham>("select * from SanPhams where SanPhamID = '" + id + "'")); }
public static IEnumerable <SanPham> DanhSachAdmin() { var db = new NHOM8DB(); return(db.Query <NHOM8.SanPham>("select * from SanPhams")); }
//---------------- Admin public static void ThemSP(SanPham sp) { var db = new NHOM8DB(); db.Insert(sp); }
public static NHOM8.SanPham ChiTiet(string a) { var db = new NHOM8DB(); return(db.SingleOrDefault <NHOM8.SanPham>("select * from SanPhams where SanPhamID = @0", a)); }
public static IEnumerable <NHOM8.SanPham> DanhSach() { var db = new NHOM8DB(); return(db.Query <NHOM8.SanPham>("select * from SanPhams where DanhMucID = '3'")); }