コード例 #1
0
ファイル: MainWindow.xaml.cs プロジェクト: andreyk6/CManager
 private void CreateEventForEachCompany(Company[] companies)
 {
     for (int i = 0; i < companies.Length; i++)
     {
         var @event = new EventInfo()
         {
             CompanyId   = companies[i].Id,
             Name        = "Event " + i,
             Description = "Event description",
             StartDate   = DateTime.Now + new TimeSpan(rnd.Next(4), 0, 0, 0),
             Location    = GetRandomLocation(),
             EndDate     = DateTime.Now.Add(new TimeSpan(10, 5, 45, 0))
         };
         eventService.Add(@event);
     }
 }