以下是引用yjy1987420在2009-11-17 16:48:30的发言:
ds.DataSet.AcceptChanges();
ds = searchdate.Searchdoc_certification(DropDownList3.SelectedValue.Trim(),TextBox5.Text.Trim());
if(ds.Tables[0].Rows.Count != 0)
{
for(i=0;i<ds.Tables[0].Rows.Count;i++)
{
ds1=searchdate.SearchProduct_Station_id(ds.Tables[0].Rows[i][2].ToString(),ds.Tables[0].Rows[i][3].ToString());
Product_Station_id = int.Parse(ds1.Tables[0].Rows[0][0].ToString());
for (j=0;j<ds1.Tables[0].Rows.Count;j++)
ts = searchdate.Searchdoc1_productid(Product_Station_id,ds.Tables[0].Rows[i][4].ToString());
if (int.Parse(ts.Tables[0].Rows[j][1].ToString())>int.Parse(ts.Tables[0].Rows[j][2].ToString()))
{
inure = "true";
break;
}
else
{
inure = "false";
}
Response.Write("<script>alert('"+inure+"')</script>");
ds.Tables[0].Rows[i][9] =inure;
}
}
ds.AcceptChanges(); 填上去了,似乎还是返回原来的值,没什么用啊!!!
DataGrid1.DataSource = ds;
DataGrid1.DataBind();