public void SaveUniversities(List <University> universities)
        {
            ListDBOObject listDBOObject = provider.GetListDBOObjects(universities);
            XmlSerializer formatter     = new XmlSerializer(typeof(ListDBOObject), new XmlRootAttribute("root"));

            using (FileStream fstream = new FileStream(@"C:\Users\User\Proga\c#\project(course)\University\University\FilesXml\save.xml", FileMode.Open))
            {
                formatter.Serialize(fstream, listDBOObject);
            }
        }
Exemplo n.º 2
0
        public ListDBOObject GetListDBOObjects(List <University> universities)
        {
            ListDBOObject listDBOObject = new ListDBOObject();

            listDBOObject.dBOAddresses    = CreatedDBOAddress(universities);
            listDBOObject.dBODeans        = CreatedDBODean(universities);
            listDBOObject.dBOFaculties    = CreatedDBOFaculties(universities);
            listDBOObject.dBOStudents     = CreatedDBOStudent(universities);
            listDBOObject.dBOUniversities = CreatedDBOUniversities(universities);
            return(listDBOObject);
        }