public LogList getLogList(DateTime date) { LogList log = new LogList(); List<ScheduledSlice> scheduledslices =getScheduledSlices(date); for (int i = 0; i < scheduledslices.Count; i++) { ScheduledSlice scheduledslice = scheduledslices.ElementAt(i); LogListPrj.Slice slice = log.newSliceOnList(scheduledslice.scheduleddate); for (int j = 0; j < scheduledslice.slots.Count; j++) { ScheduledSlot schslot = scheduledslice.slots.ElementAt(j); DataItem item = null; if (schslot.type == "AUDIO") { item = new DataSongItem(schslot.iddataitem, schslot.dataitem.artist, schslot.dataitem.title, System.Configuration.ConfigurationSettings.AppSettings["MusicPath"] + "" + schslot.dataitem.file, new TimeMarker(TimeSpan.Zero, schslot.dataitem.runtime)); item.setField("pic1", schslot.dataitem.radiovis1); item.setField("pic2", schslot.dataitem.radiovis2); item.setField("pic3", schslot.dataitem.radiovis3); item.setField("pic4", schslot.dataitem.radiovis4); item.setField("radiovistxt", schslot.dataitem.radiovistxt); item.setField("currentdescr", schslot.dataitem.radiovistxt); } else if (schslot.type == "LOGNOTE") { item = new DataLogNoteItem(schslot.idhist, schslot.param, TimeSpan.Zero); } else if (schslot.type == "SYNC") { if(schslot.param == "HARD") item = new DataSyncItem(schslot.idhist, DS.SyncType.HARD, schslot.scheduleddatetime); else item = new DataSyncItem(schslot.idhist, DS.SyncType.SOFT, schslot.scheduleddatetime); } if(item != null) log.addDataToSlice(item, slice, schslot.idhist, date); } } log.refreshAirdatetime(); log.loadPlaylist(); return log; }