/// <summary> /// 初始化 /// </summary> /// <returns>成功返回1 失败返回-1</returns> private int Init() { Neusoft.HISFC.BizLogic.Manager.Constant consManager = new Neusoft.HISFC.BizLogic.Manager.Constant(); //限制药品类别 ArrayList al = consManager.GetList("RestrainedType"); if (al == null) { al = new ArrayList(); } foreach (Neusoft.FrameWork.Models.NeuObject info in al) { this.hsRestrainedQualityHelper.Add(info.ID, null); } Neusoft.HISFC.BizLogic.Manager.PowerLevelManager powerLevelManager = new Neusoft.HISFC.BizLogic.Manager.PowerLevelManager(); Neusoft.HISFC.Models.Admin.PowerLevelClass3 privClass3 = powerLevelManager.LoadLevel3ByPrimaryKey(this.phaOutManager.Class2Priv.ID, this.phaOutManager.PrivType.ID); if (privClass3 != null) { privJoinClass3 = powerLevelManager.LoadLevel3ByPrimaryKey("0310", privClass3.Class3JoinCode); } return(1); }
/// <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 }
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> /// <param name="customType">分类</param> /// <param name="typeItem">分类内容</param> /// <returns></returns> protected string GetDescriptionFromTypeItem(EnumMSCustomType customType, string typeItem, TransTypes trans) { switch (customType) { case Neusoft.HISFC.Models.Base.EnumMSCustomType.入库: //根据入库类型检索 case Neusoft.HISFC.Models.Base.EnumMSCustomType.出库: //根据出库类型检索 Neusoft.HISFC.BizLogic.Manager.PowerLevelManager powerManager = new Neusoft.HISFC.BizLogic.Manager.PowerLevelManager(); PowerLevelClass3 pIn3 = powerManager.LoadLevel3ByPrimaryKey(Neusoft.HISFC.Models.Base.EnumMSCustomTypeService.GetNameFromEnum(customType), typeItem); return(customType.ToString() + " - " + pIn3.Name); case Neusoft.HISFC.Models.Base.EnumMSCustomType.科室: //科室 根据入出库科室选择 Neusoft.HISFC.BizLogic.Manager.PrivInOutDept privInOutManager = new Neusoft.HISFC.BizLogic.Manager.PrivInOutDept(); return("科室 - " + this.deptHelper.GetName(typeItem)); case Neusoft.HISFC.Models.Base.EnumMSCustomType.调价: if (typeItem == "00") { return(this.strAdjustCollection[0]); } else { return(this.strAdjustCollection[1]); } case Neusoft.HISFC.Models.Base.EnumMSCustomType.盘点: //根据盘点盈亏 if (typeItem == "00") { return(this.strCheckCollection[0]); } else { return(this.strCheckCollection[1]); } default: return(customType.ToString()); } }
/// <summary> /// 初始化权限类型 /// </summary> /// <returns>成功进行权限选择返回1 否则返回-1</returns> protected int InitPrivType() { #region 效性判断 if (this.Class2Priv.ID == "") { MessageBox.Show("未获取当前操作的二级权限编码"); return(-1); } if (this.DeptInfo.ID == "") { MessageBox.Show("未获取当前操作科室编码"); return(-1); } if (this.OperInfo.ID == "") { MessageBox.Show("未获取当前操作员编码"); return(-1); } #endregion #region 获取当前操作员具有的权限集合 this.privList = this.powerDetailManager.QueryUserPrivCollection(this.OperInfo.ID, this.Class2Priv.ID, this.DeptInfo.ID); if (this.privList == null) { MessageBox.Show("读取操作员操作权限集合时出错!\n" + this.powerDetailManager.Err); return(-1); } #endregion #region 获取三级权限涵义码 Neusoft.HISFC.Models.Admin.PowerLevelClass3 privClass3; Neusoft.HISFC.BizLogic.Manager.PowerLevelManager powerLevelManager = new Neusoft.HISFC.BizLogic.Manager.PowerLevelManager(); foreach (Neusoft.FrameWork.Models.NeuObject info in this.privList) { privClass3 = powerLevelManager.LoadLevel3ByPrimaryKey(this.Class2Priv.ID, info.ID); if (privClass3 == null) { MessageBox.Show("获取三级权限涵义码出错\n查找三级权限涵义码出错" + powerLevelManager.Err); return(-1); } info.Memo = privClass3.Class3MeaningCode; } #endregion #region 针对申请的不同进行过滤 ArrayList al = new ArrayList(); Neusoft.FrameWork.Models.NeuObject typeInfo = new Neusoft.FrameWork.Models.NeuObject(); Neusoft.FrameWork.Models.NeuObject objInfo; for (int i = 0; i < this.privList.Count; i++) { typeInfo = this.privList[i] as Neusoft.FrameWork.Models.NeuObject; objInfo = new Neusoft.FrameWork.Models.NeuObject(); objInfo.ID = typeInfo.ID; objInfo.Name = typeInfo.Name; objInfo.Memo = typeInfo.Memo; switch (this.OperInfo.Memo) { case "apply": if (typeInfo.Memo == "13" || typeInfo.Memo == "18" || typeInfo.Memo == "24" || typeInfo.Memo == "12") { al.Add(typeInfo); } break; case "in": if (typeInfo.Memo != "13" || typeInfo.Memo != "18" || typeInfo.Memo != "12") { al.Add(typeInfo); } break; case "out": if (typeInfo.Memo != "24") { al.Add(typeInfo); } break; } } //this.privList = new ArrayList(); //this.privList = new List<Neusoft.FrameWork.Models.NeuObject>(); //this.privList.Clear(); //this.privList = al; #endregion return(1); }
/// <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 }
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); }
/// <summary> /// 初始化方法 /// </summary> private void init() { #region 初始化权限明细ListView //权限等级管理类,针对等级3,等级3包括1,2等级的信息 Neusoft.HISFC.BizLogic.Manager.PowerLevelManager powerManager = new Neusoft.HISFC.BizLogic.Manager.PowerLevelManager(); //现实所在大类下的所有权限 ArrayList al = powerManager.LoadLevel3ByLevel1(this.userPowerDetail.Class1Code);//根据一级权限编码取所有2,3级权限信息 if (al == null) { MessageBox.Show(powerManager.Err); return; } ListViewItem lvi; //将获得改大类下具有的所有权限填充到ListView中 foreach (Neusoft.HISFC.Models.Admin.PowerLevelClass3 info in al) { //设置插入的节点信息 lvi = new ListViewItem(); lvi.Text = info.Name; //Tag属性保存摆药单分类实体 lvi.Tag = info; //设置listView的子节点 lvi.SubItems.Add(info.PowerLevelClass2.Class2Name); //返回插入的节点 this.lvPrivList.Items.Add(lvi); } #endregion //取用户在此处拥有的三级权限,并显示在ListView中。 this.ShowUserPriv(); //将人员信息显示在控件中 this.lblCode.Text = this.userPowerDetail.User.ID; this.comboName.Text = this.userPowerDetail.User.Name; this.lblDeptName.Text = this.userPowerDetail.Dept.Name; this.txtMark.Text = this.userPowerDetail.Memo; this.comboRole.Tag = this.userPowerDetail.RoleCode; //只有在增加人员时才可以修改人员 if (this.userPowerDetail.User.ID == "") { this.btnChooseUser.Enabled = true; this.btDelete.Enabled = false; } else { this.btnChooseUser.Enabled = false; this.btDelete.Enabled = true; } #region 初始化人员维护下ComboBox //界面初始化1 initInfo(); #endregion #region 人员基本信息 //界面初始化2 //如果用户编码为空则返回 if (this.userPowerDetail.User.ID == "") { return; } //人员实体 Neusoft.HISFC.Models.Base.Employee person = this.psMgr.GetPersonByID(this.userPowerDetail.User.ID); setInfo(person); #endregion }