示例#1
0
        private void _fpMasterResultLoad(IBook book)
        {
            ObservableCollection<FP_MasterResultDataViewModel> loaded = this.ViewModel_.fpMasterResultLoad(book);
            this.fpMasterListDataGrid_.ItemsSource = loaded;

            this.statusLabel_.Content
                = DateTime.Now + " - " + loaded.Count + " master result is loaded";
        }
示例#2
0
文件: IBook.cs 项目: minikie/test
        // insert는 아니고 저장되어있는 book load임.
        public static IBook CreateBook(string book_cd)
        {
            IBook book = new IBook(book_cd);

            book.thisBookLoad();
            book.childBookLoad();

            return book;
        }
示例#3
0
        public void bookTreeListLoad()
        {
            this.BookList_.Clear();

            IBook.GetAllBooks(this.BookList_);

            // book 에 속하지 않은 것들
            IBook book = new IBook("NOGREEK");
            book.DAO_ = new clsMAST_BOOKINFO_TB();
            book.DAO_.BOOK_NM = "No Greek";

            this.BookList_.Add(book);

        }
示例#4
0
        public void bookTreeListLoad()
        {
            this.BookList_.Clear();

            IBook.GetAllBooks(this.BookList_);

            // book 에 속하지 않은 것들

            IBook book = new IBook("NOTCALCULATED");
            book.DAO_ = new clsMAST_BOOKINFO_TB();
            book.DAO_.BOOK_NM = "Not Calculated";

            this.BookList_.Add(book);

        }
示例#5
0
        public void bookTreeListLoad()
        {
            this.BookList_.Clear();

            IBook.GetAllBooks(this.BookList_);

            // book 에 속하지 않은 것들

            IBook book = new IBook("NOTBOOKED");
            book.DAO_ = new clsMAST_BOOKINFO_TB();
            book.DAO_.BOOK_NM = "Not Booked";

            this.BookList_.Add(book);

            //clsMAST_BOOKINFO_TB clstb = new clsMAST_BOOKINFO_TB();

            //clstb.PARENT_BOOK_CD = "ANCESTOR";
            //clstb.SelectOwn();

            //string rootbookcd = clstb.BOOK_CD;

            //if (rootbookcd != null)
            //{
            //    this.BookList_.Add(IBook.CreateBook(rootbookcd));
            //}
            //else
            //{
            //    clstb.BOOK_CD = "ROOTBOOK";
            //    clstb.BOOK_NM = "NewRootBook";
            //    clstb.PARENT_BOOK_CD = "ANCESTOR";
            //    clstb.OPEN_DT = DateTime.Now.ToString("yyyyMMdd");
            //    clstb.CLOSE_DT = "20991231";

            //    clstb.Insert();

            //    this.BookList_.Add(IBook.CreateBook("ROOTBOOK"));
            //}

            //// book 에 속하지 않은 것들

            //IBook book = new IBook("NOTBOOKED");
            //book.DAO_ = new clsMAST_BOOKINFO_TB();
            //book.DAO_.BOOK_NM = "Not Booked";

            //this.BookList_.Add(book);

        }
示例#6
0
文件: IBook.cs 项目: minikie/test
        public void moveBookToThisChild(IBook book)
        {
            book.changeParent(this.bookCode_);

            this.ChildBookList_.Add(book);
        }
示例#7
0
        public void changeBook(IBook targetBook , ObservableCollection<clsMAST_FP_INSTRUMENT_TB> instrument_list)
        { 
            // 이동함. 
            foreach (var clstb_inst in instrument_list)
            {
                targetBook.moveInstrumentToThis(clstb_inst);

            }

        }
示例#8
0
        public ObservableCollection<clsMAST_FP_INSTRUMENT_TB> fpMasterLoad(IBook book)
        {
            if (book.BookCode_ == "NOTBOOKED")
                return this.NotBookedFPMasterDAOList_;

            ObservableCollection<clsMAST_FP_INSTRUMENT_TB> selected = new ObservableCollection<clsMAST_FP_INSTRUMENT_TB>();

            List<string> listStr = new List<string>();

            book.getAllSubBookCode(listStr);
            int refDateInt32 = Convert.ToInt32(this.ReferenceDate_.ToString("yyyyMMdd"));

            var values = (from fpmaster in this.LoadedFPMasterDAOList_
                          where listStr.Contains(fpmaster.BOOK_CD) &&
                          Convert.ToInt32(fpmaster.BOOKED_DT) <= refDateInt32
                     select fpmaster);

            foreach (clsMAST_FP_INSTRUMENT_TB item in values)
            {
                selected.Add(item);
            }

            return selected;
        }
示例#9
0
        //public ObservableCollection<clsHITM_FP_POSITION_TB> positionLoad(string book_cd)
        public ObservableCollection<clsHITM_FP_POSITION_TB> positionLoad(IBook book)
        {
            if (book.BookCode_ == "NOTBOOKED")
                return this.NotBookedPositionDAOList_;

            ObservableCollection<clsHITM_FP_POSITION_TB> selected = new ObservableCollection<clsHITM_FP_POSITION_TB>();
            
            List<string> listStr = new List<string>();

            book.getAllSubBookCode(listStr);

            var values = (from position in this.LoadedPositionDAOList_
                     where listStr.Contains(position.BOOK_CD)
                     select position );

            foreach (clsHITM_FP_POSITION_TB item in values)
	        {
                selected.Add(item);
	        }

            return selected;

        }
示例#10
0
        public ObservableCollection<HedgeGreekPositionViewModel> hedgeGreekPositionLoad(IBook book) 
        {
            ObservableCollection<HedgeGreekPositionViewModel> selected = new ObservableCollection<HedgeGreekPositionViewModel>();

            clsHITM_FP_GREEKRESULT_TB clstb = new clsHITM_FP_GREEKRESULT_TB();

            clstb.CALC_DT = this.ReferenceDate_.ToString("yyyyMMdd");

            List<string> listStr = new List<string>();

            book.getAllSubBookCode(listStr);

            //string bookcd = book.BookCode_;

            DataTable dt_greekResult = clstb.SelectUnderlyingPartition(listStr);

            foreach (DataRow dr in dt_greekResult.Select())
            {
                HedgeGreekPositionViewModel vm = new HedgeGreekPositionViewModel();
                vm.DAO_ = clsHITM_FP_GREEKRESULT_TB.Create(dr);
                selected.Add(vm);
            }



            return selected;
        }
示例#11
0
        // book 이 load된 상태에서 ㄱㄱ
        public void _positionLoad(IBook book)
        {
            ObservableCollection<clsHITM_FP_POSITION_TB> loaded = this.ViewModel_.positionLoad(book);

            this.positionListDataGrid_.ItemsSource = loaded;

            this.statusLabel_.Content = DateTime.Now + " - " + loaded.Count + " position is loaded";
        }
示例#12
0
        private void _fpMasterLoad(IBook book)
        {
            ObservableCollection<clsMAST_FP_INSTRUMENT_TB> loaded = this.ViewModel_.fpMasterLoad(book);
            this.fpMasterListDataGrid_.ItemsSource = loaded;

            this.statusLabel_.Content 
                = DateTime.Now + " - " + loaded.Count + " master is loaded";
        }
示例#13
0
        public ObservableCollection<FP_MasterResultDataViewModel> fpMasterResultLoad(IBook book)
        {
            if (book.BookCode_ == "NOTBOOKED")
                return this.NotCalculatedFPMasterResultVMList_;

            ObservableCollection<FP_MasterResultDataViewModel> selected = new ObservableCollection<FP_MasterResultDataViewModel>();

            List<string> listStr = new List<string>();

            book.getAllSubBookCode(listStr);

            var values = (from fpmasterResultVM in this.LoadedFPMasterResultVMList_
                          where listStr.Contains(fpmasterResultVM.MastDAO_.BOOK_CD)
                          select fpmasterResultVM);

            foreach (FP_MasterResultDataViewModel item in values)
            {
                selected.Add(item);
            }

            return selected;
        }
示例#14
0
        // 여기서는 그냥 배치 calculationManager 에서 하면 대나..
        public void calculate(IBook selectedBook)
        {
            CalculationManager calcM = new CalculationManager();
            calcM.ReferenceDate_ = this.ReferenceDate_;

            // book 에 있는 거 리스트
            // 어케 해야함..?
            // index futures 의 경우에 마켓 데이터를 업어치고 평가 가격을 덮으면 댐.
            // Financial_instrumentPricerManager f_instPriceManager = new Financial_instrumentPricerManager();
            // ExcelExport ee = new ExcelExport();

            string bookCD = selectedBook.BookCode_;

            var selectedFi = (from fi in this.LoadedFPMasterResultVMList_
                              where fi.BOOK_CD == bookCD
                              select fi);

            foreach (var fi in selectedFi)
            {
                calcM.calculation(fi.Financial_instrument_);
            }
            //{
            //    try
            //    {
            //    }
            //    catch (Exception e)
            //    {
            //        //sb.AppendLine(e.Message);
            //        ee.writeException(e);
            //    }

            //}

            //ee.export();


        }
示例#15
0
文件: IBook.cs 项目: minikie/test
        // 북을 아예 날림. 가지고 있는 포지션은 그냥 놔둠. ( 나중에 살릴수도 있으니.. )
        public void removeThisBook(IBook book)
        {
            clsMAST_BOOKINFO_TB tb = new clsMAST_BOOKINFO_TB();

            tb.BOOK_CD = this.bookCode_;

            tb.DeleteBookCD();
        }
示例#16
0
文件: IBook.cs 项目: minikie/test
        public void removeBookOnList(IBook book)
        {
            bool removed = this.ChildBookList_.Remove(book);

            if (removed)
            {
                return;
            }
            else 
            {
                foreach (IBook roopBook in this.ChildBookList_)
                {
                    roopBook.removeBookOnList(book);
                }
            }
        }
示例#17
0
 public BookPropertyViewModel(IBook book)
 {
     this.Book_ = book;
 }
示例#18
0
文件: IBook.cs 项目: minikie/test
        public IBook addChildBook(string book_cd,DateTime bookOpenDate,DateTime bookCloseDate)
        { 
            IBook book = new IBook(book_cd);

            this.ChildBookList_.Add(book);

            clsMAST_BOOKINFO_TB tb = new clsMAST_BOOKINFO_TB();

            tb.BOOK_CD = book_cd;
            tb.BOOK_NM = "NewBook";
            tb.PARENT_BOOK_CD = this.bookCode_;
            tb.OPEN_DT = bookOpenDate.ToString("yyyyMMdd");
            tb.CLOSE_DT = bookCloseDate.ToString("yyyyMMdd");
            tb.DESCRIPTION = "NewBook";

            tb.Insert();

            book.DAO_ = tb;

            // Default KRW Cash 넣어놈.
            CurrencyCash.CurrencyCashBooking("KRW",book_cd, bookOpenDate);

            return book;
        }
示例#19
0
 private void _hedgeGreekPositionLoad(IBook book)
 {
     ObservableCollection<HedgeGreekPositionViewModel> loaded = this.ViewModel_.hedgeGreekPositionLoad(book);
     this.hedgeGreekPositionListDataGrid_.ItemsSource = loaded;
     
     this.statusLabel_.Content
         = DateTime.Now + " - " + loaded.Count + " master is loaded";
 }