F
fengyuyang
Unregistered / Unconfirmed
GUEST, unregistred user!
代码如下:
private void dgWorkTeam_UpdateCommand(object source, System.Web.UI.WebControls.DataGridCommandEventArgs e)
{
string compcode,workteam,teamdesc;
string strSQL;
compcode = e.Item.Cells[0].Text;
workteam = e.Item.Cells[1].Text;
teamdesc = ((TextBox)e.Item.FindControl("txtEditTeamDesc")).Text;
strSQL = "Update SprayWorkTeam Set teamdesc = '" + teamdesc + "' Where compcode = '" + compcode + "' and workteam = '" + workteam + "'";
}
teamdesc 的值总是获取修改前的值,而不是修改后的值。
private void dgWorkTeam_UpdateCommand(object source, System.Web.UI.WebControls.DataGridCommandEventArgs e)
{
string compcode,workteam,teamdesc;
string strSQL;
compcode = e.Item.Cells[0].Text;
workteam = e.Item.Cells[1].Text;
teamdesc = ((TextBox)e.Item.FindControl("txtEditTeamDesc")).Text;
strSQL = "Update SprayWorkTeam Set teamdesc = '" + teamdesc + "' Where compcode = '" + compcode + "' and workteam = '" + workteam + "'";
}
teamdesc 的值总是获取修改前的值,而不是修改后的值。