Beispiel #1
0
        /// <summary>
        /// 复制源表格的表结构,创建一个空的表格
        /// </summary>
        /// <param name="sourceTable">源表格</param>
        /// <param name="featureWorkspace">创建新表格的工作空间</param>
        /// <param name="tableName">新表格的名称</param>
        /// <param name="tableAliasName">新表格的别名,值为null则别名与名字相同</param>
        /// <returns></returns>
        public static ITable CreateTable(this IFeatureWorkspace featureWorkspace, ITable sourceTable, string tableName, string tableAliasName = null)
        {
            var feilds = sourceTable.CloneTableFields(true);
            var table  = CreateTable(featureWorkspace, tableName, feilds);

            if (!string.IsNullOrEmpty(tableAliasName))
            {
                table.RenameTableAliasName(tableAliasName);
            }
            return(table);
        }