예제 #1
0
        public static void Xoa(string id, Product sp)
        {
            var db = new SmartShopConnectionDB();

            db.Execute("DELETE FROM Comment WHERE MaSP=@0", id);
            db.Execute("DELETE FROM Product WHERE MaSP=@0", id);
        }
예제 #2
0
        public static void Xoa(string us)
        {
            var    db   = new SmartShopConnectionDB();
            var    user = db.SingleOrDefault <viewUser>("SELECT * FROM viewUser where UserName=@0", us);
            string id   = user.UserId;

            db.Execute("DELETE FROM AspNetUserRoles WHERE UserId=@0", id);
            db.Execute("DELETE FROM AspNetUsers WHERE UserName=@0", us);
            db.Execute("DELETE FROM Accounts WHERE UserName=@0", us);
        }
예제 #3
0
        public static void Xoa(string id, Loai l)
        {
            var db = new SmartShopConnectionDB();

            db.Execute("DELETE FROM Loai WHERE MaLoai=@0", id);
        }
예제 #4
0
        public static void Xoa(int id)
        {
            var db = new SmartShopConnectionDB();

            db.Execute("DELETE FROM Comment WHERE IDCmt=@0", id);
        }
예제 #5
0
        public static void Xoa(int id, ChungLoai cl)
        {
            var db = new SmartShopConnectionDB();

            db.Execute("DELETE FROM ChungLoai WHERE MaCL=@0", id);
        }