private void Form1_Load(object sender, EventArgs e) { JsonRepos jsonRepos = new JsonRepos("data.json"); jsonRepos.VytvorTestData(); XmlRepos xmlRepos = new XmlRepos("data.xml"); xmlRepos.VytvorTestData(); SqlRepos sqlRepos = new SqlRepos(); //repositar = jsonRepos; repositar = sqlRepos; //repositar = xmlRepos; cBoxRok.SelectedIndex = cBoxRok.Items.IndexOf(DateTime.Now.Year.ToString()); cBoxMesic.SelectedIndex = DateTime.Now.Month - 1; pokladna = repositar.NactiVse(); foreach (var p in pokladna) { listView1.Items.Add(p.DoLvItem()); } }
private void Form1_Load(object sender, EventArgs e) { JsonRepos jsonRepos = new JsonRepos("data.json"); //jsonRepos.VytvorTestData(); SqlRepos sqlRepos = new SqlRepos(); //sqlRepos.VytvorTestData(jsonRepos.NactiVse()); repositar = sqlRepos; cBoxRok.SelectedIndex = cBoxRok.Items.IndexOf(DateTime.Now.Year.ToString()); cBoxMesic.SelectedIndex = DateTime.Now.Month - 1; }