private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            XmlDocument DS_QL = new XmlDocument();

            DS_QL.LoadXml(nghiep_vu.LayDanhSachQuanLy());

            XmlNodeList dsQuanLy = DS_QL.SelectNodes("/GOC/QUANLY");

            foreach (var item in dsQuanLy)
            {
                XmlElement tenloai = item as XmlElement;
                cbxQuanLy.Items.Add(tenloai.GetAttribute("TAIKHOAN").ToString());
            }
            cbxQuanLy.SelectedIndex = 0;

            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.Items.Add("Tất cả");

            cbxDanhMucPhong.SelectedIndex = 0;
        }
Esempio n. 2
0
        private void ThongKe_Loaded(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.Items.Add("Tất cả");

            cbxDanhMucPhong.SelectedIndex = 0;
        }