将一个DataTable转变为自定义的DataSet
public DataSetUser SettingDs(DataSetUser ds,DataTable tb)
{
DataTable Dstable = ds.Tables[0];
for (int i = 0; i < tb.Rows.Count; i++)
{
DataRow row = Dstable.NewRow();
for (int j = 0; j < tb.Columns.Count; j++)
{
string str = tb.Columns[j].ToString();
row[str] = tb.Rows[i][str];
}
Dstable.Rows.Add(row);
}
return ds;
}