星期日, 12月 06, 2009

Using LINQ To Create Custom Datatable And Travel Table


IEnumerable<DataRow> SubenumTable =
from goodTable in dt.AsEnumerable()
where goodTable.Field<string>("TravelRegion") == row.col1.ToString()
select goodTable;
//sr.Append(row.col1.ToString()+"<br>");
foreach (DataRow goodsrow in SubenumTable)
{


SiteNode Subn1 = new SiteNode();
Subn1.ParentID = count.ToString();
Subn1.ID = goodsrow["TravelID"].ToString();
Subn1.Title = goodsrow["TravelAttractions"].ToString();
Subn1.Pos = goodsrow["TravelLat"].ToString() + "," + goodsrow["TravelLng"].ToString();
nodes.Add(Subn1);
}

沒有留言:

張貼留言

留個話吧:)

其他你感興趣的文章

Related Posts with Thumbnails