public void Load_Danhmucphong()
        {
            XmlDocument DM_Phong = new XmlDocument();

            DM_Phong.LoadXml(nghiep_vu.Load_DanhMucPhong());

            XmlNodeList dsLoaiPhong = DM_Phong.SelectNodes("/LOAIPHONG/TENLOAI");

            foreach (var item in dsLoaiPhong)
            {
                XmlElement tenloai = item as XmlElement;
                cbxDanhMucPhong.Items.Add(tenloai.GetAttribute("VALUE").ToString());
            }

            cbxDanhMucPhong.SelectedIndex = 0;
        }
        private void ThemLoai_Loade(object sender, RoutedEventArgs e)
        {
            XmlDocument DM_Phong = new XmlDocument();

            DM_Phong.LoadXml(nghiep_vu.Load_DanhMucPhong());

            XmlNodeList dsLoaiPhong = DM_Phong.SelectNodes("/LOAIPHONG/TENLOAI");

            foreach (var item in dsLoaiPhong)
            {
                XmlElement tenloai = item as XmlElement;
                cbxDanhMucPhong.Items.Add(tenloai.GetAttribute("VALUE").ToString());
            }

            cbxDanhMucPhong.SelectedIndex = 0;
        }
        private void LoadDanhSachLoaiPhong()
        {
            lplist.Clear();

            XmlDocument DM_Phong = new XmlDocument();

            DM_Phong.LoadXml(nghiep_vu.Load_DanhMucPhong());

            XmlNodeList dsLoaiPhong = DM_Phong.SelectNodes("/LOAIPHONG/TENLOAI");

            foreach (XmlNode item in dsLoaiPhong)
            {
                LoaiPhong  lp      = new LoaiPhong();
                XmlElement tenloai = item as XmlElement;
                cbxDanhMucPhong.Items.Add(tenloai.GetAttribute("VALUE").ToString());
                lp.TenLoai = tenloai.GetAttribute("VALUE").ToString();

                XmlElement sltrong = item.FirstChild as XmlElement;
                XmlElement dongia  = sltrong.NextSibling as XmlElement;
                XmlElement toida   = dongia.NextSibling as XmlElement;

                lp.SlTrong = Convert.ToInt32(sltrong.GetAttribute("VALUE").ToString());
                lp.DonGia  = float.Parse(dongia.GetAttribute("VALUE").ToString());
                lp.ToiDa   = Convert.ToInt32(toida.GetAttribute("VALUE").ToString());
                lplist.Add(lp);
            }

            if (lpind == -1)
            {
                cbxDanhMucPhong.SelectedIndex = lpind = 0;
                lbSL.Content = lplist[0].SlTrong;
                lbDG.Content = lplist[0].DonGia.ToString() + " VND";
                lbTD.Content = lplist[0].ToiDa.ToString();
            }
            else
            {
                cbxDanhMucPhong.SelectedIndex = lpind;
                lbSL.Content = lplist[lpind].SlTrong;
                lbDG.Content = lplist[lpind].DonGia.ToString() + " VND";
                lbTD.Content = lplist[lpind].ToiDa.ToString();
            }
        }