public void reloadBuses() { busSearchBox.Text = ""; busCoachBox.Text = ""; busAcRadio.Checked = false; busNonAcRadio.Checked = false; busesTime.Text = "Time"; busId = 0; busTrash.Visible = false; //busAddBtn.Enabled = true; var bus = BusesController.getAllBus(); busGridView.DataSource = bus; }
public void reloadTickets() { ticketId = 0; customerName.Text = ""; phoneBox.Text = ""; ticketSource.Text = "From"; ticketDest.Text = "To"; coachBox.Text = "Coach"; acRadioButton.Checked = false; nonAcRadioButton.Checked = false; journeyDate.Text = DateTime.Now.ToShortDateString(); journeyTime.Text = "Time"; journeyDate.MinDate = DateTime.Parse(DateTime.Now.ToShortDateString()); // for manager and salesman journeyDate.MaxDate = DateTime.Parse(DateTime.Now.AddDays(2).ToShortDateString()); var coachlist = BusesController.getAllBus(); coachBox.Items.Clear(); foreach (var a in coachlist) { coachBox.Items.Add(a.Coach); } reserve = ""; booked = ""; seatList = allSeat(); reloadSeat(); ticketBookBtn.Enabled = true; trashTicket.Visible = false; var tickets = TicketsController.getAllTickets(); ticketsGridView.DataSource = tickets; var reservation = ReservationController.getAllReservations(); reservationGridView.DataSource = reservation; }