예제 #1
0
        public void nhap()
        {
            ThiSinh ts = new ThiSinh();

            Console.WriteLine("Nhap SBD"); ts.SBD = int.Parse(Console.ReadLine());
            Console.WriteLine("Nhap ho ten thi sinh"); ts.TenThiSinh = Console.ReadLine();
            Console.WriteLine("Nhap nam sinh"); ts.NamSinh           = int.Parse(Console.ReadLine());
            Console.WriteLine("Diem toan"); ts.DiemToan   = float.Parse(Console.ReadLine());
            Console.WriteLine("Nhap van"); ts.DiemVan     = float.Parse(Console.ReadLine());
            Console.WriteLine("Nhap nn"); ts.DiemNgoaiNgu = float.Parse(Console.ReadLine());

            lists.Add(ts);
        }
예제 #2
0
        public void docFile(string file)
        {
            XmlDocument read = new XmlDocument();

            read.Load(file);
            XmlNodeList nodes = read.SelectNodes("/DSSV/ThiSinh");

            foreach (XmlNode node in nodes)
            {
                ThiSinh ts = new ThiSinh(int.Parse(node["SBD"].InnerText), node["HT"].InnerText,
                                         int.Parse(node["NamSinh"].InnerText), float.Parse(node["Toan"].InnerText),
                                         float.Parse(node["Van"].InnerText), float.Parse(node["NN"].InnerText));
                lists.Add(ts);
            }
        }