Exemple #1
0
 /// <summary>
 /// 移除病历预览页面
 /// </summary>
 public void RemoveEmrInputPreView(UCEmrInputPreView preView, XtraTabPage page)
 {
     try
     {
         if (null == preView)
         {
             return;
         }
         page.Controls.Remove(preView);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Exemple #2
0
 /// <summary>
 /// 添加病历预览页面
 /// </summary>
 public void AddEmrInputPreView(UCEmrInputPreView preView, XtraTabPage page)
 {
     try
     {
         if (null == preView)
         {
             return;
         }
         preView.Dock = DockStyle.Bottom;
         page.Controls.Add(preView);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Exemple #3
0
        /// <summary>
        /// 在Page中添加病程预览区
        /// </summary>
        /// <param name="emrModel">当前需要显示的病历EmrModel</param>
        /// <param name="page">当前的选中的XtraTabPage</param>
        private void AddDailyEmrPreView(EmrModel emrModel, XtraTabPage page)
        {
            try
            {
                if (page == null || emrModel == null)
                {
                    return;
                }

                if (emrModel.ModelCatalog == ContainerCatalog.BingChengJiLu)
                {
                    UCEmrInputPreView inputPreView = null;
                    if (null != emrModel.DeptChangeID && m_TempDailyPreViewCollection.ContainsKey(emrModel.DeptChangeID))
                    {
                        //获取集合中的病程预览
                        inputPreView = m_TempDailyPreViewCollection[emrModel.DeptChangeID];
                        //inputPreView.Restore();
                    }
                    else
                    {
                        //新建的病程预览加入到集合中
                        inputPreView        = new UCEmrInputPreView(emrModel.DeptChangeID, emrModel.InstanceId.ToString());
                        inputPreView.Height = 0;
                        m_TempDailyPreViewCollection.Add(emrModel.DeptChangeID, inputPreView);
                    }
                    if (page != null)
                    {
                        SplitterControl splitter = GetControlByType <SplitterControl>(page);
                        if (splitter == null)
                        {
                            CurrentInputTabPages.AddSplitterControl(page);
                        }
                        UCEmrInputPreView preView = GetControlByType <UCEmrInputPreView>(page);
                        if (preView == null)
                        {
                            CurrentInputTabPages.AddEmrInputPreView(inputPreView, page);
                        }
                    }
                }
            }
            catch (Exception)
            {
                throw;
            }
        }
Exemple #4
0
        private void btnItemOpenForEdit_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            try
            {
                string msg = CurrentEditorForm.LocateDailyEmrByCursor();
                GetParentUserControl().OnLocateDailyEmrForEdit(ChangeID, msg);
                UCEmrInputPreView preView = Util.GetParentUserControl <UCEmrInputPreView>(this);

                //打开指定的病程后重新控制病程预览区的高度
                if (preView.Height > FirstHeight)
                {
                    preView.Height = FirstHeight;
                    preView.ButtonRestore.Enabled = false;
                    preView.ButtonUp.Enabled      = true;
                    preView.ButtonDown.Enabled    = true;
                }
                this.CurrentEditorForm.SetCurrentElement(msg);
            }
            catch (Exception ex)
            {
                DrectSoft.Common.Ctrs.DLG.MyMessageBox.Show(1, ex);
            }
        }