日期:2014-05-17 浏览次数:20443 次
public DataTable GetNextFormsList(int WorkflowID, int g_RSID)
{
DataTable dt = new DataTable();
DataSet ds = dal.GetNextFormsList(WorkflowID, g_RSID);
if (ds.Tables[0].Rows.Count > 0)
{
ds.Relations.Add("R", ds.Tables[0].Columns["thisId"], ds.Tables[0].Columns["wfid"],false);
dt = ds.Relations["R"].ParentTable;
dt.Columns.Add("branchIdList", typeof(System.Int32));
foreach (DataRow dr in dt.Rows)
{
string strBranchId = ",";
for (int i = 0; i < dr.GetChildRows("R").Length; i++)
{
strBranchId += dr.GetChildRows("R")[i]["branchId"].ToString();
}
dr["branchIdList"] = strBranchId.Substring(1, strBranchId.Length);
}
}
return dt;
}