Exemple #1
0
        public QUANLYKHACHSAN.BusinessObject.DanhSachSuDungDichVuInFo LayDSSuDungDVu(string madvu)
        {
            PhieuNhanPhongControl pnctrl = new PhieuNhanPhongControl();
            DichVuControl         dvctrl = new DichVuControl();

            QUANLYKHACHSAN.BusinessObject.DanhSachSuDungDichVuInFo pif = null;
            pif = new QUANLYKHACHSAN.BusinessObject.DanhSachSuDungDichVuInFo();
            DataTable tbl = data.LayMaDSSuDungDichVu(madvu);

            if (tbl.Rows.Count > 0)
            {
                pif.MaDichVu    = Convert.ToString(tbl.Rows[0]["MaDichVu"]);
                pif.MaNhanPhong = pnctrl.LayPhieuNhan(Convert.ToString(tbl.Rows[0]["MaNhanPhong"]));
                pif.SoLuong     = Convert.ToInt32(tbl.Rows[0]["SoLuong"]);
                //pif.TienDichVu = Convert.ToSingle(tbl.Rows[0]["TienDichVu"] != DBNull.Value ? tbl.Rows[0]["TienDichVu"] : 0);
            }
            return(pif);
        }
        public QUANLYKHACHSAN.BusinessObject.ChiTietPhieuNhanPhongInFo LayChiTietPhieuNhan(String id)
        {
            QUANLYKHACHSAN.BusinessObject.ChiTietPhieuNhanPhongInFo ph = null;
            ph = new QUANLYKHACHSAN.BusinessObject.ChiTietPhieuNhanPhongInFo();
            DataTable             tbl    = data.LayChiTietPhieuNhan(id);
            PhongControl          pctrl  = new PhongControl();
            PhieuNhanPhongControl ptctrl = new PhieuNhanPhongControl();

            if (tbl.Rows.Count > 0)
            {
                ph.MaNhanPhong    = Convert.ToString(tbl.Rows[0]["MaNhanPhong"]);
                ph.MaPhong        = Convert.ToString(tbl.Rows[0]["MaPhong"]);
                ph.HoTenKhachHang = Convert.ToString(tbl.Rows[0]["HoTenKhachHang"]);
                ph.CMND           = Convert.ToString(tbl.Rows[0]["CMND"]);
                ph.NgayNhan       = Convert.ToDateTime(tbl.Rows[0]["NgayNhan"]);
                ph.NgayTraDuKien  = Convert.ToDateTime(tbl.Rows[0]["NgayTraDuKien"]);
                ph.NgayTraThucTe  = Convert.ToDateTime(tbl.Rows[0]["NgayTraThucTe"]);
            }
            return(ph);
        }
Exemple #3
0
        public QUANLYKHACHSAN.BusinessObject.HoaDonInFo LayHoaDon(String id)
        {
            DataTable tbl = data.LayMaHoaDon(id);

            QUANLYKHACHSAN.BusinessObject.HoaDonInFo ph = null;
            KhachHangControl      khctrl = new KhachHangControl();
            PhieuNhanPhongControl ptctrl = new PhieuNhanPhongControl();

            if (tbl.Rows.Count > 0)
            {
                ph              = new QUANLYKHACHSAN.BusinessObject.HoaDonInFo();
                ph.MaHoaDon     = Convert.ToString(tbl.Rows[0]["MaHoaDon"]);
                ph.TenNhanVien  = Convert.ToString(tbl.Rows[0]["NhanVienLap"]);
                ph.TenKhachHang = khctrl.LKH(Convert.ToString(tbl.Rows[0]["MaKhachHang"]));
                ph.MaNhanPhong  = ptctrl.LayPhieuNhan(Convert.ToString(tbl.Rows[0]["MaNhanPhong"]));
                ph.TongTien     = Convert.ToSingle(tbl.Rows[0]["TongTien"]);
                ph.NgayLap      = Convert.ToDateTime(tbl.Rows[0]["NgayLap"]);
                ChiTietHoaDonControl cthd = new ChiTietHoaDonControl();
                ph.ChiTiet = cthd.ChiTietHoaDon(ph.MaHoaDon);
            }
            return(ph);
        }