/* * NAME * * Class_Form::Import_Many_Click - selects import files and sends it to the database. * * SYNOPSIS * * void Import_Many_Click(object sender, EventArgs e); * * sender --> the object sending the event. * e --> the event arguments. * * DESCRIPTION * * Calls the import many function from the IO class, and refreshes the view */ private void Import_Many_Click(object sender, EventArgs e) { if (IO.Import_Many()) { Refresh_Data_Grid_View(); } }
/* * NAME * * Welcome_Form::Import_Button_Click - event invoked when user clicks "Import students" * * SYNOPSIS * * void Import_Button_Click(object sender, EventArgs e); * * sender --> object sending event * e --> event arguments * * DESCRIPTION * * This function verifies that the user has entered valid teacher data, and if so, begins the importing process. * If import is canceled, it returns to the welcome form and does nothing. */ private void Import_Button_Click(object sender, EventArgs e) { //Save teacher data if (Verify_Teacher_Data() == false) { return; } else { IO.Teacher_To_File(Textboxes_To_Teacher()); } //Attempt to import if (IO.Import_Many() == true) { this.Hide(); App app = new App(); Class_Form new_class = new Class_Form(); new_class.ShowDialog(); app.ShowDialog(); this.Close(); } }