Example #1
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();

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



        }