// 이건 그냥 partition 말고 전체 list로 하자. join 이 있어서리 linq로 못감.
        // 최근일자가 가져와짐.
        public void totalHedgeGreekPositionLoad()
        {
            this.LoadedHedgeGreekPositionVMList_.Clear();

            clsHITM_FP_GREEKRESULT_TB clstb_greekResult = new clsHITM_FP_GREEKRESULT_TB();

            // 최근일 check 
            // 결과가 있으면... 그날 가져옴... 없으면 전일자
            // 보통 예전 일이면 그냥 그날꺼 가져옴

            // 이놈은 생성을 언제 하냐면.... 다음날이 대면 그냥 생성해놓음.
            clsHDAT_BATCHJOB_RESULT_TB clstb_batchjob = new clsHDAT_BATCHJOB_RESULT_TB();
            
            string refDateStr = this.ReferenceDate_.ToString("yyyyMMdd");

            clstb_batchjob.BATCH_JOB_ID = (int)clsHDAT_BATCHJOB_RESULT_TB.BATCH_JOB_ID_Type.FP_CACULATION;
            clstb_batchjob.CALC_DT = refDateStr;

            clstb_batchjob.SelectOwn();

            clstb_greekResult.CALC_DT = clstb_batchjob.MaxCalcDateSelect();

            DataTable dt_greekResult = clstb_greekResult.Select();

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

            //if (clstb_batchjob.STATUS == (int)clsHDAT_BATCHJOB_RESULT_TB.STATUS_Type.CALCULATED)
            //{
            //    clstb_greekResult.CALC_DT = clstb_batchjob.CALC_DT;

            //    DataTable dt_greekResult = clstb_greekResult.Select();

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

            //}
            //else
            //{
            //    // 최근일
            //    refDateStr = clstb_batchjob.MaxCalcDateSelect();

            //    clstb_greekResult.CALC_DT = clstb_batchjob;

            //    DataTable dt_greekResult = clstb_greekResult.Select();

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

        }
        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;
        }