Example #1
0
        /// <summary>
        /// 药柜处理
        /// </summary>
        private void SetArkDept(ref Neusoft.FrameWork.Models.NeuObject operDept)
        {
            Neusoft.HISFC.BizLogic.Pharmacy.Constant   phaConsManager = new Neusoft.HISFC.BizLogic.Pharmacy.Constant();
            Neusoft.HISFC.Models.Pharmacy.DeptConstant deptCons       = phaConsManager.QueryDeptConstant(operDept.ID);
            if (deptCons == null)
            {
                MessageBox.Show(Language.Msg("根据科室编码获取科室常数信息发生错误") + phaConsManager.Err);
                return;
            }

            if (deptCons.IsArk)         //对药柜管理科室进行以下处理
            {
                Neusoft.HISFC.BizProcess.Integrate.Manager managerIntegrate = new Neusoft.HISFC.BizProcess.Integrate.Manager();
                ArrayList al = managerIntegrate.LoadPhaParentByChildren(operDept.ID);
                if (al == null || al.Count == 0)
                {
                    MessageBox.Show(Language.Msg("获取科室结构信息发生错误") + managerIntegrate.Err);
                    return;
                }

                Neusoft.HISFC.Models.Base.DepartmentStat deptStat = al[0] as Neusoft.HISFC.Models.Base.DepartmentStat;
                if (deptStat.PardepCode.Substring(0, 1) == "S")     //上级节点为分类编码 不进行处理
                {
                    return;
                }
                else
                {
                    operDept.ID   = deptStat.PardepCode;
                    operDept.Name = deptStat.PardepName;
                }
            }
        }
        /// <summary>
        /// 药柜处理
        /// </summary>
        private void SetArkDept(ref Neusoft.FrameWork.Models.NeuObject operDept)
        {
            Neusoft.HISFC.BizLogic.Pharmacy.Constant   phaConsManager = new Neusoft.HISFC.BizLogic.Pharmacy.Constant();
            Neusoft.HISFC.Models.Pharmacy.DeptConstant deptCons       = phaConsManager.QueryDeptConstant(operDept.ID);
            if (deptCons == null)
            {
                MessageBox.Show(Language.Msg("根据科室编码获取科室常数信息发生错误") + phaConsManager.Err);
                return;
            }

            operDept.Memo = Neusoft.FrameWork.Function.NConvert.ToInt32(deptCons.IsArk).ToString();
            if (this.tvDrugMessage1.StockMarkDept == null || (this.tvDrugMessage1.StockMarkDept.ID != operDept.ID))
            {
                this.tvDrugMessage1.StockMarkDept = operDept.Clone();
            }

            if (deptCons.IsArk)         //对药柜管理科室进行以下处理
            {
                #region 药柜处理

                Neusoft.HISFC.BizProcess.Integrate.Manager managerIntegrate = new Neusoft.HISFC.BizProcess.Integrate.Manager();
                ArrayList al = managerIntegrate.LoadPhaParentByChildren(operDept.ID);
                if (al == null || al.Count == 0)
                {
                    MessageBox.Show(Language.Msg("获取科室结构信息发生错误") + managerIntegrate.Err);
                    return;
                }

                Neusoft.HISFC.Models.Base.DepartmentStat deptStat = al[0] as Neusoft.HISFC.Models.Base.DepartmentStat;
                if (deptStat.PardepCode.Substring(0, 1) == "S")     //上级节点为分类编码 不进行处理
                {
                    return;
                }
                else
                {
                    this.ucDrugDetail1.ArkDept  = operDept.Clone();
                    this.ucDrugMessage1.ArkDept = operDept.Clone();

                    //核准扣库科室为药柜所属药房
                    this.ucDrugDetail1.ApproveDept      = new Neusoft.FrameWork.Models.NeuObject();
                    this.ucDrugDetail1.ApproveDept.ID   = deptStat.PardepCode;
                    this.ucDrugDetail1.ApproveDept.Name = deptStat.PardepName;

                    this.ucDrugMessage1.ApproveDept      = new Neusoft.FrameWork.Models.NeuObject();
                    this.ucDrugMessage1.ApproveDept.ID   = deptStat.PardepCode;
                    this.ucDrugMessage1.ApproveDept.Name = deptStat.PardepName;

                    operDept.ID   = deptStat.PardepCode;
                    operDept.Name = deptStat.PardepName;
                }

                #endregion

                this.isArkDept = true;
            }
        }
Example #3
0
        /// <summary>
        /// 判断某科室是否为药柜
        /// </summary>
        /// <param name="deptCode">科室编码</param>
        /// <returns>成功返回1 失败返回-1</returns>
        private bool ArkJudge(string deptCode)
        {
            Neusoft.HISFC.BizLogic.Pharmacy.Constant phaConsManager = new Neusoft.HISFC.BizLogic.Pharmacy.Constant();

            Neusoft.HISFC.Models.Pharmacy.DeptConstant deptCons = phaConsManager.QueryDeptConstant(deptCode);
            if (deptCons == null)
            {
                MessageBox.Show(Language.Msg("根据科室编码获取科室常数信息失败") + phaConsManager.Err);
                return(false);
            }

            return(deptCons.IsArk);
        }
Example #4
0
 /// <summary>
 /// 根据所赋值的库房编码 设置信息显示
 /// </summary>
 public void SetData()
 {
     Neusoft.HISFC.BizLogic.Pharmacy.Constant   consMgr  = new Neusoft.HISFC.BizLogic.Pharmacy.Constant();
     Neusoft.HISFC.Models.Pharmacy.DeptConstant deptCons = consMgr.QueryDeptConstant(this.deptCode);
     if (deptCons == null)
     {
         MessageBox.Show(Language.Msg("获取科室常数发生错误! \n" + consMgr.Err));
         return;
     }
     this.dtpEnd.Value        = consMgr.GetDateTimeFromSysDateTime().Date.AddDays(1).AddSeconds(-1);
     this.dtpBegin.Value      = this.dtpEnd.Value.AddDays(-deptCons.ReferenceDays);
     this.txtMaxDays.Text     = deptCons.StoreMaxDays.ToString();
     this.txtMinDays.Text     = deptCons.StoreMinDays.ToString();
     this.lbIntervalDays.Text = deptCons.ReferenceDays.ToString() + "天";
 }