日期:2014-05-17 浏览次数:20471 次
class Program
{
static void Main(string[] args)
{
//手动构建一个DataTable
DataTable dt = new DataTable();
dt.Columns.Add("id");
dt.Columns.Add("navgationType");
dt.Columns.Add("typename");
DataRow row1 = dt.NewRow();
row1["id"] = 1;
row1["navgationType"] = "产品分类";
row1["typename"] = "AAA";
dt.Rows.Add(row1);
DataRow row2 = dt.NewRow();
row2["id"] = 2;
row2["navgationType"] = "产品分类";
row2["typename"] = "BBB";
dt.Rows.Add(row2);
DataRow row3 = dt.NewRow();
row3["id"] = 3;
row3["navgationType"]