Commit 9e4d85a5 authored by tr's avatar tr

1.剔除重复代码

parent 62593bb0
......@@ -100,18 +100,7 @@ namespace FunnyPick
}
//创建目标新行
DataRow drNew = dtTarget.NewRow();
foreach (DataColumn c in dtFrom.Columns)
{
string ColName = c.ColumnName;
//ID和指定忽略的列,不复制
if (ColName.Equals("ID") || ExceptList?.IndexOf(ColName) >= 0)
continue;
if (dtTarget.Columns.Contains(ColName))
{
drNew[ColName] = r[ColName];
}
}
drNew.EndEdit();
CopyRow(r, drNew, ExceptList);
dtTarget.Rows.Add(drNew);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment