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

        private void AddLine_Click(object sender, RoutedEventArgs e)
        {
            LinesDetails newLine = new LinesDetails(null, true, false);

            if (newLine.ShowDialog() == true)//if the user could click on ok
            {
                bl.AddLine(newLine.MyLine);
                lineList.Insert(0, newLine.MyLine);
            }
        }
        /// <summary>
        /// an event to show the update line window
        /// </summary>

        private void updateBusLine_Click(object sender, RoutedEventArgs e)
        {
            BO.Line      l            = ((Button)sender).DataContext as BO.Line;
            LinesDetails linesDetails = new LinesDetails(l, false, true);

            if (linesDetails.ShowDialog() == true)//if the user fill all the ditals
            {
                bl.UpdateLine(l);
                int i = lineList.IndexOf(l);
                lineList.Remove(l);
                lineList.Insert(i, l);
            }
        }
        /// <summary>
        /// an event to show the details line window
        /// </summary>

        private void linesDetails_Click(object sender, MouseButtonEventArgs e)
        {
            LinesDetails detailLine = new LinesDetails(((ListView)sender).SelectedItem as BO.Line, false, false);

            detailLine.ShowDialog();
        }