void ParseKeys(PDModel m, PDPackage package, PDTable table, XmlNode root) { foreach (XmlNode keyNode in root.ChildNodes) { PDKey key = new PDKey(); key.Model = m; key.Package = package; key.Table = table; key.ID = keyNode.Attributes["Id"].Value; foreach (XmlNode node in keyNode.ChildNodes) { switch (node.Name) { case "a:Name": key.Name = node.InnerText; break; case "a:Code": key.Code = node.InnerText; break; case "a:Comment": key.Comment = node.InnerText; break; case "c:Key.Columns": key.ColumnIDList = ParseKeyColumnIDs(node.ChildNodes); break; default: break; } }//end parse key table.AddKey(key); }//end parse keys }
public void AddKey(PDKey key) { _KeyList.Add(key); }