/// <summary>
 /// Imports data from the raw person information to the correct tables in the database
 /// </summary>
 private void ImportData()
 {
     _view.StatusTextBox.Text = "";
     try
     {
         var dataTransformer = new DataTransformer();
         dataTransformer.TransformData();
         ShowSuccess("Data was successfully imported.");
     }
     catch (Exception ex)
     {
         ShowError(ex.Message + ". Data could not be imported.");
     }
 }
        public void TestDataTransform()
        {
            var u = VoterListApp.CurrentUser;
            var dt = new DataTransformer();
            dt.TransformData();

            // 13 persons in row data, 4 persons in in current, one overlap (Jens) = 16 total
            var select = new MySqlCommand("SELECT COUNT(*) FROM person;", this._conn);
            object o = select.ExecuteScalar();
            Assert.That(Convert.ToInt32(o) == 16, "Did not import expected amount of people.");

            MySqlCommand selectData = new MySqlCommand("SELECT COUNT(*) FROM person WHERE name='Mik Thomasen'", this._conn);
            var i = Convert.ToInt32(selectData.ExecuteScalar());
            Assert.That(i == 1, "Mik Thomasen was not insert into data");

            select = new MySqlCommand("SELECT COUNT(*) FROM person WHERE eligible_to_vote=1;", this._conn);
            i = Convert.ToInt32(select.ExecuteScalar());
            Assert.That(i > 5);
        }