Exemple #1
0
        private XmlTable GetTable(string typeName, bool create)
        {
            var table = _db.GetTable(typeName);

            if (table == null && create)
            {
                table = XmlTable.Create(typeName);
                _db.AddTable(table);
            }
            return(table);
        }
Exemple #2
0
 /// <summary>
 /// 创建CAD版本
 /// </summary>
 /// <param name="version"></param>
 /// <param name="xmlDB"> </param>
 private static void InsertCadVersion(int version, XmlDB xmlDB)
 {
     try
     {
         var cadVersion = new CadVersion
         {
             G3E_ID      = 1,
             G3E_FID     = 1,
             G3E_FNO     = 2014,
             Version     = version,
             EntityState = EntityState.None
         };
         var versionTable = XmlTable.Create("CadVersion");
         versionTable.AddEntity(cadVersion);
         xmlDB.AddTable(versionTable);
     }
     catch
     {
         LogManager.Instance.Error("CADVersion添加失败!");
     }
 }