/// <summary></summary>
        /// <param name="sender">The sender.</param>
        /// <param name="e">The e.</param>
        private void button1_Click(object sender, EventArgs e)
        {
            ReadingModel readingModel = new ReadingModel(0, Convert.ToInt32(nudReadingReading.Value), dtpReading.Value, Convert.ToInt32(nudReadingX.Value), Convert.ToInt32(nudReadingY.Value), missionModel.Id);
            ReadingModel newReadingModel = missionManager.AddReading(readingModel);
            if (newReadingModel != null)
            {
                MessageBox.Show("Reading toegevoegd");
                this.AddStuff();
                return;
            }

            MessageBox.Show("Oeps er ging iets mis");
        }
        /// <summary></summary>
        /// <param name="readingModel">The reading model.</param>
        /// <returns>The <see cref="ReadingModel"/>.</returns>
        public ReadingModel AddReading(ReadingModel readingModel)
        {
            string query =
                    string.Format(
                        "INSERT INTO READING (ID, READING, CAPTUREDATE, X, Y, MISSIONID) VALUES (seq_reading.nextval, '{0}', TO_TIMESTAMP('{1} 13:25:44.356000000', 'YYYY-MM-DD HH24:MI:SS.FF'), '{2}', '{3}', '{4}')",
                        readingModel.Reading,
                        readingModel.CaptureDate.ToShortDateString(),
                        readingModel.X,
                        readingModel.Y,
                        readingModel.MissionID);

                OracleCommand command = new OracleCommand(query, DatabaseSettings.Connection);
                command.ExecuteNonQuery();

                DatabaseSettings.Commit();
                return readingModel;
        }
        /// <summary></summary>
        /// <param name="id">The id.</param>
        /// <returns>The <see cref="List"/>.</returns>
        public List<ReadingModel> GetReadingsForMission(int id)
        {
            List<ReadingModel> readings = new List<ReadingModel>();

            ReadingModel readingModel = null;

            try
            {
                string query = string.Format("select * from reading where missionid ={0}", id);
                OracleCommand command = new OracleCommand(query, DatabaseSettings.Connection);

                OracleDataReader reader = command.ExecuteReader();

                while (reader.Read())
                {
                    readingModel = new ReadingModel(Convert.ToInt32(reader[0]), Convert.ToInt32(reader[1]), Convert.ToDateTime(reader[2]), Convert.ToInt32(reader[3]), Convert.ToInt32(reader[4]), Convert.ToInt32(reader[5]));
                    readings.Add(readingModel);
                }

                return readings;
            }
            catch (Exception ex)
            {
                return null;
            }
        }