Exemplo n.º 1
0
 public override void SetTrans(System.Data.IDbTransaction trans)
 {
     this.trans = trans;
     docs.SetTrans(trans);
     registerManager.SetTrans(trans);
     regLvlFeeManager.SetTrans(trans);
     regLevelManager.SetTrans(trans);
     assingManager.SetTrans(trans);
     noonManager.SetTrans(trans);
 }
Exemplo n.º 2
0
        /// <summary>
        /// 设置Trans
        /// </summary>
        /// <param name="trans"></param>
        public override void SetTrans(System.Data.IDbTransaction trans)
        {
            this.trans = trans;

            managerConstant.SetTrans(trans);
            managerDepartment.SetTrans(trans);
            manangerPerson.SetTrans(trans);
            orderType.SetTrans(trans);
            managerFrequency.SetTrans(trans);
            managerBed.SetTrans(trans);
            controler.SetTrans(trans);
            pactStatRelationManager.SetTrans(trans);
            comGroupDetailManager.SetTrans(trans);
            assignManager.SetTrans(trans);
            managerInpatient.SetTrans(trans);
            userTextManager.SetTrans(trans);
            spellManager.SetTrans(trans);
            undrugPackageManager.SetTrans(trans);
            userPowerDetailManager.SetTrans(trans);
        }
Exemplo n.º 3
0
        private void neuButton1_Click(object sender, EventArgs e)
        {
            Neusoft.FrameWork.Models.NeuObject roomObj = this.cmbRoom.SelectedItem;

            if (this.cmbRoom.Items.Count <= 0)
            {
                MessageBox.Show("请先维护诊室!", "提示");
                return;
            }
            if (roomObj == null)
            {
                MessageBox.Show("请选择分诊诊室!", "提示");
                this.cmbRoom.Focus();
                return;
            }
            Neusoft.FrameWork.Models.NeuObject consoleObj = this.cmbConsole.SelectedItem;

            if (this.cmbConsole.Items.Count <= 0)
            {
                MessageBox.Show("请先维护该诊室的诊台!", "提示");
                return;
            }
            if (consoleObj == null)
            {
                MessageBox.Show("请选择分诊诊台!", "提示");
                this.cmbConsole.Focus();
                return;
            }

            Neusoft.HISFC.BizLogic.Nurse.Assign assMgr = new Neusoft.HISFC.BizLogic.Nurse.Assign();

            Neusoft.FrameWork.Management.PublicTrans.BeginTransaction();

            //Neusoft.FrameWork.Management.Transaction SQLCA = new Neusoft.FrameWork.Management.Transaction(Neusoft.FrameWork.Management.Connection.Instance);
            //SQLCA.BeginTransaction();

            try
            {
                assMgr.SetTrans(Neusoft.FrameWork.Management.PublicTrans.Trans);

                int rtn = assMgr.Update(this.Assign.Register.ID, roomObj, consoleObj, assMgr.GetDateTimeFromSysDateTime());

                if (rtn == -1)
                {
                    Neusoft.FrameWork.Management.PublicTrans.RollBack();
                    MessageBox.Show(assMgr.Err, "提示");
                    return;
                }
                if (rtn == 0)
                {
                    Neusoft.FrameWork.Management.PublicTrans.RollBack();
                    MessageBox.Show("该患者分诊状态已经改变,请重新刷新屏幕!", "提示");
                    return;
                }
                Neusoft.FrameWork.Management.PublicTrans.Commit();
            }
            catch (Exception error)
            {
                Neusoft.FrameWork.Management.PublicTrans.RollBack();
                MessageBox.Show(error.Message, "提示");
                return;
            }

            this.Assign.Queue.SRoom   = roomObj;
            this.Assign.Queue.Console = consoleObj;
            if (this.OK != null)
            {
                this.OK(this.Assign);
            }

            this.FindForm().Close();
        }
Exemplo n.º 4
0
        /// <summary>
        /// 保存操作结果
        /// </summary>
        /// <return>0 success, -1 fail</return>
        public int Save()
        {
            this.neuSpread1.StopCellEditing();

            if (this.neuSpread1_Sheet1.RowCount <= 0)
            {
                MessageBox.Show("没有要保存的数据", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return(-1);
            }



            if (this.Valid() == -1)
            {
                return(-1);
            }

            Neusoft.FrameWork.Management.PublicTrans.BeginTransaction();

            //Neusoft.FrameWork.Management.Transaction SQLCA = new Neusoft.FrameWork.Management.Transaction(Neusoft.FrameWork.Management.Connection.Instance);
            //SQLCA.BeginTransaction();

            this.seatMgr.SetTrans(Neusoft.FrameWork.Management.PublicTrans.Trans);

            try
            {
                for (int i = 0; i < this.neuSpread1_Sheet1.RowCount; i++)
                {
                    #region 界面生成实体
                    Neusoft.HISFC.Models.Nurse.Seat info = new Neusoft.HISFC.Models.Nurse.Seat();
                    info.ID              = this.neuSpread1_Sheet1.Cells[i, 0].Tag.ToString();
                    info.Name            = this.neuSpread1_Sheet1.GetValue(i, 0).ToString();
                    info.PRoom.InputCode = this.neuSpread1_Sheet1.GetValue(i, 1).ToString();
                    info.PRoom.ID        = this.neuSpread1_Sheet1.Cells[i, 2].Tag.ToString();
                    info.PRoom.Name      = this.neuSpread1_Sheet1.GetValue(i, 2).ToString();
                    //状态
                    string strTemp = "1";
                    if (this.neuSpread1_Sheet1.GetValue(i, 3).ToString().Trim() == "停用")
                    {
                        strTemp = "0";
                    }
                    info.PRoom.IsValid = strTemp;
                    //备注
                    string strMemo = this.neuSpread1_Sheet1.Cells[i, 4].Text.Trim();
                    if (strMemo == null)
                    {
                        strMemo = "";
                    }
                    info.Memo = strMemo;
                    //操作信息
                    info.Oper.ID       = this.seatMgr.Operator.ID;
                    info.Oper.OperTime = this.seatMgr.GetDateTimeFromSysDateTime();



                    #endregion

                    if (!Neusoft.FrameWork.Function.NConvert.ToBoolean(info.PRoom.IsValid))
                    {
                        Neusoft.HISFC.BizLogic.Nurse.Assign assMgr = new Neusoft.HISFC.BizLogic.Nurse.Assign();
                        assMgr.SetTrans(Neusoft.FrameWork.Management.PublicTrans.Trans);
                        if (assMgr.ExistPatient(info.ID, assMgr.GetSysDateTime()))
                        {
                            Neusoft.FrameWork.Management.PublicTrans.RollBack();
                            MessageBox.Show(info.Name + " 有患者,不能将状态改为无效", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                            this.neuSpread1_Sheet1.SetValue(i, 3, "在用");
                            return(-1);
                        }

                        //if (this.seatMgr.QuerySeatByConsoleID(info.ID) < 0)
                        //{

                        //    Neusoft.FrameWork.Management.PublicTrans.RollBack();
                        //    MessageBox.Show(this.seatMgr.Err);
                        //    return -1;
                        //}
                        //if (this.seatMgr.QuerySeatByConsoleID(info.ID) > 0)
                        //{

                        //    Neusoft.FrameWork.Management.PublicTrans.RollBack();
                        //    MessageBox.Show("该诊台正在使用不能置成无效");
                        //    return -1;
                        //}
                    }


                    if (this.seatMgr.Insert(info) == -1)
                    {
                        if (this.seatMgr.Update(info) == -1)
                        {
                            Neusoft.FrameWork.Management.PublicTrans.RollBack();
                            MessageBox.Show("保存失败!" + this.seatMgr.Err, "提示");
                            return(-1);
                        }
                    }
                }
            }
            catch (Exception e)
            {
                Neusoft.FrameWork.Management.PublicTrans.RollBack();
                MessageBox.Show("保存失败!" + e.Message, "提示");
                return(-1);
            }

            Neusoft.FrameWork.Management.PublicTrans.Commit();
            MessageBox.Show("保存成功!", "提示");

            this.SetFp();

            return(0);
        }