示例#1
0
        public async Task <ActionResult> AddConfirmedTime(int id)
        {
            Time    timeChosen = TimeRepository.Get(id);
            Meeting meeting    = MeetingRepository.Get(timeChosen.Meeting.Id);

            meeting.ConfirmedTime = timeChosen.Date;
            MeetingRepository.Update(meeting);
            await sendMeetingUpdateMail(meeting);

            return(RedirectToAction("Profile", new { id = meeting.Id }));
        }
示例#2
0
        public ActionResult AddNewTimeChoice(int id)
        {
            User       currentUser   = UserRepository.Get(Convert.ToInt32(User.Identity.GetUserId()));
            Time       timeChosen    = TimeRepository.Get(id);
            TimeChoice newTimeChoice = new TimeChoice();

            newTimeChoice.Time    = timeChosen;
            newTimeChoice.User    = currentUser;
            newTimeChoice.Meeting = timeChosen.Meeting;
            TimeChoiceRepository.Add(newTimeChoice);
            updateInvitationStatus(currentUser, timeChosen.Meeting.Id, 1);

            return(RedirectToAction("Profile", new { id = newTimeChoice.Meeting.Id }));
        }