public Udapting(BO.BusStationBO busStationBO1, IBL1 bl1)
 {
     busStationBO = busStationBO1;
     InitializeComponent();
     stationNumberTextBox.Text = busStationBO1.StationNumber.ToString();
     bl = bl1;
 }
        private void Udapting(object sender, RoutedEventArgs e)
        {
            BO.BusStationBO  busStationBO = new BO.BusStationBO();
            FrameworkElement fxElt        = sender as FrameworkElement;

            busStationBO = fxElt.DataContext as BO.BusStationBO;
            Udapting udapting = new Udapting(busStationBO, bl);

            udapting.Show();
            Close();
        }
        private void Linespassingstation(object sender, RoutedEventArgs e)
        {
            _ = new BO.BusStationBO();
            FrameworkElement fxElt = sender as FrameworkElement;

            BO.BusStationBO busStationBO = fxElt.DataContext as BO.BusStationBO;
            try
            {
                LineInStation lineInStation = new LineInStation(bl.LinePastInStationBOs(busStationBO.StationNumber));
                _ = lineInStation.ShowDialog();
            }
            catch (BO.BOExceptionLine ex)
            {
                _ = MessageBox.Show(ex.Message, "Error", MessageBoxButton.OKCancel,
                                    MessageBoxImage.Error);
            }
        }
 private void Delete(object sender, RoutedEventArgs e)
 {
     try
     {
         FrameworkElement fxElt        = sender as FrameworkElement;
         BO.BusStationBO  busStationBO = fxElt.DataContext as BO.BusStationBO;
         bl.DeleteStationFromDo(busStationBO.StationNumber);
         _ = busLineBOs.Remove(busStationBO);
         busLineBOs.Add(bl.ReturnStationToPL(busStationBO.StationNumber));
         StationList.Items.Refresh();
     }
     catch (BO.BOExceptionStation ex)
     {
         _ = MessageBox.Show(ex.Message, "Error", MessageBoxButton.OKCancel,
                             MessageBoxImage.Error);
     }
 }
Ejemplo n.º 5
0
        private void AddStation(object sender, RoutedEventArgs e)
        {
            FrameworkElement fxElt = sender as FrameworkElement;

            BO.BusStationBO busStationBO = fxElt.DataContext as BO.BusStationBO;

            BO.StationLineBO stationLineBO = new BO.StationLineBO
            {
                BusLineID2           = NumberLine,
                StationNumberOnLine  = busStationBO.StationNumber,
                ChackDelete2         = true,
                LocationNumberOnLine = StationLineBO2.LocationNumberOnLine
            };
            AddTimeDIS addTimeDIS = new AddTimeDIS(bl, StationLineBO1, stationLineBO, StationLineBO2, busStationBO.NameOfStation);

            addTimeDIS.Show();
            Close();
        }
Ejemplo n.º 6
0
 private void Add(object sender, RoutedEventArgs e)
 {
     try
     {
         BO.BusStationBO busStationBO = new BO.BusStationBO
         {
             StationNumber     = int.Parse(stationNumberTextBox.Text),
             NameOfStation     = nameOfStationTextBox.Text,
             StationAddress    = stationAddressTextBox.Text,
             IsAvailable3      = (bool)isAvailable3CheckBox.IsChecked,
             AccessForDisabled = (bool)accessForDisabledComboBox.IsChecked,
             RoofToTheStation  = (bool)roofToTheStationComboBox1.IsChecked,
         };
         bl.AddStationToDo(busStationBO);
         Station station = new Station(bl);
         station.Show();
     }
     catch (BO.BOExceptionStation ex)
     {
         _ = MessageBox.Show(ex.Message, "Error", MessageBoxButton.OKCancel,
                             MessageBoxImage.Error);
     }
 }
Ejemplo n.º 7
0
 public Station1(BO.BusStationBO BusStationBO1)
 {
     Station = BusStationBO1;
     InitializeComponent();
     StationList1.DataContext = Station;
 }