public static ResStudent LoadFromXml(XElement Ques)
        {
            var res = new ResStudent();

            res.Id     = (int)Ques.Element("id");
            res.Answer = (string)Ques.Element("answer");
            res.Option = (string)Ques.Element("option");

            return(res);
        }
Example #2
0
        public static ResStudentBlank LoadFromXml(XElement Ques)
        {
            if (Ques != null)
            {
                var res = new ResStudentBlank();
                foreach (var ques in Ques.Elements())
                {
                    foreach (var que in ques.Elements())
                    {
                        res.Ress.Add(ResStudent.LoadFromXml(que));
                    }
                }

                res.User = "******" + (string)Ques.Element("User").Attribute("f") + " "
                           + (string)Ques.Element("User").Attribute("i") + " "
                           + (string)Ques.Element("User").Attribute("o");

                return(res);
            }
            return(null);
        }