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"; }
// insert는 아니고 저장되어있는 book load임. public static IBook CreateBook(string book_cd) { IBook book = new IBook(book_cd); book.thisBookLoad(); book.childBookLoad(); return book; }
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); }
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); }
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); }
public void moveBookToThisChild(IBook book) { book.changeParent(this.bookCode_); this.ChildBookList_.Add(book); }
public void changeBook(IBook targetBook , ObservableCollection<clsMAST_FP_INSTRUMENT_TB> instrument_list) { // 이동함. foreach (var clstb_inst in instrument_list) { targetBook.moveInstrumentToThis(clstb_inst); } }
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; }
//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; }
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; }
// 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"; }
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"; }
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; }
// 여기서는 그냥 배치 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(); }
// 북을 아예 날림. 가지고 있는 포지션은 그냥 놔둠. ( 나중에 살릴수도 있으니.. ) public void removeThisBook(IBook book) { clsMAST_BOOKINFO_TB tb = new clsMAST_BOOKINFO_TB(); tb.BOOK_CD = this.bookCode_; tb.DeleteBookCD(); }
public void removeBookOnList(IBook book) { bool removed = this.ChildBookList_.Remove(book); if (removed) { return; } else { foreach (IBook roopBook in this.ChildBookList_) { roopBook.removeBookOnList(book); } } }
public BookPropertyViewModel(IBook book) { this.Book_ = book; }
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; }
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"; }