Esempio n. 1
0
        public ChiTietPhieuNhanPhongInFo LayChiTietPhieuNhan(String id)
        {
            ChiTietPhieuNhanPhongInFo ph = null;

            ph = new 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);
        }
Esempio n. 2
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);
        }