Exemplo n.º 1
0
        private void Delete()
        {
            string query = "";

            foreach (RQ_INFO rq_info in rq_infos)
            {
                foreach (string security in rq_info.securities)
                {
                    query += "DELETE FROM " + table + " WHERE " + column_security + " = " + "'" + Get_short_ticker(security) + "'" + ";";
                }
            }
            if (query != "")
            {
                database.Execute0(query);
            }
        }
Exemplo n.º 2
0
 public override void Do_operation()
 {
     if (update)
     {
         Remove_up_to_date_securities(rq_infos);
     }
     else
     {
         database.Clear(table);
     }
     foreach (RQ_INFO rq_info in rq_infos)
     {
         string[] fields = Get_fields(rq_info.fields);
         Dictionary <string, object>[] request_result = source.Request(type, rq_info.securities, fields, rq_info.request_params);
         string query = Get_query(rq_info.fields, request_result);
         database.Execute0(query);
         Save_last_update(rq_info.securities);
     }
 }