DataTable dtcp = tblDeliveryInfo.Clone(); foreach (DataColumn item in dtcp.Columns) { item.DataType = typeof(string); } foreach (DataRow item in tblDeliveryInfo.Rows) { DataRow dr = dtcp.NewRow(); for (int i = 0; i < item.ItemArray.Length; i++) { dr[i] = item.ItemArray[i]; } dtcp.Rows.Add(dr); }
时间: 2024-10-19 21:54:59