public void AddColumn(PdmColumn mColumn) { if (columns == null) { columns = new List <PdmColumn>(); } columns.Add(mColumn); }
private PdmColumn GetColumn(XmlNode xnColumn) { PdmColumn mColumn = new PdmColumn(); XmlElement xe = (XmlElement)xnColumn; mColumn.ColumnId = xe.GetAttribute("Id"); XmlNodeList xnCProperty = xe.ChildNodes; foreach (XmlNode xnP in xnCProperty) { switch (xnP.Name) { case "a:ObjectID": mColumn.ObjectID = xnP.InnerText; break; case "a:Name": mColumn.Name = xnP.InnerText; break; case "a:Code": mColumn.Code = xnP.InnerText; break; case "a:CreationDate": mColumn.CreationDate = Convert.ToInt32(xnP.InnerText); break; case "a:Creator": mColumn.Creator = xnP.InnerText; break; case "a:ModificationDate": mColumn.ModificationDate = Convert.ToInt32(xnP.InnerText); break; case "a:Modifier": mColumn.Modifier = xnP.InnerText; break; case "a:Comment": mColumn.Comment = xnP.InnerText; break; case "a:DataType": mColumn.DataType = xnP.InnerText; break; case "a:Length": mColumn.Length = xnP.InnerText; break; case "a:Identity": mColumn.IdEntity = ConvertBool(xnP.InnerText); break; case "a:Mandatory": mColumn.Mandatory = ConvertBool(xnP.InnerText); break; case "a:PhysicalOptions": mColumn.PhysicalOptions = xnP.InnerText; break; case "a:ExtendedAttributesText": mColumn.ExtendedAttributesText = xnP.InnerText; break; } } return(mColumn); }