예제 #1
0
        /// <summary>
        ///  增加项目
        /// </summary>
        public void Add(Neusoft.HISFC.Models.Terminal.MedTechItem medTechItem)
        {
            try
            {
                // 增加一行

                this.neuSpread1_Sheet1.Rows.Add(this.neuSpread1_Sheet1.RowCount, 1);
                // 设置当前行

                this.neuSpread1_Sheet1.ActiveRowIndex = this.neuSpread1_Sheet1.RowCount - 1;
                int row = this.neuSpread1_Sheet1.ActiveRowIndex;

                this.neuSpread1_Sheet1.SetValue(row, (int)cols.ItemCode, medTechItem.Item.ID, false);
                this.neuSpread1_Sheet1.SetValue(row, (int)cols.ItemName, medTechItem.Item.Name, false);
                this.neuSpread1_Sheet1.SetValue(row, (int)cols.UnitFlag, this.GetUnitNameByID(medTechItem.ItemExtend.UnitFlag), false);
                this.neuSpread1_Sheet1.Cells[row, (int)cols.BookLmt].Text        = "0";
                this.neuSpread1_Sheet1.Cells[row, (int)cols.SpecialBookLmt].Text = "0";
                this.neuSpread1_Sheet1.SetValue(row, (int)cols.Remark, " ", false);
                this.neuSpread1_Sheet1.SetValue(row, (int)cols.Valid, "有效", false);
                this.neuSpread1_Sheet1.SetValue(row, ( int )cols.TmpFlag, "1", false);
                //{5A111831-190D-4187-8076-83E220BC97B2}
                this.neuSpread1_Sheet1.Cells[row, (int)cols.StartTime].Text = "00:00:00";
                this.neuSpread1_Sheet1.Cells[row, (int)cols.EndTime].Text   = "00:00:00";
                this.neuSpread1.Focus();
                this.neuSpread1_Sheet1.SetActiveCell(this.neuSpread1_Sheet1.ActiveRowIndex, (int)cols.BookLmt, false);
            }
            catch (Exception e)
            {
                MessageBox.Show(e.Message, "提示信息");
                return;
            }
        }
예제 #2
0
        /// <summary>
        /// 克隆
        /// </summary>
        /// <returns>医技预约项目信息</returns>
        public new MedTechItem Clone()
        {
            MedTechItem medTechItem = base.Clone() as MedTechItem;

            medTechItem.Item       = this.Item.Clone();
            medTechItem.itemExtend = this.itemExtend.Clone();

            return(medTechItem);
        }
예제 #3
0
        /// <summary>
        /// 增加
        /// </summary>
        private void Add()
        {
            int tabIndex = this.neuTabControl1.SelectedIndex;

            if (this.neuTreeView1.SelectedNode.Tag.GetType( ).FullName.Equals("Neusoft.HISFC.Models.Terminal.MedTechItem"))
            {
                this.medTechItem = (Neusoft.HISFC.Models.Terminal.MedTechItem) this.neuTreeView1.SelectedNode.Tag;
                if (this.medTechItem == null)
                {
                    return;
                }
                else
                {
                    try
                    {
                        this.controls [tabIndex].Add(this.medTechItem);
                    }
                    catch (Exception exception)
                    {
                        MessageBox.Show(exception.Message, "提示信息");
                        return;
                    }
                }
            }
            else if (this.neuTreeView1.SelectedNode.Tag.GetType( ).FullName.Equals("Neusoft.HISFC.Models.Terminal.TerminalCarrier"))
            {
                this.terminalCarrier = (Neusoft.HISFC.Models.Terminal.TerminalCarrier) this.neuTreeView1.SelectedNode.Tag;
                if (this.terminalCarrier == null)
                {
                    return;
                }
                else
                {
                    try
                    {
                        this.controls [tabIndex].Add(this.terminalCarrier);
                    }
                    catch (Exception exception)
                    {
                        MessageBox.Show(exception.Message, "提示信息");
                        return;
                    }
                }
            }
            this.JudgeTmpFlag(tabIndex);
        }
예제 #4
0
        /// <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 tempItem = (Neusoft.HISFC.Models.Terminal.MedTechItem)node.Tag;

                    // 查询码实体

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

                    // 获取查询码

                    spell = this.bookingIntegrate.GetSpell(tempItem.Item.Name);

                    if (spell.SpellCode.IndexOf(Filter, 0, spell.SpellCode.Length) >= 0)
                    {
                        this.neuTreeView1.Focus();
                        this.neuTreeView1.SelectedNode = node;
                        break;
                    }
                    if (tempItem.Item.ID.IndexOf(Filter, 0, tempItem.Item.ID.Length) >= 0)
                    {
                        this.neuTreeView1.Focus();
                        this.neuTreeView1.SelectedNode = node;
                        break;
                    }
                    if (tempItem.Item.Name.IndexOf(Filter, 0, tempItem.Item.Name.Length) >= 0)
                    {
                        this.neuTreeView1.Focus();
                        this.neuTreeView1.SelectedNode = node;
                        break;
                    }
                }
            }
        }
        /// <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;
                    }
                }
            }
        }