public void selectNAME_KOR(DbConnection conn)
        {
            if (conn.State != ConnectionState.Open)
            {
                conn.Open();
            }
            try
            {
                DataTable tb = new DataTable();

                DbCommand dbCommand = conn.CreateCommand();

                string selectNAME_KORQuery = MARKETDATA_SYMBOL_INFO_Table_DAO.SelectNAME_KORQuery_;

                selectNAME_KORQuery = selectNAME_KORQuery.Replace("@NAME_KORValue@", this.NAME_KOR_);

                dbCommand.CommandText = selectNAME_KORQuery;

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

                dataAdapter.Fill(tb);

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

                if (!(rowCount == 0 || rowCount == 1))
                {
                    throw new Exception();
                }

                foreach (DataRow item in dr)
                {
                    this.SYMBOL_      = item[0].ToString();
                    this.NAME_ENG_    = item[1].ToString();
                    this.NAME_KOR_    = item[2].ToString();
                    this.SYMBOL_TYPE_ = item[3].ToString();
                    this.PROVIDER_    = item[4].ToString();
                    this.DESCRIPTION_ = item[5].ToString();
                    this.TENOR_       = item[6].ToString();
                    this.SUB_TYPE_    = item[7].ToString();
                    this.LINKEDCURVE_ = item[8].ToString();
                    this.RATE_TYPE_   = item[9].ToString();
                    this.LEG_TENOR_   = item[10].ToString();
                    this.CURRENCY_    = item[11].ToString();
                }


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

            try
            {
                DataTable tb = new DataTable();

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

                DbCommand dbCommand = conn.CreateCommand();

                string selectQuery = MARKETDATA_SYMBOL_INFO_Table_DAOManager.SelectQuery_;

                selectQuery = selectQuery.Replace("@SYMBOL_TYPEKeyColumnValue@", this.KeyColumn_SYMBOL_TYPE_);

                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)
                {
                    MARKETDATA_SYMBOL_INFO_Table_DAO dao = new MARKETDATA_SYMBOL_INFO_Table_DAO();

                    dao.SYMBOL_      = item[0].ToString();
                    dao.NAME_ENG_    = item[1].ToString();
                    dao.NAME_KOR_    = item[2].ToString();
                    dao.SYMBOL_TYPE_ = item[3].ToString();
                    dao.PROVIDER_    = item[4].ToString();
                    dao.DESCRIPTION_ = item[5].ToString();
                    dao.TENOR_       = item[6].ToString();
                    dao.SUB_TYPE_    = item[7].ToString();
                    dao.LINKEDCURVE_ = item[8].ToString();
                    dao.RATE_TYPE_   = item[9].ToString();
                    dao.LEG_TENOR_   = item[10].ToString();
                    dao.CURRENCY_    = item[11].ToString();

                    this.DAOList_.Add(dao);
                }

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

            DataTable tb = new DataTable();

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

            DbCommand dbCommand = conn.CreateCommand();

            string selectQuery = TD_MRCURVE_Table_DAOManager.SelectQuery_;

            selectQuery = selectQuery.Replace("@KeyColumn_RefDateValue@", this.KeyColumn_RefDate_);
            selectQuery = selectQuery.Replace("@KeyColumn_CurveCodeValue@", this.KeyColumn_CurveCode_);

            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)
            {
                TD_MRCURVE_Table_DAO dao = new TD_MRCURVE_Table_DAO();

                dao.STD_DATE_      = item[0].ToString();
                dao.CURVE_CODE_    = item[1].ToString();
                dao.BOND_CLASS_ID_ = item[2].ToString();
                dao.D001_          = item[3].ToString();
                dao.M003_          = item[4].ToString();
                dao.M006_          = item[5].ToString();
                dao.M009_          = item[6].ToString();
                dao.M012_          = item[7].ToString();
                dao.M018_          = item[8].ToString();
                dao.M024_          = item[9].ToString();
                dao.M030_          = item[10].ToString();
                dao.M036_          = item[11].ToString();
                dao.M048_          = item[12].ToString();
                dao.M060_          = item[13].ToString();
                dao.M084_          = item[14].ToString();
                dao.M120_          = item[15].ToString();
                dao.M180_          = item[16].ToString();
                dao.M240_          = item[17].ToString();
                dao.M360_          = item[18].ToString();

                this.DAOList_.Add(dao);
            }
        }
        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 void select(DbConnection conn)
        {
            if (conn.State != ConnectionState.Open)
            {
                conn.Open();
            }

            DataTable tb = new DataTable();

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

            DbCommand dbCommand = conn.CreateCommand();

            string selectQuery = MATSER_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)
            {
                MATSER_INFO_Table_DAO dao = new MATSER_INFO_Table_DAO();

                dao.ITEM_CODE_              = item[0].ToString();
                dao.ITEM_NAME_              = item[1].ToString();
                dao.NOTIONAL_               = item[2].ToString();
                dao.REMAIN_NOTIONAL_        = item[3].ToString();
                dao.CURRENCY_               = item[4].ToString();
                dao.TRADE_DATE_             = item[5].ToString();
                dao.MATURITY_DATE_          = item[6].ToString();
                dao.COUNTERPARTY_           = item[7].ToString();
                dao.EXPORT_ITEMCODE_        = item[8].ToString();
                dao.TRADE_ID_               = item[9].ToString();
                dao.TRADE_STATUS_           = item[10].ToString();
                dao.INSTRUMENT_TYPE_        = item[11].ToString();
                dao.UNDERLYING_TYPE_        = item[12].ToString();
                dao.UNDERLYING_DETAIL_TYPE_ = item[13].ToString();
                dao.CONTRACT_TYPE_          = item[14].ToString();
                dao.CONTRACT_SUBTYPE_       = item[15].ToString();
                dao.CONTRACT_DETAIL_TYPE_   = item[16].ToString();
                dao.BOOKING_TYPE_           = item[17].ToString();

                this.DAOList_.Add(dao);
            }
        }
        public void selectInterval(DbConnection conn, DateTime startDate, DateTime endDate)
        {
            if (conn.State != ConnectionState.Open)
            {
                conn.Open();
            }
            try
            {
                DataTable tb = new DataTable();

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

                DbCommand dbCommand = conn.CreateCommand();

                string SelectInterValQuery_ = TD_MRSTOCKFACTOR_Table_DAOManager.SelectInterValQuery_;

                SelectInterValQuery_ = SelectInterValQuery_.Replace("@KeyColumnValue@", this.STOCK_ID_);
                SelectInterValQuery_ = SelectInterValQuery_.Replace("@StartDateValue@", startDate.ToString(StringFormat.DbDateFormat_));
                SelectInterValQuery_ = SelectInterValQuery_.Replace("@EndDateValue@", endDate.ToString(StringFormat.DbDateFormat_));

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

                dbCommand.CommandText = SelectInterValQuery_;

                //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)
                {
                    TD_MRSTOCKFACTOR_Table_DAO dao = new TD_MRSTOCKFACTOR_Table_DAO();

                    dao.STD_DATE_      = item[0].ToString();
                    dao.STOCK_ID_      = item[1].ToString();
                    dao.STOCK_NAME_    = item[2].ToString();
                    dao.CURR_PRICE_    = item[3].ToString();
                    dao.DIVIDEND_RATE_ = item[4].ToString();

                    this.DAOList_.Add(dao);
                }

                conn.Close();
            }
            catch (Exception)
            {
                conn.Close();
                throw;
            }
        }
Example #7
0
        public string select_date_code_id(DbConnection conn)
        {
            if (conn.State != ConnectionState.Open)
            {
                conn.Open();
            }
            try
            {
                DataTable tb = new DataTable();

                DbCommand dbCommand = conn.CreateCommand();

                string select_date_code_id_Query = OTC_TD_MRSTOCKFACTORVOL_Table_DAO.Select_date_code_id_Query_;

                select_date_code_id_Query = select_date_code_id_Query.Replace("@STD_DATEValue@", this.STD_DATE_);
                select_date_code_id_Query = select_date_code_id_Query.Replace("@KR_CODEValue@", this.KR_CODE_);
                select_date_code_id_Query = select_date_code_id_Query.Replace("@STOCK_IDValue@", this.STOCK_ID_);

                dbCommand.CommandText = select_date_code_id_Query;

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

                dataAdapter.Fill(tb);

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

                if (!(rowCount == 0 || rowCount == 1))
                {
                    throw new Exception();
                }

                foreach (DataRow item in dr)
                {
                    this.STD_DATE_   = item[0].ToString();
                    this.KR_CODE_    = item[1].ToString();
                    this.STOCK_ID_   = item[2].ToString();
                    this.VOL_        = item[3].ToString();
                    this.QUANTO_VOL_ = item[4].ToString();
                    this.QUANTO_RHO_ = item[5].ToString();
                }

                conn.Close();

                return(select_date_code_id_Query);
            }
            catch (Exception)
            {
                conn.Close();
                throw;
            }
        }
        public void select(DbConnection conn)
        {
            if (conn.State != ConnectionState.Open)
            {
                conn.Open();
            }

            DataTable tb = new DataTable();

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

            DbCommand dbCommand = conn.CreateCommand();

            string selectQuery = POSITION_PL_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)
            {
                POSITION_PL_Table_DAO dao = new POSITION_PL_Table_DAO();

                dao.ITEM_CODE_       = item[0].ToString();
                dao.TRADE_ID_        = item[1].ToString();
                dao.NOTIONAL_        = item[2].ToString();
                dao.REMAIN_NOTIONAL_ = item[3].ToString();
                dao.BOOK_PRICE_      = item[4].ToString();
                dao.BOOK_NOTIONAL_   = item[5].ToString();
                dao.EVAL_PRICE_      = item[6].ToString();
                dao.BOOK_PL_         = item[7].ToString();
                dao.TOTAL_EVAL_PL_   = item[8].ToString();
                dao.DAILY_EVAL_PL_   = item[9].ToString();
                dao.TRADE_PL_        = item[10].ToString();
                dao.TOTAL_PL_        = item[11].ToString();
                dao.ETC_PL_          = item[12].ToString();
                dao.STD_DATE_        = item[13].ToString();

                this.DAOList_.Add(dao);
            }
        }
Example #9
0
        public void select_date_id_otherid_Query(DbConnection conn)
        {
            if (conn.State != ConnectionState.Open)
            {
                conn.Open();
            }

            try
            {
                DataTable tb = new DataTable();

                DbCommand dbCommand = conn.CreateCommand();

                string select_date_id_otherid_Query = OTC_TD_MRELSSTOCKCORR_Table_DAO.Select_date_id_otherid_Query_;

                select_date_id_otherid_Query = select_date_id_otherid_Query.Replace("@STD_DATEValue@", this.STD_DATE_);
                select_date_id_otherid_Query = select_date_id_otherid_Query.Replace("@STOCK_IDValue@", this.STOCK_ID_);
                select_date_id_otherid_Query = select_date_id_otherid_Query.Replace("@OTHER_IDValue@", this.OTHER_ID_);

                dbCommand.CommandText = select_date_id_otherid_Query;

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

                dataAdapter.Fill(tb);

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

                if (!(rowCount == 0 || rowCount == 1))
                {
                    throw new Exception();
                }

                foreach (DataRow item in dr)
                {
                    this.STD_DATE_ = item[0].ToString();
                    this.STOCK_ID_ = item[1].ToString();
                    this.OTHER_ID_ = item[2].ToString();
                    this.CORR_     = item[3].ToString();
                }

                conn.Close();
            }
            catch (Exception)
            {
                conn.Close();
                throw;
            }
        }
        public void selectDateCurve(DbConnection conn)
        {
            if (conn.State != ConnectionState.Open)
            {
                conn.Open();
            }

            try
            {
                DataTable tb = new DataTable();

                DbCommand dbCommand = conn.CreateCommand();

                string selectDateCurveQuery = CURVE_DATA_Table_DAO.SelectDateCurveQuery_;

                selectDateCurveQuery = selectDateCurveQuery.Replace("@CURVE_DATEVALUE@", this.CURVE_DATE_);
                selectDateCurveQuery = selectDateCurveQuery.Replace("@CURVE_CODEVALUE@", this.CURVE_CODE_);

                dbCommand.CommandText = selectDateCurveQuery;

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

                dataAdapter.Fill(tb);

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

                if (!(rowCount == 0 || rowCount == 1))
                {
                    throw new Exception("unique curveCode violation ");
                }

                foreach (DataRow item in dr)
                {
                    this.CURVE_DATE_ = item[0].ToString();
                    this.CURVE_CODE_ = item[1].ToString();
                    this.TENOR_      = item[2].ToString();
                    this.VALUE_      = item[3].ToString();
                    this.CURVE_TYPE_ = item[4].ToString();
                }

                conn.Close();
            }
            catch (Exception e)
            {
                conn.Close();
                throw;
            }
        }
        public void select(DbConnection conn)
        {
            if (conn.State != ConnectionState.Open)
            {
                conn.Open();
            }

            DataTable tb = new DataTable();

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

            DbCommand dbCommand = conn.CreateCommand();

            string selectQuery = HOLIDAY_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)
            {
                HOLIDAY_INFO_Table_DAO dao = new HOLIDAY_INFO_Table_DAO();

                dao.HOLIDAY_DATE_          = item[0].ToString();
                dao.HOLIDAY_NAME_          = item[1].ToString();
                dao.HOLIDAY_COUNTRY_NAME_  = item[2].ToString();
                dao.HOLIDAY_CURRENCY_CODE_ = item[3].ToString();
                dao.HOLIDAY_TYPE_          = item[4].ToString();
                dao.USING_START_DATE_      = item[5].ToString();
                dao.USING_END_DATE_        = item[6].ToString();
                dao.DESCRIPTION_           = item[7].ToString();

                this.DAOList_.Add(dao);
            }
        }
Example #12
0
        public void select(DbConnection conn)
        {
            if (conn.State != ConnectionState.Open)
            {
                conn.Open();
            }

            DataTable tb = new DataTable();

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

            DbCommand dbCommand = conn.CreateCommand();

            string selectQuery = OTC_TD_MRSTOCKFACTORVOL_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)
            {
                OTC_TD_MRSTOCKFACTORVOL_Table_DAO dao = new OTC_TD_MRSTOCKFACTORVOL_Table_DAO();

                dao.STD_DATE_   = item[0].ToString();
                dao.KR_CODE_    = item[1].ToString();
                dao.STOCK_ID_   = item[2].ToString();
                dao.VOL_        = item[3].ToString();
                dao.QUANTO_VOL_ = item[4].ToString();
                dao.QUANTO_RHO_ = item[5].ToString();

                this.DAOList_.Add(dao);
            }
        }
Example #13
0
        public void select(DbConnection conn)
        {
            if (conn.State != ConnectionState.Open)
            {
                conn.Open();
            }

            DataTable tb = new DataTable();

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

            DbCommand dbCommand = conn.CreateCommand();

            string selectQuery = CURVE_DATA_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)
            {
                CURVE_DATA_Table_DAO dao = new CURVE_DATA_Table_DAO();

                dao.CURVE_DATE_ = item[0].ToString();
                dao.CURVE_CODE_ = item[1].ToString();
                dao.TENOR_      = item[2].ToString();
                dao.VALUE_      = item[3].ToString();
                dao.CURVE_TYPE_ = item[4].ToString();

                this.DAOList_.Add(dao);
            }
        }
        public void selectInterval(DbConnection conn, DateTime startDate, DateTime endDate)
        {
            if (conn.State != ConnectionState.Open)
            {
                conn.Open();
            }

            DataTable tb = new DataTable();

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

            DbCommand dbCommand = conn.CreateCommand();

            string SelectInterValQuery_ = INDEX_DATA_Table_DAOManager.SelectInterValQuery_;

            SelectInterValQuery_ = SelectInterValQuery_.Replace("@KeyColumnValue@", this.INDEX_CODE_);
            SelectInterValQuery_ = SelectInterValQuery_.Replace("@StartDateValue@", startDate.ToString(StringFormat.DbDateFormat_));
            SelectInterValQuery_ = SelectInterValQuery_.Replace("@EndDateValue@", endDate.ToString(StringFormat.DbDateFormat_));

            dbCommand.CommandText = SelectInterValQuery_;

            //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)
            {
                INDEX_DATA_Table_DAO dao = new INDEX_DATA_Table_DAO();

                dao.INDEX_DATE_  = item[0].ToString();
                dao.INDEX_CODE_  = item[1].ToString();
                dao.INDEX_NAME_  = item[2].ToString();
                dao.INDEX_VALUE_ = item[3].ToString();

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

            DataTable tb = new DataTable();

            DbCommand dbCommand = conn.CreateCommand();

            string selectQuery = INDEX_DATA_Table_DAO.SelectQuery_;

            selectQuery = selectQuery.Replace("@KeyColumnValue1@", this.INDEX_DATE_);
            selectQuery = selectQuery.Replace("@KeyColumnValue2@", this.INDEX_CODE_);

            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;

            if (!(rowCount == 0 || rowCount == 1))
            {
                throw new Exception();
            }

            foreach (DataRow item in dr)
            {
                this.INDEX_DATE_  = item[0].ToString();
                this.INDEX_CODE_  = item[1].ToString();
                this.INDEX_NAME_  = item[2].ToString();
                this.INDEX_VALUE_ = item[3].ToString();
            }
        }
        public void select(DbConnection conn)
        {
            if (conn.State != ConnectionState.Open)
            {
                conn.Open();
            }

            DataTable tb = new DataTable();

            DbCommand dbCommand = conn.CreateCommand();

            string selectQuery = DISCOUNTCURVESETTING_Table_DAO.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;

            if (!(rowCount == 0 || rowCount == 1))
            {
                throw new Exception();
            }

            foreach (DataRow item in dr)
            {
                this.CURRENCY_  = item[0].ToString();
                this.CURVECODE_ = item[1].ToString();
                this.PROVIDER_  = item[2].ToString();
            }
        }
Example #17
0
        public void select(DbConnection conn)
        {
            if (conn.State != ConnectionState.Open)
            {
                conn.Open();
            }

            DataTable tb = new DataTable();

            DbCommand dbCommand = conn.CreateCommand();

            string selectQuery = KOM_PSIT_INF_Table_DAOManager.SelectQuery_;

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

            dbCommand.CommandText = selectQuery;

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

            dataAdapter.Fill(tb);

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

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

                dao.BASC_DT_          = item[0].ToString();
                dao.OFFC_CD_          = item[1].ToString();
                dao.SEQ_NO_           = item[2].ToString();
                dao.POSITION_ID_      = item[3].ToString();
                dao.KR_CD_            = item[4].ToString();
                dao.BCOF_ITM_NM_      = item[5].ToString();
                dao.ISD_FUND_CD_      = item[6].ToString();
                dao.CRPN_ID_          = item[7].ToString();
                dao.CRPN_NM_          = item[8].ToString();
                dao.DEAL_TYP_         = item[9].ToString();
                dao.HOLD_QNT_         = item[10].ToString();
                dao.BCOF_EXHG_RT_CD_  = item[11].ToString();
                dao.PURT_AMT_         = item[12].ToString();
                dao.ACBK_UPRC_        = item[13].ToString();
                dao.FRC_ACBK_UPRC_    = item[14].ToString();
                dao.MKT_UPRC_         = item[15].ToString();
                dao.FRC_MKT_UPRC_     = item[16].ToString();
                dao.FCVL_UNIT_        = item[17].ToString();
                dao.FRC_FCVL_UNIT_    = item[18].ToString();
                dao.FCVL_AMT_         = item[19].ToString();
                dao.FRC_FCVL_AMT_     = item[20].ToString();
                dao.ACBK_AMT_         = item[21].ToString();
                dao.FRC_ACBK_AMT_     = item[22].ToString();
                dao.MKT_AMT_          = item[23].ToString();
                dao.FRC_MKT_AMT_      = item[24].ToString();
                dao.WRNT_AMT_         = item[25].ToString();
                dao.HOLD_MAX_QNT_     = item[26].ToString();
                dao.FST_BUY_DT_       = item[27].ToString();
                dao.BUY_UPRC_         = item[28].ToString();
                dao.FST_BUY_AMT_      = item[29].ToString();
                dao.FST_FRC_ACBK_AMT_ = item[30].ToString();
                dao.DD_BY_ASES_LNG_   = item[31].ToString();
                dao.DD_BY_INT_LNG_    = item[32].ToString();
                dao.DD_BY_DEAL_LNG_   = item[33].ToString();
                dao.DD_BY_DIVD_LNG_   = item[34].ToString();
                dao.DD_EXP_           = item[35].ToString();
                dao.ASES_LNG_         = item[36].ToString();
                dao.ETC_PL_AMT_1_     = item[37].ToString();
                dao.ETC_PL_AMT_2_     = item[38].ToString();
                dao.ETC_PL_AMT_3_     = item[39].ToString();
                dao.ETC_PL_AMT_4_     = item[40].ToString();
                dao.ETC_PL_AMT_5_     = item[41].ToString();
                dao.ETC_PL_AMT_6_     = item[42].ToString();
                dao.ETC_PL_AMT_7_     = item[43].ToString();
                dao.ETC_PL_AMT_8_     = item[44].ToString();
                dao.ETC_PL_AMT_9_     = item[45].ToString();
                dao.ETC_PL_AMT_10_    = item[46].ToString();
                dao.ETC_PL_AMT_11_    = item[47].ToString();
                dao.ETC_PL_AMT_12_    = item[48].ToString();
                dao.ETC_PL_AMT_13_    = item[49].ToString();
                dao.ETC_PL_AMT_14_    = item[50].ToString();
                dao.ETC_PL_AMT_15_    = item[51].ToString();
                dao.ETC_PL_AMT_16_    = item[52].ToString();
                dao.ETC_PL_AMT_17_    = item[53].ToString();
                dao.ETC_PL_AMT_18_    = item[54].ToString();
                dao.ETC_PL_AMT_19_    = item[55].ToString();
                dao.ETC_PL_AMT_20_    = item[56].ToString();
                dao.ETC_PL_AMT_21_    = item[57].ToString();
                dao.ETC_PL_AMT_22_    = item[58].ToString();
                dao.ETC_PL_AMT_23_    = item[59].ToString();
                dao.ETC_PL_AMT_24_    = item[60].ToString();
                dao.ETC_PL_AMT_25_    = item[61].ToString();
                dao.BCOF_AC_CD_1_     = item[62].ToString();
                dao.BCOF_PRD_CD_1_    = item[63].ToString();
                dao.BCOF_PRD_CD_2_    = item[64].ToString();
                dao.BCOF_PRD_CD_3_    = item[65].ToString();
                dao.CLTR_OFFR_AMT_    = item[66].ToString();
                dao.CLTR_OFFR_YN_     = item[67].ToString();
                dao.MKT_PRC_ASES_CD_  = item[68].ToString();
                dao.OPT_EVET_YN_      = item[69].ToString();
                dao.HDG_TRSC_YN_      = item[70].ToString();
                dao.TST_ISS_TYP_      = item[71].ToString();
                dao.USER_SET_YN_      = item[72].ToString();
                dao.NOTE_             = item[73].ToString();
                dao.FILE_DT_          = item[74].ToString();
                dao.DB_INSERT_DT_     = item[75].ToString();

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

            try
            {
                DataTable tb = new DataTable();

                DbCommand dbCommand = conn.CreateCommand();

                string selectQuery = TD_MRCURVE_Table_DAO.SelectQuery_;

                selectQuery = selectQuery.Replace("@KeyColumn_RefDateValue@", this.KeyColumn_RefDate_);
                selectQuery = selectQuery.Replace("@KeyColumn_BOND_CLASS_IDValue@", this.KeyColumn_BOND_CLASS_ID_);
                selectQuery = selectQuery.Replace("@KeyColumn_CURVE_CODEValue@", this.KeyColumn_CURVE_CODE_);

                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;

                if (!(rowCount == 0 || rowCount == 1))
                {
                    throw new Exception();
                }

                foreach (DataRow item in dr)
                {
                    this.STD_DATE_      = item[0].ToString();
                    this.CURVE_CODE_    = item[1].ToString();
                    this.BOND_CLASS_ID_ = item[2].ToString();
                    this.D001_          = item[3].ToString();
                    this.M003_          = item[4].ToString();
                    this.M006_          = item[5].ToString();
                    this.M009_          = item[6].ToString();
                    this.M012_          = item[7].ToString();
                    this.M018_          = item[8].ToString();
                    this.M024_          = item[9].ToString();
                    this.M030_          = item[10].ToString();
                    this.M036_          = item[11].ToString();
                    this.M048_          = item[12].ToString();
                    this.M060_          = item[13].ToString();
                    this.M084_          = item[14].ToString();
                    this.M120_          = item[15].ToString();
                    this.M180_          = item[16].ToString();
                    this.M240_          = item[17].ToString();
                    this.M360_          = item[18].ToString();
                }

                conn.Close();
            }
            catch (Exception)
            {
                conn.Close();
            }
        }