Exemplo n.º 1
0
        static void check_whq_global_totals(string min_code, string min_id, string perm_link,string period, ref GR gr)
        {
            //prod lmi_total_send_mult_disc
               // Console.WriteLine("");
            //onsole.WriteLine(perm_link + ":");
            foreach(string mcc in ids.mcc_code.Values ){
                var measurement = gr.GetMeasurements(min_id, period, period, "", "", false, "&filters[perm_link]=" + perm_link + "&filters[dimension]=" + mcc).FirstOrDefault();
                if (measurement.measurements.Count > 0) {

                Console.WriteLine(min_code + " " + mcc + ":" + measurement.measurements.First().Value);
                }else{
                    Console.WriteLine(min_code + " " + mcc + ": 0");
                }
            }
        }
Exemplo n.º 2
0
        static void deleteAllMeasurements(string period_from, string period_to, ref GR gr, string mcc)
        {
            Console.WriteLine(mcc);
            var everything = gr.GetMeasurements("", period_from, period_to, "", "", false, "&filters[perm_link]=lmi_local%25&show_detail=true&filters[dimension]=" + mcc + "&per_page=100");

               //int i = 0;
            foreach (var row1 in everything)
            {
                Console.WriteLine("Deleting " + row1.PermLink);
                foreach (var row in row1.measurements.Where(c => c.CreatedBy == "46df52a6-e71e-11e3-a5a1-12768b82bfd5"))
                {
                    Console.Write(".");

                    gr.DeleteMeasuerment(row.ID);

                    //i++;
                }
            }
        }