private void btnTrip_Click(object sender, EventArgs e) { using (var dialog = new AddTripDialog()) { dialog.ShowDialog(); if (dialog.DialogResult == DialogResult.OK) { LoadTrips(); } } }
private void MiNewTrip_Click(object sender, EventArgs e) { //using (var dialog = new AddTripDialog()) //{ // dialog.ShowDialog(); // if (dialog.DialogResult == DialogResult.OK) // { // //LoadTrips(); // } //} //DateTime startDate = calendarView1.DateSelectionStart.GetValueOrDefault(); //DateTime endDate = calendarView1.DateSelectionEnd.GetValueOrDefault(); using (var dialog = new AddTripDialog()) { dialog.ShowDialog(); if (dialog.DialogResult == DialogResult.OK) { LoadTrips(); } } }