コード例 #1
0
        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);
        }
コード例 #2
0
        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());
        }
コード例 #3
0
 public List <Product> GetAllProducts()
 {
     return(_dp.GetAllProducts());
 }