Exemple #1
0
 //temp... this is to ensure that the parent window (StartScreen) is also closed
 private void MainWindow_FormClosing(object sender, FormClosingEventArgs e)
 {
     if (raceData.StartWindow != null)
     {
         this.Dispose();
         raceData.StartWindow.Close();
     }
     //One last backup of the database is called when user closes form
     CommonSQL.BackupDB();
 }
Exemple #2
0
 //updates an exsisting runners info based on runnerID
 private void updateRunner()
 {
     if (!CommonSQL.BibExistOutsideRunner(textBoxBibId.Text, raceData.RaceID, _RunnerID))
     {
         CommonSQL.UpdateRunner(_RunnerID, textBoxFirstName.Text, textBoxLastName.Text, Convert.ToDateTime(dateTimePicker1.Value.ToShortDateString()), textBoxBibId.Text, tbGender.Text, textBoxTeam.Text, textBoxOrginization.Text, raceData.raceName, raceData.connectionString);
         if (parent != null)
         {
             parent.Reload();
         }
         CommonSQL.BackupDB();
         this.Close();
     }
     else
     {
         MessageBox.Show("Can not add: Duplicate bib");
     }
 }