///////////////////////////////////////////////////////////////////////////////////////////////////// #region NON-PUBLIC PROCEDURES ///////////////////////////////////////////////////////////////////////////////////////////////////// /// <summary> /// Initializes the sales data. /// </summary> private void InitializeSalesData() { DateTime now = DateTime.Now; for (int month = 1; month <= 12; month++) { var monthDate = new DateTime(now.Year, month, 1); SalesDataDetroit.Add(new MonthlySalesData(GetRandomSalesValue(), monthDate)); SalesDataNewYork.Add(new MonthlySalesData(GetRandomSalesValue(), monthDate)); SalesDataSeattle.Add(new MonthlySalesData(GetRandomSalesValue(), monthDate)); SalesDataLosAngeles.Add(new MonthlySalesData(GetRandomSalesValue(), monthDate)); } }
/// <summary> /// Initializes the sales data. /// </summary> private void InitializeSalesData() { DateTime now = DateTime.Now; for (int month = 1; month <= 12; month++) { var monthDate = new DateTime(now.Year, month, 1); SalesDataDetroit.Add(new MonthlySalesData(GetRandomSalesValue(), monthDate)); SalesDataLosAngeles.Add(new MonthlySalesData(GetRandomSalesValue(), monthDate)); var quarterMonthDate = new DateTime(now.Year, month, random.Next(1, 27)); SalesDataForQuarters.Add(new MonthlySalesData(GetRandomSalesValue(), quarterMonthDate)); } }