private void Page_Load(object sender, System.EventArgs e) { ClassID = (Request.QueryString["ClassID"] != null)?Request.QueryString["ClassID"].ToString():""; Action = (Request.QueryString["Action"] != null)?Request.QueryString["Action"].ToString():""; if (!Page.IsPostBack) { PopulateRadioList(); if (Action == "1") { this.lblCreate.BackColor = Color.FromName("#1ED2CA"); this.btnRevise.Visible = false; this.btnDelete.Visible = false; } if (Action == "2") { UDS.Components.ProjectClass prj = new ProjectClass(); this.lblDelete.BackColor = Color.FromName("#1ED2CA"); this.btnRevise.Visible = false; this.btnDelete.Visible = true; this.btnSubmit.Visible = false; PopulateReviseData(); if (ClassID != "1") { if (prj.IsExistSubClass(Int32.Parse(ClassID))) { this.btnDelete.Attributes["onClick"] = "javascript:alert('此项目还存在子节点,不能删除!!');return false;"; } else { this.btnDelete.Attributes["onClick"] = "javascript:return confirm('您确认吗?');"; } } else { this.btnDelete.Attributes["onClick"] = "javascript:alert('根节点不能被删除!');return false;"; } } if (Action == "3") { this.lblRevise.BackColor = Color.FromName("#1ED2CA"); this.btnSubmit.Visible = false; this.btnDelete.Visible = false; PopulateReviseData(); } } }