public void AddCatagory(string name, string shortCode, string desc) { Catagory catagory = (new Catagory(idItr++, name, shortCode, desc)); _catagories.Add(catagory); fileManager.SaveData(CatagoryConverter.ConvertToString(catagory)); }
public void DeleteCatagory(Predicate <Catagory> query) { int numberOfElementsRemoved = _catagories.RemoveAll(query); if (numberOfElementsRemoved > 0) { fileManager.DeleteData(CatagoryConverter.ConvertToString(_catagories)); } }