private List <TableColumn> convertFromModel() { List <TableColumn> table = new List <TableColumn>(); TableColumn dayCol = new TableColumn(); dayCol.Header = ""; foreach (User user in model.Users) { dayCol.Entries.Add(new DailyScrumRowHeader() { Text = user.Name }); } table.Add(dayCol); foreach (DateTime date in model.Dates.OrderByDescending(date => date)) { dayCol = new TableColumn(); dayCol.Header = date.Date.ToString("ddd, dd.MM.yyyy"); foreach (User user in model.Users) { DailyScrumEntry entry = model.Get(user, date); dayCol.Entries.Add(entry); } table.Add(dayCol); } return(table); }
public void Set(User user, DateTime day, DailyScrumEntry entry) { day = day.Date; Dates.Add(day); model[Tuple.Create(user, day)] = entry; }