set up to load schoolwork
This commit is contained in:
parent
6467013f52
commit
f49705ec11
@ -99,8 +99,11 @@ namespace EduNetworkBuilder
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Load(XmlNode TheNode)
|
public static List<SchoolworkClass> Load(XmlNode TheNode)
|
||||||
{
|
{
|
||||||
|
SchoolworkClass currentOne = new SchoolworkClass();
|
||||||
|
List<SchoolworkClass> ThisList = new List<SchoolworkClass>();
|
||||||
|
bool AddedList = false;
|
||||||
foreach (XmlNode Individual in TheNode.ChildNodes)
|
foreach (XmlNode Individual in TheNode.ChildNodes)
|
||||||
{
|
{
|
||||||
XmlNodeType myNodetype = Individual.NodeType;
|
XmlNodeType myNodetype = Individual.NodeType;
|
||||||
@ -110,44 +113,48 @@ namespace EduNetworkBuilder
|
|||||||
{
|
{
|
||||||
case "EduNetworkBuilderSchoolwork":
|
case "EduNetworkBuilderSchoolwork":
|
||||||
case "schoolwork":
|
case "schoolwork":
|
||||||
Load(Individual);
|
ThisList.AddRange(Load(Individual));
|
||||||
|
AddedList = true;
|
||||||
break;
|
break;
|
||||||
case "id":
|
case "id":
|
||||||
UInt64 tID;
|
UInt64 tID;
|
||||||
UInt64.TryParse(Individual.InnerText, out tID);
|
UInt64.TryParse(Individual.InnerText, out tID);
|
||||||
ThisID = tID;
|
currentOne.ThisID = tID;
|
||||||
break;
|
break;
|
||||||
case "name":
|
case "name":
|
||||||
Name = Individual.InnerText;
|
currentOne.Name = Individual.InnerText;
|
||||||
break;
|
break;
|
||||||
case "description":
|
case "description":
|
||||||
Description = Individual.InnerText;
|
currentOne.Description = Individual.InnerText;
|
||||||
break;
|
break;
|
||||||
case "class":
|
case "class":
|
||||||
Class = Individual.InnerText;
|
currentOne.Class = Individual.InnerText;
|
||||||
break;
|
break;
|
||||||
case "duedate":
|
case "duedate":
|
||||||
DateTime.TryParse(Individual.InnerText, out DueDate);
|
DateTime.TryParse(Individual.InnerText, out currentOne.DueDate);
|
||||||
break;
|
break;
|
||||||
case "savedate":
|
case "savedate":
|
||||||
DateTime.TryParse(Individual.InnerText, out SaveDate);
|
DateTime.TryParse(Individual.InnerText, out currentOne.SaveDate);
|
||||||
break;
|
break;
|
||||||
case "ismaster":
|
case "ismaster":
|
||||||
bool.TryParse(Individual.InnerText, out isMaster);
|
bool.TryParse(Individual.InnerText, out currentOne.isMaster);
|
||||||
break;
|
break;
|
||||||
case "isgraded":
|
case "isgraded":
|
||||||
bool.TryParse(Individual.InnerText, out IsGraded);
|
bool.TryParse(Individual.InnerText, out currentOne.IsGraded);
|
||||||
break;
|
break;
|
||||||
case "issubmitted":
|
case "issubmitted":
|
||||||
bool.TryParse(Individual.InnerText, out IsSumbitted);
|
bool.TryParse(Individual.InnerText, out currentOne.IsSumbitted);
|
||||||
break;
|
break;
|
||||||
case "network":
|
case "network":
|
||||||
theProject = new Network();
|
currentOne.theProject = new Network();
|
||||||
theProject.Load(Individual, "",false,true);
|
currentOne.theProject.Load(Individual, "",false,true);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (!AddedList) ThisList.Add(currentOne);
|
||||||
|
|
||||||
|
return ThisList;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Save(string filename)
|
public void Save(string filename)
|
||||||
|
Loading…
Reference in New Issue
Block a user