Ejemplo n.º 1
0
 public User(string name, string studentNumber, double maximum)
 {
     Name                = name;
     StudentNumber       = studentNumber;
     Maximum             = maximum;
     Semesters           = new SemesterCollection();
     GradeSystem         = new GradeSystem(Maximum, true);
     Lecture.GradeSystem = GradeSystem;
 }
Ejemplo n.º 2
0
        public static SemesterCollection GetSemesterCollectionFromXMLNode(XmlNode node)
        {
            if (node.Name != "SemesterCollection")
            {
                return(null);
            }
            SemesterCollection result = new SemesterCollection();

            foreach (XmlNode n in node.ChildNodes)
            {
                var v = Semester.GetSemesterFromXMLNode(n);
                result.Add(v);
            }

            return(result);
        }
Ejemplo n.º 3
0
        public static User GetUserFromXMLNode(XmlNode node)
        {
            if (node.Name != "User")
            {
                return(null);
            }
            string             name          = node.Attributes["Name"].Value;
            string             studentNumber = node.Attributes["StudentNumber"].Value;
            double             max           = Convert.ToDouble(node.Attributes["Maximum"].Value);
            GradeSystem        gs            = GradeSystem.GetGradeSystemFromXMLNode(node["GradeSystem"]);
            SemesterCollection sc            = SemesterCollection.GetSemesterCollectionFromXMLNode(node["SemesterCollection"]);
            User user = new User(name, studentNumber, max);

            user.GradeSystem = gs;
            user.Semesters   = sc;
            return(user);
        }