private static Utility.DBTableInfo getTable(XmlNode tnode) { DBTableInfo t = new DBTableInfo(); t.Name = tnode.Attributes["Name"].Value; XmlAttribute act = tnode.Attributes["AccessTypes"]; XmlAttribute menugroup = tnode.Attributes["MenuGroup"]; XmlAttribute sortorder = tnode.Attributes["SortOrder"]; if (act != null) { char [] sep = { ',' }; t.AccessTypes = new List <string>(act.Value.Split(sep, StringSplitOptions.RemoveEmptyEntries)); } if (menugroup != null) { t.MenuGroup = menugroup.Value; } if (sortorder != null) { t.SortOrder = sortorder.Value.ToInt(); } DBColumnInfo c = null; foreach (XmlNode cnode in tnode.SelectNodes("DBColumns/DBColumn")) { c = new DBColumnInfo(); c.Name = cnode.Attributes["NetName"].Value; c.IsPrimaryKey = cnode.Attributes["IsPrimaryKey"].Value.ToLower() != "false"; t.Columns.Add(c.Name, c); } return(t); }