DataTable dt = costFO.GetQueryTable(projectid, date);
var newrow = from x in dt.Rows.Cast().Where(C => C.Field("CostMonthReportItem_Type") != "")
select new { type = x.Field("CostMonthReportItem_Type").ToString(), name = x.Field("CostMonthReportItem_PayNext").ToString() };
StringBuilder jsons = new StringBuilder();
JavaScriptSerializer jss = new JavaScriptSerializer();
Dictionary drow = new Dictionary();
newrow.ToList().ForEach(x =>
{
drow.Add(x.type.ToString(), x.name.ToString());
});
context.Response.Write(jss.Serialize(drow));
把学习一种技术一直坚持下去。