Exemplo n.º 1
0
        public static ProductionCollection GetSampleCollection()
        {
            ProductionCollection collection = new ProductionCollection(
                new Product {
                Id = 1, Code = "1001", Category = "Red Wine", Name = "A", Price = 10, ProduceDate = Convert.ToDateTime("2018/6/16")
            },
                new Product {
                Id = 3, Code = "2001", Category = "White Spirit", Name = "B", Price = 11, ProduceDate = Convert.ToDateTime("2018/6/15")
            },
                new Product {
                Id = 4, Code = "2013", Category = "White Spirit", Name = "C", Price = 12, ProduceDate = Convert.ToDateTime("2018/6/14")
            },
                new Product {
                Id = 8, Code = "3001", Category = "Beer", Name = "D", Price = 103, ProduceDate = Convert.ToDateTime("2018/6/13")
            },
                new Product {
                Id = 11, Code = "1003", Category = "Red Wine", Name = "E", Price = 140, ProduceDate = Convert.ToDateTime("2018/6/12")
            },
                new Product {
                Id = 15, Code = "1007", Category = "Red Wine", Name = "F", Price = 105, ProduceDate = Convert.ToDateTime("2018/6/21")
            },
                new Product {
                Id = 17, Code = "3009", Category = "Beer", Name = "G", Price = 160, ProduceDate = Convert.ToDateTime("2018/6/11")
            }
                );

            return(collection);
        }
Exemplo n.º 2
0
 public ProductEnumerator(ProductionCollection productionCollection)
 {
     this.productionCollection = productionCollection;
     index = -1;
 }