//Lägger till en kompetens i den inloggade mekanikerns skill-lista.
        private void AddButton_Click(object sender, RoutedEventArgs e)
        {
            _mechanics = _mechanicdb.Load();

            _mechanic = _mechanics.FirstOrDefault(mechanic => mechanic.MechanicID == CurrentUser.user.UserID);

            List <string> SkillList = _mechanicService.ListSkills();

            var skill = SkillBox.Text;

            if (SkillList.Any(x => x == skill))
            {
                MessageBox.Show("Du har angett en kompetens som du redan har.");
            }
            else
            {
                SkillList.Add(skill);

                _mechanic.Skills.Add(skill);

                DBService.Modify(_mechanic);

                CurrentSkills.ItemsSource = SkillList;
            }
        }
        public UpdateSkills()
        {
            InitializeComponent();
            _mechanicdb      = new DataAccess <Mechanic>();
            _userService     = new UserService();
            _mechanicService = new MechanicService();

            List <string> SkillList = _mechanicService.ListSkills();

            CurrentSkills.ItemsSource = SkillList;
        }