예제 #1
0
 public static void Xuat(TreeViewItem th, BaiHocDTO bh)
 {
     foreach (BaiHocVanHocDTO bhvh in bh.ArrBaiHocVanHoc)
     {
         th.Items.Add(BaiHocVanHocGUI.The_Hien(bhvh));
     }
     th.Tag = bh;
 }
예제 #2
0
 private void LessonPage_Loaded(object sender, RoutedEventArgs e)
 {
     TreeViewItem th = new TreeViewItem();
     th = Bai10;
     string filename = "BaiVanHoc10.xml";
     BaiHocDTO bh1 = new BaiHocDTO();
     bh1 = BaiHocBUS.LayBaiHoc(filename);
     BaiHocGUI.Xuat(th, bh1);
 }    
예제 #3
0
        public static BaiHocDTO LayBaiHoc(string BaiHoc_XML)
        {
            BaiHocDTO BaiHoc = new BaiHocDTO();

            XmlDocument XmlD = new XmlDocument();
            XmlD.Load(BaiHoc_XML);

            XmlElement Root = XmlD.DocumentElement;

            BaiHoc = KhoiTao(Root);

            return BaiHoc;
        }
예제 #4
0
        public static BaiHocDTO KhoiTao(XmlElement Root)
        {
            BaiHocDTO BaiHoc = new BaiHocDTO();

            BaiHoc.SoThuTu = int.Parse(Root.GetAttribute("SoThuTu"));

            BaiHoc.ArrBaiHocVanHoc = new ArrayList();
            foreach (XmlElement Node in Root.ChildNodes)
            {
                BaiHoc.ArrBaiHocVanHoc.Add(BaiHocVanHocDAO.KhoiTao(Node));
            }

            return BaiHoc;
        }