Пример #1
0
        private void btnBalkong1_Click(object sender, EventArgs e)         // Balkong +/-
        {
            lblGrid.Text = "Sortering på då inne och yttertemperaturen skiljt sig mest och minst" + dateTimePicker1.Value.ToString("yyyy-MM-dd");

            var tab = Balkong.MestMinst2(dateTimePicker1.Value);

            dataGridView3.DataSource = tab;
            dataGridView3.Columns["diff"].DefaultCellStyle.Format = "0.#";


            //  Graph

            //var serie1 = new Series();
            //serie1.Color = Color.Blue;
            //serie1.ChartType = SeriesChartType.Line;
            //serie1.XValueMember = dataGridView3.Columns[0].DataPropertyName;
            //serie1.XValueMember = dataGridView3.Columns[2].DataPropertyName;
            //chart1.Series.Add(serie1);

            //var serie2 = new Series();
            //serie2.Color = Color.Red;
            //serie2.ChartType = SeriesChartType.Line;
            //serie2.XValueMember = dataGridView3.Columns[0].DataPropertyName;
            //serie2.XValueMember = dataGridView3.Columns[3].DataPropertyName;


            //chart1.Series.Add(serie2);
            //chart1.DataSource = dataGridView3.DataSource;
        }
Пример #2
0
        private void button2_Click_1(object sender, EventArgs e)    // Balkong      //   TempInUte     // diff Temperaturer Inne/ UT
        {
            //  var tabTemp = Balkong.TabellTempInneUte(DateTime.Parse("2016-10-10"));

            lblGrid.Text = "Differens mellan InneTemperatur och YtterTemperatur av dagen : " + dateTimePicker1.Value.ToString("yyyy-MM-dd");

            var tabTemp = Balkong.MestMinst(dateTimePicker1.Value);

            dataGridView3.DataSource = tabTemp;



            //dataGridView3.ColumnCount = 2;

            //dataGridView3.Columns[0].Name = "dagdatum";
            //dataGridView3.Columns[1].Name = "diff";

            //dataGridView3.DataSource = tabTemp;

            //MessageBox.Show(tabTemp.ToString());
        }