Esempio n. 1
0
        /// <summary>
        /// 初始化
        /// </summary>
        public override void Init()
        {
            base.Init();

            FarPoint.Win.Spread.CellType.TextCellType txtType = new FarPoint.Win.Spread.CellType.TextCellType();
            base.neuSpread1_Sheet1.Columns[0, neuSpread1_Sheet1.ColumnCount - 1].CellType = txtType;
            #region 获取入库权限

            Neusoft.HISFC.BizLogic.Manager.PowerLevelManager myManager = new Neusoft.HISFC.BizLogic.Manager.PowerLevelManager();
            ArrayList inPriv = myManager.LoadLevel3ByLevel2("0510");

            ArrayList alPriv = new ArrayList();
            Neusoft.FrameWork.Models.NeuObject tempInfo = new Neusoft.FrameWork.Models.NeuObject();
            foreach (Neusoft.HISFC.Models.Admin.PowerLevelClass3 info in inPriv)
            {
                tempInfo      = new Neusoft.FrameWork.Models.NeuObject();
                tempInfo.ID   = info.Class3Code;
                tempInfo.Name = info.Class3Name;

                alPriv.Add(tempInfo);
            }
            this.inTypeHelper = new Neusoft.FrameWork.Public.ObjectHelper(alPriv);

            #endregion

            #region 获取出库权限

            ArrayList outPriv = myManager.LoadLevel3ByLevel2("0520");

            ArrayList alOutPriv = new ArrayList();
            Neusoft.FrameWork.Models.NeuObject tempOutfo = new Neusoft.FrameWork.Models.NeuObject();
            foreach (Neusoft.HISFC.Models.Admin.PowerLevelClass3 info in outPriv)
            {
                tempOutfo      = new Neusoft.FrameWork.Models.NeuObject();
                tempOutfo.ID   = info.Class3Code;
                tempOutfo.Name = info.Class3Name;

                alOutPriv.Add(tempOutfo);
            }
            this.outTypeHelper = new Neusoft.FrameWork.Public.ObjectHelper(alOutPriv);

            #endregion

            #region 获取科室

            Neusoft.HISFC.BizLogic.Manager.Department deptManager = new Neusoft.HISFC.BizLogic.Manager.Department();
            ArrayList alDept = deptManager.GetDeptmentAll();
            if (alDept != null)
            {
                this.deptHelper = new Neusoft.FrameWork.Public.ObjectHelper(alDept);
            }

            #endregion

            #region 获取物资列表

            this.GetItemList();

            #endregion
        }
Esempio n. 2
0
        /// <summary>
        /// 显示三级权限
        /// </summary>
        public void ShowClass3()
        {
            //{42AB2AC3-EAC6-4b7d-9102-4997B2E9AAAA} 增加二级权限报错
            if (this.operClass2Priv == null || string.IsNullOrEmpty(this.operClass2Priv.Class2Code))
            {
                this.fpClass3_Sheet1.RowCount = 0;

                return;
            }

            //取三级权限
            ArrayList al = class3Manager.LoadLevel3ByLevel2(this.operClass2Priv.Class2Code);

            if (al == null)
            {
                MessageBox.Show(Language.Msg(class2Manager.Err));
                return;
            }

            string[] class3JoinCollection = this.ShowClass3JoinPriv();

            if (class3JoinCollection != null)
            {
                //创建ComboBoxCellType,填充系统类型列
                FarPoint.Win.Spread.CellType.ComboBoxCellType combo = new FarPoint.Win.Spread.CellType.ComboBoxCellType();
                //将ComboBoxCellType付给三级权限的对应列
                combo.Items = class3JoinCollection;
                this.fpClass3_Sheet1.Columns[5].CellType = combo;
            }
            else
            {
                //创建ComboBoxCellType,填充系统类型列
                FarPoint.Win.Spread.CellType.ComboBoxCellType combo = new FarPoint.Win.Spread.CellType.ComboBoxCellType();
                //将ComboBoxCellType付给三级权限的对应列
                combo.Items = new string[1];
                this.fpClass3_Sheet1.Columns[5].CellType = combo;
            }

            //显示三级权限
            this.fpClass3_Sheet1.RowCount = al.Count;

            for (int i = 0; i < al.Count; i++)
            {
                Neusoft.HISFC.Models.Admin.PowerLevelClass3 info = al[i] as Neusoft.HISFC.Models.Admin.PowerLevelClass3;
                this.fpClass3_Sheet1.Cells[i, 0].Text = info.ID;
                this.fpClass3_Sheet1.Cells[i, 1].Text = info.Name;
                this.fpClass3_Sheet1.Cells[i, 2].Text = info.Class3MeaningCode;
                this.fpClass3_Sheet1.Cells[i, 3].Text = info.Class3MeaningName;

                this.fpClass3_Sheet1.Cells[i, 4].Text = info.Class3JoinCode;
                if (this.hsClass3JoinCode.ContainsKey(info.Class3JoinCode))
                {
                    this.fpClass3_Sheet1.Cells[i, 5].Text = this.hsClass3JoinCode[info.Class3JoinCode] as string;
                }

                this.fpClass3_Sheet1.Cells[i, 6].Text = info.Memo;
                this.fpClass3_Sheet1.Rows[i].Tag      = info;
            }
        }
Esempio n. 3
0
        public override void Init()
        {
            base.Init();

            #region 获取入库权限

            Neusoft.HISFC.BizLogic.Manager.PowerLevelManager myManager = new Neusoft.HISFC.BizLogic.Manager.PowerLevelManager();
            ArrayList inPriv = myManager.LoadLevel3ByLevel2("0310");

            ArrayList alPriv = new ArrayList();
            Neusoft.FrameWork.Models.NeuObject tempInfo = new Neusoft.FrameWork.Models.NeuObject();
            foreach (Neusoft.HISFC.Models.Admin.PowerLevelClass3 info in inPriv)
            {
                tempInfo      = new Neusoft.FrameWork.Models.NeuObject();
                tempInfo.ID   = info.Class3Code;
                tempInfo.Name = info.Class3Name;

                alPriv.Add(tempInfo);
            }
            this.inTypeHelper = new Neusoft.FrameWork.Public.ObjectHelper(alPriv);

            #endregion

            #region 获取出库权限

            ArrayList outPriv = myManager.LoadLevel3ByLevel2("0320");

            ArrayList alOutPriv = new ArrayList();
            Neusoft.FrameWork.Models.NeuObject tempOutfo = new Neusoft.FrameWork.Models.NeuObject();
            foreach (Neusoft.HISFC.Models.Admin.PowerLevelClass3 info in outPriv)
            {
                tempOutfo      = new Neusoft.FrameWork.Models.NeuObject();
                tempOutfo.ID   = info.Class3Code;
                tempOutfo.Name = info.Class3Name;

                alOutPriv.Add(tempOutfo);
            }
            this.outTypeHelper = new Neusoft.FrameWork.Public.ObjectHelper(alOutPriv);

            #endregion

            #region 获取科室

            Neusoft.HISFC.BizLogic.Manager.Department deptManager = new Neusoft.HISFC.BizLogic.Manager.Department();
            ArrayList alDept = deptManager.GetDeptmentAll();
            if (alDept != null)
            {
                this.deptHelper = new Neusoft.FrameWork.Public.ObjectHelper(alDept);
            }

            #endregion
        }
        /// <summary>
        /// 初始化
        /// </summary>
        protected void Init()
        {
            FarPoint.Win.Spread.CellType.ComboBoxCellType addFlagCmbType = new FarPoint.Win.Spread.CellType.ComboBoxCellType();
            addFlagCmbType.Items = this.addFlagStrCollection;

            this.neuSpread1_Sheet1.Columns[6].CellType = addFlagCmbType;

            Neusoft.FrameWork.Management.DataBaseManger dataManager = new DataBaseManger();

            this.privDept = ((Neusoft.HISFC.Models.Base.Employee)dataManager.Operator).Dept;

            Neusoft.HISFC.BizProcess.Integrate.Manager integrateManager = new Neusoft.HISFC.BizProcess.Integrate.Manager();

            ArrayList aldept = integrateManager.GetDepartment();

            this.deptHelper = new Neusoft.FrameWork.Public.ObjectHelper(aldept);

            int iIndex = 0;

            #region 获取出入库科室列表

            Neusoft.HISFC.BizLogic.Manager.PrivInOutDept privInOutManager = new Neusoft.HISFC.BizLogic.Manager.PrivInOutDept();

            ArrayList alPrivInDept = privInOutManager.GetPrivInOutDeptList(this.privDept.ID, "0310");
            if (alPrivInDept == null)
            {
                MessageBox.Show(Language.Msg("获取当前科室入库科室列表发生错误") + privInOutManager.Err);
                return;
            }

            this.privInStrCollection = new string[alPrivInDept.Count];
            iIndex = 0;
            foreach (Neusoft.HISFC.Models.Base.PrivInOutDept privInInfo in alPrivInDept)
            {
                this.privInStrCollection[iIndex] = "科室 - " + privInInfo.Dept.Name;

                this.hsPrivInDept.Add(this.privInStrCollection[iIndex], privInInfo.Dept.ID);

                iIndex++;
            }

            ArrayList alPrivOutDept = privInOutManager.GetPrivInOutDeptList(this.privDept.ID, "0320");
            if (alPrivOutDept == null)
            {
                MessageBox.Show(Language.Msg("获取当前科室出库科室列表发生错误") + privInOutManager.Err);
                return;
            }
            this.privOutStrCollection = new string[alPrivOutDept.Count];
            iIndex = 0;
            foreach (Neusoft.HISFC.Models.Base.PrivInOutDept privOutInfo in alPrivOutDept)
            {
                this.privOutStrCollection[iIndex] = "科室 - " + privOutInfo.Dept.Name;

                this.hsPrivOutDept.Add(this.privOutStrCollection[iIndex], privOutInfo.Dept.ID);

                iIndex++;
            }

            #endregion

            #region 入出库权限集合

            Neusoft.HISFC.BizLogic.Manager.PowerLevelManager powerManager = new Neusoft.HISFC.BizLogic.Manager.PowerLevelManager();

            ArrayList alPrivInC3 = powerManager.LoadLevel3ByLevel2("0310");
            if (alPrivInC3 == null)
            {
                MessageBox.Show(Language.Msg("获取当前入库三级权限类型发生错误") + powerManager.Err);
                return;
            }
            this.privInC3StrCollection = new string[alPrivInC3.Count];
            iIndex = 0;
            foreach (Neusoft.HISFC.Models.Admin.PowerLevelClass3 privInC3 in alPrivInC3)
            {
                this.privInC3StrCollection[iIndex] = "入库 - " + privInC3.Name;

                this.hsPrivInC3.Add(this.privInC3StrCollection[iIndex], privInC3.ID);

                iIndex++;
            }

            ArrayList alPrivOutC3 = powerManager.LoadLevel3ByLevel2("0320");
            if (alPrivOutC3 == null)
            {
                MessageBox.Show(Language.Msg("获取当前出库三级权限类型发生错误") + powerManager.Err);
                return;
            }
            this.privOutC3StrCollection = new string[alPrivOutC3.Count];
            iIndex = 0;
            foreach (Neusoft.HISFC.Models.Admin.PowerLevelClass3 privOutC3 in alPrivOutC3)
            {
                this.privOutC3StrCollection[iIndex] = "出库 - " + privOutC3.Name;

                this.hsPrivOutC3.Add(this.privOutC3StrCollection[iIndex], privOutC3.ID);

                iIndex++;
            }

            #endregion
        }
Esempio n. 5
0
        protected override void OnLoad()
        {
            base.OnLoad();
            //设置时间范围
            DateTime now = DateTime.Now;
            DateTime dt  = new DateTime(DateTime.Now.Year, 1, 1);

            this.dtpBeginTime.Value = dt;


            Neusoft.HISFC.BizLogic.Manager.Constant consManager = new Neusoft.HISFC.BizLogic.Manager.Constant();
            ArrayList alItemType = consManager.GetList(Neusoft.HISFC.Models.Base.EnumConstant.ITEMTYPE);

            if (alItemType == null)
            {
                MessageBox.Show(Language.Msg("根据常数类别获取药品类型名称发生错误!") + consManager.Err);
                itemTypeHelper = new Neusoft.FrameWork.Public.ObjectHelper();
                return;
            }

            Neusoft.FrameWork.Models.NeuObject itemTypeObj = new Neusoft.FrameWork.Models.NeuObject();
            itemTypeObj.ID   = "ALL";
            itemTypeObj.Name = "全部";

            alItemType.Insert(0, itemTypeObj);

            itemTypeHelper = new Neusoft.FrameWork.Public.ObjectHelper(alItemType);

            this.cmbType.AddItems(alItemType);
            ////////////////////////////////////////////
            ArrayList alQuality = consManager.GetList(Neusoft.HISFC.Models.Base.EnumConstant.DRUGQUALITY);

            if (alQuality == null)
            {
                MessageBox.Show(Language.Msg("根据常数类别获取药品性质发生错误!") + consManager.Err);
                this.qualityHelper = new Neusoft.FrameWork.Public.ObjectHelper();
                return;
            }

            this.qualityNameCollection = new string[alQuality.Count];
            int iIndex = 0;

            foreach (Neusoft.FrameWork.Models.NeuObject qualityInfo in alQuality)
            {
                qualityNameCollection[iIndex] = qualityInfo.Name;
                iIndex++;
            }

            Neusoft.FrameWork.Models.NeuObject qualityObj = new Neusoft.FrameWork.Models.NeuObject();
            qualityObj.ID   = "ALL";
            qualityObj.Name = "全部";

            alQuality.Insert(0, qualityObj);
            this.qualityHelper = new Neusoft.FrameWork.Public.ObjectHelper(alQuality);

            this.cmbQuality.AddItems(alQuality);
            /////////////////////////////////////////////////////////////
            Neusoft.HISFC.BizLogic.Manager.PowerLevelManager levelManager = new Neusoft.HISFC.BizLogic.Manager.PowerLevelManager();
            ArrayList alLevel = levelManager.LoadLevel3ByLevel2("0320");

            if (alLevel == null)
            {
                MessageBox.Show(Language.Msg("根据常数类别获取出库类型名称发生错误!") + consManager.Err);
                this.privTypeHelper = new Neusoft.FrameWork.Public.ObjectHelper();
                return;
            }

            ArrayList alNeuLevel = new ArrayList();

            Neusoft.FrameWork.Models.NeuObject objLevel = null;

            foreach (Neusoft.HISFC.Models.Admin.PowerLevelClass3 info in alLevel)
            {
                objLevel = new Neusoft.FrameWork.Models.NeuObject();

                objLevel.ID   = info.Class3Code;
                objLevel.Name = info.Class3Name;

                alNeuLevel.Add(objLevel);
            }

            objLevel = new Neusoft.FrameWork.Models.NeuObject();

            objLevel.ID   = "ALL";
            objLevel.Name = "全部";

            alNeuLevel.Insert(0, objLevel);
            this.cmbPrivType.AddItems(alNeuLevel);
        }