private void AddNewOrder(OrderRepository orderRepository) { var order = orderRepository.New(); order.Accounting = _rand.Next()%2 == 0 ? new Accounting() : null; order.Created = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day - _rand.Next(7)); order.Vat = Vats[_rand.Next(Vats.Count)]; for (int i = 0; i < _rand.Next(3, 20); i++) AddNewOrderItem(order); orderRepository.Orders.Add(order); }
public ReportForm(OrderRepository rep) { InitializeComponent(); _reportBuilder = new ReportBuilder(rep); }
public ReportBuilder(OrderRepository orderRepository) { _orderRepository = orderRepository; }