private DataTable ToDataTable(DataRow[] rows)
{
if (rows == null || rows.Length == 0) return null;
DataTable tmp = rows[0].Table.Clone(); // 復制DataRow的表結構
foreach (DataRow row in rows)
{
tmp.ImportRow(row); // 將DataRow添加到DataTable中
}
return tmp;
}