Beispiel #1
0
        private void buttonDetails_Click(object sender, EventArgs e)
        {
            int         code = Convert.ToInt32(comboBoxUpcoming.Text);
            TripDetails t    = new TripDetails(code, ID);

            t.Show();
        }
Beispiel #2
0
        private void buttonFind_Click(object sender, EventArgs e)
        {
            Controller controllerObj = new Controller();
            int        code          = Convert.ToInt32(controllerObj.getTripCode(comboBoxReg.Text, comboBoxDirection.Text, comboBoxTime.Text));
            string     date          = monthCalendar1.SelectionRange.Start.ToString("yyyy-MM-dd");
            string     time          = comboBoxTime.Text.ToString();
            int        n             = controllerObj.BookTrip(code, ID, date);

            if (n == 0)
            {
                TripDetails t = new TripDetails(code, ID, date, time, comboBoxReg.Text);
                t.Show();
            }
        }