예제 #1
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;
        }
예제 #2
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);
            }
        }