コード例 #1
0
ファイル: Form1.cs プロジェクト: Glusis/c-sharp-final
        private void getWeather()
        {
            string theDate = dateTimePicker1.Value.ToString("dd/MM/yyyy");

            string    query = "SELECT city, AVG(temp) FROM WeatherData WHERE date = \"" + theDate + "\"";
            DBconnect dbcon = new DBconnect(query);
        }
コード例 #2
0
ファイル: Form1.cs プロジェクト: Glusis/c-sharp-final
 private void addWeather(string city, float temp)
 {
     string    query = "INSERT INTO WeatherData (city, temp, time) VALUES ('" + city + "', '" + temp + "', '" + DateTime.Now.ToString("yyyy-MM-dd") + "')";
     DBconnect dbcon = new DBconnect(query);
 }