예제 #1
0
        public List <KhachHang> GetAll()
        {
            List <KhachHang> listkh = new List <KhachHang>();
            string           sql    = "SELECT * FROM KhachHang";
            SqlDataReader    dr     = _helper.ExcuteDataReader(sql, null, CommandType.Text);

            listkh = _helper.MapReaderToList <KhachHang>(dr);
            _helper.DisConnect();
            return(listkh);
        }
예제 #2
0
        public List <NguoiDung> GetAll()
        {
            List <NguoiDung> listct = new List <NguoiDung>();
            string           sql    = "SELECT nd.*, nv.HoTen FROM NguoiDung nd JOIN NhanVien nv ON nd.MaNV = nv.MaNV ORDER BY nd.NgayTao DESC";
            SqlDataReader    dr     = _helper.ExcuteDataReader(sql, null, CommandType.Text);

            listct = _helper.MapReaderToList <NguoiDung>(dr);
            _helper.DisConnect();
            return(listct);
        }
예제 #3
0
        public List <Phong> GetAlldgvPhong()
        {
            List <Phong>  Listp = new List <Phong>();
            string        sql   = "SELECT PH.MaPH, PH.MaLoaiPH, LP.TenLoaiPH FROM Phong PH JOIN LoaiPhong LP ON PH.MaLoaiPH =LP.MaLoaiPH";
            SqlDataReader dr    = _helper.ExcuteDataReader(sql, null, CommandType.Text);

            Listp = _helper.MapReaderToList <Phong>(dr);
            _helper.DisConnect();
            return(Listp);
        }
예제 #4
0
        public List <NhanVien> GetAll()
        {
            List <NhanVien> listct = new List <NhanVien>();
            string          sql    = "SELECT * FROM NhanVien ORDER BY NgayTao DESC";
            SqlDataReader   dr     = _helper.ExcuteDataReader(sql, null, CommandType.Text);

            listct = _helper.MapReaderToList <NhanVien>(dr);
            _helper.DisConnect();
            return(listct);
        }
예제 #5
0
        public List <ChiTietTienThuePhong> GetAll()
        {
            List <ChiTietTienThuePhong> listtp = new List <ChiTietTienThuePhong>();
            string        sql = "";
            SqlDataReader dr  = _helper.ExcuteDataReader(sql, null, CommandType.Text);

            listtp = _helper.MapReaderToList <ChiTietTienThuePhong>(dr);
            _helper.DisConnect();
            return(listtp);
        }