protected void btnAdd1_Click(object sender, EventArgs e) { if (tbxNewcon.Text != "") { GA gAdmin = new GA(); PropertyContent procontent = new PropertyContent(); Property property = new Property(); property.PropertyName = drpNewProname.SelectedItem.Text; procontent.PropertyID = gAdmin.PoNameGetID(property); procontent.PropertyContentName = tbxNewcon.Text; if (PropertyContent.PcIsRepeat(procontent) == true)//不重复 { if (gAdmin.AddPoContent(procontent) == true) { 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>"); } } else { this.lblCheck.Text = "添加不能为空!"; //this.Page.ClientScript.RegisterStartupScript(this.GetType(), "", "<script language='javascript'>alert('" + "添加不能为空" + "');</script>"); } }