Пример #1
0
        // GET: Invitation
        public ActionResult Index()
        {
            int userId      = Convert.ToInt32(User.Identity.GetUserId());
            var invitations = InvitationRepository.Get(userId);
            var model       = new InvitationViewModel()
            {
                Invitations = invitations
            };

            if (invitations != null)
            {
                InvitationRepository.UpdateNotified(userId);
            }
            return(View(model));
        }
Пример #2
0
        // GET: Meetings
        public ActionResult Index()
        {
            int userId   = Convert.ToInt32(User.Identity.GetUserId());
            var meetings = MeetingsRepository.Get(userId);

            meetings.Reverse();
            var invitations = InvitationRepository.Get(userId);

            invitations.Reverse();
            if (invitations != null)
            {
                InvitationRepository.UpdateNotified(userId);
            }
            var model = new MeetingsViewModel()
            {
                Meetings    = meetings,
                Invitations = invitations
            };

            return(View(model));
        }