public static ExamTemplateCollection GetExamTemplates() { XmlElement templates = QueryTemplate.GetAbstractList(); ExamTemplateCollection objTemplates = new ExamTemplateCollection(); foreach (XmlElement each in templates.SelectNodes("ExamTemplate")) { ExamTemplate template = new ExamTemplate(each); objTemplates.Add(template.Identity, template); } return(objTemplates); }
public TemplateLookup() { _lookup_table = new Dictionary <string, string>(); XmlElement xmlRecords = QueryTemplate.GetAbstractList(); foreach (XmlElement each in xmlRecords.SelectNodes("ExamTemplate")) { string name = each.SelectSingleNode("TemplateName").InnerText; string id = each.GetAttribute("ID"); _lookup_table.Add(name, id); } }