/// <summary>
        /// 初始化下拉控件

        /// </summary>
        private void InitComb()
        {
            if (this.DesignMode)
            {
                return;
            }
            // 业务
            Neusoft.HISFC.BizProcess.Integrate.Terminal.Booking bookingIntegrate = new Neusoft.HISFC.BizProcess.Integrate.Terminal.Booking();
            // 科室数组
            ArrayList deptList = bookingIntegrate.GetDeptmentAll();

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

            this.neuComboBoxDept.AddItems(deptList);
            //this.neuComboBoxDept.isItemOnly = true;

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

            if (this.useScope != UseScope.AllDepartment)
            {
                this.neuComboBoxDept.Enabled = false;
            }
        }
        /// <summary>
        /// 生成科室项目树

        /// </summary>
        private void InitItem()
        {
            if (this.DesignMode)
            {
                return;
            }
            // 父级节点
            TreeNode parentNode = new TreeNode("科室项目");

            neuTreeView1.ImageList        = neuTreeView1.groupImageList;
            parentNode.ImageIndex         = 0;
            parentNode.SelectedImageIndex = 0;
            // 医技业务层

            Neusoft.HISFC.BizProcess.Integrate.Terminal.Booking bookingIntegrate = new Neusoft.HISFC.BizProcess.Integrate.Terminal.Booking();
            // 选择的科室编码

            string deptCode = this.GetDept().ID;
            // 科室维护的预约项目

            ArrayList deptItemList = new ArrayList();

            deptItemList = bookingIntegrate.QueryMedTechItem(deptCode);
            this.neuTreeView1.Nodes.Clear();
            this.neuTreeView1.Nodes.Add(parentNode);

            if (deptItemList == null)
            {
                MessageBox.Show("获取科室项目列表时出错!" + bookingIntegrate.Err, "提示");
                return;
            }
            ArrayList alReturn = bookingIntegrate.GetAllList("MEDTECHITEM");

            if (alReturn == null)
            {
                MessageBox.Show("获取常数 MEDTECHITEM 失败");
            }
            foreach (Neusoft.HISFC.Models.Terminal.MedTechItem obj in deptItemList)
            {
                foreach (Neusoft.HISFC.Models.Base.Const con in alReturn)
                {
                    if (obj.Item.ID == con.ID && con.IsValid)
                    {
                        TreeNode node = new TreeNode();

                        node.Text               = obj.Item.Name;
                        node.Tag                = obj;
                        node.ImageIndex         = 3;
                        node.SelectedImageIndex = 4;
                        parentNode.Nodes.Add(node);
                    }
                }
            }

            parentNode.ExpandAll();
        }
Exemplo n.º 3
0
        /// <summary>
        /// 生成科室设备树

        /// </summary>
        private void InitEquipment( )
        {
            if (this.DesignMode)
            {
                return;
            }
            // 父级节点
            TreeNode parentNode = new TreeNode("科室设备");

            neuTreeView1.ImageList        = neuTreeView1.groupImageList;
            parentNode.ImageIndex         = 0;
            parentNode.SelectedImageIndex = 0;
            // 医技业务层

            Neusoft.HISFC.BizProcess.Integrate.Terminal.Booking bookingIntegrate = new Neusoft.HISFC.BizProcess.Integrate.Terminal.Booking( );
            // 选择的科室编码

            string deptCode = this.GetDept( ).ID;
            // 科室维护的设备

            ArrayList deptEquipmentList = new ArrayList( );

            deptEquipmentList = bookingIntegrate.QueryMedTechEquipment(deptCode);
            this.neuTreeView1.Nodes.Clear( );
            this.neuTreeView1.Nodes.Add(parentNode);

            if (deptEquipmentList == null)
            {
                MessageBox.Show("获取科室设备列表时出错!" + bookingIntegrate.Err, "提示");
                return;
            }
            foreach (Neusoft.HISFC.Models.Terminal.TerminalCarrier obj in deptEquipmentList)
            {
                TreeNode node = new TreeNode( );

                node.Text               = obj.CarrierName;
                node.Tag                = obj;
                node.ImageIndex         = 3;
                node.SelectedImageIndex = 4;
                parentNode.Nodes.Add(node);
            }

            parentNode.ExpandAll( );
        }
        /// <summary>
        /// 查找按钮单击事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void neuButtonQuery_Click(object sender, EventArgs e)
        {
            if (this.neuTextBoxQuery.Text.Trim() == "")
            {
                this.neuTreeView1.SelectedNode = this.neuTreeView1.Nodes[0];
            }
            else
            {
                string filter = this.neuTextBoxQuery.Text.Trim().ToUpper();

                foreach (TreeNode node in this.neuTreeView1.Nodes[0].Nodes)
                {
                    Neusoft.HISFC.Models.Terminal.MedTechItem medTechItemTemp = (Neusoft.HISFC.Models.Terminal.MedTechItem)node.Tag;
                    // 业务
                    Neusoft.HISFC.BizProcess.Integrate.Terminal.Booking bookingIntegrate = new Neusoft.HISFC.BizProcess.Integrate.Terminal.Booking();
                    // 拼音码

                    Neusoft.HISFC.Models.Base.Spell spell = new Spell();

                    spell = bookingIntegrate.GetSpell(medTechItemTemp.Item.Name);

                    if (spell.SpellCode.IndexOf(filter, 0, spell.SpellCode.Length) >= 0)
                    {
                        this.neuTreeView1.Focus();
                        this.neuTreeView1.SelectedNode = node;
                        break;
                    }
                    if (medTechItemTemp.Item.ID.IndexOf(filter, 0, medTechItemTemp.Item.ID.Length) >= 0)
                    {
                        this.neuTreeView1.Focus();
                        this.neuTreeView1.SelectedNode = node;
                        break;
                    }
                    if (medTechItemTemp.Item.Name.IndexOf(filter, 0, medTechItemTemp.Item.Name.Length) >= 0)
                    {
                        this.neuTreeView1.Focus();
                        this.neuTreeView1.SelectedNode = node;
                        break;
                    }
                }
            }
        }