public string GetDptIdeasData()
{ StringBuilder temp = new StringBuilder();
for (int i = 0; i < mainIdeas.Rows.Count; i++)
{ string strJSON = WCFHelper.GetWCFValue(mainIdeas.Rows[i]["部门"].ToString(), ConfigurationManager.AppSettings["GetWFUserByID"]); WFUser wfuser = JsonConvert.DeserializeObject(strJSON);
temp.Append(@"
temp.Append(@"
temp.Append(@"
![p.gif](../Images/p.gif)
temp.Append(@"
" + mainIdeas.Rows[i]["处理人"].ToString()); temp.Append(@" ");for (int j = 0; j < Dsource.Rows.Count; j++)//每个人的所有处理意见 { string strJSONs = WCFHelper.GetWCFValue(Dsource.Rows[j]["部门"].ToString(), ConfigurationManager.AppSettings["GetWFUserByID"]);
WFUser wfusers = JsonConvert.DeserializeObject");
}
}
temp.Append("
");temp.Append("
temp.Append("
temp.Append(@"
");for (int k = 0; k < Dsource.Rows.Count; k++)//每条处理意见 { string strJSONs = WCFHelper.GetWCFValue(Dsource.Rows[k]["部门"].ToString(), ConfigurationManager.AppSettings["GetWFUserByID"]);
WFUser wfusers = JsonConvert.DeserializeObject(strJSON); if (wfuser.DptId.ToString() == wfusers.DptId.ToString()) {
temp.Append("
"); temp.Append(@" " + wfusers.DptName.ToString()); temp.Append(@" " + Dsource.Rows[k]["处人"].ToString()); temp.Append(@" ");temp.Append(Dsource.Rows[k]["处理意见"].ToString());
temp.Append(@"
");}
}
temp.Append(@"
} return temp.ToString();
}上面代码实现的效果
部门相同时合并(达到下面的效果,点记加号展开全部)