public void insertPhieuThue(string maphieu, string ngaybd, int soluongkhach, string tenphong)
 {
     SqlProvider.ExecuteQuery("insert into phieuthuephong values ('" + maphieu + "','" + ngaybd + "'," + soluongkhach + ",'" + tenphong + "')");
 }
Beispiel #2
0
 public void updateDonGiaTatCaCacPhongTheoLoai(string loaiphong, double dongia)
 {
     SqlProvider.ExecuteQuery("update phong set dongia = " + dongia + "where loaiphong = '" + loaiphong + "'");
 }
Beispiel #3
0
 public void updateTTPhongAsChuaThue()
 {
     SqlProvider.ExecuteQuery("exec UpdateTTPhong");
 }
Beispiel #4
0
 public void insertKH(double cmt, string ten, string loaikhach, string diachi, string maphieuthue)
 {
     SqlProvider.ExecuteQuery("insert into khachhang values('" + cmt + "',N'" + ten + "','" + loaikhach + "',N'" + diachi + "','" + maphieuthue + "')");
 }
 public DataTable selectAllHoaDon()
 {
     return(SqlProvider.ExecuteQuery("select * from hoadonthanhtoan"));
 }
 public DataTable SelectThamSo()
 {
     return(SqlProvider.ExecuteQuery("select*from thamso"));
 }
 public void updateHeSoPhuThuKhachThu3(double hesophuthu)
 {
     SqlProvider.ExecuteQuery("update thamso set phuthukhachthu3 = " + hesophuthu);
 }
Beispiel #8
0
 public DataTable SortByPhongDaThue()
 {
     return(SqlProvider.ExecuteQuery("select * from phong order by tinhtrang DESC"));
 }
Beispiel #9
0
 public DataTable SearchTenVaLoaiPhong(string textsearch)
 {
     return(SqlProvider.ExecuteQuery("select * from phong where tenphong like '%" + textsearch + "%' or loaiphong like'%" + textsearch + "%'"));
 }
 public DataTable selectMatDoSuDungPhong(int thang, int nam)
 {
     return(SqlProvider.ExecuteQuery("select p.tenphong,sum(hd.songaythue) TongSoNgayThue from HOADONTHANHTOAN hd join PHONG p on hd.phong = p.tenphong where year(hd.ngaythanhtoan) = " + nam + " and MONTH(hd.ngaythanhtoan) = " + thang + " group by p.tenphong, hd.songaythue"));
 }
Beispiel #11
0
 public DataTable SelectAllPhong()
 {
     return(SqlProvider.ExecuteQuery("select * from phong"));
 }
 public DataTable selectDoanhThuTheoLoaiPhong(int thang, int nam)
 {
     return(SqlProvider.ExecuteQuery("select p.loaiphong, SUM(hd.thanhtien) TongTien from HOADONTHANHTOAN hd join PHONG p on hd.phong = p.tenphong where year(hd.ngaythanhtoan) = " + nam + " and MONTH(hd.ngaythanhtoan) = " + thang + " group by p.loaiphong, hd.thanhtien"));
 }
 public DataTable SelectNam()
 {
     return(SqlProvider.ExecuteQuery("select year(ngaythanhtoan) from hoadonthanhtoan"));
 }
 public DataTable Kiemtrathanhtoan()
 {
     return(SqlProvider.ExecuteQuery("select pt.phong from HOADONTHANHTOAN hd join PHIEUTHUEPHONG pt on pt.maphieu = hd.phieuthue join PHONG p on p.tenphong = pt.phong where p.tinhtrang = 'da thue'"));
 }
 public DataTable selectAllPhieuThuePhong()
 {
     return(SqlProvider.ExecuteQuery("select * from phieuthuephong"));
 }
Beispiel #16
0
 public void updatePhong(string tenphong)
 {
     SqlProvider.ExecuteQuery("update phong set tinhtrang = 'da thue' where tenphong = '" + tenphong + "'");
 }
 public DataTable selectPhieuThueGanNhat(string tenphong)
 {
     return(SqlProvider.ExecuteQuery("select pt.* from phong p join PHIEUTHUEPHONG pt on p.tenphong = pt.phong where p.tenphong = '" + tenphong + "' and DATEDIFF(DAY, pt.ngaybd, getdate()) <= all(select DATEDIFF(DAY, pt.ngaybd, getdate()) from phong p join PHIEUTHUEPHONG pt on p.tenphong = pt.phong where p.tenphong = '" + tenphong + "')"));
 }
Beispiel #18
0
 public DataTable SearchTheoTenPhongchuathue(string tenphong)
 {
     return(SqlProvider.ExecuteQuery("select * from phong where tenphong like '%" + tenphong + "%' and tinhtrang = 'chua thue'"));
 }
Beispiel #19
0
 public void updateSoLuongKhachToiDa(int soluongkhach)
 {
     SqlProvider.ExecuteQuery("update thamso set soluongkhachtoidamoiphong = " + soluongkhach);
 }
Beispiel #20
0
 public void UpdateTTPhong(string tenphong, string loai, double dongia, string ghichu)
 {
     SqlProvider.ExecuteQuery("update phong set loaiphong = '" + loai + "',dongia =" + dongia + ",ghichu =N'" + ghichu + "'where tenphong = '" + tenphong + "' ");
 }
Beispiel #21
0
 public void updateHeSoPhuThuKhachNuocNgoai(double hesophuthu)
 {
     SqlProvider.ExecuteQuery("update thamso set phuthukhachnuocngoai = " + hesophuthu);
 }
Beispiel #22
0
 public DataTable selectGiaPhongTheoLoaiPhong(string loaiphong)
 {
     return(SqlProvider.ExecuteQuery("select dongia from phong where loaiphong ='" + loaiphong + "'"));
 }
Beispiel #23
0
 public DataTable selectKhachHang(string maphieuthue)
 {
     return(SqlProvider.ExecuteQuery("select * from khachhang where maphieuthue = '" + maphieuthue + "'"));
 }
 public void insertHoaDon(string mahd, string tenphong, string ngaythanhtoan, int songaythue, double dongia, double phuthu, double thanhtien, string phieuthue)
 {
     SqlProvider.ExecuteQuery("insert into hoadonthanhtoan values('" + mahd + "','" + tenphong + "','" + ngaythanhtoan + "'," + songaythue + "," + dongia + "," + phuthu + "," + thanhtien + ",'" + phieuthue + "')");
 }