Exemplo n.º 1
0
        private void loadBookInfo()
        {
            this.batchInstVMWrapperList_ = new ObservableCollection <BatchInstrumentVMWrapper>();

            FpmlSerializedCSharp.BookInformation serial_bookInfo = new FpmlSerializedCSharp.BookInformation(this.bookInfoVM_.BookInfoXml_);

            this.PathURLInfo_ = this.bookInfoVM_.PathURLInfo_;

            //serial_bookInfo.PathInfo_.Url_.ValueStr;

            DirectoryInfo directoryInfo = new DirectoryInfo(this.PathURLInfo_);

            foreach (var item in serial_bookInfo.InstrumentList_.InstHirachyInfo_)
            {
                string itemCode = item.Code_.ValueStr;
                string itemType = item.Type_.ValueStr;

                InstUriInfo instUri = bookInfoVM_.InstUri(item);
                //ResultUriInfo resultUri = bookInfoVM_.resultUri(item);

                FileInfo fileInfo = new FileInfo(directoryInfo.FullName + itemCode + "_" + itemType + ".xml");

                InstrumentBaseViewModel instBaseVM = InstrumentBaseViewModel.CreateInstBaseVM(instUri);

                //ExploreHirachyInstrumentVMWrapper hirachyInstVMWrapper
                //    = new ExploreHirachyInstrumentVMWrapper(itemCode, itemType, instBaseVM);

                BatchInstrumentVMWrapper batchInstVMWrapper = new BatchInstrumentVMWrapper(instBaseVM);

                batchInstVMWrapper.setFromSerial(item);

                this.batchInstVMWrapperList_.Add(batchInstVMWrapper);
            }
        }
Exemplo n.º 2
0
        public void loadDBPosition(string position)
        {
            this.instPositionWrapperVMList_ = new ObservableCollection <InstPositionWrapperVM>();

            RiskMonitor.PositionSingletonManger.setReferenceDate(this.ReferenceDate_);

            //db 만들어서 관리 해야함?  ㅇㅇ 그래야함 ㅡ.ㅡㅋ
            instPositionWrapperVMList_.Clear();

            DataBaseManager loader = new DataBaseManager();

            loader.PositionHostInfo_ = new PositionHostInfo(position);

            List <InstPositionInfo> instDataList = loader.loadPositionData();

            foreach (InstPositionInfo item in instDataList)
            {
                InstUriInfo instUri = PositionSingletonManger.CreateInstUriInfo(item.InstCode_, item.InstType_);
                //ResultUriInfo resultUri = CreateResultUriInfo(item.InstCode_, item.InstType_);
                //InstrumentBaseViewModel instBaseVM = InstrumentBaseViewModel.CreateInstBaseVM(instUri, resultUri);
                InstrumentBaseViewModel instBaseVM = InstrumentBaseViewModel.CreateInstBaseVM(instUri);
                instBaseVM.ReferenceDate_ = PositionSingletonManger.referenceDate();

                InstPositionWrapperVM viewModel = new InstPositionWrapperVM(item, instBaseVM);
                instPositionWrapperVMList_.Add(viewModel);
            }
        }
Exemplo n.º 3
0
        private void hirachyLoop(FpmlSerializedCSharp.InstHirachyInfo serial_Hirachy,
                                 HirachyInstrumentVM roop_ExploreHirachyInstWrapper)
        {
            foreach (var item in serial_Hirachy.InstHirachyInfo_)
            {
                string itemCode = item.Code_.ValueStr;
                string itemType = item.Type_.ValueStr;

                InstUriInfo instUri = bookInfoVM_.InstUri(item);
                //ResultUriInfo resultUri = bookInfoVM_.resultUri(item);

                //FileInfo fileInfo = new FileInfo(itemCode + "_" + itemType + ".xml");

                InstrumentBaseViewModel instBaseVM = InstrumentBaseViewModel.CreateInstBaseVM(instUri);

                //ExploreHirachyInstrumentVMWrapper hirachyInstVMWrapper
                //    = new ExploreHirachyInstrumentVMWrapper(itemCode, itemType, instBaseVM);

                //ExploreHirachyVMWrapper hirachyInstVMWrapper = ExploreHirachyVMWrapper.CreateExploreHirachyWrapper(instUri, resultUri, instBaseVM);
                ExploreHirachyVMWrapper hirachyInstVMWrapper = ExploreHirachyVMWrapper.CreateExploreHirachyWrapper(instBaseVM);

                this.hirachyLoop(item, hirachyInstVMWrapper);

                roop_ExploreHirachyInstWrapper.addHirachInstrumentVM(hirachyInstVMWrapper);
            }
        }
Exemplo n.º 4
0
        public void loadBookInfo()
        {
            //FileInfo file = bookInfoVM_.BookFile_;

            //XmlDocument xmlDoc = new XmlDocument();
            //xmlDoc.Load(file.FullName);

            XmlNode node = this.bookInfoVM_.BookInfoXml_;

            XmlNode bookInfoNode = node.SelectSingleNode("/bookInformation");

            FpmlSerializedCSharp.BookInformation serial_bookInfo = new FpmlSerializedCSharp.BookInformation(bookInfoNode);

            this.instHierarchyList_ = new ObservableCollection <ExploreHirachyVMWrapper>();

            //this.PathURLInfo_ = this.bookInfoVM_.PathURLInfo_;

            //DirectoryInfo directoryInfo = new DirectoryInfo(this.PathURLInfo_);

            foreach (var item in serial_bookInfo.InstrumentList_.InstHirachyInfo_)
            {
                //FileInfo fileInfo = new FileInfo(directoryInfo.FullName + itemCode + "_" + itemType + ".xml");

                InstUriInfo instUri = this.bookInfoVM_.InstUri(item);
                //ResultUriInfo resultUri = this.bookInfoVM_.resultUri(item);

                InstrumentBaseViewModel instBaseVM = InstrumentBaseViewModel.CreateInstBaseVM(instUri);

                //ExploreHirachyInstrumentVMWrapper hirachyInstVMWrapper
                //    = new ExploreHirachyInstrumentVMWrapper(itemCode, itemType, instBaseVM);

                //ExploreHirachyVMWrapper hirachyInstVMWrapper = ExploreHirachyVMWrapper.CreateExploreHirachyWrapper(instUri, resultUri, instBaseVM);
                ExploreHirachyVMWrapper hirachyInstVMWrapper = ExploreHirachyVMWrapper.CreateExploreHirachyWrapper(instBaseVM);

                hirachyInstVMWrapper.setFromSerial(item);

                this.hirachyLoop(item, hirachyInstVMWrapper);

                this.instHierarchyList_.Add(hirachyInstVMWrapper);
            }
        }
        public void loadDBResult(string referenceDate)
        {
            this.instResultMasterWrapperVMList = new ObservableCollection <InstResultMasterWrapperVM>();

            string positionName = PositionSingletonManger.positionName();

            this.Loader_ = new ResultMasterLoader();
            this.Loader_.PositionHostInfo_ = new PositionHostInfo(positionName);

            List <ResultMasterInfo> resultMasterInfoList = this.Loader_.loadResultData();



            foreach (ResultMasterInfo item in resultMasterInfoList)
            {
                InstUriInfo             instUri    = PositionSingletonManger.CreateInstUriInfo(item.InstCode_, item.InstType_);
                InstrumentBaseViewModel instBaseVM = InstrumentBaseViewModel.CreateInstBaseVM(instUri);

                InstResultMasterWrapperVM viewModel = new InstResultMasterWrapperVM(instBaseVM, item);
                this.instResultMasterWrapperVMList.Add(viewModel);
            }
        }