private void AddNewOrderItem(Order order) { var orderItem = order.New(); orderItem.Product = Products[_rand.Next(Products.Count)]; orderItem.Count = _rand.Next(1, 100); orderItem.Price = _rand.Next(100); orderItem.RateVat = _rand.Next(30); order.OrderItems.Add(orderItem); }
public OrderGenMainForm(Order order, IList<Product> products) { InitializeComponent(); Products = products; _orderRepository.Orders.Add(order); tlpOrderRepository.RowStyles[0].Height = 0; bConductAccounting.Visible = false; bnAddNewOrderItem.Visible = false; bnDeleteOrderItem.Visible = false; }