62,266
社区成员
发帖
与我相关
我的任务
分享
<asp:TemplateField HeaderText ="删除">
<ItemTemplate >
<asp:ImageButton ID ="btnDelete" runat ="server" ImageUrl ="~/images/delete.gif" CommandArgument='<%Eval("BranchId") %>' CommandName ="Del" />
</ItemTemplate>
</asp:TemplateField>
protected void gdvShowBranch_RowCommand(object sender, GridViewCommandEventArgs e)
{
BranchInfoRule bir = new BranchInfoRule();
switch (e.CommandName )
{
case "Del":
int branchId =Convert .ToInt32( e.CommandArgument);
bir.Delete(branchId);
this.BindDate();
break ;
}
protected void gdvShowBranch_RowCommand(object sender, GridViewCommandEventArgs e)
{
BranchInfoRule bir = new BranchInfoRule();
switch (e.CommandName )
{
case "Del":
int branchId =Convert .ToInt32( e.CommandArgument);
bir.Delete(branchId);//调用删除记录的方法
this.BindDate();
break ;
}