示例#1
0
        public async Task <IActionResult> OnGet(int id)
        {
            var userId = _httpContextAccessor.HttpContext.User.FindFirstValue(ClaimTypes.NameIdentifier);

            CurrentID      = id;
            isCreated      = false;
            MeetingVariant = _mvRepo.GetMeetingVariantById(id, null);
            if (MeetingVariant != null)
            {
                isCreated = true;
            }
            if (MeetingVariant != null && userId != MeetingVariant.Owner)
            {
                return(Redirect("/HostMan/AccountPage"));
            }
            Diapasons = _diRepo.GetAllByMeetingId(id, userId);
            return(Page());
        }
 public async Task <IActionResult> OnGet(int id, int?day, int?course)
 {
     ////CHANGE ASAP!!!!!!!!!!!!!!!!!!!!!!!!!!!!
     Slots          = _slotRepo.GetSlotsByMeetingID(id);
     MeetingVariant = _mvRepo.GetMeetingVariantById(id, null);
     if (Slots == null || MeetingVariant == null)
     {
         return(Redirect("/Index"));
     }
     if (day != null)
     {
         SelectedSlot = Slots.FirstOrDefault(el => el.SlotID == day);
     }
     if (course != null)
     {
         FinalSlot = Slots.FirstOrDefault(el => el.SlotID == day);
     }
     return(Page());
 }