コード例 #1
0
        //保存
        private void btnSave_Click(object sender, EventArgs e)
        {
            try
            {
                string message        = "";
                bool   validateResult = uCCommonNoteInfo.ValidateCommonNote();
                if (validateResult == false)
                {
                    return;
                }
                CommonNoteEntity      commonNoteEntityNew   = uCCommonNoteInfo.SaveCommonNote();
                bool                  saveResult            = commonNoteBiz.SaveCommonNoteAll(commonNoteEntityNew, ref message);
                CommonNoteCountEntity commonNoteCountEntity = uCCommonNoteInfo.SaveCommonCount();
                commonNoteCountEntity.CommonNoteFlow = commonNoteEntityNew.CommonNoteFlow;
                CommonNoteBiz.AddOrModCommonNoteEntity(commonNoteCountEntity);
                if (saveResult)
                {
                    m_app.CustomMessageBox.MessageShow("保存成功");


                    //从数据库中取对象 为了确保对象数据的完整
                    commonNoteEntityNew = commonNoteBiz.GetDetailCommonNote(commonNoteEntityNew.CommonNoteFlow);
                    Search();
                    //RefreshTabpage(commonNoteEntityNew);
                }
                else
                {
                    m_app.CustomMessageBox.MessageShow(message);
                }
            }
            catch (Exception ex)
            {
                m_app.CustomMessageBox.MessageShow(ex.Message);
            }
        }
コード例 #2
0
 /// <summary>
 /// 获取统计数据 xll 20130620
 /// </summary>
 private void InitCommonCount()
 {
     try
     {
         chkCount.Checked = false;
         if (string.IsNullOrEmpty(m_CommonNoteEntity.CommonNoteFlow))
         {
             return;
         }
         m_commonNoteCountEntity = CommonNoteBiz.GetCommonNoteCount(m_CommonNoteEntity.CommonNoteFlow);
         if (m_commonNoteCountEntity == null)
         {
             return;
         }
         txtitemCount.Text = m_commonNoteCountEntity.ItemCount;
         txt12Name.Text    = m_commonNoteCountEntity.Hour12Name == null ? "12小时统计" : m_commonNoteCountEntity.Hour12Name;
         txt24Name.Text    = m_commonNoteCountEntity.Hour24Name == null ? "24小时统计" : m_commonNoteCountEntity.Hour24Name;
         chkCount.Checked  = m_commonNoteCountEntity.Valide == "1" ? true : false;
         tim12.Time        = string.IsNullOrEmpty(m_commonNoteCountEntity.Hour12Time) ? Convert.ToDateTime("2013-06-20 07:00:00") : Convert.ToDateTime(m_commonNoteCountEntity.Hour12Time);
         tim24.Time        = string.IsNullOrEmpty(m_commonNoteCountEntity.Hour24Time) ? Convert.ToDateTime("2013-06-20 19:00:00") : Convert.ToDateTime(m_commonNoteCountEntity.Hour24Time);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
コード例 #3
0
 /// <summary>
 /// 初始化信息 包括所有的科室和病区等
 /// </summary>
 private void InitDataBase()
 {
     try
     {
         //chcomboxDepart
         if (m_CommonNoteBiz == null)
         {
             m_CommonNoteBiz = new CommonNoteBiz(m_app);
         }
         var basedictoryListAll = m_CommonNoteBiz.GetAllDepartAndAreas();
         List <BaseDictory> basedictoryListDepart = basedictoryListAll["01"];
         List <BaseDictory> basedictoryListAreas  = basedictoryListAll["02"];
         InitChcombox(chListDept, basedictoryListDepart);
         InitChcombox(chlistWard, basedictoryListAreas);
         DataTable dtPrint = m_CommonNoteBiz.GetPrintTem();
         cboxPrint.Properties.Items.Clear();
         if (dtPrint != null)
         {
             foreach (DataRow item in dtPrint.Rows)
             {
                 string tempDesc = item["TEMPDESC"].ToString();
                 if (item["TEMPDESC"].ToString().Length > 10)
                 {
                     tempDesc = tempDesc.Substring(0, 10);
                 }
                 string itemValue = item["TEMPNAME"].ToString() + "--" + tempDesc;
                 cboxPrint.Properties.Items.Add(itemValue);
             }
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
コード例 #4
0
 /// <summary>
 /// 将commonNoteEntity转成InCommonNoteEnmtity,并保存
 /// </summary>
 /// <param name="commonNoteEntity"></param>
 /// <returns></returns>
 private InCommonNoteEnmtity ConverBycommonNote(CommonNoteEntity commonNoteEntity)
 {
     try
     {
         CommonNoteBiz commonNoteBiz = new DrectSoft.Core.CommonTableConfig.CommonNoteBiz(m_app);
         commonNoteEntity = commonNoteBiz.GetDetailCommonNote(commonNoteEntity.CommonNoteFlow);
         InCommonNoteEnmtity inCommonNote = InCommonNoteBiz.ConvertCommonToInCommon(commonNoteEntity);
         InCommonNoteBiz     icombiz      = new DrectSoft.Core.CommonTableConfig.CommonNoteUse.InCommonNoteBiz(m_app);
         DataTable           inpatientDt  = icombiz.GetInpatient(m_noofInpat);
         inCommonNote.CurrDepartID   = inpatientDt.Rows[0]["OUTHOSDEPT"].ToString();
         inCommonNote.CurrDepartName = inpatientDt.Rows[0]["DEPARTNAME"].ToString();
         inCommonNote.CurrWardID     = inpatientDt.Rows[0]["OUTHOSWARD"].ToString();
         inCommonNote.CurrWardName   = inpatientDt.Rows[0]["WARDNAME"].ToString();
         inCommonNote.NoofInpatient  = m_noofInpat;
         inCommonNote.InPatientName  = inpatientDt.Rows[0]["NAME"].ToString();
         string message    = "";
         bool   saveResult = icombiz.SaveInCommomNoteAll(inCommonNote, ref message);
         if (saveResult)
         {
             return(inCommonNote);
         }
         else
         {
             DrectSoft.Common.Ctrs.DLG.MyMessageBox.Show("创建单据失败");
             return(null);
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
コード例 #5
0
 //初始化信息
 private void InitData()
 {
     try
     {
         if (commonNoteBiz == null)
         {
             commonNoteBiz = new CommonNoteBiz(m_app);
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
コード例 #6
0
        public NurseJLDForm(IEmrHost app, CommonNoteEntity commonNoteEntity)
        {
            try
            {
                this.m_app = app;
                this.m_commonNoteEntity = commonNoteEntity;
                InitializeComponent();

                if (m_commonNoteEntity.CommonNote_TabList == null)
                {
                    CommonNoteBiz commonNoteBiz = new DrectSoft.Core.CommonTableConfig.CommonNoteBiz(m_app);
                    m_commonNoteEntity = commonNoteBiz.GetDetailCommonNote(m_commonNoteEntity.CommonNoteFlow);
                }

                //InitInpatient();//xlb
                InitPatient();
                InitTool();
                //SetDockPanelHidden();
            }
            catch (Exception ex)
            {
                MyMessageBox.Show(1, ex);
            }
        }