Esempio n. 1
0
 public void AddColumn(TableColumnInfo mColumn)
 {
     if (columns == null)
     {
         columns = new List <TableColumnInfo>();
     }
     columns.Add(mColumn);
 }
Esempio n. 2
0
        /// <summary>
        /// 读取Column node 中的内容
        /// </summary>
        /// <param name="xnColumn">column node</param>
        /// <returns></returns>
        private TableColumnInfo GetColumn(XmlNode xnColumn)
        {
            TableColumnInfo mColumn = new TableColumnInfo();

            XmlElement xe = (XmlElement)xnColumn;

            mColumn.Id = xe.GetAttribute("Id");

            XmlNodeList xnTProperty = xe.ChildNodes;

            foreach (XmlNode xnP in xnTProperty)
            {
                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 = xnP.InnerText;
                    break;

                case "a:Creator": mColumn.Creator = xnP.InnerText;
                    break;

                case "a:ModificationDate": mColumn.ModificationDate = 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 = xnP.InnerText;
                    break;

                case "a:Mandatory": mColumn.Mandatory = xnP.InnerText;
                    break;

                case "a:DefaultValue": mColumn.DefaultValue = xnP.InnerText;
                    break;
                }
            }
            return(mColumn);
        }
Esempio n. 3
0
 /// <summary>
 /// 读取key node 下的关联的column的 Id
 /// </summary>
 /// <param name="xnP"></param>
 /// <param name="mKey"></param>
 private void GetRefIds(XmlNode xnP, KeyInfo mKey)
 {
     foreach (XmlNode xnp in xnP.ChildNodes)
     {
         XmlElement      xe     = (XmlElement)xnp;
         TableColumnInfo column = new TableColumnInfo();
         column.RefId = xe.GetAttribute("Ref");
         mKey.AddColumn(column);
     }
 }