本文整理汇总了C#中Epi.CreateCodeTable方法的典型用法代码示例。如果您正苦于以下问题:C# Epi.CreateCodeTable方法的具体用法?C# Epi.CreateCodeTable怎么用?C# Epi.CreateCodeTable使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Epi
的用法示例。
在下文中一共展示了Epi.CreateCodeTable方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CopyCodeTablesTo
/// <summary>
/// CopyCodeTablesTo()
/// </summary>
/// <param name="destination"></param>
public void CopyCodeTablesTo(Epi.Project destination)
{
List<string> codeTableList = Metadata.GetCodeTableNames();
foreach (string codeTableName in codeTableList)
{
RaiseEventTableCopyBegin(codeTableName + StringLiterals.ELLIPSIS);
string[] columnNames = Metadata.GetCodeTableColumnNames(codeTableName);
destination.CreateCodeTable(codeTableName, columnNames);
DataTable CodeTable = this.Metadata.GetCodeTableData(codeTableName);
int rowIndex = 0;
foreach (DataRow CodeRow in CodeTable.Rows)
{
RaiseEventTableCopyStatus(codeTableName, rowIndex, CodeTable.Rows.Count);
rowIndex++;
string[] columnData = new string[columnNames.Length];
for (int i = 0; i < columnNames.Length; i++)
{
columnData[i] = CodeRow[columnNames[i]].ToString();
}
destination.Metadata.CreateCodeTableRecord(codeTableName, columnNames, columnData);
}
RaiseEventTableCopyEnd(codeTableName + StringLiterals.ELLIPSIS);
}
}