Exemple #1
0
        /// <summary>
        /// 测试方法
        /// </summary>
        private void Test()
        {
            string        message = "";
            CommonNoteBiz cbiz    = new CommonNoteBiz(m_app);

            m_commonNoteEntity = cbiz.GetDetailCommonNote("f5d1c558-df2a-4ac5-8d1d-6ef3ccaef5e7");
            InCommonNoteBiz            icombiz          = new InCommonNoteBiz(m_app);
            List <InCommonNoteEnmtity> InCommonNoteList = icombiz.GetSimInCommonNote("1333");

            if (InCommonNoteList == null || InCommonNoteList.Count == 0)
            {
                m_inCommonNote = InCommonNoteBiz.ConvertCommonToInCommon(m_commonNoteEntity);
                DataTable inpatientDt = icombiz.GetInpatient("1333");
                m_inCommonNote.CurrDepartID   = inpatientDt.Rows[0]["OUTHOSDEPT"].ToString();
                m_inCommonNote.CurrDepartName = inpatientDt.Rows[0]["DEPARTNAME"].ToString();
                m_inCommonNote.CurrWardID     = inpatientDt.Rows[0]["OUTHOSWARD"].ToString();
                m_inCommonNote.CurrWardName   = inpatientDt.Rows[0]["WARDNAME"].ToString();
                m_inCommonNote.NoofInpatient  = "1333";
                m_inCommonNote.InPatientName  = inpatientDt.Rows[0]["NAME"].ToString();
                bool saveResult = icombiz.SaveInCommomNoteAll(m_inCommonNote, ref message);
            }
            else
            {
                m_inCommonNote = InCommonNoteList[0];
            }
        }
Exemple #2
0
 /// <summary>
 /// 创建病人列表一级节点
 /// xlb 2013-01-17
 /// </summary>
 private void MakeTreeOne(List <InPatientSim> inPatientList)
 {
     try
     {
         TreeListNode parentNode = null;//父节点
         if (inPatientList == null || inPatientList.Count <= 0)
         {
             return;
         }
         foreach (var item in inPatientList)
         {
             string patInf = "床号:" + item.OutBed + "|" + "住院号:" + item.PatId;
             parentNode     = treeListInpat.AppendNode(new object[] { item.Name, "Folder", patInf }, null);
             parentNode.Tag = item;
             List <InCommonNoteEnmtity> inCommonNoteList = m_inCommonNoteBiz.GetSimInCommonNote(item.NoofInpat.ToString());
             MakeTreeATwo(inCommonNoteList, parentNode);
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Exemple #3
0
        private void gvInpatient_DoubleClick(object sender, EventArgs e)
        {
            try
            {
                var gvInpatient = (sender as DevExpress.XtraGrid.Views.Grid.GridView);
                if (gvInpatient == null)
                {
                    return;
                }
                m_drInpatient = gvInpatient.GetFocusedDataRow();
                if (m_drInpatient == null || string.IsNullOrEmpty(m_drInpatient["NOOFINPAT"].ToString()))
                {
                    return;
                }


                //未保存数据提示
                if (pcJLD.Controls != null && pcJLD.Controls.Count != 0)
                {
                    UCInCommonNote uCInCommonNote = (pcJLD.Controls[0] as UCInCommonNote);
                    if (uCInCommonNote != null)
                    {
                        bool HasSave = uCInCommonNote.HasInfoSave();
                        if (HasSave == true)
                        {
                            DialogResult diaResult = DrectSoft.Common.Ctrs.DLG.MyMessageBox.Show("存在数据未保存,确定退出吗?", "提示", DrectSoft.Common.Ctrs.DLG.MyMessageBoxButtons.YesNo);
                            if (diaResult == DialogResult.No)
                            {
                                return;
                            }
                        }
                    }
                }

                m_noofInpat = m_drInpatient["NOOFINPAT"].ToString();
                InCommonNoteEnmtity        MyinCommonNoteEnmtity = null;
                InCommonNoteBiz            inCommonNoteBiz       = new InCommonNoteBiz(m_app);
                List <InCommonNoteEnmtity> inCommonNoteListAll   = inCommonNoteBiz.GetSimInCommonNote(this.m_noofInpat);
                List <InCommonNoteEnmtity> inCommonNoteList      = inCommonNoteListAll.FindAll(a => a.CommonNoteFlow == m_commonNoteEntity.CommonNoteFlow) as List <InCommonNoteEnmtity>;
                if (inCommonNoteList != null && inCommonNoteList.Count >= 2)
                {
                    InCommListForm inCommListForm = new InCommListForm(inCommonNoteList, m_app, m_noofInpat, m_commonNoteEntity);
                    DialogResult   diaResult      = inCommListForm.ShowDialog();
                    if (diaResult == DialogResult.OK)
                    {
                        MyinCommonNoteEnmtity = inCommListForm.MyInCommonNoteEnmtity;
                        AddUCInCommonNote(MyinCommonNoteEnmtity);
                    }
                    else
                    {
                        return;
                    }
                }
                else if (inCommonNoteList == null || inCommonNoteList.Count == 0)
                {
                    MyinCommonNoteEnmtity = ConverBycommonNote(m_commonNoteEntity);
                    if (MyinCommonNoteEnmtity == null)
                    {
                        return;
                    }
                    AddUCInCommonNote(MyinCommonNoteEnmtity);
                }
                else
                {
                    MyinCommonNoteEnmtity = inCommonNoteList[0];
                    AddUCInCommonNote(MyinCommonNoteEnmtity);
                }
                lblJLDName.Text = m_drInpatient["NAME"].ToString() + ":" + MyinCommonNoteEnmtity.InCommonNoteName;
            }
            catch (Exception ex)
            {
                DrectSoft.Common.Ctrs.DLG.MyMessageBox.Show(ex.StackTrace);
            }
        }