public virtual void build_emptyResult(DateTime refDate) { clsHITM_FP_GREEKRESULT_TB clstb = new clsHITM_FP_GREEKRESULT_TB(); string refDateStr = refDate.ToString("yyyyMMdd"); List<string> underlyingList = new List<string>(); this.underlyingList(underlyingList); clstb.FP_GREEKRESULT_ID = IDGenerator.getNewGreekResultID(this.baseDAO_.INSTRUMENT_ID, refDateStr); clstb.CALC_DT = refDateStr; clstb.INSTRUMENT_ID = this.baseDAO_.INSTRUMENT_ID; clstb.INSTRUMENT_TYP = this.baseDAO_.FP_MASTER_TYP; int i = 1; foreach (string under in underlyingList) { clstb.UNDERLYING_ID = under; clstb.UNDERLYING_VALUE = 0.0; clstb.SEQ = i; clstb.DELTA = 0.0; clstb.GAMMA = 0.0; clstb.VEGA = 0.0; clstb.CALC_PRICE = 0.0; clstb.CALCULATED_FLAG = 0; clstb.CALCULATED_TIME = ""; clstb.CALCULATE_TYP = 0; clstb.Insert(); i += 1; } // SCENARIO 팀장 미친 개새끼 clsSET_SCENARIO_TB cls_scenario = new clsSET_SCENARIO_TB(); cls_scenario.FP_MASTER_TYP = this.baseDAO_.FP_MASTER_TYP; DataTable dt = cls_scenario.Select(); foreach (DataRow dr in dt.Select()) { clstb.UNDERLYING_ID = clsSET_SCENARIO_TB.Create(dr).SCENARIO_CD; clstb.SEQ = i; clstb.Insert(); i += 1; } // 지워 clsHITM_FP_CASHFLOWRESULT_TB clstb_cf = new clsHITM_FP_CASHFLOWRESULT_TB(); clstb_cf.CALC_DT = refDate.ToString("yyyyMMdd"); clstb_cf.INSTRUMENT_ID = this.baseDAO_.INSTRUMENT_ID; clstb_cf.DeleteInstDateCashFlow(); }
public override void delete_result(string calcDateStr,string instID) { // greekresult clsHITM_FP_GREEKRESULT_TB clstb_greekresult = new clsHITM_FP_GREEKRESULT_TB(); clstb_greekresult.CALC_DT = calcDateStr; clstb_greekresult.DeleteDate(instID); // cashflowresult clsHITM_FP_CASHFLOWRESULT_TB clstb_cashflow = new clsHITM_FP_CASHFLOWRESULT_TB(); clstb_cashflow.CALC_DT = calcDateStr; clstb_cashflow.INSTRUMENT_ID = instID; clstb_cashflow.DeleteInstDateCashFlow(); }