Пример #1
0
        public QUANLYKHACHSAN.BusinessObject.PhieuThuePhongInFo LayPhieuThue(String id)
        {
            DataTable          tbl    = data.LayPhieuDangKy(id);
            PhieuThuePhongInFo ph     = null;
            KhachHangControl   khctrl = new KhachHangControl();

            if (tbl.Rows.Count > 0)
            {
                ph             = new PhieuThuePhongInFo();
                ph.MaPhieuThue = Convert.ToString(tbl.Rows[0]["MaPhieuThue"]);
                ph.MaKhachHang = khctrl.LKH(Convert.ToString(tbl.Rows[0]["MaKhachHang"]));
                ChiTietPhieuThueControl ctrl = new ChiTietPhieuThueControl();
                ph.ChiTiet = ctrl.ChiTietPhieuThue(ph.MaPhieuThue);
            }
            return(ph);
        }
Пример #2
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);
        }
Пример #3
0
        public IList <ChiTietPhieuNhanPhongInFo> ChiTietPhieuNhan(String id)
        {
            KhachHangControl khctrl = new KhachHangControl();
            PhongControl     pctrl  = new PhongControl();
            IList <ChiTietPhieuNhanPhongInFo> ds = new List <ChiTietPhieuNhanPhongInFo>();

            DataTable tbl = data.LayChiTietPhieuNhan(id);

            foreach (DataRow row in tbl.Rows)
            {
                //PhongControl pctrl = new PhongControl();
                ChiTietPhieuNhanPhongInFo ct = new ChiTietPhieuNhanPhongInFo();
                ct.MaNhanPhong    = Convert.ToString(row["MaNhanPhong"]);
                ct.HoTenKhachHang = Convert.ToString(row["HoTenKhachHang"]);
                ct.CMND           = Convert.ToString(row["CMND"]);
                ct.NgayNhan       = Convert.ToDateTime(row["NgayNhan"]);
                ct.NgayTraDuKien  = Convert.ToDateTime(row["NgayTraDuKien"]);
                ct.NgayTraThucTe  = Convert.ToDateTime(row["NgayTraThucTe"]);
                ct.MaPhong        = Convert.ToString(row["MaPhong"]);

                ds.Add(ct);
            }
            return(ds);
        }