protected void btnSave_Click(object sender, EventArgs e) { bool ret = false; string result = ""; if (action == "new") { OrganizationBLL bll = new OrganizationBLL(); ret = bll.CreateOrgInfo(txtOrgName.Text, txtOrgCode.Text, txtOrgDesc.Text, txtOrderNo.Text); result = "添加"; } else if (action == "edit") { OrganizationBLL bll = new OrganizationBLL(); Guid id = new Guid(orgCode); ret = bll.UpdateOrgInfo(id, txtOrgName.Text, txtOrgCode.Text, txtOrgDesc.Text, txtOrderNo.Text); result = "更新"; } if (ret) { ClientScript.RegisterStartupScript(this.GetType(), "", "<script>top.ymPrompt.doHandler('ok', false);</script>"); } else { ClientScript.RegisterStartupScript(this.GetType(), "", "<script>top.ymPrompt.doHandler('failed', false);</script>"); } }