private void btnStation_Click(object sender, RoutedEventArgs e)
        {
            var stationRepositoty = new SqlStationRepository(_connectionString);
            var stationWindow     = new StationWindow(_customer, stationRepositoty.SelectAll());

            wndMainWindow.IsEnabled = false;
            stationWindow.ShowDialog();
            wndMainWindow.IsEnabled = true;
        }
        private void btnStation_Click(object sender, RoutedEventArgs e)
        {
            var stationRepository = new SqlStationRepository(_connectionString);

            if (dgrDataSchedule.SelectedItem == null)
            {
                MessageBox.Show("Not selected schedule.", "Selection", MessageBoxButton.OK, MessageBoxImage.Error);
                return;
            }

            int scheduleId = ((TimeTable)dgrDataSchedule.SelectedItem).Id;

            var stationWindow = new StationWindow(_customer, stationRepository.GetStationBySchedule(scheduleId));

            wndSchedule.Close();
            stationWindow.ShowDialog();
        }
        private void btnStations_Click(object sender, RoutedEventArgs e)
        {
            var stationRepository = new SqlStationRepository(_connectionString);

            if (dgrDataDrivers.SelectedItem == null)
            {
                MessageBox.Show("Not selected driver.", "Selection", MessageBoxButton.OK, MessageBoxImage.Error);
                return;
            }

            int driverId = ((Driver)dgrDataDrivers.SelectedItem).Id;

            var stationWindow = new StationWindow(_customer, stationRepository.GetStationByDriver(driverId));

            wndDriver.Close();
            stationWindow.ShowDialog();
        }