public 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 IList <ChiTietPhieuThuePhongInFo> ChiTietPhieuThue(String id) { IList <ChiTietPhieuThuePhongInFo> ds = new List <ChiTietPhieuThuePhongInFo>(); DataTable tbl = data.LayChiTietPhieuDangKy(id); foreach (DataRow row in tbl.Rows) { //PhongControl pctrl = new PhongControl(); ChiTietPhieuThuePhongInFo ct = new ChiTietPhieuThuePhongInFo(); ct.MaPhieuThue = Convert.ToString(row["MaPhieuThue"]); ct.NgayDangKy = Convert.ToDateTime(row["NgayDangKy"]); ct.NgayNhan = Convert.ToDateTime(row["NgayNhan"]); ct.MaPhong = Convert.ToString(row["MaPhong"]); ds.Add(ct); } return(ds); }