public ObservableCollection<DealerInfo> GetDealerDetails (int count) { ObservableCollection<DealerInfo> dealerDetails = new ObservableCollection<DealerInfo> (); for (int i = 1; i <= count; i++) { var ord = new DealerInfo () { ProductID = i, ProductNo = ProductNo [random.Next (15)], DealerName = Customers [random.Next (15)], ProductPrice = random.Next(2000,10000), IsOnline = ((i % random.Next (1, 10) > 2) ? true : false), DealerImage = ImageSource.FromResource("SampleBrowser.Icons.DataGrid.Image" + (i % 10) + ".png"), }; dealerDetails.Add (ord); } return dealerDetails; }
public ObservableCollection <DealerInfo> GetDealerDetails(int count) { ObservableCollection <DealerInfo> dealerDetails = new ObservableCollection <DealerInfo> (); for (int i = 1; i <= count; i++) { var ord = new DealerInfo() { ProductID = i, ProductNo = ProductNo [random.Next(15)], DealerName = Customers [random.Next(15)], ProductPrice = random.Next(2000, 10000), IsOnline = ((i % random.Next(1, 10) > 2) ? true : false), DealerImage = ImageSource.FromResource("SampleBrowser.Icons.DataGrid.Image" + (i % 10) + ".png"), }; dealerDetails.Add(ord); } return(dealerDetails); }
public ObservableCollection<DealerInfo> GetDealerDetails(int count) { ObservableCollection<DealerInfo> dealerDetails = new ObservableCollection<DealerInfo>(); this.OrderedDates = GetDateBetween(2000, 2014, count); for (int i = 1; i <= count; i++) { var ord = new DealerInfo() { ProductID = i, ProductNo = ProductNo[random.Next(15)], DealerName = Customers[random.Next(15)], ProductPrice = random.Next(2000, 10000), ShippedDate = this.OrderedDates[i - 1], IsOnline = ((i % random.Next(1, 10) > 2) ? true : false), }; dealerDetails.Add(ord); } return dealerDetails; }