Esempio n. 1
0
        public static bool KiemTraTonTaiMau(string maSanPham, string mauSac)
        {
            string query = string.Format("SELECT count(MaSP) FROM ChiTietSanPham WHERE MauSac = N'{0}' AND MaSP = '{1}'", mauSac, maSanPham);

            return(XuLyDuLieu.ThucThiCauLenhWithScalar(query) >= 1);
        }
Esempio n. 2
0
        public static bool KiemTraTonTaiMaCT(string _maCT)
        {
            string query = string.Format("select count(*) from ChiTietSanPham where MaCTSP = '{0}'", _maCT);

            return(XuLyDuLieu.ThucThiCauLenhWithScalar(query) >= 1);
        }
Esempio n. 3
0
        public static bool KiemTraTonTaiTenNCC(string tenNhaCungCap)
        {
            string query = string.Format("select count(TenNhaCungCap) from NhaCungCap where TenNhaCungCap = '{0}'", tenNhaCungCap);

            return(XuLyDuLieu.ThucThiCauLenhWithScalar(query) >= 1);
        }
Esempio n. 4
0
        public static bool KiemTraTrungSanPham(string tenSanPham)
        {
            string query = string.Format("SELECT count(TenSP) FROM SanPham WHERE TenSP = N'{0}'", tenSanPham);

            return(XuLyDuLieu.ThucThiCauLenhWithScalar(query) >= 1);
        }
        public static bool KiemTraTonTaiTenDanhMuc(string TenDanhMuc)
        {
            string query = string.Format("SELECT count(TenDanhMuc) FROM DanhMuc WHERE TenDanhMuc = N'{0}'", TenDanhMuc);

            return(XuLyDuLieu.ThucThiCauLenhWithScalar(query) >= 1);
        }
Esempio n. 6
0
        public static bool KiemTraTaiKhoanDaTonTai(string tenTaiKhoan)
        {
            string query = string.Format("select count(*) from TaiKhoan where TenTaiKhoan = '{0}'", tenTaiKhoan);

            return(XuLyDuLieu.ThucThiCauLenhWithScalar(query) >= 1);
        }