private void CapNhat_TraPhong(string chuoiXML)
        {
            CPhieuThuePhong PhieuThue = new CPhieuThuePhong();

            XmlDocument Tai_Lieu = new XmlDocument();

            Tai_Lieu.LoadXml(chuoiXML);

            XmlElement Root = Tai_Lieu.DocumentElement;

            foreach (XmlElement DoiTuong in Root.SelectNodes(Root.ChildNodes[0].Name))
            {
                PhieuThue.ID            = Int32.Parse(DoiTuong.GetAttribute("ID").Trim());
                PhieuThue.NgayTra       = DoiTuong.GetAttribute("NgayTra").Trim();
                PhieuThue.TienThuePhong = Int32.Parse(DoiTuong.GetAttribute("SoTien").Trim());
            }

            GhiDuLieuVaoCSDL(DULIEUGHI.CapNhat_TraPhong, PhieuThue);
        }
        private void CapNhat_ThuePhong(string chuoiXML)
        {
            CPhieuThuePhong PhieuThue = new CPhieuThuePhong();

            XmlDocument Tai_Lieu = new XmlDocument();

            Tai_Lieu.LoadXml(chuoiXML);

            XmlElement Root = Tai_Lieu.DocumentElement;

            foreach (XmlElement DoiTuong in Root.SelectNodes(Root.ChildNodes[0].Name))
            {
                PhieuThue.NgayBatDau            = DoiTuong.GetAttribute("NgayBatDau").Trim();
                PhieuThue.NgayDuKienTra         = DoiTuong.GetAttribute("NgayDuKienTra").Trim();
                PhieuThue.MaPhong               = Int32.Parse(DoiTuong.GetAttribute("ID_Phong").Trim());
                PhieuThue.DanhSachTenKhachHang  = DoiTuong.GetAttribute("DS_TenKhachHang").Trim();
                PhieuThue.DanhSachCMNDKhachHang = DoiTuong.GetAttribute("DS_CMND").Trim();
            }
            GhiDuLieuVaoCSDL(DULIEUGHI.CapNhat_ThuePhong, PhieuThue);
        }