/// <summary> /// Adds a sub category. /// </summary> /// <param name="subCategory">The sub category.</param> public void AddSubCategory(SubCategories subCategory){ Persistence.Persist.Data.SubCategoriesList.Add(subCategory); Persist(); }
/// <summary> /// Adds the sub category. /// </summary> private void AddSubCategory(){ if (txtSubCategory.Text != "") { SubCategories subCategory = new SubCategories(); subCategory.GUID = Utilities.GetNewGUID(); subCategory.Category = txtSubCategory.Text; _categoriesControl.AddSubCategory(subCategory); } PopulateCategories(); }