public static bool XoaDichVuPhong(int maDVP) { try { DataProvider.ExecuseNonQuery("DELETE FROM quanlykaraoke.dichvuphong WHERE quanlykaraoke.dichvuphong.MaDVP = '" + maDVP + "';"); return(true); } catch (Exception e) { return(false); } }
public static bool LuuThongTinDatPhong(ChiTietDatPhongDTO datPhongDTO) { StringBuilder stringBuilder = new StringBuilder("INSERT INTO `quanlykaraoke`.`chitietdatphong` (`MaChiTietDatPhong`, `MaPhong`, `MaDatPhong`) VALUES ('$0', '$1', '$2');"); stringBuilder.Replace("$0", datPhongDTO.MaChiTietDatPhong.ToString()); stringBuilder.Replace("$1", datPhongDTO.MaPhong.ToString()); stringBuilder.Replace("$2", datPhongDTO.MaDatPhong.ToString()); DataProvider.ExecuseNonQuery(stringBuilder.ToString()); return(true); }
public static bool UpdateDichVuPhong(DichVuPhongDTO dichVuPhongDTO) { try { DataProvider.ExecuseNonQuery("UPDATE quanlykaraoke.dichvuphong SET quanlykaraoke.dichvuphong.SoLuong = '" + dichVuPhongDTO.SoLuong + "', quanlykaraoke.dichvuphong.Gia ='" + dichVuPhongDTO.DonGia + "' WHERE quanlykaraoke.dichvuphong.MaDVP = '" + dichVuPhongDTO.MaDVP + "';"); return(true); } catch (Exception e) { return(false); } }
public static bool XoaCacDonGiaPhong(LoaiPhongDTO loaiPhongDTO) { try { DataProvider.ExecuseNonQuery("DELETE FROM quanlykaraoke.dongia_loaiphong WHERE quanlykaraoke.dongia_loaiphong.MaLoaiPhong = '" + loaiPhongDTO.MaLoaiPhong + "'"); return(true); } catch (Exception e) { return(false); } }
public static bool LuuTienGio_ThuePhong(TienGio_ThuePhongDTO tienThuePhongDTO) { StringBuilder stringBuilder = new StringBuilder("INSERT INTO `quanlykaraoke`.`tiengio_thuephong` (`MaTienGio_ThuePhong`, `Ngay`, `KhoangThoiGian`, `DonGia`, `SoLuong`, `MaThuePhong`) VALUES ('$0', '$1', '$2', '$3', '$4', '$5');"); stringBuilder.Replace("$0", tienThuePhongDTO.MaTienGio_ThuePhong.ToString()); stringBuilder.Replace("$1", tienThuePhongDTO.Ngay.ToString()); stringBuilder.Replace("$2", tienThuePhongDTO.KhoangThoiGian.ToString()); stringBuilder.Replace("$3", tienThuePhongDTO.DonGia.ToString()); stringBuilder.Replace("$4", tienThuePhongDTO.SoLuong.ToString()); stringBuilder.Replace("$5", tienThuePhongDTO.MaThuePhong.ToString()); DataProvider.ExecuseNonQuery(stringBuilder.ToString()); return(true); }
public static bool LuuThongTinDatPhong(DatPhongDTO datPhongDTO) { StringBuilder stringBuilder = new StringBuilder("INSERT INTO `quanlykaraoke`.`datphong` (`MaDatPhong`, `ThoiGianDatPhong`, `SoTienDatTruoc`, `MaNhanVien`, `MaKH`, `GhiChu`, `MaTinhTrangDatPhong`,`NgayLapPhieuDat`) VALUES ('$0', '$1', '$2', '$3', '$4', '$5', '$6', '$7');"); stringBuilder.Replace("$0", datPhongDTO.MaDatPhong.ToString()); stringBuilder.Replace("$1", datPhongDTO.ThoiGianDatPhong.ToString("yyyy-MM-dd HH:mm:ss.fff")); stringBuilder.Replace("$2", datPhongDTO.SoTienDatTruoc.ToString()); stringBuilder.Replace("$3", datPhongDTO.MaNhanVien.ToString()); stringBuilder.Replace("$4", datPhongDTO.MaKH.ToString()); stringBuilder.Replace("$5", datPhongDTO.GhiChu.ToString()); stringBuilder.Replace("$6", datPhongDTO.MaTinhTrangDatPhong.ToString()); stringBuilder.Replace("$7", datPhongDTO.NgayLapPhieuDat.ToString("yyyy-MM-dd HH:mm:ss.fff")); DataProvider.ExecuseNonQuery(stringBuilder.ToString()); return(true); }
public static bool XoaDatPhong(int maDatPhong) { DataProvider.ExecuseNonQuery("DELETE FROM datphong WHERE MaDatPhong = '" + maDatPhong + "';"); return(true); }
public static void XoaChiTietDatPhong(ChiTietDatPhongDTO chiTietDatPhong) { DataProvider.ExecuseNonQuery("DELETE FROM chitietdatphong WHERE MaChiTietDatPhong = '" + chiTietDatPhong.MaChiTietDatPhong + "';"); }
public static bool UpdateKhachHang(int maDatPhong, int maKH) { DataProvider.ExecuseNonQuery("UPDATE datphong SET datphong.MaKH = '" + maKH + "' WHERE datphong.MaDatPhong = '" + maDatPhong + "';"); return(true); }
public static bool XoaDichVuDatPhong(int maDVP) { DataProvider.ExecuseNonQuery("DELETE FROM quanlykaraoke.dichvudatphong WHERE quanlykaraoke.dichvudatphong.MaDichVuDatPhong = '" + maDVP + "';"); return(true); }
public static void CapNhatGhiChuDatPhong(double value, int maDatPhong) { DataProvider.ExecuseNonQuery("UPDATE datphong SET GhiChu = '" + value + "' WHERE MaDatPhong = '" + maDatPhong + "';"); }
public static bool CapNhatTienTraTruoc(HoaDonDTO hoaDonDTO, double tienTraTruoc) { DataProvider.ExecuseNonQuery("UPDATE hoadon SET hoadon.TienTraTruoc = '" + tienTraTruoc + "' WHERE hoadon.MaHoaDon = '" + hoaDonDTO.MaHoaDon + "';"); return(true); }
public static bool CapNhatHoaDonDaThanhToan(HoaDonDTO hoaDonDTO) { DataProvider.ExecuseNonQuery("UPDATE hoadon SET hoadon.MaNhanVienThanhToan = '" + hoaDonDTO.MaNhanVienThanhToan + "' , hoadon.TongTienThanhToan = '" + hoaDonDTO.TongTienThanhToan + "' , hoadon.NgayThanhToan = '" + hoaDonDTO.NgayThanhToan.ToString("yyyy-MM-dd HH:mm:ss.fff") + "' , hoadon.SoTienKhuyenMai = '" + hoaDonDTO.SoTienKhuyenMai + "' WHERE hoadon.MaHoaDon = '" + hoaDonDTO.MaHoaDon + "';"); return(true); }
public static bool UpdateKhachHang(int maHoaDon, int maKH) { DataProvider.ExecuseNonQuery("UPDATE hoadon SET hoadon.MaKH = '" + maKH + "' WHERE hoadon.MaHoaDon = '" + maHoaDon + "';"); return(true); }
public static bool UpdateGhiChu(int maHoaDon, string strGhiChu) { DataProvider.ExecuseNonQuery("UPDATE hoadon SET hoadon.GhiChu = '" + strGhiChu + "' WHERE hoadon.MaHoaDon = '" + maHoaDon + "';"); return(true); }
public static void CapNhatTinhTrangDatPhong(int value, int MaDatPhong) { DataProvider.ExecuseNonQuery("UPDATE datphong SET MaTinhTrangDatPhong = '" + value + "' WHERE MaDatPhong = '" + MaDatPhong + "';"); }
public static void CapNhatTienTraTruocDatPhong(double value, int maDatPhong) { DataProvider.ExecuseNonQuery("UPDATE datphong SET SoTienDatTruoc = '" + value + "' WHERE MaDatPhong = '" + maDatPhong + "';"); }
public static void SetTyLeQuyDoiDiemTien(double i) { DataProvider.ExecuseNonQuery("UPDATE quanlykaraoke.thamso SET GiaTri = '" + i + "' WHERE MaThamSo = '0';"); }
public static void SetKhoangThoiGianToiThieuGiuaHaiLanThue(int i) { DataProvider.ExecuseNonQuery("UPDATE quanlykaraoke.thamso SET GiaTri = '" + i + "' WHERE MaThamSo = '1';"); }
public static void SetKhoangThoiGianChoDatPhong(int i) { DataProvider.ExecuseNonQuery("UPDATE quanlykaraoke.thamso SET GiaTri = '" + i + "' WHERE MaThamSo = '2';"); }
public static bool CapNhatThongTinDatPhong(ChiTietDatPhongDTO chiTietDatPhongDTO) { DataProvider.ExecuseNonQuery("UPDATE chitietdatphong SET MaPhong = '" + chiTietDatPhongDTO.MaPhong + "' WHERE MaChiTietDatPhong = '" + chiTietDatPhongDTO.MaChiTietDatPhong + "' ;"); return(true); }
public static void SetKChuyenSangChoDonDepSauKhiThanhToan(bool b) { DataProvider.ExecuseNonQuery("UPDATE quanlykaraoke.thamso SET GiaTri = '" + b + "' WHERE MaThamSo = '3';"); }
public static bool CapNhatGhiChu(int maPhong, string strGhiChu) { DataProvider.ExecuseNonQuery("UPDATE phong SET phong.GhiChu = '" + strGhiChu + "' WHERE phong.MaPhong = '" + maPhong + "';"); return(true); }
public static bool UpdateDichVuDatPhong(DichVuDatPhongDTO dichVuDatPhongDTO) { DataProvider.ExecuseNonQuery("UPDATE quanlykaraoke.dichvudatphong SET quanlykaraoke.dichvudatphong.SoLuong = '" + dichVuDatPhongDTO.SoLuong + "', quanlykaraoke.dichvudatphong.Gia ='" + dichVuDatPhongDTO.DonGia + "' WHERE quanlykaraoke.dichvudatphong.MaDichVuDatPhong = '" + dichVuDatPhongDTO.MaDichVuDatPhong + "';"); return(true); }