Esempio n. 1
0
        public void loadInstrument()
        {
            this.Financial_instrumentList_.Clear();

            clsMAST_SWAP_TB swap_tb = new clsMAST_SWAP_TB();
            DataTable dt = swap_tb.Select();

            foreach (DataRow dr in dt.Select())
            {
                VanillaIRS_instrument v_irs_inst = new VanillaIRS_instrument();
                v_irs_inst.SwapDAO_ = clsMAST_SWAP_TB.Create(dr);
                v_irs_inst.loadCashflow();

                this.Financial_instrumentList_.Add(v_irs_inst);
            }
        }
Esempio n. 2
0
		public clsMAST_SWAP_TB Clone()
		{
			try
			{
				clsMAST_SWAP_TB cloneTB = new clsMAST_SWAP_TB();
				
				
				cloneTB._INSTRUMENT_ID = this._INSTRUMENT_ID;
				cloneTB._INSTRUMENT_TYP = this._INSTRUMENT_TYP;
				cloneTB._NOTIONAL_PAY = this._NOTIONAL_PAY;
				cloneTB._PAY_CURR = this._PAY_CURR;
				cloneTB._NOTIONAL_REC = this._NOTIONAL_REC;
				cloneTB._REC_CURR = this._REC_CURR;
				cloneTB._EFFECTIVE_DT = this._EFFECTIVE_DT;
				cloneTB._MATURITY_DT = this._MATURITY_DT;
				cloneTB._PAY_LEG_TYP = this._PAY_LEG_TYP;
				cloneTB._PAY_LEG_TENOR = this._PAY_LEG_TENOR;
				cloneTB._PAY_LEG_BDC = this._PAY_LEG_BDC;
				cloneTB._PAY_LEG_DC = this._PAY_LEG_DC;
				cloneTB._REC_LEG_TYP = this._REC_LEG_TYP;
				cloneTB._REC_LEG_TENOR = this._REC_LEG_TENOR;
				cloneTB._REC_LEG_BDC = this._REC_LEG_BDC;
				cloneTB._REC_LEG_DC = this._REC_LEG_DC; 
				
				return cloneTB;
			}
			catch(Exception ex)
			{
				throw new Exception(ex.Message);
			}
		}
Esempio n. 3
0
		public static clsMAST_SWAP_TB Create(DataRow dr)
		{
			try
			{
				clsMAST_SWAP_TB tb = new clsMAST_SWAP_TB();
				
				
				tb._INSTRUMENT_ID = Convert.ToString(dr[0]);
				tb._INSTRUMENT_TYP = Convert.ToInt32(dr[1]);
				tb._NOTIONAL_PAY = Convert.ToDouble(dr[2]);
				tb._PAY_CURR = Convert.ToString(dr[3]);
				tb._NOTIONAL_REC = Convert.ToDouble(dr[4]);
				tb._REC_CURR = Convert.ToString(dr[5]);
				tb._EFFECTIVE_DT = Convert.ToString(dr[6]);
				tb._MATURITY_DT = Convert.ToString(dr[7]);
				tb._PAY_LEG_TYP = Convert.ToInt32(dr[8]);
				tb._PAY_LEG_TENOR = Convert.ToString(dr[9]);
				tb._PAY_LEG_BDC = Convert.ToInt32(dr[10]);
				tb._PAY_LEG_DC = Convert.ToInt32(dr[11]);
				tb._REC_LEG_TYP = Convert.ToInt32(dr[12]);
				tb._REC_LEG_TENOR = Convert.ToString(dr[13]);
				tb._REC_LEG_BDC = Convert.ToInt32(dr[14]);
				tb._REC_LEG_DC = Convert.ToInt32(dr[15]); 
				
				return tb;
			}
			catch(Exception ex)
			{
				throw new Exception(ex.Message);
			}
		}