public Context(string st, string prodName, string catName, decimal lPrice, UnitsSoldRandomGenerator uSoldGenerator) { State = st; ProductName = prodName; CategoryName = catName; ListPrice = lPrice; UnitsSoldGenerator = uSoldGenerator; }
public Context(string st, string prodName, string catName, decimal lPrice, UnitsSoldRandomGenerator uSoldGenerator) { this.st = st; this.prodName = prodName; this.catName = catName; this.lPrice = lPrice; this.uSoldGenerator = uSoldGenerator; }
public void Generate() { foreach (DataRow region in Regions) { string state = GetState(region); double regionWeight = GetRegionWeight(region); foreach (DataRow product in Products) { UnitsSoldRandomGenerator unitsSoldgenerator = CreateUnitsSoldGenerator(regionWeight, GetProductClass(product)); Generate(new Context(state, GetProductName(product), GetCategoryName(product), GetListPrice(product), unitsSoldgenerator)); } } EndGenerate(); }