static void Main(string[] args) { List <Product> unorderedProducts = new List <Product>(); CeceliaDataProvider dp = new CeceliaDataProvider(); StringBuilder text = new StringBuilder(); unorderedProducts = dp.GetAllProducts(); if (isCfOnly) { unorderedProducts.RemoveAll(o => o.CF == false); } if (isSfOnly) { unorderedProducts.RemoveAll(o => o.SF == false); } List <Category> Products = LoadProducts(unorderedProducts); WriteToTextFile(Products); }
public string GetTextString(bool isCf, bool isSf) { List <Product> unorderedProducts = new List <Product>(); CeceliaDataProvider dp = new CeceliaDataProvider(); StringBuilder text = new StringBuilder(); unorderedProducts = dp.GetAllProducts(); if (isCf) { unorderedProducts.RemoveAll(o => o.CF == false); } if (isSf) { unorderedProducts.RemoveAll(o => o.SF == false); } List <Category> Products = LoadProducts(unorderedProducts); StringBuilder extract = WriteToTextFile(Products); return(extract.ToString()); }
public List <Product> GetAllProducts() { return(_dp.GetAllProducts()); }