示例#1
0
 /// <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();
 }
示例#2
0
 /// <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();
 }