Exemplo n.º 1
0
        public void bookingEvent(MasterInformationViewModel masterInformationViewModel)
        {
            EVENT_INFO_Table_DAO dao = new EVENT_INFO_Table_DAO();

            dao.EVENT_DATE_        = this.eventDate_;
            dao.EVENT_TYPE_        = "Termination";
            dao.EVENT_SUBTYPE_     = this.detailTerminationType_;
            dao.EVENT_DESCRIPTION_ = this.description_;
            dao.EVENT_NAME_        = "Early Redemption";
            dao.CURRENCY_          = "";

            generalTerminationEventDetailViewModel_.bookingDetailEvent(masterInformationViewModel, dao);

            //dao.EVENT_AMOUNT_ = generalTerminationEventDetailViewModel_.InitialFixingAmount_;
            //dao.FIXING_UNDERLYINGS_ = generalTerminationEventDetailViewModel_.FixingUnderlying_;
            //dao.FIXING_FLAG_ = generalTerminationEventDetailViewModel_.InitialFixingFlag_;
            //dao.OBSERVATION_END_DATE_ = generalTerminationEventDetailViewModel_.ObservationEndDate_;

            dao.ITEM_CODE_       = masterInformationViewModel.Item_code_;
            dao.ITEM_TYPE_       = masterInformationViewModel.Booking_type_;
            dao.ITEM_NAME_       = masterInformationViewModel.Item_name_;
            dao.REMAIN_NOTIONAL_ = masterInformationViewModel.Remain_notional_;

            dao.insert(DataBaseConnectManager.ConnectionFactory("myDB"));
        }
        public override void bookingEvent(MasterInformationViewModel masterInformationViewModel)
        {
            // 상품이 모두 만들어진 후에 event를 gen 해서 박아넣음

            foreach (var item in this.excel_hifive_StepDownKI_ViewModel_.SubScheduleDataList_)
            {
                EVENT_INFO_Table_DAO dao = new EVENT_INFO_Table_DAO();

                dao.EVENT_DATE_        = item.EventDate_.ToString(DataBaseStringFormat.DateFormat_);
                dao.EVENT_TYPE_        = "settlement";
                dao.EVENT_SUBTYPE_     = "earlyRedemption";
                dao.EVENT_DESCRIPTION_ = "coupon : " + item.Coupon_ + " trigger : " + item.Trigger_;
                dao.EVENT_NAME_        = "중도상환";
                dao.CURRENCY_          = "KRW";

                double amt = Convert.ToDouble(this.excel_issueInfoViewModel_.Notional_) + Convert.ToDouble(this.excel_issueInfoViewModel_.Notional_) * Convert.ToDouble(item.Coupon_) / 100;

                dao.EVENT_AMOUNT_       = amt.ToString();
                dao.FIXING_UNDERLYINGS_ = this.excel_underlyingCalcInfoViewModel_.underlyingString();
                dao.FIXING_FLAG_        = "false";
                //dao.OBSERVATION_END_DATE_ = dao.EVENT_DATE_;

                dao.ITEM_CODE_       = masterInformationViewModel.Item_code_;
                dao.ITEM_TYPE_       = masterInformationViewModel.Booking_type_;
                dao.ITEM_NAME_       = masterInformationViewModel.Item_name_;
                dao.REMAIN_NOTIONAL_ = masterInformationViewModel.Remain_notional_;

                dao.insert(DataBaseConnectManager.ConnectionFactory("myDB"));
            }
        }
Exemplo n.º 3
0
        public void buildDAO()
        {
            // bussiness logic here
            EVENT_INFO_Table_DAO insertDao = new EVENT_INFO_Table_DAO();

            insertDao.EVENT_CODE_         = this.Event_code_;
            insertDao.EVENT_DATE_         = this.Event_date_.ToString("yyyyMMdd");
            insertDao.EVENT_TYPE_         = this.Event_type_;
            insertDao.EVENT_SUBTYPE_      = this.Event_subtype_;
            insertDao.EVENT_NAME_         = this.Event_name_;
            insertDao.EVENT_DESCRIPTION_  = this.Event_description_;
            insertDao.CURRENCY_           = this.Currency_;
            insertDao.NOTIONAL_           = this.Notional_;
            insertDao.REMAIN_NOTIONAL_    = this.Remain_notional_;
            insertDao.EVENT_AMOUNT_       = this.Event_amount_;
            insertDao.COUNTERPARTY_       = this.Counterparty_;
            insertDao.FLOATING_FLAG_      = this.Floating_flag_;
            insertDao.CALCULATION_TYPE_   = this.Calculation_type_;
            insertDao.FIXING_UNDERLYINGS_ = this.Fixing_underlyings_;
            insertDao.FIXING_OBSERVATION_ = this.Fixing_observation_;
            insertDao.FIXING_FLAG_        = this.Fixing_flag_;
            insertDao.EXPIRED_FLAG_       = this.Expired_flag_;
            insertDao.ITEM_CODE_          = this.Item_code_;
            insertDao.ITEM_TYPE_          = this.Item_type_;
            insertDao.ITEM_NAME_          = this.Item_name_;
        }
        public override void bookingEvent(MasterInformationViewModel masterInformationViewModel)
        {
            foreach (var item in this.excel_fixedCouponScheduleListViewModel_.Excel_fixedCouponScheduleViewModel_)
            {
                EVENT_INFO_Table_DAO dao = new EVENT_INFO_Table_DAO();

                dao.ITEM_CODE_ = masterInformationViewModel.Item_code_;
                dao.ITEM_TYPE_ = masterInformationViewModel.Booking_type_;
                dao.ITEM_NAME_ = masterInformationViewModel.Item_name_;

                //dao.CALCULATION_TYPE_ =
                dao.COUNTERPARTY_ = masterInformationViewModel.Counterparty_;
                dao.CURRENCY_     = this.excel_issueInfoViewModel_.Currency_.CurrencyString_;
                //dao.EVENT_AMOUNT_ =
                dao.EVENT_CODE_ = EventViewModel.eventCodeGen();
                //dao.EVENT_DATE_ =
                //dao.EVENT_DESCRIPTION_ =
                //dao.EVENT_NAME_ =
                //dao.EVENT_SUBTYPE_
                //dao.EVENT_TYPE_
                dao.EXPIRED_FLAG_ = "false";
                //dao.FIXING_FLAG_ =
                //dao.FIXING_OBSERVATION_ =
                //dao.FIXING_UNDERLYINGS_ =
                //dao.FLOATING_FLAG_ =
                dao.NOTIONAL_ = this.excel_issueInfoViewModel_.Notional_;
                //dao.REMAIN_NOTIONAL_ = masterInformationViewModel.Remain_notional_;
                dao.REMAIN_NOTIONAL_ = "undefined";

                item.bookingEvent(masterInformationViewModel, dao);

                dao.insert(DataBaseConnectManager.ConnectionFactory("myDB"));
            }
        }
Exemplo n.º 5
0
 public void setFromDAO(EVENT_INFO_Table_DAO dao)
 {
     // bussiness logic here
     try
     {
         this.event_code_         = dao.EVENT_CODE_;
         this.Event_date_         = DateTime.ParseExact(dao.EVENT_DATE_, "yyyyMMdd", null);
         this.event_type_         = dao.EVENT_TYPE_;
         this.event_subtype_      = dao.EVENT_SUBTYPE_;
         this.event_name_         = dao.EVENT_NAME_;
         this.event_description_  = dao.EVENT_DESCRIPTION_;
         this.currency_           = dao.CURRENCY_;
         this.notional_           = dao.NOTIONAL_;
         this.remain_notional_    = dao.REMAIN_NOTIONAL_;
         this.event_amount_       = dao.EVENT_AMOUNT_;
         this.counterparty_       = dao.COUNTERPARTY_;
         this.floating_flag_      = dao.FLOATING_FLAG_;
         this.calculation_type_   = dao.CALCULATION_TYPE_;
         this.fixing_underlyings_ = dao.FIXING_UNDERLYINGS_;
         this.fixing_observation_ = dao.FIXING_OBSERVATION_;
         this.fixing_flag_        = dao.FIXING_FLAG_;
         this.expired_flag_       = dao.EXPIRED_FLAG_;
         this.item_code_          = dao.ITEM_CODE_;
         this.item_type_          = dao.ITEM_TYPE_;
         this.item_name_          = dao.ITEM_NAME_;
     }
     catch (Exception)
     {
         //OutputLogViewModel.addResult("event dao : " + e.Message + " " + item_code_ + " " + item_name_);
     }
 }
Exemplo n.º 6
0
        public void dbUpdate()
        {
            EVENT_INFO_Table_DAO updateDao = new EVENT_INFO_Table_DAO();

            //set insertDao

            updateDao.delete(DataBaseConnectManager.ConnectionFactory("myDB"));
        }
Exemplo n.º 7
0
        public void dbDelete()
        {
            EVENT_INFO_Table_DAO insertDao = new EVENT_INFO_Table_DAO();

            insertDao.KeyColumn_ = this.event_code_;

            //set insertDao

            insertDao.delete(DataBaseConnectManager.ConnectionFactory("myDB"));
        }
        public void select(DbConnection conn)
        {
            if (conn.State != ConnectionState.Open)
            {
                conn.Open();
            }

            DataTable tb = new DataTable();

            this.DAOList_ = new List <EVENT_INFO_Table_DAO>();

            DbCommand dbCommand = conn.CreateCommand();

            string selectQuery = EVENT_INFO_Table_DAOManager.SelectQuery_;

            selectQuery = selectQuery.Replace("@KeyColumnValue@", this.KeyColumn_);

            dbCommand.CommandText = selectQuery;

            //DbDataAdapter dataAdapter = new DbDataAdapter(dbCommand, conn);
            DbDataAdapter dataAdapter = DataBaseConnectManager.CreateDataAdapter(dbCommand, conn);

            dataAdapter.Fill(tb);

            DataRow[] dr       = tb.Select();
            int       rowCount = dr.Length;

            foreach (DataRow item in dr)
            {
                EVENT_INFO_Table_DAO dao = new EVENT_INFO_Table_DAO();

                dao.EVENT_CODE_         = item[0].ToString();
                dao.EVENT_DATE_         = item[1].ToString();
                dao.EVENT_TYPE_         = item[2].ToString();
                dao.EVENT_SUBTYPE_      = item[3].ToString();
                dao.EVENT_NAME_         = item[4].ToString();
                dao.EVENT_DESCRIPTION_  = item[5].ToString();
                dao.CURRENCY_           = item[6].ToString();
                dao.NOTIONAL_           = item[7].ToString();
                dao.REMAIN_NOTIONAL_    = item[8].ToString();
                dao.EVENT_AMOUNT_       = item[9].ToString();
                dao.COUNTERPARTY_       = item[10].ToString();
                dao.FLOATING_FLAG_      = item[11].ToString();
                dao.CALCULATION_TYPE_   = item[12].ToString();
                dao.FIXING_UNDERLYINGS_ = item[13].ToString();
                dao.FIXING_OBSERVATION_ = item[14].ToString();
                dao.FIXING_FLAG_        = item[15].ToString();
                dao.EXPIRED_FLAG_       = item[16].ToString();
                dao.ITEM_CODE_          = item[17].ToString();
                dao.ITEM_TYPE_          = item[18].ToString();
                dao.ITEM_NAME_          = item[19].ToString();

                this.DAOList_.Add(dao);
            }
        }
        public override void bookingDetailEvent(MasterInformationViewModel masterInformationViewModel, EVENT_INFO_Table_DAO dao)
        {
            //dao.EVENT_AMOUNT_ = Convert.ToDouble(masterInformationViewModel.RemainNotional_)
            //                    * Convert.ToDouble( this.fixedRate_ ) * this.yearFraction_;

            dao.EVENT_AMOUNT_ = "554443";

            dao.FIXING_UNDERLYINGS_ = "Target Underlying";
            dao.FIXING_FLAG_ = "TRUE";
            //dao.OBSERVATION_END_DATE_ = dao.EVENT_DATE_;
            dao.EVENT_DESCRIPTION_ = this.description();
        }
        public override void bookingDetailEvent(MasterInformationViewModel masterInformationViewModel,
                                                EVENT_INFO_Table_DAO dao)
        {
            //dao.EVENT_AMOUNT_ = Convert.ToDouble(masterInformationViewModel.RemainNotional_)
            //                    * Convert.ToDouble( this.fixedRate_ ) * this.yearFraction_;

            dao.EVENT_AMOUNT_ = "97854673";

            dao.FIXING_UNDERLYINGS_ = "";
            dao.FIXING_FLAG_        = "TRUE";
            //dao.OBSERVATION_END_DATE_ = dao.EVENT_DATE_;
            dao.EVENT_DESCRIPTION_ = this.description();
        }
        public override void bookingEvent(MasterInformationViewModel masterInformationViewModel)
        {
            EVENT_INFO_Table_DAO dao = new EVENT_INFO_Table_DAO();

            this.fx_exchangeLegViewModel_.bookingEvent(masterInformationViewModel, dao);

            //dao.EVENT_AMOUNT_ = generalScheduleDeatilViewModel_.InitialFixingAmount_;
            //dao.FIXING_UNDERLYINGS_ = generalScheduleDeatilViewModel_.FixingUnderlying_;
            //dao.FIXING_FLAG_ = generalScheduleDeatilViewModel_.InitialFixingFlag_;

            dao.ITEM_CODE_       = masterInformationViewModel.Item_code_;
            dao.ITEM_TYPE_       = masterInformationViewModel.Booking_type_;
            dao.ITEM_NAME_       = masterInformationViewModel.Item_name_;
            dao.REMAIN_NOTIONAL_ = masterInformationViewModel.Remain_notional_;
        }
        public override void bookingEvent(MasterInformationViewModel masterInformationViewModel)
        {
            EVENT_INFO_Table_DAO dao = new EVENT_INFO_Table_DAO();

            foreach (var item in this.excel_multiAsset_compositeOption_subtypeViewModel_)
            {
                item.bookingEvent(masterInformationViewModel, dao);
            }

            dao.ITEM_CODE_       = masterInformationViewModel.Item_code_;
            dao.ITEM_TYPE_       = masterInformationViewModel.Booking_type_;
            dao.ITEM_NAME_       = masterInformationViewModel.Item_name_;
            dao.REMAIN_NOTIONAL_ = masterInformationViewModel.Remain_notional_;

            dao.insert(DataBaseConnectManager.ConnectionFactory("myDB"));
        }
Exemplo n.º 13
0
        public void dbInsert()
        {
            // bussiness logic here
            EVENT_INFO_Table_DAO insertDao = new EVENT_INFO_Table_DAO();

            insertDao.EVENT_DATE_         = this.Event_date_.ToString("yyyyMMdd");
            insertDao.EVENT_TYPE_         = this.Event_type_;
            insertDao.EVENT_SUBTYPE_      = this.Event_subtype_;
            insertDao.EVENT_DESCRIPTION_  = this.Event_description_;
            insertDao.EVENT_NAME_         = this.Event_name_;
            insertDao.CURRENCY_           = this.Currency_;
            insertDao.EVENT_AMOUNT_       = this.Event_amount_;
            insertDao.FIXING_UNDERLYINGS_ = this.Fixing_underlyings_;
            insertDao.FIXING_FLAG_        = this.Fixing_flag_;
            insertDao.ITEM_CODE_          = this.Item_code_;
            insertDao.ITEM_TYPE_          = this.Item_type_;
            insertDao.ITEM_NAME_          = this.Item_name_;
            insertDao.REMAIN_NOTIONAL_    = this.Remain_notional_;

            insertDao.insert(DataBaseConnectManager.ConnectionFactory("myDB"));
        }
        public override void bookingEvent(MasterInformationViewModel masterInformationViewModel)
        {
            {
                EVENT_INFO_Table_DAO daoFirst = new EVENT_INFO_Table_DAO();

                this.fx_exchangeLegViewModel_[0].bookingEvent(masterInformationViewModel, daoFirst);

                daoFirst.ITEM_CODE_       = masterInformationViewModel.Item_code_;
                daoFirst.ITEM_TYPE_       = masterInformationViewModel.Booking_type_;
                daoFirst.ITEM_NAME_       = masterInformationViewModel.Item_name_;
                daoFirst.REMAIN_NOTIONAL_ = masterInformationViewModel.Remain_notional_;
            }

            {
                EVENT_INFO_Table_DAO daoSecond = new EVENT_INFO_Table_DAO();

                this.fx_exchangeLegViewModel_[0].bookingEvent(masterInformationViewModel, daoSecond);

                daoSecond.ITEM_CODE_       = masterInformationViewModel.Item_code_;
                daoSecond.ITEM_TYPE_       = masterInformationViewModel.Booking_type_;
                daoSecond.ITEM_NAME_       = masterInformationViewModel.Item_name_;
                daoSecond.REMAIN_NOTIONAL_ = masterInformationViewModel.Remain_notional_;
            }
        }
 public override void bookingEvent(MasterInformationViewModel masterInformationViewModel, EVENT_INFO_Table_DAO dao)
 {
     dao.CALCULATION_TYPE_ = "fixedCoupon";
     dao.EVENT_AMOUNT_ = "unCalculated";
     dao.EVENT_DATE_ = this.eventDate_.ToString(StringFormat.DbDateFormat_);
     dao.EVENT_DESCRIPTION_ = "fixed coupon description";
     dao.EVENT_NAME_ = "fixed coupon name";
     dao.EVENT_TYPE_ = "payment";
     dao.EVENT_SUBTYPE_= "fixed_interest";
     //dao.EXPIRED_FLAG_ = "false";
     dao.FIXING_FLAG_ = "true";
     dao.FIXING_OBSERVATION_ = "undefined";
     dao.FIXING_UNDERLYINGS_ = "";
     dao.FLOATING_FLAG_ = "false";
     //dao.NOTIONAL_ = this.excel_issueInfoViewModel_.Notional_;
     //dao.REMAIN_NOTIONAL_ = "undefined";
     
 }
 public void buildDAO()
 {
     // bussiness logic here
     EVENT_INFO_Table_DAO insertDao = new EVENT_INFO_Table_DAO();
     insertDao.EVENT_CODE_ = this.Event_code_;
     insertDao.EVENT_DATE_ = this.Event_date_.ToString("yyyyMMdd");
     insertDao.EVENT_TYPE_ = this.Event_type_;
     insertDao.EVENT_SUBTYPE_ = this.Event_subtype_;
     insertDao.EVENT_NAME_ = this.Event_name_;
     insertDao.EVENT_DESCRIPTION_ = this.Event_description_;
     insertDao.CURRENCY_ = this.Currency_;
     insertDao.NOTIONAL_ = this.Notional_;
     insertDao.REMAIN_NOTIONAL_ = this.Remain_notional_;
     insertDao.EVENT_AMOUNT_ = this.Event_amount_;
     insertDao.COUNTERPARTY_ = this.Counterparty_;
     insertDao.FLOATING_FLAG_ = this.Floating_flag_;
     insertDao.CALCULATION_TYPE_ = this.Calculation_type_;
     insertDao.FIXING_UNDERLYINGS_ = this.Fixing_underlyings_;
     insertDao.FIXING_OBSERVATION_ = this.Fixing_observation_;
     insertDao.FIXING_FLAG_ = this.Fixing_flag_;
     insertDao.EXPIRED_FLAG_ = this.Expired_flag_;
     insertDao.ITEM_CODE_ = this.Item_code_;
     insertDao.ITEM_TYPE_ = this.Item_type_;
     insertDao.ITEM_NAME_ = this.Item_name_;
 }
 public override void bookingEvent(MasterInformationViewModel masterInformationViewModel, EVENT_INFO_Table_DAO dao)
 {
     
 }
        public override void bookingEvent(MasterInformationViewModel masterInformationViewModel, EVENT_INFO_Table_DAO dao)
        {
            dao.CALCULATION_TYPE_  = "vanilla floating Coupon";
            dao.EVENT_AMOUNT_      = "unCalculated";
            dao.EVENT_DATE_        = this.eventDate_.ToString(StringFormat.DbDateFormat_);
            dao.EVENT_DESCRIPTION_ = "floating coupon description";
            dao.EVENT_NAME_        = "floating coupon name";
            dao.EVENT_TYPE_        = "payment";
            dao.EVENT_SUBTYPE_     = "floating_interest";
            //dao.EXPIRED_FLAG_ = "false";
            dao.FIXING_FLAG_        = "need calculation";
            dao.FIXING_OBSERVATION_ = "undefined";

            foreach (var item in excel_underlyingCalcIDViewModel_.Excel_selectedUnderlyingViewModel_)
            {
                if (item.Checked_)
                {
                    dao.FIXING_UNDERLYINGS_ = item.NameTrans_.Value_ + ";";
                }
            }

            dao.FLOATING_FLAG_ = "true";
            //dao.NOTIONAL_ = this.excel_issueInfoViewModel_.Notional_;
            //dao.REMAIN_NOTIONAL_ = "undefined";
        }
 public override void bookingEvent(MasterInformationViewModel masterInformationViewModel,
                           EVENT_INFO_Table_DAO dao)
 {
     dao.EVENT_TYPE_ = "multiAssetcompositeOptionSubTypeTest";
     dao.EVENT_NAME_ = "multi_vanillaCallPut";
 }
Exemplo n.º 20
0
 public override void bookingEvent(MasterInformationViewModel masterInformationViewModel, EVENT_INFO_Table_DAO dao)
 {
 }
 public override void bookingEvent(MasterInformationViewModel masterInformationViewModel,
                                   EVENT_INFO_Table_DAO dao)
 {
     dao.EVENT_TYPE_ = "compositeOptionSubTypeTest";
     dao.EVENT_NAME_ = "upInOutCall";
 }
        public override void bookingEvent(MasterInformationViewModel masterInformationViewModel)
        {
            {
                EVENT_INFO_Table_DAO daoFirst = new EVENT_INFO_Table_DAO();

                this.fx_exchangeLegViewModel_[0].bookingEvent(masterInformationViewModel, daoFirst);

                daoFirst.ITEM_CODE_ = masterInformationViewModel.Item_code_;
                daoFirst.ITEM_TYPE_ = masterInformationViewModel.Booking_type_;
                daoFirst.ITEM_NAME_ = masterInformationViewModel.Item_name_;
                daoFirst.REMAIN_NOTIONAL_ = masterInformationViewModel.Remain_notional_;
            }

            {
                EVENT_INFO_Table_DAO daoSecond = new EVENT_INFO_Table_DAO();

                this.fx_exchangeLegViewModel_[0].bookingEvent(masterInformationViewModel, daoSecond);

                daoSecond.ITEM_CODE_ = masterInformationViewModel.Item_code_;
                daoSecond.ITEM_TYPE_ = masterInformationViewModel.Booking_type_;
                daoSecond.ITEM_NAME_ = masterInformationViewModel.Item_name_;
                daoSecond.REMAIN_NOTIONAL_ = masterInformationViewModel.Remain_notional_;
            }
        }
        public void dbInsert() 
        {
            // bussiness logic here
            EVENT_INFO_Table_DAO insertDao = new EVENT_INFO_Table_DAO();

            insertDao.EVENT_DATE_ = this.Event_date_.ToString("yyyyMMdd");
            insertDao.EVENT_TYPE_ = this.Event_type_;
            insertDao.EVENT_SUBTYPE_ = this.Event_subtype_;
            insertDao.EVENT_DESCRIPTION_ = this.Event_description_;
            insertDao.EVENT_NAME_ = this.Event_name_;
            insertDao.CURRENCY_ = this.Currency_;
            insertDao.EVENT_AMOUNT_ = this.Event_amount_;
            insertDao.FIXING_UNDERLYINGS_ = this.Fixing_underlyings_;
            insertDao.FIXING_FLAG_ = this.Fixing_flag_;
            insertDao.ITEM_CODE_ = this.Item_code_;
            insertDao.ITEM_TYPE_ = this.Item_type_;
            insertDao.ITEM_NAME_ = this.Item_name_;
            insertDao.REMAIN_NOTIONAL_ = this.Remain_notional_;

            insertDao.insert(DataBaseConnectManager.ConnectionFactory("myDB"));
        }
        public void dbUpdate()
        {
            EVENT_INFO_Table_DAO updateDao = new EVENT_INFO_Table_DAO();

            //set insertDao

            updateDao.delete(DataBaseConnectManager.ConnectionFactory("myDB"));
        }
        public void dbDelete()
        {
            EVENT_INFO_Table_DAO insertDao = new EVENT_INFO_Table_DAO();

            insertDao.KeyColumn_ = this.event_code_;

            //set insertDao

            insertDao.delete(DataBaseConnectManager.ConnectionFactory("myDB"));

        }
 public override void bookingEvent(MasterInformationViewModel masterInformationViewModel, EVENT_INFO_Table_DAO dao)
 {
     throw new NotImplementedException();
 }
 public override void bookingEvent(MasterInformationViewModel masterInformationViewModel,
                                   EVENT_INFO_Table_DAO dao)
 {
     dao.EVENT_TYPE_ = "compositeOptionSubTypeTest";
     dao.EVENT_NAME_ = "vanillaCallPut";
 }
        public void bookingEvent(MasterInformationViewModel masterInformationViewModel, EVENT_INFO_Table_DAO dao)
        {
            dao.EVENT_DATE_    = this.paymentDate_.ToString(StringFormat.DbDateFormat_);
            dao.EVENT_TYPE_    = "Settlement";
            dao.EVENT_SUBTYPE_ = "Pay";
            //dao.EVENT_DESCRIPTION_ = this.description_;
            dao.EVENT_NAME_ = "FxExchange";
            dao.CURRENCY_   = this.targetCurrency_.CurrencyCode_;

            ////dao.OBSERVATION_END_DATE_ = this.calculationDate_.ToString(StringFormat.DbDateFormat_);
            ////dao.OBSERVATION_END_DATE_ = this.calculationDate_.ToString(StringFormat.DbDateFormat_);
        }
 public override void bookingEvent(MasterInformationViewModel masterInformationViewModel, EVENT_INFO_Table_DAO dao)
 {
     dao.CALCULATION_TYPE_  = "fixedCoupon";
     dao.EVENT_AMOUNT_      = "unCalculated";
     dao.EVENT_DATE_        = this.eventDate_.ToString(StringFormat.DbDateFormat_);
     dao.EVENT_DESCRIPTION_ = "fixed coupon description";
     dao.EVENT_NAME_        = "fixed coupon name";
     dao.EVENT_TYPE_        = "payment";
     dao.EVENT_SUBTYPE_     = "fixed_interest";
     //dao.EXPIRED_FLAG_ = "false";
     dao.FIXING_FLAG_        = "true";
     dao.FIXING_OBSERVATION_ = "undefined";
     dao.FIXING_UNDERLYINGS_ = "";
     dao.FLOATING_FLAG_      = "false";
     //dao.NOTIONAL_ = this.excel_issueInfoViewModel_.Notional_;
     //dao.REMAIN_NOTIONAL_ = "undefined";
 }
 public override void bookingEvent(MasterInformationViewModel masterInformationViewModel,
                                   EVENT_INFO_Table_DAO dao)
 {
     dao.EVENT_TYPE_ = "multiAssetcompositeOptionSubTypeTest";
     dao.EVENT_NAME_ = "multi_upInOutCall";
 }
        public override void bookingEvent(MasterInformationViewModel masterInformationViewModel, EVENT_INFO_Table_DAO dao)
        {
            if (this.eventDAO_ == null)
            {
                //dao.EVENT_CODE_ = "testCode";
                dao.EVENT_DATE_ = this.eventDate_.ToString(StringFormat.DbDateFormat_);
                dao.EVENT_TYPE_ = "payment";
                dao.EVENT_SUBTYPE_ = "coupon";
                dao.EVENT_NAME_ = "simple coupon";
                dao.EVENT_DESCRIPTION_ = "simpleCalculation default";
                //dao.CURRENCY_ = item[6].ToString();
                //dao.NOTIONAL_ = item[7].ToString();
                //dao.REMAIN_NOTIONAL_ = item[8].ToString();
                dao.EVENT_AMOUNT_ = "";
                //dao.COUNTERPARTY_ = item[10].ToString();
                dao.FLOATING_FLAG_ = "true";
                dao.CALCULATION_TYPE_ = "simpleCalculation";

                foreach (var item in this.excel_underlyingCalcInfoViewModel_.Excel_underlyingInfoViewModel_)
                {
                    dao.FIXING_UNDERLYINGS_ += item.NameTrans_.Value_ + " ; ";
                }

                dao.FIXING_OBSERVATION_ = "empty";

                dao.FIXING_FLAG_ = "false";
                dao.EXPIRED_FLAG_ = "false";
                //dao.ITEM_CODE_ = item[17].ToString();
                //dao.ITEM_TYPE_ = item[18].ToString();
                //dao.ITEM_NAME_ = item[19].ToString();

            }


        }
        public override void bookingEvent(MasterInformationViewModel masterInformationViewModel, EVENT_INFO_Table_DAO dao)
        {
            if (this.eventDAO_ == null)
            {
                //dao.EVENT_CODE_ = "testCode";
                dao.EVENT_DATE_        = this.eventDate_.ToString(StringFormat.DbDateFormat_);
                dao.EVENT_TYPE_        = "payment";
                dao.EVENT_SUBTYPE_     = "coupon";
                dao.EVENT_NAME_        = "simple coupon";
                dao.EVENT_DESCRIPTION_ = "simpleCalculation default";
                //dao.CURRENCY_ = item[6].ToString();
                //dao.NOTIONAL_ = item[7].ToString();
                //dao.REMAIN_NOTIONAL_ = item[8].ToString();
                dao.EVENT_AMOUNT_ = "";
                //dao.COUNTERPARTY_ = item[10].ToString();
                dao.FLOATING_FLAG_    = "true";
                dao.CALCULATION_TYPE_ = "simpleCalculation";

                foreach (var item in this.excel_underlyingCalcInfoViewModel_.Excel_underlyingInfoViewModel_)
                {
                    dao.FIXING_UNDERLYINGS_ += item.NameTrans_.Value_ + " ; ";
                }

                dao.FIXING_OBSERVATION_ = "empty";

                dao.FIXING_FLAG_  = "false";
                dao.EXPIRED_FLAG_ = "false";
                //dao.ITEM_CODE_ = item[17].ToString();
                //dao.ITEM_TYPE_ = item[18].ToString();
                //dao.ITEM_NAME_ = item[19].ToString();
            }
        }
        public override void bookingEvent(MasterInformationViewModel masterInformationViewModel)
        {
            EVENT_INFO_Table_DAO dao = new EVENT_INFO_Table_DAO();

            this.fx_exchangeLegViewModel_.bookingEvent(masterInformationViewModel, dao);

            //dao.EVENT_AMOUNT_ = generalScheduleDeatilViewModel_.InitialFixingAmount_;
            //dao.FIXING_UNDERLYINGS_ = generalScheduleDeatilViewModel_.FixingUnderlying_;
            //dao.FIXING_FLAG_ = generalScheduleDeatilViewModel_.InitialFixingFlag_;

            dao.ITEM_CODE_ = masterInformationViewModel.Item_code_;
            dao.ITEM_TYPE_ = masterInformationViewModel.Booking_type_;
            dao.ITEM_NAME_ = masterInformationViewModel.Item_name_;
            dao.REMAIN_NOTIONAL_ = masterInformationViewModel.Remain_notional_;

        }
        public void select(DbConnection conn)
        {
            if (conn.State != ConnectionState.Open)
                conn.Open();

            DataTable tb = new DataTable();

            this.DAOList_ = new List<EVENT_INFO_Table_DAO>();

            DbCommand dbCommand = conn.CreateCommand();

            string selectQuery = EVENT_INFO_Table_DAOManager.SelectQuery_;

            selectQuery = selectQuery.Replace("@KeyColumnValue@", this.KeyColumn_);

            dbCommand.CommandText = selectQuery;

            //DbDataAdapter dataAdapter = new DbDataAdapter(dbCommand, conn);
            DbDataAdapter dataAdapter = DataBaseConnectManager.CreateDataAdapter(dbCommand, conn);

            dataAdapter.Fill(tb);

            DataRow[] dr = tb.Select();
            int rowCount = dr.Length;

            foreach (DataRow item in dr)
            {
                EVENT_INFO_Table_DAO dao = new EVENT_INFO_Table_DAO();

                dao.EVENT_CODE_ = item[0].ToString();
                dao.EVENT_DATE_ = item[1].ToString();
                dao.EVENT_TYPE_ = item[2].ToString();
                dao.EVENT_SUBTYPE_ = item[3].ToString();
                dao.EVENT_NAME_ = item[4].ToString();
                dao.EVENT_DESCRIPTION_ = item[5].ToString();
                dao.CURRENCY_ = item[6].ToString();
                dao.NOTIONAL_ = item[7].ToString();
                dao.REMAIN_NOTIONAL_ = item[8].ToString();
                dao.EVENT_AMOUNT_ = item[9].ToString();
                dao.COUNTERPARTY_ = item[10].ToString();
                dao.FLOATING_FLAG_ = item[11].ToString();
                dao.CALCULATION_TYPE_ = item[12].ToString();
                dao.FIXING_UNDERLYINGS_ = item[13].ToString();
                dao.FIXING_OBSERVATION_ = item[14].ToString();
                dao.FIXING_FLAG_ = item[15].ToString();
                dao.EXPIRED_FLAG_ = item[16].ToString();
                dao.ITEM_CODE_ = item[17].ToString();
                dao.ITEM_TYPE_ = item[18].ToString();
                dao.ITEM_NAME_ = item[19].ToString();

                this.DAOList_.Add(dao);
            }



        }
        public override void bookingEvent(MasterInformationViewModel masterInformationViewModel)
        {
            // 상품이 모두 만들어진 후에 event를 gen 해서 박아넣음

            foreach (var item in this.excel_hifive_StepDownKI_ViewModel_.SubScheduleDataList_)
            {
                EVENT_INFO_Table_DAO dao = new EVENT_INFO_Table_DAO();

                dao.EVENT_DATE_ = item.EventDate_.ToString(DataBaseStringFormat.DateFormat_);
                dao.EVENT_TYPE_ = "settlement";
                dao.EVENT_SUBTYPE_ = "earlyRedemption";
                dao.EVENT_DESCRIPTION_ = "coupon : " + item.Coupon_ + " trigger : " + item.Trigger_;
                dao.EVENT_NAME_ = "중도상환";
                dao.CURRENCY_ = "KRW";

                double amt = Convert.ToDouble(this.excel_issueInfoViewModel_.Notional_) + Convert.ToDouble(this.excel_issueInfoViewModel_.Notional_) * Convert.ToDouble(item.Coupon_) / 100;
                
                dao.EVENT_AMOUNT_ = amt.ToString();
                dao.FIXING_UNDERLYINGS_ = this.excel_underlyingCalcInfoViewModel_.underlyingString();
                dao.FIXING_FLAG_ = "false";
                //dao.OBSERVATION_END_DATE_ = dao.EVENT_DATE_;

                dao.ITEM_CODE_ = masterInformationViewModel.Item_code_;
                dao.ITEM_TYPE_ = masterInformationViewModel.Booking_type_;
                dao.ITEM_NAME_ = masterInformationViewModel.Item_name_;
                dao.REMAIN_NOTIONAL_ = masterInformationViewModel.Remain_notional_;

                dao.insert(DataBaseConnectManager.ConnectionFactory("myDB"));
            }
                
        }
 public override void bookingEvent(MasterInformationViewModel masterInformationViewModel, EVENT_INFO_Table_DAO dao)
 {
     throw new NotImplementedException();
 }
 public void setFromDAO(EVENT_INFO_Table_DAO dao)
 {
                 // bussiness logic here
     try
     {
         this.event_code_ = dao.EVENT_CODE_;
         this.Event_date_ = DateTime.ParseExact(dao.EVENT_DATE_, "yyyyMMdd", null);
         this.event_type_ = dao.EVENT_TYPE_;
         this.event_subtype_ = dao.EVENT_SUBTYPE_;
         this.event_name_ = dao.EVENT_NAME_;
         this.event_description_ = dao.EVENT_DESCRIPTION_;
         this.currency_ = dao.CURRENCY_;
         this.notional_ = dao.NOTIONAL_;
         this.remain_notional_ = dao.REMAIN_NOTIONAL_;
         this.event_amount_ = dao.EVENT_AMOUNT_;
         this.counterparty_ = dao.COUNTERPARTY_;
         this.floating_flag_ = dao.FLOATING_FLAG_;
         this.calculation_type_ = dao.CALCULATION_TYPE_;
         this.fixing_underlyings_ = dao.FIXING_UNDERLYINGS_;
         this.fixing_observation_ = dao.FIXING_OBSERVATION_;
         this.fixing_flag_ = dao.FIXING_FLAG_;
         this.expired_flag_ = dao.EXPIRED_FLAG_;
         this.item_code_ = dao.ITEM_CODE_;
         this.item_type_ = dao.ITEM_TYPE_;
         this.item_name_ = dao.ITEM_NAME_;
     }
     catch (Exception )
     {
         //OutputLogViewModel.addResult("event dao : " + e.Message + " " + item_code_ + " " + item_name_);
     }
 }
        public override void bookingEvent(MasterInformationViewModel masterInformationViewModel, EVENT_INFO_Table_DAO dao)
        {
            dao.CALCULATION_TYPE_ = "vanilla floating Coupon";
            dao.EVENT_AMOUNT_ = "unCalculated";
            dao.EVENT_DATE_ = this.eventDate_.ToString(StringFormat.DbDateFormat_);
            dao.EVENT_DESCRIPTION_ = "floating coupon description";
            dao.EVENT_NAME_ = "floating coupon name";
            dao.EVENT_TYPE_ = "payment";
            dao.EVENT_SUBTYPE_ = "floating_interest";
            //dao.EXPIRED_FLAG_ = "false";
            dao.FIXING_FLAG_ = "need calculation"; 
            dao.FIXING_OBSERVATION_ = "undefined";

            foreach (var item in excel_underlyingCalcIDViewModel_.Excel_selectedUnderlyingViewModel_)
	        {
                if (item.Checked_)
                {
                    dao.FIXING_UNDERLYINGS_ = item.NameTrans_.Value_ + ";";
                }
	        }

            dao.FLOATING_FLAG_ = "true";
            //dao.NOTIONAL_ = this.excel_issueInfoViewModel_.Notional_;
            //dao.REMAIN_NOTIONAL_ = "undefined";
        }
        public override void bookingEvent(MasterInformationViewModel masterInformationViewModel)
        {
            EVENT_INFO_Table_DAO dao = new EVENT_INFO_Table_DAO();

            foreach (var item in this.excel_compositeOption_subtypeViewModelList_)
            {
                item.bookingEvent(masterInformationViewModel, dao);
            }

            dao.ITEM_CODE_ = masterInformationViewModel.Item_code_;
            dao.ITEM_TYPE_ = masterInformationViewModel.Booking_type_;
            dao.ITEM_NAME_ = masterInformationViewModel.Item_name_;
            dao.REMAIN_NOTIONAL_ = masterInformationViewModel.Remain_notional_;

            dao.insert(DataBaseConnectManager.ConnectionFactory("myDB"));

        }
 public abstract void bookingEvent(MasterInformationViewModel masterInformationViewModel,
                                   EVENT_INFO_Table_DAO dao);
        public override void bookingEvent(MasterInformationViewModel masterInformationViewModel)
        {
            //this.excel_vanillaFloatingCouponScheduleListViewModel_.bookingEvent(masterInformationViewModel);

            foreach (var item in this.excel_vanillaFloatingCouponScheduleListViewModel_.Excel_vanillaFloatingCouponScheduleViewModel_)
            {
                EVENT_INFO_Table_DAO dao = new EVENT_INFO_Table_DAO();

                dao.ITEM_CODE_ = masterInformationViewModel.Item_code_;
                dao.ITEM_TYPE_ = masterInformationViewModel.Booking_type_;
                dao.ITEM_NAME_ = masterInformationViewModel.Item_name_;

                //dao.CALCULATION_TYPE_ = 
                dao.COUNTERPARTY_ = masterInformationViewModel.Counterparty_;
                dao.CURRENCY_ = this.excel_issueInfoViewModel_.Currency_.CurrencyString_;
                //dao.EVENT_AMOUNT_ = 
                dao.EVENT_CODE_ = EventViewModel.eventCodeGen();
                //dao.EVENT_DATE_ = 
                //dao.EVENT_DESCRIPTION_ = 
                //dao.EVENT_NAME_ =
                //dao.EVENT_SUBTYPE_
                //dao.EVENT_TYPE_
                dao.EXPIRED_FLAG_ = "false";
                //dao.FIXING_FLAG_ = 
                //dao.FIXING_OBSERVATION_ =
                //dao.FIXING_UNDERLYINGS_ = 
                //dao.FLOATING_FLAG_ = 
                dao.NOTIONAL_ = this.excel_issueInfoViewModel_.Notional_;
                //dao.REMAIN_NOTIONAL_ = masterInformationViewModel.Remain_notional_;
                dao.REMAIN_NOTIONAL_ = "undefined";

                item.bookingEvent(masterInformationViewModel, dao);

                dao.insert(DataBaseConnectManager.ConnectionFactory("myDB"));

            }

        }
Exemplo n.º 42
0
 public abstract void bookingDetailEvent(MasterInformationViewModel masterInformationViewModel,
                                         EVENT_INFO_Table_DAO dao);
        public void bookingEvent(MasterInformationViewModel masterInformationViewModel)
        {
            EVENT_INFO_Table_DAO dao = new EVENT_INFO_Table_DAO();

            dao.EVENT_DATE_ = this.eventDate_;
            dao.EVENT_TYPE_ = "Termination";
            dao.EVENT_SUBTYPE_ = this.detailTerminationType_;
            dao.EVENT_DESCRIPTION_ = this.description_;
            dao.EVENT_NAME_ = "Early Redemption";
            dao.CURRENCY_ = "";

            generalTerminationEventDetailViewModel_.bookingDetailEvent(masterInformationViewModel, dao);

            //dao.EVENT_AMOUNT_ = generalTerminationEventDetailViewModel_.InitialFixingAmount_;
            //dao.FIXING_UNDERLYINGS_ = generalTerminationEventDetailViewModel_.FixingUnderlying_;
            //dao.FIXING_FLAG_ = generalTerminationEventDetailViewModel_.InitialFixingFlag_;
            //dao.OBSERVATION_END_DATE_ = generalTerminationEventDetailViewModel_.ObservationEndDate_;

            dao.ITEM_CODE_ = masterInformationViewModel.Item_code_;
            dao.ITEM_TYPE_ = masterInformationViewModel.Booking_type_;
            dao.ITEM_NAME_ = masterInformationViewModel.Item_name_;
            dao.REMAIN_NOTIONAL_ = masterInformationViewModel.Remain_notional_;

            dao.insert(DataBaseConnectManager.ConnectionFactory("myDB"));
        }