Esempio n. 1
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);
        }
Esempio n. 2
0
        private void dgvPhongCoKhachThue_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            string maphong = dgvTrangThaiPhong.Rows[e.RowIndex].Cells[0].Value.ToString();
            DangKy dangKy  = new DangKy();

            dangKy.setMaPhong(maphong);
            dgvDanhSachKhachThuePhong.DataSource = dangKyBLL.loadChiTietKhachThue(dangKy);
        }
Esempio n. 3
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));
        }
Esempio n. 4
0
 //Thêm khách ở phòng mới
 public bool ThemKhachThueVaoPhongMoi(DangKy dangKyPhong)
 {
     return(DangKyDAL.getInstance().ThemKhachThueVaoPhongMoi(dangKyPhong));
 }
Esempio n. 5
0
 //Thêm khách ở ghép
 public bool ThemKhachOghep(DangKy dangKyPhong)
 {
     return(DangKyDAL.getInstance().ThemKhachOghep(dangKyPhong));
 }
Esempio n. 6
0
 public DataTable loadChiTietKhachThue(DangKy dangKyPhong)
 {
     return(DangKyDAL.getInstance().loadChiTietKhachThue(dangKyPhong));
 }