protected void btnUpdate_Click(object sender, EventArgs e) { GA gAdmin = new GA(); Property propertyAlter = new Property(); Property propertyNow = new Property(); propertyNow.PropertyName = drpNewProname.SelectedItem.Text; propertyAlter.PropertyName = tbxDelupdate.Text; if (gAdmin.PoIsRepeat(propertyAlter) == true)//不重复 { if (gAdmin.AlterPoName(propertyNow, propertyAlter)) { 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>"); } } else { this.lblCheck.Text = "该属性存在无法修改!"; //this.Page.ClientScript.RegisterStartupScript(this.GetType(), "", "<script language='javascript'>alert('" + "该属性存在无法修改" + "');</script>"); } }