예제 #1
0
 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);
     }
 }
예제 #2
0
        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);
        }
예제 #3
0
 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);
     }
 }
예제 #4
0
        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);
            }
        }
예제 #5
0
        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);
        }
예제 #6
0
        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);
        }
예제 #7
0
 public static bool XoaDatPhong(int maDatPhong)
 {
     DataProvider.ExecuseNonQuery("DELETE FROM datphong WHERE MaDatPhong = '" + maDatPhong + "';");
     return(true);
 }
예제 #8
0
 public static void XoaChiTietDatPhong(ChiTietDatPhongDTO chiTietDatPhong)
 {
     DataProvider.ExecuseNonQuery("DELETE FROM chitietdatphong WHERE MaChiTietDatPhong = '" + chiTietDatPhong.MaChiTietDatPhong + "';");
 }
예제 #9
0
 public static bool UpdateKhachHang(int maDatPhong, int maKH)
 {
     DataProvider.ExecuseNonQuery("UPDATE datphong SET datphong.MaKH = '" + maKH + "'  WHERE datphong.MaDatPhong = '" + maDatPhong + "';");
     return(true);
 }
예제 #10
0
        public static bool XoaDichVuDatPhong(int maDVP)
        {
            DataProvider.ExecuseNonQuery("DELETE FROM  quanlykaraoke.dichvudatphong  WHERE  quanlykaraoke.dichvudatphong.MaDichVuDatPhong = '" + maDVP + "';");

            return(true);
        }
예제 #11
0
 public static void CapNhatGhiChuDatPhong(double value, int maDatPhong)
 {
     DataProvider.ExecuseNonQuery("UPDATE datphong SET GhiChu = '" + value + "' WHERE MaDatPhong = '" + maDatPhong + "';");
 }
예제 #12
0
        public static bool CapNhatTienTraTruoc(HoaDonDTO hoaDonDTO, double tienTraTruoc)
        {
            DataProvider.ExecuseNonQuery("UPDATE hoadon SET hoadon.TienTraTruoc = '" + tienTraTruoc + "'  WHERE hoadon.MaHoaDon = '" + hoaDonDTO.MaHoaDon + "';");

            return(true);
        }
예제 #13
0
        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);
        }
예제 #14
0
 public static bool UpdateKhachHang(int maHoaDon, int maKH)
 {
     DataProvider.ExecuseNonQuery("UPDATE hoadon SET hoadon.MaKH = '" + maKH + "'  WHERE hoadon.MaHoaDon = '" + maHoaDon + "';");
     return(true);
 }
예제 #15
0
        public static bool UpdateGhiChu(int maHoaDon, string strGhiChu)
        {
            DataProvider.ExecuseNonQuery("UPDATE hoadon SET hoadon.GhiChu = '" + strGhiChu + "'  WHERE hoadon.MaHoaDon = '" + maHoaDon + "';");

            return(true);
        }
예제 #16
0
 public static void CapNhatTinhTrangDatPhong(int value, int MaDatPhong)
 {
     DataProvider.ExecuseNonQuery("UPDATE datphong SET MaTinhTrangDatPhong = '" + value + "' WHERE MaDatPhong = '" + MaDatPhong + "';");
 }
예제 #17
0
 public static void CapNhatTienTraTruocDatPhong(double value, int maDatPhong)
 {
     DataProvider.ExecuseNonQuery("UPDATE datphong SET SoTienDatTruoc = '" + value + "' WHERE MaDatPhong = '" + maDatPhong + "';");
 }
예제 #18
0
 public static void SetTyLeQuyDoiDiemTien(double i)
 {
     DataProvider.ExecuseNonQuery("UPDATE quanlykaraoke.thamso SET GiaTri = '" + i + "' WHERE MaThamSo = '0';");
 }
예제 #19
0
 public static void SetKhoangThoiGianToiThieuGiuaHaiLanThue(int i)
 {
     DataProvider.ExecuseNonQuery("UPDATE quanlykaraoke.thamso SET GiaTri = '" + i + "' WHERE MaThamSo = '1';");
 }
예제 #20
0
 public static void SetKhoangThoiGianChoDatPhong(int i)
 {
     DataProvider.ExecuseNonQuery("UPDATE quanlykaraoke.thamso SET GiaTri = '" + i + "' WHERE MaThamSo = '2';");
 }
예제 #21
0
 public static bool CapNhatThongTinDatPhong(ChiTietDatPhongDTO chiTietDatPhongDTO)
 {
     DataProvider.ExecuseNonQuery("UPDATE chitietdatphong SET MaPhong = '" + chiTietDatPhongDTO.MaPhong + "'  WHERE MaChiTietDatPhong = '" + chiTietDatPhongDTO.MaChiTietDatPhong + "'  ;");
     return(true);
 }
예제 #22
0
 public static void SetKChuyenSangChoDonDepSauKhiThanhToan(bool b)
 {
     DataProvider.ExecuseNonQuery("UPDATE quanlykaraoke.thamso SET GiaTri = '" + b + "' WHERE MaThamSo = '3';");
 }
예제 #23
0
        public static bool CapNhatGhiChu(int maPhong, string strGhiChu)
        {
            DataProvider.ExecuseNonQuery("UPDATE phong SET phong.GhiChu = '" + strGhiChu + "'  WHERE phong.MaPhong = '" + maPhong + "';");

            return(true);
        }
예제 #24
0
        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);
        }