Пример #1
0
        /// <summary>
        /// 初始化数据
        /// </summary>
        /// <returns></returns>
        private int InitData()
        {
            ArrayList al = noonMgr.Query();

            if (al == null)
            {
                MessageBox.Show("获取午别信息失败!" + noonMgr.Err);
                return(-1);
            }
            noonHelper.ArrayObject = al;

            this.noRegFlagChar = this.controlParamIntegrate.GetControlParam <string>(Neusoft.HISFC.BizProcess.Integrate.Const.NO_REG_CARD_RULES, false, "9");
            DateTime dtNow = regMgr.GetDateTimeFromSysDateTime();

            dtBegin.Value = dtNow;
            dtEnd.Value   = dtNow;
            return(1);
        }
Пример #2
0
        private int Save()
        {
            int returnValue = this.valid();

            if (returnValue < 0)
            {
                return(-1);
            }
            Neusoft.HISFC.BizLogic.Registration.Register regMgr = new Neusoft.HISFC.BizLogic.Registration.Register();
            Neusoft.FrameWork.Management.PublicTrans.BeginTransaction();
            Neusoft.FrameWork.Models.NeuObject myObj     = new Neusoft.FrameWork.Models.NeuObject();
            Neusoft.FrameWork.Models.NeuObject myDeptObj = new Neusoft.FrameWork.Models.NeuObject();

            for (int i = 0; i < this.cmbDoct.alItems.Count; i++)
            {
                Neusoft.FrameWork.Models.NeuObject obj = this.cmbDoct.alItems[i] as Neusoft.FrameWork.Models.NeuObject;
                if (obj.ID == this.cmbDoct.Tag.ToString())
                {
                    myObj.ID   = obj.ID;
                    myObj.Name = obj.Name;
                    break;
                }
            }

            if (this.cmbDept.SelectedItem != null)
            {
                myDeptObj = this.cmbDept.SelectedItem as Neusoft.FrameWork.Models.NeuObject;
            }

            //if (this.cmbDoct.SelectedItem != null)
            //{
            //    myObj = this.cmbDoct.SelectedItem as Neusoft.FrameWork.Models.NeuObject;
            //}
            //else
            //{
            //    myObj.ID = "";
            //    myObj.Name = "";
            //}

            if (isUpdateRegDt)
            {
                this.myRegObj.DoctorInfo.SeeDate = regMgr.GetDateTimeFromSysDateTime();
            }
            returnValue = regMgr.UpdateDeptAndDoct(this.myRegObj.ID, this.cmbDept.Tag.ToString(), this.cmbDept.Text,
                                                   myObj.ID, myObj.Name, this.myRegObj.DoctorInfo.SeeDate.ToString());
            if (returnValue < 0)
            {
                MessageBox.Show("换科失败!" + regMgr.Err);
                Neusoft.FrameWork.Management.PublicTrans.RollBack();
                return(-1);
            }

            returnValue = regMgr.CancelTriage(this.myRegObj.ID);
            if (returnValue < 0)
            {
                MessageBox.Show("取消分诊失败!" + regMgr.Err);
                Neusoft.FrameWork.Management.PublicTrans.RollBack();
            }

            Neusoft.FrameWork.Management.PublicTrans.Commit();
            MessageBox.Show("换科成功!");

            this.alDeptOrDoct.Add(myDeptObj);
            this.alDeptOrDoct.Add(myObj);
            return(1);
        }