using System.Collections.Generic;
public static void Main()
string koko = "Facebook;Investment";
string channel = koko.Split(';')[0];
string metric = koko.Split(';')[1];
Console.WriteLine(channel);
Console.WriteLine(metric);
Dictionary<string, double> pokus = new Dictionary<string, double>();
pokus.Add("Facebook;Investment", 11000);
pokus.Add("Facebook;Impressions", 22000);
pokus.Add("Facebook;Clicks", 31000);
pokus.Add("Google;Investment", 99000);
pokus.Add("Google;Impressions", 88000);
pokus.Add("Google;Clicks", 77000);
pokus.Add("Skrz;Investment", 6000);
pokus.Add("Skrz;Impressions", 55000);
pokus.Add("Skrz;Clicks", 56000);
foreach(KeyValuePair<string, double> pair in pokus)
Console.WriteLine(pair.Key);
Console.WriteLine(pair.Value);
OutputRows rows = new OutputRows();
List<OutputRows> finaleOutputs = new List<OutputRows>();
public List<OutputRows> CreateRowsForToday(Dictionary<string, double> current_day)
List<OutputRows> outputForADay = new List<OutputRows>();
string current_channel = (current_day.Keys.First()).Split(';')[0];
OutputRows newOutput = new OutputRows();
foreach(KeyValuePair<string,double> pair in current_day)
string channel = (pair.Key).Split(';')[0];
string metric = (pair.Key).Split(';')[1];
if(channel == current_channel)
newOutput.Channel = current_channel;
int Investment_pre = (int)Math.Round(pair.Value);
newOutput.Investment = Investment_pre.ToString();
int Impressions_pre = (int)Math.Round(pair.Value);
newOutput.Impressions = Impressions_pre.ToString();
int Clicks_pre = (int)Math.Round(pair.Value);
newOutput.Clicks = Clicks_pre.ToString();
outputForADay.Add(newOutput);
current_channel = channel;
newOutput.Channel = current_channel;
int Investment_pre = (int)Math.Round(pair.Value);
newOutput.Investment = Investment_pre.ToString();
int Impressions_pre = (int)Math.Round(pair.Value);
newOutput.Impressions = Impressions_pre.ToString();
int Clicks_pre = (int)Math.Round(pair.Value);
newOutput.Clicks = Clicks_pre.ToString();
outputForADay.Add(newOutput);