Beispiel #1
0
        private void btn_Save_Click(object sender, EventArgs e)
        {
            TreeNode tr = trv_InterestPatient.SelectedNode;

            if (tr == null)
            {
                MessageBoxEx.Show("请选择需要保存到的分类!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }
            if (txt_NOTE_NAME.Text.Trim() == "")
            {
                MessageBoxEx.Show("请输入分类名!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }
            mip.NOTE_NAME = txt_NOTE_NAME.Text.Trim();

            mip.PARENT_NOTE_ID = Convert.ToInt32(tr.Name);

            if (!chk_PATIENT_ID.Checked)
            {
                mip.PATIENT_ID = null;
            }
            if (!chk_EXAM_ACCESSION_NUM.Checked)
            {
                mip.EXAM_ACCESSION_NUM = null;
            }

            if (txt_MEMO.Text.Trim() != "")
            {
                mip.MEMO = txt_MEMO.Text.Trim();
            }

            if (string.IsNullOrEmpty(mip.EXAM_ACCESSION_NUM) && string.IsNullOrEmpty(mip.PATIENT_ID))
            {
                mip.IS_NOTE = 0;
            }
            else
            {
                mip.IS_NOTE = 1;
            }

            int i = bItPt.Add(mip);

            if (i > 0)
            {
                MessageBoxEx.Show("新增感兴趣病人成功!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            else
            {
                MessageBoxEx.Show("新增感兴趣病人失败!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Beispiel #2
0
        private void btn_Save_Click(object sender, EventArgs e)
        {
            if (Now_Modify_NodeID == "" && Now_Add_NodeID == "") return;

            if (Now_Modify_NodeID == "" && Now_Add_NodeID != "")
                Now_Modify_NodeID = Now_Add_NodeID;
            TreeNode[] tr = trv_InterestPatient.Nodes.Find(Now_Modify_NodeID, true);
            if (tr.Length > 0)
            {
                TreeNode ntr = tr[0];
                MInterestPatient mip = new MInterestPatient();
                mip.NOTE_ID = Convert.ToInt32(ntr.Name);
                mip.NOTE_NAME = txt_NOTE_NAME.Text.Trim();
                if (ntr.Level == 0)
                    mip.PARENT_NOTE_ID = 0;
                else
                    mip.PARENT_NOTE_ID = Convert.ToInt32(ntr.Parent.Name);

                mip.DOCTOR_ID = NowDoctorID;
                mip.MEMO = txt_MEMO.Text.Trim();
                mip.IS_NOTE = 0;
                bool bl = bItPt.Exists(mip);

                if (bl)
                {
                    int i = bItPt.Update(mip, " where NOTE_ID=" + mip.NOTE_ID);
                    if (i >= 0)
                    {
                        MessageBoxEx.Show("修改成功!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                        ntr.Text = txt_NOTE_NAME.Text.Trim();
                        Now_Add_NodeID = "";
                        Now_Modify_NodeID = "";
                        btn_Clean_Click(null, null);
                    }
                    else
                    {
                        MessageBoxEx.Show("修改失败!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    }
                }
                else
                {
                    int i = bItPt.Add(mip);
                    if (i > 0)
                    {
                        MessageBoxEx.Show("新增成功!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                        ntr.Text = txt_NOTE_NAME.Text.Trim();
                        Now_Add_NodeID = "";
                        Now_Modify_NodeID = "";
                        btn_Clean_Click(null, null);
                    }
                    else
                    {
                        MessageBoxEx.Show("新增失败!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    }
                }
            }
        }
Beispiel #3
0
        private void tsmi_InterestExam_Click(object sender, EventArgs e)
        {
            MInterestPatient mintPat = new MInterestPatient();

            mintPat.DOCTOR_ID          = ((MUser)frmMainForm.iUser).DOCTOR_ID;
            mintPat.EXAM_ACCESSION_NUM = this.MworkList.EXAM_ACCESSION_NUM;
            mintPat.PATIENT_ID         = this.MworkList.PATIENT_ID;
            mintPat.IS_NOTE            = 1;
            BInterestPatient bintPat = new BInterestPatient();

            bintPat.Add(mintPat);
        }