删除按钮提代码


protected void LinkButton2_Click(object sender, EventArgs e)
{
this.Confirm("確定刪除", "location.href='?SN=" + this.SN + "&type=del'", "sf.hide()");
}

private int DeleteItem()
{
string sql = "delete from CRM_add_case where SN='" + this.SN + "'";
return MySqlBase.ExecuteSql(sql);
}

if (this.type == "del" && !CoolFuncs.IsNullorEmpty(this.SN))
{
if (this.DeleteItem() >= 0)
{
ClientScript.RegisterStartupScript(this.GetType(), "a", "<script>parent.relo();</script>");
}
else
{
this.MsgForm("刪除失敗");
}
}

this.LinkButton3.Attributes.Add("onclick", "javascript:return confirm('你确认要删除吗?')");

优质内容筛选与推荐>>
1、爱普生打印机的设置问题。
2、38.递推练习:  上台阶
3、PyQt5--GridLayoutMultiLine
4、安装和配置Linux系统虚拟机
5、如何切换svn用户?


长按二维码向我转账

受苹果公司新规定影响,微信 iOS 版的赞赏功能被关闭,可通过二维码转账支持公众号。

    阅读
    好看
    已推荐到看一看
    你的朋友可以在“发现”-“看一看”看到你认为好看的文章。
    已取消,“好看”想法已同步删除
    已推荐到看一看 和朋友分享想法
    最多200字,当前共 发送

    已发送

    朋友将在看一看看到

    确定
    分享你的想法...
    取消

    分享想法到看一看

    确定
    最多200字,当前共

    发送中

    网络异常,请稍后重试

    微信扫一扫
    关注该公众号