예제 #1
0
        /// <summary>
        /// 增加一行
        /// </summary>
        private void InsertRow()
        {
            //实例化要弹出的窗口
            frmICDInfo icdInfo = new frmICDInfo();

            //赋值 ICD的类型
            icdInfo.ICDType = type;
            //赋值 修改的类型
            icdInfo.EditType = EditTypes.Add;
            //保存修改类型
            editType = EditTypes.Add;
            //订制事件 。
            icdInfo.SaveButtonClick += new frmICDInfo.SaveInfo(icdInfo_SaveButtonClick);
            //显示窗体
            icdInfo.ShowDialog();
        }
예제 #2
0
        /// <summary>
        /// 修改ICD信息
        /// </summary>
        private void ModifyInfo()
        {
            if (this.fpSpread1_Sheet1.RowCount <= 0)
            {
                return;
            }

            int currRow = fpSpread1_Sheet1.ActiveRowIndex;//当前行

            if (currRow < 0)
            {
                return;
            }
            ArrayList alReturn = new ArrayList(); //返回的ICD信息
            string    sICDCode = "";              //选取的ICD编码

            //定义变量,存储要修改的信息
            Neusoft.HISFC.Models.HealthRecord.ICD orgICD = new Neusoft.HISFC.Models.HealthRecord.ICD();
            ////获得有效性
            //string IsValue = fpSpread1_Sheet1.Cells[currRow, GetColumnKey("有效性")].Value.ToString();
            ////如果已经是无效,则不允许修改
            //if (IsValue == "False")
            //{
            //    MessageBox.Show("此项目已经无效,不能再被修改");
            //    return;
            //}
            //获得ICD编码

            sICDCode = fpSpread1_Sheet1.Cells[currRow, GetColumnKey("诊断码")].Text;

            if (sICDCode == "" || sICDCode == null)
            {
                return;
            }

            alReturn = myICD.IsExistAndReturn(sICDCode, type, true);

            if (alReturn == null)
            {
                MessageBox.Show("获得ICD信息出错!" + myICD.Err);
                return;
            }
            if (alReturn.Count == 0)
            {
                alReturn = myICD.IsExistAndReturn(sICDCode, type, false);
            }
            if (alReturn.Count == 0)
            {
                MessageBox.Show("获得ICD信息出错");
                return;
            }
            try
            {
                orgICD = alReturn[0] as Neusoft.HISFC.Models.HealthRecord.ICD;
            }
            catch (Exception ex)
            {
                MessageBox.Show("获得ICD信息出错!" + ex.Message);
                return;
            }
            //实例化要弹出的窗口
            frmICDInfo icdInfo = new frmICDInfo();

            //显示待修改信息
            icdInfo.OrgICD = orgICD;
            //赋值 ICD的类型
            icdInfo.ICDType = type;
            //赋值 修改的类型
            icdInfo.EditType = EditTypes.Modify;
            //保存修改类型
            editType = EditTypes.Modify;
            //订制事件 。
            icdInfo.SaveButtonClick += new frmICDInfo.SaveInfo(icdInfo_SaveButtonClick);
            //显示窗体
            icdInfo.ShowDialog();
        }