Пример #1
0
        /// <summary>
        /// 初始化下拉控件

        /// </summary>
        private void InitComb()
        {
            // 科室列表
            ArrayList deptList = this.bookingIntegrate.GetDeptmentAll();

            if (deptList == null)
            {
                deptList = new ArrayList();
            }

            this.neuComboBoxDept.AddItems(deptList);
            this.neuComboBoxDept.IsListOnly = true;

            this.neuComboBoxDept.Tag  = this.operEnvironment.Dept.ID;
            this.neuComboBoxDept.Text = this.operEnvironment.Dept.Name;

            this.controls[this.neuTabControl1.SelectedIndex].operEnvironment = this.operEnvironment;

            if (this.useScope == UseScope.SelfDepartment)
            {
                this.neuComboBoxDept.Enabled = false;
            }
            else
            {
                this.neuComboBoxDept.Enabled = true;
            }
        }
Пример #2
0
        /// <summary>
        /// 释放资源
        /// </summary>
        /// <param name="isDisposing"></param>
        protected override void Dispose(bool isDisposing)
        {
            if (this.alreadyDisposed)
            {
                return;
            }

            if (this.operEnvironment != null)
            {
                this.operEnvironment.Dispose();
                this.operEnvironment = null;
            }
            if (this.group != null)
            {
                this.group.Dispose();
                this.group = null;
            }
            if (this.pact != null)
            {
                this.pact.Dispose();
                this.pact = null;
            }
            if (this.statClass != null)
            {
                this.statClass.Dispose();
                this.statClass = null;
            }

            base.Dispose(isDisposing);

            this.alreadyDisposed = true;
        }
Пример #3
0
        /// <summary>
        /// 释放资源
        /// </summary>
        /// <param name="isDisposing"></param>
        protected override void Dispose(bool isDisposing)
        {
            if (this.alreadyDisposed)
            {
                return;
            }

            if (this.pactItem != null)
            {
                this.pactItem.Dispose();
                this.pactItem = null;
            }
            if (this.rate != null)
            {
                this.rate.Dispose();
                this.rate = null;
            }
            if (this.operEnvironment != null)
            {
                this.operEnvironment.Dispose();
                this.operEnvironment = null;
            }

            base.Dispose(isDisposing);

            this.alreadyDisposed = true;
        }
        /// <summary>
        /// Tab页改变时事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void neuTabControl1_Selecting(object sender, TabControlCancelEventArgs e)
        {
            try
            {
                int tabIndex = this.neuTabControl1.SelectedIndex;

                this.neuTextBoxQuery.Focus();

                this.ucBookingTempletArray[tabIndex].operEnvironment = this.operEnvironment;

                if (this.ucBookingTempletArray[tabIndex].IsChange())
                {
                    if (MessageBox.Show("数据已经修改,是否保存变动?",
                                        "提示",
                                        MessageBoxButtons.YesNo,
                                        MessageBoxIcon.Question,
                                        MessageBoxDefaultButton.Button1) == DialogResult.Yes)
                    {
                        if (this.ucBookingTempletArray[tabIndex].Save() == -1)
                        {
                            return;
                        }
                    }
                }
            }
            catch (Exception exception)
            {
                MessageBox.Show(exception.Message, "提示信息");
                return;
            }

            this.SetListVisiable();
        }
        /// <summary>
        /// UC加载事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="neuObject"></param>
        /// <param name="param"></param>
        /// <returns></returns>
        protected override ToolBarService OnInit(object sender, object neuObject, object param)
        {
            if (this.DesignMode)
            {
                return(null);
            }

            this.DeleteEvent    += new EventHandler(ucMedTechBookingTemplet_DeleteEvent);
            this.DeptEvent      += new EventHandler(ucMedTechBookingTemplet_DeptEvent);
            this.EquipmentEvent += new EventHandler(ucMedTechBookingTemplet_EquipmentEvent);
            this.toobarService.AddToolButton("删除", "删除执行记录", ( int )Neusoft.FrameWork.WinForms.Classes.EnumImageList.S删除, true, false, this.DeleteEvent);
            this.toobarService.AddToolButton("项目", "项目", ( int )Neusoft.FrameWork.WinForms.Classes.EnumImageList.K科室, true, false, this.DeptEvent);
            this.toobarService.AddToolButton("设备", "设备", ( int )Neusoft.FrameWork.WinForms.Classes.EnumImageList.S设备, true, false, this.EquipmentEvent);
            this.operEnvironment.ID   = Neusoft.FrameWork.Management.Connection.Operator.ID;
            this.operEnvironment.Name = Neusoft.FrameWork.Management.Connection.Operator.Name;
            this.operEnvironment.Dept = ((Neusoft.HISFC.Models.Base.Employee)Neusoft.FrameWork.Management.Connection.Operator).Dept;

            this.InitArray( );
            this.InitComb( );
            this.InitItem( );

            this.InitControls( );
            this.RetrieveTab( );

            this.ucBookingTempletArray [this.neuTabControl1.SelectedIndex].operEnvironment = this.operEnvironment;
            this.JudgeTmpFlag(0);


            return(this.toobarService);
        }
Пример #6
0
        /// <summary>
        /// 克隆
        /// </summary>
        /// <returns></returns>
        public new OperEnvironment Clone()
        {
            OperEnvironment operEnvironment = base.Clone() as OperEnvironment;

            //operEnvironment.Oper = this.Oper.Clone();
            operEnvironment.Dept = this.Dept.Clone();

            return(operEnvironment);
        }
        /// <summary>
        /// Tab页改变之后事件

        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void neuTabControl1_Selected(object sender, TabControlEventArgs e)
        {
            // Tab页的Tag
            object tempObject = this.neuTabControl1.TabPages[this.neuTabControl1.SelectedIndex].Tag;
            int    tabIndex   = this.neuTabControl1.SelectedIndex;

            if (tempObject == null || tempObject.ToString() == "")
            {
                this.neuTreeView1.SelectedNode = this.neuTreeView1.Nodes[0];

                this.RetrieveTab();

                this.ucBookingTempletArray[tabIndex].Focus();

                this.ucBookingTempletArray[tabIndex].operEnvironment = this.operEnvironment;

                this.neuTabControl1.TabPages[this.neuTabControl1.SelectedIndex].Tag = "Has Retrieve";
            }
            this.JudgeTmpFlag(tabIndex);
        }