DataSet dt = rule.GetMyPayOrder(cid, uid);
int coutf = dt.Tables[0].Rows.Count;//父及數量
int couts = dt.Tables[1].Rows.Count;//子集數量
for (int i = 0; i < coutf; i++)
{
DataTable t=new DataTable();//子集
t = dt.Tables[1].Clone(); //克隆結構 Copy()複製全部
for (int j = 0; j < couts; j++)
{
if (dt.Tables[1].Rows[j]["PayID"].ToString().Equals(dt.Tables[0].Rows[i]["PayID"].ToString()))
{
t.ImportRow(dt.Tables[1].Rows[j]);
}
}
dt.Tables[0].Rows[i]["data"] = JsonHelper.ToJson(t, true);
}