//--- QUERIES INTO DATABASE --- // These are not finished - there are a -lot- of queries that need to be made. For the sake of not losing my mind, // I decided to end here with just these few - I need to be able to test it, first. //Query to add a sensor reading record public void InsertSensorRecord(WATRSensorRecord record) { string query = "INSERT INTO SensorReadings_T VALUES (" + record.XBeeSerialNumber.ToString() + ", '" + record.TimeStamp.ToString() + "'," + record.HumidityLevel.ToString() + "," + record.TemperatureLevel.ToString() + "," + record.MoistureLevel + "," + record.BatteryLevel.ToString() + ");"; executeRawSQL(query); }
public void PlaceCurrentRecord(WATRSensorRecord record) { this.currentHumidityLvl = record.HumidityLevel; this.currentBatteryLvl = record.BatteryLevel; this.currentTemperature = record.TemperatureLevel; this.currentMoistureLvl = record.MoistureLevel; this.dateTimeInfoSSLabel.Text = record.TimeStamp.ToString("MM/dd/yy hh:mm"); updateUI(); }