Ejemplo n.º 1
0
        protected void btnAdd_Click(object sender, EventArgs e)
        {
            if (txtTitle.Text.Trim().Equals(""))
            {
                ClientScript.RegisterStartupScript(GetType(), "err", "alert('请输入标题');", true);
                return;
            }
            JavaDLL dll = new JavaDLL();

            if (dll.addMaterial(txtTitle.Text.Trim(), txtUrl.Text.Trim(), txtPassword.Text.Trim(), txtRemark.Text))
            {
                ClientScript.RegisterStartupScript(GetType(), "err", "top.closeDialog()", true);
            }
            else
            {
                ClientScript.RegisterStartupScript(GetType(), "err", "alert('添加失败!');", true);
            }
        }