Exemplo n.º 1
0
        public virtual void calculate(string instCode, DateTime refDate)
        {
            this.inst_xmlDoc_ = XMLFileLoader.LoadInstrument(instCode);
            this.para_xmlDoc_ = XMLFileLoader.LoadParameter(instCode, refDate);

            this.calculateSavedXml(refDate);
        }
Exemplo n.º 2
0
        public void enqueue_intrument(string itemCode)
        {
            // itemCode 를 master에서 찾아서 만들어서 넣음

            try
            {
                Excel_instrumentViewModel e_ivm = MasterInformationViewModel.loadInstrumentVM(itemCode);

                // inst xml
                e_ivm.loadInterfaceVMFromXml(XMLFileLoader.LoadInstrument(itemCode));

                // para xml
                e_ivm.loadParameterFromXml(XMLFileLoader.LoadParameter(itemCode, this.calculationDate_));

                BatchItemViewModel bvm = new BatchItemViewModel(e_ivm);

                this.BatchItemViewModelQueueList_.Add(bvm);
            }
            catch (Exception e)
            {
                throw e;
            }

            //
        }
Exemplo n.º 3
0
        public void loadInterfaceVMFromXml(XmlDocument xmlDoc = null)
        {
            //this.excel_interfaceViewModel_.loadInterfaceFromXml();

            try
            {
            }
            catch (Exception)
            {
                OutputLogViewModel.addResult(masterInformationViewModel_.Item_name_ + " : Xml invalid!");
            }

            //XmlDocument xmlDoc = XMLFileLoader.LoadInstrument(this.masterInformationViewModel_.Item_code_);
            if (xmlDoc == null)
            {
                this.inst_xmlDoc_ = XMLFileLoader.LoadInstrument(this.masterInformationViewModel_.Item_code_);
            }
            else
            {
                this.inst_xmlDoc_ = xmlDoc;
            }

            try
            {
                FpmlSerializedCSharp.Instrument_Menual xml_instrument
                    = new FpmlSerializedCSharp.Instrument_Menual(inst_xmlDoc_.SelectSingleNode("instrument"));

                //XmlNode interfaceNode = inst_xmlDoc_.SelectSingleNode("instrument/excel_interface");

                //FpmlSerializedCSharp.Excel_interface excel_interface
                //    = new FpmlSerializedCSharp.Excel_interface(interfaceNode);

                if (xml_instrument.Excel_interface_ != null)
                {
                    FpmlSerializedCSharp.Excel_interface excel_interface = xml_instrument.Excel_interface_;
                    this.excel_interfaceViewModel_.setFromSerial(excel_interface);
                }
                else if (xml_instrument.Excel_swapInterface_ != null)
                {
                    FpmlSerializedCSharp.Excel_swapInterface excel_swapInterface = xml_instrument.Excel_swapInterface_;
                    this.excel_interfaceViewModel_.setFromSerial(excel_swapInterface);
                }
                else
                {
                    throw new Exception("interfaceXml is null");
                }

                // 여기서 로드해야할거 같은데...
                // settle event , termination event
                // settle 된거 라던지...
                // 임의로 call 할거 라던지..
                //

                //Event

                //FpmlSerializedCSharp.Excel_interface excel_interface
                //= new FpmlSerializedCSharp.Excel_interface(interfaceNode);

                //this.excel_interfaceViewModel_.setFromSerial(excel_interface);
            }
            catch (Exception e)
            {
                OutputLogViewModel.addResult("interface load error : " + e.Message);

                throw new Exception("interface load error" + " : " + e.Message);
                //OutputLogViewModel.addResult(masterInformationViewModel_.Item_name_ + " : Xml invalid!");
            }

            //this.setFromXml(instNode);
        }