private void OnAddNewRealSkillCommand() { if (NewSkillName == null) { if (NewDefindedSkillName == null || NewDefindedSkillName == string.Empty) { MessageBox.Show("Wybierz umiejętność!"); return; } var newSkill = new Skill(NewDefindedSkillName); BLLService.AddNewSkill(newSkill); ChosenSkills.Add(newSkill); Skills.Add(NewDefindedSkillName); OnPropertyChanged("Skills"); NewDefindedSkillName = string.Empty; } else { if (!ChosenSkills.Any(x => x.SkillName.Equals(NewSkillName))) { ChosenSkills.Add(new Skill(NewSkillName)); } else { MessageBox.Show("Podana umiejętność już została dodana!"); } NewSkillName = string.Empty; } }
public static void AddNewSkill(Skill skill) { DataAccessLayer.DALSkill.AddSkill(skill); }