Exemplo n.º 1
0
        private void LatestButton_Click(object sender, EventArgs e)
        {
            var dt = WeatherSQLite.GetLatest(Convert.ToInt32(AreaIdTextBox.Text));

            if (dt.Rows.Count > 0)
            {
                DataDateLabel.Text    = dt.Rows[0]["DataDate"].ToString();
                ConditionLabel.Text   = dt.Rows[0]["Condition"].ToString();
                TemperatureLabel.Text =
                    FloatHelper.RoundString(Convert.ToSingle(dt.Rows[0]["Temperature"]), Temperature.DecimalPoint) + Temperature.UnitName;
            }
        }