public void InitializeControl()
        {
            int numRegion = DataReaderRegion.ReadRegions().Count();

            cbbTop.DataSource = new ComboData[]
            {
                new ComboData()
                {
                    display = "5", value = 5
                },
                new ComboData()
                {
                    display = "10", value = 10
                },
                new ComboData()
                {
                    display = "15", value = 15
                },
                new ComboData()
                {
                    display = "all", value = numRegion
                }
            };;

            chartManager = new PieChartItalyManager(pieChart)
            {
                FromDate = () => dttFrom.Value,
                ToDate   = () => dttTo.Value,
                Top      = () => cbbTop.SelectedItem as ComboData
            };

            var charts = chartManager.GetChartAvailable();

            cbbChart.Items.AddRange(charts);
        }
Exemple #2
0
 private void RefreshChart()
 {
     if (cbbRegion.SelectedItem is ComboData selected)
     {
         dgwRegionData.DataSource = DataReaderRegion.ReadRegionData(selected.value).ToList();
     }
 }
Exemple #3
0
        public void InitializeCombo()
        {
            var regions = DataReaderRegion.ReadRegions()
                          .Select(r => new ComboData()
            {
                value = r.codice_regione, display = r.denominazione_regione
            }).ToArray();

            cbbRegion.Items.AddRange(regions);
        }