
我想点通过把状态的内容改为通过,然后刷新表格,但是我写的代码点了通过之后没反应,那我大神能帮我看看问题在哪,谢谢!!!
代码:
<asp:TemplateField HeaderText="操作" ShowHeader="False">
<ItemTemplate>
<asp:LinkButton ID="TG" runat="server" CommandName="tongguo" CommandArgument='<%# Eval("ID") %>'>通过</asp:LinkButton>
/
<asp:LinkButton ID="NTG" runat="server" CommandName="butongguo" CommandArgument='<%# Eval("ID") %>'>不通过</asp:LinkButton>
</ItemTemplate>
<HeaderStyle CssClass="ce" Width="100px" />
<ItemStyle CssClass="ce" />
</asp:TemplateField>
protected void GridView1_RowCommand(object sender,GridViewCommandEventArgs e)
{
if (e.CommandName == "tongguo")
{
long id = (long)e.CommandArgument;
RSGL.Model.T_Application app = new RSGL.Model.T_Application();
RSGL.BLL.T_Application bll = new RSGL.BLL.T_Application();
app = bll.GetModel(id);
app.Status = "已通过";
bll.Update(app);
}
}