Exemple #1
0
        /// <summary>
        /// 初始化界面
        /// </summary>
        private void InitForm()
        {
            WaitDialogForm waitDialog = new WaitDialogForm("正在获取数据……", "请稍等。");

            try
            {
                if (inCommonNoteBiz == null)
                {
                    inCommonNoteBiz = new InCommonNoteBiz(m_app);
                }
                inCommonNoteBiz.GetDetaliInCommonNote(ref m_inCommonNote);
                waitDialog.Hide();
                waitDialog.Close();
                foreach (var item in m_inCommonNote.InCommonNoteTabList)
                {
                    CommonNote_TabEntity commonNote_TabEntity = null;
                    foreach (var itemTab in m_commonNoteEntity.CommonNote_TabList)
                    {
                        if (itemTab.CommonNote_Tab_Flow == item.CommonNote_Tab_Flow)
                        {
                            commonNote_TabEntity = itemTab;
                            break;
                        }
                    }
                    if (commonNote_TabEntity == null)
                    {
                        continue;
                    }
                    XtraTabPage tabPage = new XtraTabPage();
                    tabPage.Tag  = item;
                    tabPage.Text = item.CommonNoteTabName;
                    if (item.ShowType == "表格")
                    {
                        UCIncommonNoteTab UCIncommonNoteTab = new UCIncommonNoteTab(item, commonNote_TabEntity, m_inCommonNote, m_app, m_canEdit);
                        tabPage.Controls.Add(UCIncommonNoteTab);
                        UCIncommonNoteTab.Dock = DockStyle.Fill;
                    }
                    else
                    {
                        UCInCommonTabSingle ucInCommonTabSingle = new UCInCommonTabSingle(item, commonNote_TabEntity, m_inCommonNote, m_app, m_canEdit);
                        tabPage.Controls.Add(ucInCommonTabSingle);
                        ucInCommonTabSingle.Dock = DockStyle.Fill;
                    }
                    tabcontrol.TabPages.Add(tabPage);
                }
                tabcontrol.SelectedTabPageIndex = 1;
            }
            catch (Exception ex)
            {
                waitDialog.Hide();
                waitDialog.Close();
                throw ex;
            }
        }
Exemple #2
0
 private void btnAdd_Click(object sender, EventArgs e)
 {
     try
     {
         InCommonNoteEnmtity inCommonNoteEnmtity = ConverBycommonNote(m_commonNoteEntity);
         if (inCommonNoteEnmtity == null)
         {
             return;
         }
         InCommonNoteBiz icbiz = new InCommonNoteBiz(m_app);
         icbiz.GetDetaliInCommonNote(ref inCommonNoteEnmtity);
         m_InCommonNoteList.Add(inCommonNoteEnmtity);
         DataTable dt = SetCommonToDataTable(m_InCommonNoteList);
         gcIncommonList.DataSource = dt;
     }
     catch (Exception ex)
     {
         DrectSoft.Common.Ctrs.DLG.MyMessageBox.Show(1, ex);
     }
 }
Exemple #3
0
        ///// <summary>
        ///// 展开节点触发的事件
        ///// xlb 2013-01-29
        ///// 解决存在大量数据时一次加载引起的卡屏
        ///// </summary>
        ///// <param name="sender"></param>
        ///// <param name="e"></param>
        //private void treeListInpat_AfterExpand(object sender, DevExpress.XtraTreeList.NodeEventArgs e)
        //{
        //    try
        //    {
        //        //如果有子节点则展开
        //        if (e.Node.HasChildren)
        //        {
        //            e.Node.ExpandAll();
        //        }
        //        TreeListNode parentNode = e.Node;//以当前要展开的节点为父节点
        //        InPatientSim inpatient=new InPatientSim();
        //        if (e.Node.Tag is InPatientSim)
        //        {
        //            inpatient = e.Node.Tag as InPatientSim;
        //        }

        //        List<InCommonNoteEnmtity> inCommonNoteList = m_inCommonNoteBiz.GetSimInCommonNote(inpatient.NoofInpat.ToString());
        //        MakeTreeATwo(inCommonNoteList, parentNode);
        //    }
        //    catch (Exception ex)
        //    {
        //        MyMessageBox.Show(1, ex);
        //    }
        //}
        #endregion

        /// <summary>
        /// 右键新增事件
        /// xlb 2013-01-19
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void barButtonItemAdd_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            try
            {
                InPatientSim inpatient = null;
                TreeListNode node      = treeListInpat.FocusedNode; //父节点
                TreeListNode node2     = null;                      //子节点
                if (node != null && node.Tag != null && node.Tag is InPatientSim)
                {
                    inpatient = node.Tag as InPatientSim;
                }

                CommonChooseForm commonChooseForm = new Core.CommonTableConfig.CommonNoteUse.CommonChooseForm("护理单据模板选择", m_app);
                //窗体运行起始位置居中
                commonChooseForm.StartPosition = FormStartPosition.CenterScreen;

                if (commonChooseForm.ShowDialog() != DialogResult.OK)
                {
                    return;
                }
                InCommonNoteEnmtity inCommonNote = ConvertToByCommonNote(commonChooseForm.SelectCommonNoteEntity, inpatient);
                if (inCommonNote == null)
                {
                    return;
                }

                InCommonNoteBiz icbiz = new InCommonNoteBiz(m_app);
                icbiz.GetDetaliInCommonNote(ref inCommonNote);
                string createTIme  = DateUtil.getDateTime(inCommonNote.CreateDateTime, DateUtil.NORMAL_LONG);
                string commmonNote = "创建人:" + inCommonNote.CreateDoctorName + "|" + "时间:" + createTIme;
                node2     = treeListInpat.AppendNode(new object[] { inCommonNote.InCommonNoteName, "Leaf", commmonNote }, node);
                node2.Tag = inCommonNote;
                treeListInpat.FocusedNode = node2;//定位在新增子节点上
            }
            catch (Exception ex)
            {
                MyMessageBox.Show(1, ex);
            }
        }
Exemple #4
0
        private void Save()
        {
            UCRecordDateTime uCRecordDateTime = scorlInfo.Controls["uCRecordDateTime"] as UCRecordDateTime;
            UCRecordDoctor   uCRecordDoctor   = scorlInfo.Controls["uCRecordDoctor"] as UCRecordDoctor;
            string           datestr          = uCRecordDateTime.GetDate();
            string           timestr          = uCRecordDateTime.GetTime();
            string           recordDoc        = uCRecordDoctor.GetDoc();
            string           message          = "";

            foreach (var item in scorlInfo.Controls)
            {
                if (item is ucLabText)
                {
                    bool getResult = (item as ucLabText).GetInCommonNoteItemSave(ref message);
                    if (getResult == false)
                    {
                        m_app.CustomMessageBox.MessageShow(message);
                        return;
                    }
                }
            }
            if (inCommonNoteBiz == null)
            {
                inCommonNoteBiz = new InCommonNoteBiz(m_app);
            }
            foreach (var item in m_InCommonNoteTab.InCommonNoteItemList)
            {
                item.RecordDate       = datestr;
                item.RecordTime       = timestr;
                item.RecordDoctorName = recordDoc;
                inCommonNoteBiz.SaveIncommonNoteItem(item, ref message);
            }
            DrectSoft.Common.Ctrs.DLG.MyMessageBox.Show("保存成功");
            inCommonNoteBiz.GetDetaliInCommonNote(ref m_inCommonNote);
            m_InCommonNoteTab = m_inCommonNote.InCommonNoteTabList.Find(a => a.InCommonNote_Tab_Flow == m_InCommonNoteTab.InCommonNote_Tab_Flow);
            InitData();
        }