public VehicleToEmployeeRelation AddRelation(FleetServiceClient socket, Vehicle vehicle)
        {
            addRelationWindow = new AddRelationWindow();

            //Filter wich Employees get shown
            List <Employee> emps = socket.GetAllEmployees().ToList();
            List <VehicleToEmployeeRelation> rels = socket.GetRelationFromVehicle(vehicle).ToList();
            List <Employee> selectedEmps          = new List <Employee>(emps);

            emps.ForEach(emp =>
            {
                if (rels.Find(rel => rel.EmployeeId.Id == emp.Id) != null)
                {
                    selectedEmps.Remove(emp);
                }
            });

            addRelationViewModel = new AddRelationViewModel()
            {
                AddCommand    = new RelayCommand(ExecuteAddCommand),
                CancelCommand = new RelayCommand(ExecuteCancelCommand),
                Employees     = new ObservableCollection <Employee>(selectedEmps),
                Vehicle       = vehicle
            };
            addRelationWindow.DataContext = addRelationViewModel;

            if (addRelationWindow.ShowDialog() == true)
            {
                var relation = addRelationViewModel.Relation;
                relation.EmployeeId = addRelationViewModel.SelectedEmployee;
                relation.VehicleId  = vehicle;
                return(relation);
            }
            else
            {
                return(null);
            }
        }
        public VehicleToEmployeeRelation AddRelation(FleetServiceClient socket, Vehicle vehicle)
        {
            addRelationWindow    = new AddRelationWindow();
            addRelationViewModel = new AddRelationViewModel()
            {
                AddCommand    = new RelayCommand(ExecuteAddCommand),
                CancelCommand = new RelayCommand(ExecuteCancelCommand),
                Employees     = new ObservableCollection <Employee>(socket.GetAllEmployees()),
                Vehicle       = vehicle
            };
            addRelationWindow.DataContext = addRelationViewModel;

            if (addRelationWindow.ShowDialog() == true)
            {
                var relation = addRelationViewModel.Relation;
                relation.EmployeeId = addRelationViewModel.SelectedEmployee;
                relation.VehicleId  = vehicle;
                return(relation);
            }
            else
            {
                return(null);
            }
        }