public QUANLYKHACHSAN.BusinessObject.ChiTietPhieuThuePhongInFo LayPhieuThue(String id) { DataTable tbl = data.LayChiTietPhieuDangKy(id); ChiTietPhieuThuePhongInFo ph = null; PhongControl pctrl = new PhongControl(); if (tbl.Rows.Count > 0) { ph.MaPhieuThue = Convert.ToString(tbl.Rows[0]["MaPhieuThue"]); ph.NgayDangKy = Convert.ToDateTime(tbl.Rows[0]["NgayDangKy"]); ph.NgayNhan = Convert.ToDateTime(tbl.Rows[0]["NgayNhan"]); ph.MaPhong = Convert.ToString(tbl.Rows[0]["MaPhong"]); } return(ph); }
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); }
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); }