/// <summary>
        /// an event to show the add line window
        /// </summary>

        public void AddBus_Click(object sender, RoutedEventArgs e)
        {
            AddBus addBus = new AddBus(true);

            if (addBus.ShowDialog() == true)
            {
                addBus.MyBus.Status(1);
                listBuses.Add(addBus.MyBus);
                bl.AddBus(addBus.MyBus);
            }
        }
        /// <summary>
        /// an event to show the update bus window
        /// </summary>

        public void UpDateBus_Click(object sender, RoutedEventArgs e)
        {
            PO.Bus b     = ((Button)sender).DataContext as PO.Bus;
            AddBus upBus = new AddBus(false, b);

            if (upBus.ShowDialog() == true)
            {
                bl.UpdateBusDetails(b);
                b.Status(1);
                int i = listBuses.IndexOf((PO.Bus)b);
                listBuses.Remove((PO.Bus)b);
                listBuses.Insert(i, (PO.Bus)b);
            }
        }