异常信息: Column 'FinanceOverdue' is read only.
public DataTable RetFinanceDt(DataTable dt)
{
dt.Columns.Add("FinanceOverdue", typeof(string), "0");
if (dt == null || dt.Rows.Count == 0)
{
return dt;
}
DataTable dtdue = GetFinanceOverdue();
if (dtdue != null && dtdue.Rows.Count > 0)
{
List<string> ls = new List<string>();
foreach (DataRow durow in dtdue.Rows)
{
if (!ls.Contains(durow["FFOOrderId"].ToString()))
{
ls.Add(durow["FFOOrderId"].ToString());
}
}
foreach (DataRow dtrow in dt.Rows)
{
if (ls.Contains(dtrow["orderid"].ToString()))
{
dtrow["FinanceOverdue"] = 1;
}
else
{
dtrow["FinanceOverdue"] = 0;
}
}
}
return dt;
}