예제 #1
0
 public EventViewModel(EventModel ev, IDbCrud tm, IMainViewModel mvm)
 {
     CurrentEvent          = ev;
     CurrentEvent.Sessions = CurrentEvent.Sessions.Where(i => i.IsDone == false).OrderBy(i => i.Date).ToList();
     this.tm      = tm;
     this.mvm     = mvm;
     loggedUserId = mvm.GetLoggedUserId();
     IsLogged     = loggedUserId == -1 ? false : true;
     if (IsLogged)
     {
         CheckFavoriteSessions();
     }
 }