public void insertPhieuThue(string maphieu, string ngaybd, int soluongkhach, string tenphong)
 {
     SqlProvider.ExecuteQuery("insert into phieuthuephong values ('" + maphieu + "','" + ngaybd + "'," + soluongkhach + ",'" + tenphong + "')");
 }
Exemplo n.º 2
0
 public void updateDonGiaTatCaCacPhongTheoLoai(string loaiphong, double dongia)
 {
     SqlProvider.ExecuteQuery("update phong set dongia = " + dongia + "where loaiphong = '" + loaiphong + "'");
 }
Exemplo n.º 3
0
 public void updateTTPhongAsChuaThue()
 {
     SqlProvider.ExecuteQuery("exec UpdateTTPhong");
 }
Exemplo n.º 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"));
 }
Exemplo n.º 6
0
 public DataTable SelectThamSo()
 {
     return(SqlProvider.ExecuteQuery("select*from thamso"));
 }
Exemplo n.º 7
0
 public void updateHeSoPhuThuKhachThu3(double hesophuthu)
 {
     SqlProvider.ExecuteQuery("update thamso set phuthukhachthu3 = " + hesophuthu);
 }
Exemplo n.º 8
0
 public DataTable SortByPhongDaThue()
 {
     return(SqlProvider.ExecuteQuery("select * from phong order by tinhtrang DESC"));
 }
Exemplo n.º 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"));
 }
Exemplo n.º 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'"));
 }
Exemplo n.º 15
0
 public DataTable selectAllPhieuThuePhong()
 {
     return(SqlProvider.ExecuteQuery("select * from phieuthuephong"));
 }
Exemplo n.º 16
0
 public void updatePhong(string tenphong)
 {
     SqlProvider.ExecuteQuery("update phong set tinhtrang = 'da thue' where tenphong = '" + tenphong + "'");
 }
Exemplo n.º 17
0
 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 + "')"));
 }
Exemplo n.º 18
0
 public DataTable SearchTheoTenPhongchuathue(string tenphong)
 {
     return(SqlProvider.ExecuteQuery("select * from phong where tenphong like '%" + tenphong + "%' and tinhtrang = 'chua thue'"));
 }
Exemplo n.º 19
0
 public void updateSoLuongKhachToiDa(int soluongkhach)
 {
     SqlProvider.ExecuteQuery("update thamso set soluongkhachtoidamoiphong = " + soluongkhach);
 }
Exemplo n.º 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 + "' ");
 }
Exemplo n.º 21
0
 public void updateHeSoPhuThuKhachNuocNgoai(double hesophuthu)
 {
     SqlProvider.ExecuteQuery("update thamso set phuthukhachnuocngoai = " + hesophuthu);
 }
Exemplo n.º 22
0
 public DataTable selectGiaPhongTheoLoaiPhong(string loaiphong)
 {
     return(SqlProvider.ExecuteQuery("select dongia from phong where loaiphong ='" + loaiphong + "'"));
 }
Exemplo n.º 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 + "')");
 }