internal OrdersInfo RefreshItemsource(int i) { var order = new OrdersInfo() { OrderID = i.ToString(), CustomerID = CustomerID[random.Next(15)], EmployeeID = random.Next(1700, 1800).ToString(), FirstName = FirstNames[random.Next(15)], LastName = LastNames[random.Next(15)], Gender = Genders[random.Next(5)], IsClosed = ((i % random.Next(1, 10) > 5) ? true : false).ToString(), }; return(order); }
public ObservableCollection <OrdersInfo> GetOrderDetails(int count) { for (int i = 1; i <= count; i++) { var ord = new OrdersInfo() { OrderID = i.ToString(), CustomerID = CustomerID[random.Next(15)], EmployeeID = random.Next(1700, 1800).ToString(), FirstName = FirstNames[random.Next(15)], LastName = LastNames[random.Next(15)], Gender = Genders[random.Next(5)], IsClosed = ((i % random.Next(1, 10) > 5) ? true : false).ToString(), }; orderDetails.Add(ord); } return(orderDetails); }
internal ObservableCollection <OrdersInfo> GenerateOrders(int count) { int id = orderDetails.Count; for (int i = id; i <= id + count; i++) { var ord = new OrdersInfo() { OrderID = i.ToString(), CustomerID = CustomerID[random.Next(15)], EmployeeID = random.Next(1700, 1800).ToString(), FirstName = FirstNames[random.Next(15)], LastName = LastNames[random.Next(15)], Gender = Genders[random.Next(5)], IsClosed = ((i % random.Next(1, 10) > 5) ? true : false).ToString(), }; orderDetails.Insert(0, ord); } return(orderDetails); }