Esempio n. 1
0
    protected void Button_del_Click(object sender, EventArgs e)
    {
        if (this.hidenSortID.Value.Trim() == "")
        {
            this.JavaScriptControl1.Text = "alert('请选择删除的记录!')";
            return;
        }
        int checkCount = CheckAction.GetCheckCount("AcceptCheckSort=" + this.hidenSortID.Value);

        if (checkCount > 0)
        {
            this.JavaScriptControl1.Text = "alert('该类别对应的有检查记录,请删除对应的检查记录后再删除该类别!');";
            return;
        }
        bool flag = CheckClassAction.Delete(this.hidenSortID.Value);

        if (flag)
        {
            this.JavaScriptControl1.Text = "alert('删除成功!');window.location.href=window.location.href";
            return;
        }
        this.JavaScriptControl1.Text = "alert('删除失败!')";
    }