private void btnHistory_Click(object sender, EventArgs e) { HistoryView historyView = new HistoryView(); if ((Application.OpenForms["DataTable"] as HistoryView) == null) { historyView.Show(); } historyView.Updating(); }
private void btnSubmit_Click(object sender, EventArgs e) { if (txtId.Text != "" && txtDate.Text != "" && txtDestination.Text != "") { Flight flight = new Flight(int.Parse(txtId.Text), txtOrigin.Text, txtDestination.Text, DateTime.Parse(txtDate.Text), DateTime.Parse(txtTime.Text)); historyView = new HistoryView(); historyView.Updating(); } }