protected void Delete2_Click(object sender, EventArgs e) { try { if (dlistSecondClumName.SelectedItem.Value == "") { this.lblCheck.Text = "选择删除项为空"; } else { SecondClassDm Second = new SecondClassDm(); ThirdClassDm Third = new ThirdClassDm(); Second.SecondClassDmName = dlistSecondClumName.SelectedItem.Text; GA ga = new GA(); GAController GA = new GAController(); if (SecondClassDm.FcShowContent(Third, Second).Count != 0) { this.lblCheck.Text = "三级类目存在内容!"; //this.Page.ClientScript.RegisterStartupScript(this.GetType(), "", "<script language='javascript'>alert('" + "三级类目存在内容" + "');</script>"); } else { if (GA.DeleteSecondClass(ga, Second)) { this.lblCheck.Text = "删除成功!"; //this.Page.ClientScript.RegisterStartupScript(this.GetType(), "", "<script language='javascript'>alert('" + "删除成功" + "');</script>"); } else { this.lblCheck.Text = "删除失败!"; //this.Page.ClientScript.RegisterStartupScript(this.GetType(), "", "<script language='javascript'>alert('" + "删除失败 " + "');</script>"); } } } } catch { this.lblCheck.Text = "选择删除项为空"; } }