/// <summary>
/// 合并两个表中的数据(要表中的结构一样)
/// </summary>
/// <param name="dt1"></param>
/// <param name="dt2"></param>
/// <returns></returns>
public static DataTable TheSameTable(DataTable dt1, DataTable dt2)
{
if (dt1.Rows.Count == 0 && dt2.Rows.Count == 0)
{
return new DataTable();
}
if (dt1.Rows.Count == 0)
{
return dt2;
}
if (dt2.Rows.Count == 0)
{
return dt1;
}
dt1.Merge(dt2);
return dt1;
}