コード例 #1
0
        public IndexViewModel(User user, DateTime startDate, IEnumerable<User> users)
        {
            StartDate = startDate;
            Users = users;
            User = user;

            var days = new List<DayViewModel>();
            var nextMonth = startDate.AddMonths(1);
            var tmp = startDate;
            while (nextMonth > tmp)
            {
                days.Add(new DayViewModel{
                    Date = tmp,
                    Abscent = user.AbsentDays != null && user.AbsentDays.Any(d => d.Date == tmp.Date)
                });
                tmp = tmp.AddDays(1);
            }
            Days = days;
        }
コード例 #2
0
 public void Save(User entity)
 {
     this.session.Store(entity);
 }
コード例 #3
0
 public void Remove(User entity)
 {
     throw new NotImplementedException();
 }