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>
 /// 将CommonNoeEntity->InCommonNoteEnmtity;
 /// xlb 2013-01-19
 /// </summary>
 /// <param name="commonNote"></param>
 /// <returns></returns>
 private InCommonNoteEnmtity ConvertToByCommonNote(CommonNoteEntity commonNote, InPatientSim inPatient)
 {
     try
     {
         //用来接收选择的模板的新模板名称
         string        commonNoteNames = commonNote.CommonNoteName == null ? "" : commonNote.CommonNoteName;
         CommonNoteBiz commonNoteBiz   = new CommonNoteBiz(m_app);
         commonNote = commonNoteBiz.GetDetailCommonNote(commonNote.CommonNoteFlow);
         commonNote.CommonNoteName = commonNoteNames;//模板名称修改
         InCommonNoteEnmtity inCommonNote    = InCommonNoteBiz.ConvertCommonToInCommon(commonNote);
         InCommonNoteBiz     incommonNoteBiz = new InCommonNoteBiz(m_app);
         DataTable           dtPatient       = incommonNoteBiz.GetInpatient(inPatient.NoofInpat.ToString());
         inCommonNote.CurrDepartID   = dtPatient.Rows[0]["OUTHOSDEPT"].ToString();
         inCommonNote.CurrDepartName = dtPatient.Rows[0]["DEPARTNAME"].ToString();
         inCommonNote.CurrWardID     = dtPatient.Rows[0]["OUTHOSWARD"].ToString();
         inCommonNote.CurrWardName   = dtPatient.Rows[0]["WARDNAME"].ToString();
         inCommonNote.NoofInpatient  = inPatient.NoofInpat.ToString();
         inCommonNote.InPatientName  = dtPatient.Rows[0]["NAME"].ToString();
         inCommonNote.CreateDateTime = DateTime.Now.ToString();
         inCommonNote.Valide         = "1";
         string message    = "";
         bool   saveResult = incommonNoteBiz.SaveInCommomNoteAll(inCommonNote, ref message);
         if (saveResult)
         {
             return(inCommonNote);
         }
         else
         {
             MessageBox.Show("创建单据失败");
             return(null);
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }