Пример #1
0
        /// <summary>
        /// 根据项目类别设置不同的分类内容
        /// </summary>
        /// <param name="customType">项目分类</param>
        /// <returns></returns>
        protected string[] GetDescriptionFromType(EnumMSCustomType customType, TransTypes trnas)
        {
            switch (customType)
            {
            case Neusoft.HISFC.Models.Base.EnumMSCustomType.入库:           //根据入库类型检索

                return(this.privInC3StrCollection);

            case Neusoft.HISFC.Models.Base.EnumMSCustomType.出库:           //根据出库类型检索

                return(this.privOutC3StrCollection);

            case Neusoft.HISFC.Models.Base.EnumMSCustomType.科室:           //科室 根据入出库科室选择
                if (trnas == TransTypes.Positive)                         //正交易 取入库科室
                {
                    return(this.privInStrCollection);
                }
                else                                                        //反交易 取出库科室
                {
                    return(this.privOutStrCollection);
                }

            case Neusoft.HISFC.Models.Base.EnumMSCustomType.调价:

                return(this.strAdjustCollection);

            case Neusoft.HISFC.Models.Base.EnumMSCustomType.盘点:           //根据盘点盈亏

                return(this.strCheckCollection);

            default:
                return(new string[] { customType.ToString() });
            }
        }
Пример #2
0
        /// <summary>
        /// 设置Fp分类内容
        /// </summary>
        /// <param name="iRow"></param>
        private void SetTypeItem(int iRow)
        {
            EnumMSCustomType customType = EnumMSCustomTypeService.GetEnumFromName(this.neuSpread1_Sheet1.Cells[iRow, 2].Text);

            TransTypes trans = this.neuSpread1_Sheet1.Cells[iRow, 6].Text.Trim() == "收入" ? TransTypes.Positive : TransTypes.Negative;

            FarPoint.Win.Spread.CellType.ComboBoxCellType typeItemCellType = new FarPoint.Win.Spread.CellType.ComboBoxCellType();

            typeItemCellType.Items = this.GetDescriptionFromType(customType, trans);
            this.neuSpread1_Sheet1.Cells[iRow, 5].CellType = typeItemCellType;
        }
Пример #3
0
        /// <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>
 /// <param name="msCustomType"></param>
 /// <returns></returns>
 public static string GetNameFromEnum(EnumMSCustomType msCustomType)
 {
     return(itemCollection[msCustomType].ToString());
 }
Пример #5
0
        private void neuSpread1_ComboCloseUp(object sender, FarPoint.Win.Spread.EditorNotifyEventArgs e)
        {
            if (e.Column == 5)
            {
                #region 根据选择的项目获取编码

                EnumMSCustomType customType = EnumMSCustomTypeService.GetEnumFromName(this.neuSpread1_Sheet1.Cells[e.Row, 2].Text);

                TransTypes trans = this.neuSpread1_Sheet1.Cells[e.Row, 6].Text.Trim() == "收入" ? TransTypes.Positive : TransTypes.Negative;

                string keys       = this.neuSpread1_Sheet1.Cells[e.Row, 5].Text;
                string typeItemID = "";
                switch (customType)
                {
                case Neusoft.HISFC.Models.Base.EnumMSCustomType.入库:           //根据入库类型检索
                    if (this.hsPrivInC3.ContainsKey(keys))
                    {
                        typeItemID = this.hsPrivInC3[keys].ToString();
                    }
                    break;

                case Neusoft.HISFC.Models.Base.EnumMSCustomType.出库:           //根据出库类型检索
                    if (this.hsPrivOutC3.ContainsKey(keys))
                    {
                        typeItemID = this.hsPrivOutC3[keys].ToString();
                    }
                    break;

                case Neusoft.HISFC.Models.Base.EnumMSCustomType.科室:           //科室 根据入出库科室选择
                    if (trans == TransTypes.Positive)                         //正交易 取入库科室
                    {
                        if (this.hsPrivInDept.ContainsKey(keys))
                        {
                            typeItemID = this.hsPrivInDept[keys].ToString();
                        }
                    }
                    else                                                        //反交易 取出库科室
                    {
                        if (this.hsPrivOutDept.ContainsKey(keys))
                        {
                            typeItemID = this.hsPrivOutDept[keys].ToString();
                        }
                    }
                    break;

                case Neusoft.HISFC.Models.Base.EnumMSCustomType.调价:
                    typeItemID = keys == this.strAdjustCollection[0] ? "00" : "01";
                    break;

                case Neusoft.HISFC.Models.Base.EnumMSCustomType.盘点:           //根据盘点盈亏
                    typeItemID = keys == this.strCheckCollection[0] ? "00" : "01";
                    break;

                case EnumMSCustomType.门诊患者领药:
                    typeItemID = "M1";
                    break;

                case EnumMSCustomType.门诊患者退药:
                    typeItemID = "M2";
                    break;

                case EnumMSCustomType.住院患者领药:
                    typeItemID = "Z1";
                    break;

                case EnumMSCustomType.住院患者退药:
                    typeItemID = "Z2";
                    break;

                case EnumMSCustomType.小计:
                    typeItemID = "SUB";
                    break;
                }

                this.neuSpread1_Sheet1.Cells[e.Row, 4].Text = typeItemID;

                #endregion
            }
            if (e.Column == 6)      //收支标记
            {
                this.SetTypeItem(e.Row);
            }
        }