Пример #1
0
        public string LayMaNhanVien()
        {
            //SqlConnection con = ThaoTacDuLieu_DAO.TaoKetNoi();
            string query = "SELECT COUNT(*) FROM NhanVien";

            //SqlCommand cmd = ThaoTacDuLieu_DAO.TruyVan(query, con);
            //string maNV = cmd.ExecuteScalar().ToString();
            return(ThaoTacDuLieu_DAO.ExecuteScalar(query).ToString());
        }
Пример #2
0
        public string LayMaKhachHang()
        {
            string query = "SELECT COUNT(*) FROM KhachHang";

            return(ThaoTacDuLieu_DAO.ExecuteScalar(query).ToString());
        }
Пример #3
0
        public bool KiemTraKhachHangDaCoThe(string maKH)
        {
            string query = string.Format("SELECT COUNT(*) FROM TheKhachHang WHERE ma_khach_hang = '{0}' AND trang_thai = '{1}'", maKH, true);

            return((int)ThaoTacDuLieu_DAO.ExecuteScalar(query) > 0);
        }
Пример #4
0
 public string LayMaTuDong()
 {
     return(ThaoTacDuLieu_DAO.ExecuteScalar("SELECT COUNT(*) FROM ChiTietBanPhanCong").ToString());
 }