Example #1
0
        public EWData GetData(List <InputParitem> _items, int _index, string _strtype, double _doua, InputType _Itype)
        {
            EWData temp = new EWData();

            try
            {
                double tempDvalue = 0;
                temp.gname = _items[_index].ipname;

                switch (_strtype)
                {
                case "1":
                    temp = DataManager1(_items, _index, _doua, temp, tempDvalue, _Itype);
                    break;

                case "2":
                    temp = DataManager2(_items, _index, _doua, temp, tempDvalue, _Itype);
                    break;

                case "3":
                    temp = DataManager3(_items, _index, _doua, temp, tempDvalue, _Itype);
                    break;

                default:
                    break;
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(temp);
        }
Example #2
0
        /// <summary>
        /// 类型3处理
        /// </summary>
        /// <param name="_items"></param>
        /// <param name="_index"></param>
        /// <param name="_doua"></param>
        /// <param name="temp"></param>
        /// <param name="tempDvalue"></param>
        /// <returns></returns>
        private EWData DataManager3(List <InputParitem> _items, int _index, double _doua, EWData temp, double tempDvalue, InputType _Itype)
        {
            if (_index == 0)
            {
                tempDvalue = _items[1].ipvalue;
            }
            else
            {
                tempDvalue = _items[0].ipvalue;
            }
            List <EWMOUT> outputlist = new List <EWMOUT>();
            EWMITEM       inputItem  = null;

            IcustWhatIfDAManager DA = null;

            switch (_Itype)
            {
            case InputType.DA402:
                DA = new EcustWhatIfDA402();
                break;

            case InputType.DA452:
                DA = new EcustWhatIfDA452();
                break;

            default:
                DA = new EcustWhatIfDA452();
                break;
            }
            for (var i = 0; i < _items[_index].ipitems.Count; i++)
            {
                inputItem         = new EWMITEM();
                inputItem.FIC2503 = _doua;
                if (_items[_index].ipname == "FIC2409")
                {
                    inputItem.FIC2409 = _items[_index].ipitems[i];
                    inputItem.FIC2414 = tempDvalue;
                }
                else
                {
                    inputItem.FIC2409 = tempDvalue;
                    inputItem.FIC2414 = _items[_index].ipitems[i];
                }
                outputlist.Add(DA.EWManager(inputItem));
            }
            temp.gdata = EWResultConvert(outputlist);
            return(temp);
        }