Example #1
0
        /// <summary>
        /// 处理回车操作 ,并且取出数据
        /// </summary>
        /// <returns></returns>
        private int ProcessDept()
        {
            int CurrentRow = fpEnter1_Sheet1.ActiveRowIndex;

            if (CurrentRow < 0)
            {
                return(0);
            }

            if (fpEnter1_Sheet1.ActiveColumnIndex == 0)
            {
                Neusoft.NFC.Interface.Controls.PopUpListBox listBox = this.fpEnter1.getCurrentList(this.fpEnter1_Sheet1, 0);
                //获取选中的信息
                Neusoft.NFC.Object.NeuObject item = null;
                int rtn = listBox.GetSelectedItem(out item);
                //				if(rtn==-1)return -1;
                if (item == null)
                {
                    return(-1);
                }
                //科室编码
                fpEnter1_Sheet1.ActiveCell.Text = item.ID;
                //科室名称
                fpEnter1_Sheet1.Cells[CurrentRow, 1].Text = item.Name;
                fpEnter1.Focus();
                fpEnter1_Sheet1.SetActiveCell(fpEnter1_Sheet1.ActiveRowIndex, 2);
                return(0);
            }

            else if (fpEnter1_Sheet1.ActiveColumnIndex == 1)
            {
                Neusoft.NFC.Interface.Controls.PopUpListBox listBox = this.fpEnter1.getCurrentList(this.fpEnter1_Sheet1, 1);
                //获取选中的信息
                Neusoft.NFC.Object.NeuObject item = null;
                int rtn = listBox.GetSelectedItem(out item);
                //				if(rtn==-1)return -1;
                if (item == null)
                {
                    return(-1);
                }
                //科室名称
                fpEnter1_Sheet1.ActiveCell.Text = item.Name;
                //科室编码
                fpEnter1_Sheet1.Cells[CurrentRow, 0].Text = item.ID;
                fpEnter1.Focus();
                fpEnter1_Sheet1.SetActiveCell(fpEnter1_Sheet1.ActiveRowIndex, 2);
                return(0);
            }
            return(0);
        }
Example #2
0
        /// <summary>
        /// 由列表获取所选择项目
        /// </summary>
        /// <returns>成功返回1 出错返回-1</returns>
        protected int GetSelectItem()
        {
            int currentRow = this.fpEnter1_Sheet1.ActiveRowIndex;

            if (currentRow < 0)
            {
                return(0);
            }
            if (this.fpEnter1_Sheet1.ActiveColumnIndex == (int)ColumnSet.ColTradeName)
            {
                //获取选中的信息
                Neusoft.NFC.Interface.Controls.PopUpListBox listBox = this.fpEnter1.getCurrentList(this.fpEnter1_Sheet1, (int)ColumnSet.ColTradeName);
                Neusoft.NFC.Object.NeuObject item = null;
                int rtn = listBox.GetSelectedItem(out item);
                if (item == null)
                {
                    return(-1);
                }
                this.SetSelectItem(item);
                return(0);
            }
            if (this.fpEnter1_Sheet1.ActiveColumnIndex == (int)ColumnSet.ColUsage)
            {
                //获取选中的信息
                Neusoft.NFC.Interface.Controls.PopUpListBox listBox = this.fpEnter1.getCurrentList(this.fpEnter1_Sheet1, (int)ColumnSet.ColUsage);
                Neusoft.NFC.Object.NeuObject item = null;
                int rtn = listBox.GetSelectedItem(out item);
                if (item == null)
                {
                    return(-1);
                }
                this.SetSelectItem(item);
                return(0);
            }
            return(0);
        }
        /// <summary>
        /// 处理回车操作 ,并且取出数据

        /// </summary>
        /// <returns></returns>
        private int ProcessDept()
        {
            int CurrentRow = fpEnter1_Sheet1.ActiveRowIndex;

            if (CurrentRow < 0)
            {
                return(0);
            }

            if (fpEnter1_Sheet1.ActiveColumnIndex == (int)EnumCol.DiagKind) //诊断类型
            {
                //获取选中的信息

                Neusoft.NFC.Interface.Controls.PopUpListBox listBox = this.fpEnter1.getCurrentList(this.fpEnter1_Sheet1, (int)EnumCol.DiagKind);
                Neusoft.NFC.Object.NeuObject item = null;
                int rtn = listBox.GetSelectedItem(out item);
                //				if(rtn==-1)return -1;
                if (item == null)
                {
                    return(-1);
                }
                //诊断类别
                fpEnter1_Sheet1.ActiveCell.Text = item.Name;
                fpEnter1.Focus();
                fpEnter1_Sheet1.SetActiveCell(fpEnter1_Sheet1.ActiveRowIndex, (int)EnumCol.Icd10Code);
                return(0);
            }
            else if (fpEnter1_Sheet1.ActiveColumnIndex == (int)EnumCol.OutState)
            {
                Neusoft.NFC.Interface.Controls.PopUpListBox listBox = this.fpEnter1.getCurrentList(this.fpEnter1_Sheet1, (int)EnumCol.OutState);
                //获取选中的信息

                Neusoft.NFC.Object.NeuObject item = null;
                int rtn = listBox.GetSelectedItem(out item);
                //				if(rtn==-1)return -1;
                if (item == null)
                {
                    return(-1);
                }
                // 出院信息
                fpEnter1_Sheet1.ActiveCell.Text = item.Name;
                fpEnter1.Focus();
                fpEnter1_Sheet1.SetActiveCell(fpEnter1_Sheet1.ActiveRowIndex, (int)EnumCol.OperationFlag);
                return(0);
            }
            else if (fpEnter1_Sheet1.ActiveColumnIndex == (int)EnumCol.OperationFlag)
            {
                Neusoft.NFC.Interface.Controls.PopUpListBox listBox = this.fpEnter1.getCurrentList(this.fpEnter1_Sheet1, (int)EnumCol.OperationFlag);
                //获取选中的信息

                Neusoft.NFC.Object.NeuObject item = null;
                int rtn = listBox.GetSelectedItem(out item);
                //				if(rtn==-1)return -1;
                if (item == null)
                {
                    return(-1);
                }
                // 出院信息
                fpEnter1_Sheet1.ActiveCell.Text = item.Name;
                fpEnter1.Focus();
                fpEnter1_Sheet1.SetActiveCell(fpEnter1_Sheet1.ActiveRowIndex, (int)EnumCol.Disease);
                return(0);
            }
            else if (fpEnter1_Sheet1.ActiveColumnIndex == (int)EnumCol.Perior)
            {
                Neusoft.NFC.Interface.Controls.PopUpListBox listBox = this.fpEnter1.getCurrentList(this.fpEnter1_Sheet1, (int)EnumCol.Perior);
                //获取选中的信息

                Neusoft.NFC.Object.NeuObject item = null;
                int rtn = listBox.GetSelectedItem(out item);
                //				if(rtn==-1)return -1;
                if (item == null)
                {
                    return(-1);
                }
                //分期
                fpEnter1_Sheet1.ActiveCell.Text = item.Name;
                fpEnter1.Focus();
                fpEnter1_Sheet1.SetActiveCell(fpEnter1_Sheet1.ActiveRowIndex, (int)EnumCol.Level);
                return(0);
            }
            else if (fpEnter1_Sheet1.ActiveColumnIndex == (int)EnumCol.Level)
            {
                Neusoft.NFC.Interface.Controls.PopUpListBox listBox = this.fpEnter1.getCurrentList(this.fpEnter1_Sheet1, (int)EnumCol.Level);
                //获取选中的信息

                Neusoft.NFC.Object.NeuObject item = null;
                int rtn = listBox.GetSelectedItem(out item);
                //				if(rtn==-1)return -1;
                if (item == null)
                {
                    return(-1);
                }
                //分期
                fpEnter1_Sheet1.ActiveCell.Text = item.Name;
                fpEnter1.Focus();
                fpEnter1_Sheet1.SetActiveCell(fpEnter1_Sheet1.ActiveRowIndex, (int)EnumCol.DubDiag);
                return(0);
            }

            return(0);
        }