Пример #1
0
        public bool ThemKhachThue(DangKy dangkyphong)
        {
            SqlParameter p1 = new SqlParameter("@makhach", dangkyphong.getMaKhach());
            SqlParameter p2 = new SqlParameter("@maphong", dangkyphong.getMaPhong());
            SqlParameter p3 = new SqlParameter("@ngayvaophong", dangkyphong.getNgayVaoPhong());

            SqlParameter[] giatri = { p1, p2, p3 };

            return(data.Update("ThemKhachThue", giatri));
        }
Пример #2
0
        //Load danh sách các khách
        public DataTable loadChiTietKhachThue(DangKy dangkyphong)
        {
            String    sql   = "select CT_KHACH_THUE.TenKhach, KHACH_THUE.Phai, KHACH_THUE.NgheNghiep, Convert(varchar,NgayVaoPhong,103) as NgayVaoPhong from CT_KHACH_THUE, KHACH_THUE where CT_KHACH_THUE.MaKhach = KHACH_THUE.MaKhach and MaPhong = '" + dangkyphong.getMaPhong() + "'";
            DataTable table = manager.executeQuery(sql);

            return(table);
        }