Esempio n. 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);
            }
        }
Esempio n. 2
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;
     }
 }
Esempio n. 3
0
        /// <summary>
        /// 初始化CommonNoteEntity中的信息到控件上
        /// </summary>
        private void InitCommonNoteData()
        {
            try
            {
                if (!string.IsNullOrEmpty(m_CommonNoteEntity.CommonNoteFlow))
                {
                    m_CommonNoteEntity = m_CommonNoteBiz.GetDetailCommonNote(m_CommonNoteEntity.CommonNoteFlow);
                }
                txtNoteName.Text = m_CommonNoteEntity.CommonNoteName;

                DataTable dtPrint = m_CommonNoteBiz.GetPrintTem();
                //处理打印模板 显示模板名和描述
                string printShowName = m_CommonNoteEntity.PrinteModelName;
                if (dtPrint != null && dtPrint.Rows.Count > 0)
                {
                    foreach (DataRow dritem in dtPrint.Rows)
                    {
                        int myIndex = dritem["TEMPNAME"].ToString().IndexOf(".");
                        if (myIndex > 0 && dritem["TEMPNAME"].ToString().Substring(0, myIndex) == m_CommonNoteEntity.PrinteModelName)
                        {
                            printShowName = dritem["TEMPNAME"].ToString() + "--" + dritem["TEMPDESC"].ToString();
                            break;
                        }
                    }
                }
                cboxPrint.Text       = printShowName;
                comboxShowType.Text  = m_CommonNoteEntity.ShowType;
                chboxUsing.Checked   = m_CommonNoteEntity.UsingFlag == "1" ? true : false;
                chboxPicEdit.Checked = m_CommonNoteEntity.UsingPicSign == "1" ? true : false;
                //chboxCheck.Checked = m_CommonNoteEntity.UsingCheckDoc == "1" ? true : false;
                //加载科室信息
                InitChcomBoxChecked(chListDept, m_CommonNoteEntity.BaseDepartments);
                //加载病区信息
                InitChcomBoxChecked(chlistWard, m_CommonNoteEntity.BaseAreas);
                //加载commonNoteTab
                InitCommonNoteTab(m_CommonNoteEntity.CommonNote_TabList);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Esempio n. 4
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);
            }
        }