public void DeleteSubcategory() { if (SelectedSubcategory == null) { return; } JobSubcategoryRepository.Instance.RemoveItem(SelectedSubcategory); Subcategories.Remove(SelectedSubcategory); SubcategoryName = ""; SubcategoryDescription = ""; }
public void UpdateSubcategory(Subcategory subcategory) { Subcategories.Remove(Subcategories.First(sub => sub.ID == subcategory.ID)); Subcategories.Add(subcategory); }
public void DeleteSubcategory(Subcategory subcategory) { Subcategories.Remove(subcategory); SaveChanges(); }
public void RemoveSubcategory(Subcategory subcategory) { Subcategories.Remove(subcategory); }