private MarketRow GetMarketRow(ChinaETFPchRedmRow row) { // TODO: MarketRow market = new MarketRow(); //market.Idx; market.Trade_Date = row.TRADE_DT; market.Security_Id = this.ConvertSecurityId(row.S_INFO_WINDCODE); //market.Last_Price = ; //market.Change_Rate; //market.Volume; //market.Trade_Count; //market.Turn_Over; //market.Pre_Close_Price; //market.Pre_Open_Interest; //market.Pre_Settlement_Price; //market.Open_Price; //market.Highest_Price; //market.Lowerst_Price; //market.Close_Price; //market.Open_Interest; //market.Settlement_Price; //market.Up_Limit_Price; //market.Lower_Limit_Price; //market.Currency; //market.Epsilon; //market.Multiplier; //market.Rule; //market.Ipov; //market.Ytm; //market.Syl1; //market.Syl2; //market.Pre_Delta; //market.Curr_Delta; //market.Avg_Price; //market.Sys_Update_Time; //market.Update_Time; return market; }
public bool Add(MarketRow row) { string sql = string.Format("insert into {0}({1}, {2}, {3}, {4}, {5}, {6}, {7}, {8}, {9}, {10}, {11}, {12}, {13}, {14}, {15}, {16}, {17}, {18}, {19}, {20}, {21}, {22}, {23}, {24}, {25}, {26}, {27}, {28}, {29}, {30}, {31}) VALUES(@{1}, @{2}, @{3}, @{4}, @{5}, @{6}, @{7}, @{8}, @{9}, @{10}, @{11}, @{12}, @{13}, @{14}, @{15}, @{16}, @{17}, @{18}, @{19}, @{20}, @{21}, @{22}, @{23}, @{24}, @{25}, @{26}, @{27}, @{28}, @{29}, @{30}, @{31});", TableName, MarketRow.C_trade_date, MarketRow.C_security_id, MarketRow.C_last_price, MarketRow.C_change_rate, MarketRow.C_volume, MarketRow.C_trade_count, MarketRow.C_turn_over, MarketRow.C_pre_close_price, MarketRow.C_pre_open_interest, MarketRow.C_pre_settlement_price, MarketRow.C_open_price, MarketRow.C_highest_price, MarketRow.C_lowerst_price, MarketRow.C_close_price, MarketRow.C_open_interest, MarketRow.C_settlement_price, MarketRow.C_up_limit_price, MarketRow.C_lower_limit_price, MarketRow.C_currency, MarketRow.C_epsilon, MarketRow.C_multiplier, MarketRow.C_rule, MarketRow.C_ipov, MarketRow.C_ytm, MarketRow.C_syl1, MarketRow.C_syl2, MarketRow.C_pre_delta, MarketRow.C_curr_delta, MarketRow.C_avg_price, MarketRow.C_sys_update_time, MarketRow.C_update_time); MySqlParameter[] parameters = new MySqlParameter[]{ new MySqlParameter(string.Format("@{0}", MarketRow.C_trade_date), row.Trade_Date), new MySqlParameter(string.Format("@{0}", MarketRow.C_security_id), row.Security_Id), new MySqlParameter(string.Format("@{0}", MarketRow.C_last_price), row.Last_Price), new MySqlParameter(string.Format("@{0}", MarketRow.C_change_rate), row.Change_Rate), new MySqlParameter(string.Format("@{0}", MarketRow.C_volume), row.Volume), new MySqlParameter(string.Format("@{0}", MarketRow.C_trade_count), row.Trade_Count), new MySqlParameter(string.Format("@{0}", MarketRow.C_turn_over), row.Turn_Over), new MySqlParameter(string.Format("@{0}", MarketRow.C_pre_close_price), row.Pre_Close_Price), new MySqlParameter(string.Format("@{0}", MarketRow.C_pre_open_interest), row.Pre_Open_Interest), new MySqlParameter(string.Format("@{0}", MarketRow.C_pre_settlement_price), row.Pre_Settlement_Price), new MySqlParameter(string.Format("@{0}", MarketRow.C_open_price), row.Open_Price), new MySqlParameter(string.Format("@{0}", MarketRow.C_highest_price), row.Highest_Price), new MySqlParameter(string.Format("@{0}", MarketRow.C_lowerst_price), row.Lowerst_Price), new MySqlParameter(string.Format("@{0}", MarketRow.C_close_price), row.Close_Price), new MySqlParameter(string.Format("@{0}", MarketRow.C_open_interest), row.Open_Interest), new MySqlParameter(string.Format("@{0}", MarketRow.C_settlement_price), row.Settlement_Price), new MySqlParameter(string.Format("@{0}", MarketRow.C_up_limit_price), row.Up_Limit_Price), new MySqlParameter(string.Format("@{0}", MarketRow.C_lower_limit_price), row.Lower_Limit_Price), new MySqlParameter(string.Format("@{0}", MarketRow.C_currency), row.Currency), new MySqlParameter(string.Format("@{0}", MarketRow.C_epsilon), row.Epsilon), new MySqlParameter(string.Format("@{0}", MarketRow.C_multiplier), row.Multiplier), new MySqlParameter(string.Format("@{0}", MarketRow.C_rule), row.Rule), new MySqlParameter(string.Format("@{0}", MarketRow.C_ipov), row.Ipov), new MySqlParameter(string.Format("@{0}", MarketRow.C_ytm), row.Ytm), new MySqlParameter(string.Format("@{0}", MarketRow.C_syl1), row.Syl1), new MySqlParameter(string.Format("@{0}", MarketRow.C_syl2), row.Syl2), new MySqlParameter(string.Format("@{0}", MarketRow.C_pre_delta), row.Pre_Delta), new MySqlParameter(string.Format("@{0}", MarketRow.C_curr_delta), row.Curr_Delta), new MySqlParameter(string.Format("@{0}", MarketRow.C_avg_price), row.Avg_Price), new MySqlParameter(string.Format("@{0}", MarketRow.C_sys_update_time), row.Sys_Update_Time), new MySqlParameter(string.Format("@{0}", MarketRow.C_update_time), row.Update_Time) }; return this.ExecuteNonQuery(sql, parameters) > 0; }
private MarketRow GetMarketRow(BondFuturesEODPriceRow row) { // TODO: MarketRow market = new MarketRow(); //market.Idx; market.Trade_Date = row.TRADE_DT; market.Security_Id = this.ConvertSecurityId(row.S_INFO_WINDCODE); //market.Last_Price = ; market.Change_Rate = row.S_DQ_CHANGE; market.Volume = row.S_DQ_VOLUME; //market.Trade_Count; market.Turn_Over = row.S_DQ_AMOUNT; //market.Pre_Close_Price; //market.Pre_Open_Interest; market.Pre_Settlement_Price = row.S_DQ_PRESETTLE; market.Open_Price = row.S_DQ_OPEN; market.Highest_Price = row.S_DQ_HIGH; market.Lowerst_Price = row.S_DQ_LOW; market.Close_Price = row.S_DQ_CLOSE; market.Open_Interest = row.S_DQ_OI; market.Settlement_Price = row.S_DQ_SETTLE; //market.Up_Limit_Price; //market.Lower_Limit_Price; //market.Currency; //market.Epsilon; //market.Multiplier; //market.Rule; //market.Ipov; //market.Ytm; //market.Syl1; //market.Syl2; //market.Pre_Delta; //market.Curr_Delta; //market.Avg_Price; //market.Sys_Update_Time; //market.Update_Time; return market; }