/// <summary>
        /// Initializes the current window in all existing objects
        /// </summary>
        public PresentationStops(string auInput)
        {
            InitializeComponent();
            bl = BLApi.Factory.GetBL("1");

            a = bl.GetAllStops().ToList();

            au = auInput;

            if (au == "PASSENGER")
            {
                AddButton.Visibility = Visibility.Collapsed;
                foreach (BO.Stop stop in a)
                {
                    stop.Show = BO.status.REFULING;
                }
            }
            else
            {
                foreach (BO.Stop stop in a)
                {
                    stop.Show = BO.status.READY_FOR_DRIVE;
                }
            }
            stopList.ItemsSource = a;
        }
        /// <summary>
        /// This function is responsible for the series of actions that will be performed when this button is clicked
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Delete_Click(object sender, RoutedEventArgs e)
        {
            Button a = (Button)sender;

            tempStop = (BO.Stop)a.DataContext;
            try
            {
                bl.DeleteStop(tempStop.StopCode);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Exception", MessageBoxButton.OK, MessageBoxImage.Information);
            }

            var aa = bl.GetAllStops().ToList();

            if (au == "PASSENGER")
            {
                foreach (BO.Stop stop in aa)
                {
                    stop.Show = BO.status.REFULING;
                }
            }
            else
            {
                foreach (BO.Stop stop in aa)
                {
                    stop.Show = BO.status.READY_FOR_DRIVE;
                }
            }
            stopList.ItemsSource = aa;
        }
 /// <summary>
 /// constractor of the window
 /// </summary>
 public LineManagerAdd()
 {
     InitializeComponent();
     bl = BLApi.Factory.GetBL("1");
     ProgressBar();
     StopListComboBox.ItemsSource = bl.GetAllStops().ToList();
     StopListListBox.ItemsSource  = stopListInput;
 }
        /// <summary>
        /// Initializes the current window in all existing objects
        /// </summary>
        public LineManager(BO.Line line)
        {
            InitializeComponent();
            managingLine = new BO.Line();
            managingLine = line;
            bl           = BLApi.Factory.GetBL("1");
            var managingStops = bl.GetAllStops();

            allStopsList.ItemsSource = managingStops;
            stopsList.ItemsSource    = managingLine.Stops;
        }