Пример #1
0
        /// <summary>
        /// 确定事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void simpleButton1_Click(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(txtITEMNAME.Text))
            {
                MyMessageBox.Show("节点名称不能为空", "提示", MyMessageBoxButtons.Ok, DrectSoft.Common.Ctrs.DLG.MessageBoxIcon.WarningIcon);
                txtITEMNAME.Focus();
                return;
            }
            if (string.IsNullOrEmpty(ContentEdit.Text))
            {
                MyMessageBox.Show("诊断内容不能为空", "提示", MyMessageBoxButtons.Ok, DrectSoft.Common.Ctrs.DLG.MessageBoxIcon.WarningIcon);
                ContentEdit.Focus();
                return;
            }

            if (Tool.GetByteLength(txtITEMNAME.Text) > 200)
            {
                MyMessageBox.Show("节点名称字符长度不能大于200,请重新输入。", "提示", MyMessageBoxButtons.Ok, DrectSoft.Common.Ctrs.DLG.MessageBoxIcon.WarningIcon);
                txtITEMNAME.Focus();
                return;
            }
            if (Tool.GetByteLength(ContentEdit.Text) > 4000)
            {
                MyMessageBox.Show("内容字符长度不能大于4000,请重新输入。", "提示", MyMessageBoxButtons.Ok, DrectSoft.Common.Ctrs.DLG.MessageBoxIcon.WarningIcon);
                ContentEdit.Focus();
                return;
            }

            PatRecUtil prUtil = new PatRecUtil(m_App, m_App.CurrentPatientInfo);

            prUtil.UpdateNodeContent(NID, NodeID, ParentNode, DS_Common.FilterSpecialCharacter(ContentEdit.EditValue.ToString()), DS_Common.FilterSpecialCharacter(txtITEMNAME.Text));

            NodeTitle   = this.txtITEMNAME.Text;
            NodeContent = this.ContentEdit.EditValue.ToString();

            this.DialogResult = System.Windows.Forms.DialogResult.OK;
            this.Close();
        }
Пример #2
0
        /// <summary>
        /// 确定操作
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void simpleButton1_Click(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(txtITEMNAME.Text))
            {
                MyMessageBox.Show("节点名称不能为空", "提示", MyMessageBoxButtons.Ok, DrectSoft.Common.Ctrs.DLG.MessageBoxIcon.WarningIcon);
                txtITEMNAME.Focus();
                return;
            }
            if (string.IsNullOrEmpty(ContentEdit.Text))
            {
                MyMessageBox.Show("诊断内容不能为空", "提示", MyMessageBoxButtons.Ok, DrectSoft.Common.Ctrs.DLG.MessageBoxIcon.WarningIcon);
                ContentEdit.Focus();
                return;
            }
            if (Tool.GetByteLength(txtITEMNAME.Text) > 200)
            {
                MyMessageBox.Show("子类名称字符长度不能大于200,请重新输入。", "提示", MyMessageBoxButtons.Ok, DrectSoft.Common.Ctrs.DLG.MessageBoxIcon.WarningIcon);
                txtITEMNAME.Focus();
                return;
            }
            if (Tool.GetByteLength(ContentEdit.Text) > 4000)
            {
                MyMessageBox.Show("子类名称字符长度不能大于4000,请重新输入。", "提示", MyMessageBoxButtons.Ok, DrectSoft.Common.Ctrs.DLG.MessageBoxIcon.WarningIcon);
                ContentEdit.Focus();
                return;
            }
            PatRecUtil prUtil = new PatRecUtil(m_App, m_App.CurrentPatientInfo);
            string     m_node;
            string     m_parentnode;

            prUtil.InsertChildNode(DiagID, "node", NodeID, DS_Common.FilterSpecialCharacter(this.txtITEMNAME.Text), DS_Common.FilterSpecialCharacter(this.ContentEdit.Text), "indexid", "1", out m_node, out m_parentnode);
            this.DialogResult = DialogResult.OK;
            string m_title; string m_content;

            SetTitleContent(out m_title, out m_content);
            SetNodeAndPNode(m_node, m_parentnode);
            this.Close();
        }