示例#1
0
 private void btnTrip_Click(object sender, EventArgs e)
 {
     using (var dialog = new AddTripDialog())
     {
         dialog.ShowDialog();
         if (dialog.DialogResult == DialogResult.OK)
         {
             LoadTrips();
         }
     }
 }
示例#2
0
        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();
                }
            }
        }