-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathTemplateGroup.cs
52 lines (45 loc) · 1.41 KB
/
TemplateGroup.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
using System;
using System.Collections.Generic;
using System.Text;
using System.Xml;
namespace RustyLogic.RedDotNet
{
public class TemplateGroup : RedDotObject
{
private string _name;
public string Name
{
get { return _name; }
set { _name = value; }
}
protected TemplateGroup(XmlNode xmlNode) : base(xmlNode) { }
protected TemplateGroup(Guid guid) : base(guid) { }
protected override XmlNode LoadXml()
{
throw new Exception("The method or operation is not implemented.");
}
protected override void LoadBasics(XmlNode xmlNode)
{
_name = xmlNode.Attributes.GetNamedItem("name").Value;
}
public List<Template> Templates()
{
return Template.List(this);
}
public static List<TemplateGroup> List()
{
List<TemplateGroup> groups = new List<TemplateGroup>();
string rqlStatement =
"<IODATA>" +
"<TEMPLATEGROUPS action=\"load\" />" +
"</IODATA>";
xmlDoc.LoadXml(Session.Execute(rqlStatement));
XmlNodeList xmlNodes = xmlDoc.GetElementsByTagName("GROUP");
foreach (XmlNode xmlNode in xmlNodes)
{
groups.Add(new TemplateGroup(xmlNode));
}
return groups;
}
}
}