public ActionResult Confirm(int id)
        {
            using (var collectService = new CollectsService())
            {
                var collectViewModel = collectService.GetCollectViewModel(id, GetUserId());

                using (var userService = new UsersService())
                {
                    if (!userService.IsAdmin(GetUserId()))
                    {
                        if (!collectService.IsCollectionsUser(id, GetUserId()))
                        {
                            return(HttpNotFound());
                        }
                    }
                }

                if (collectService.CounterCollectionsGifts(id) == 0)
                {
                    ViewBag.MustChooseItem = "Musisz wybrać któryś z prezentów !";
                }

                return(View(collectViewModel));
            }
        }
 public ActionResult Details(int id)
 {
     using (var collectService = new CollectsService())
     {
         ViewBag.InCollect = collectService.IsCollectionsUser(id, GetUserId());
         var collectViewModel = collectService.GetCollectViewModel(id, GetUserId());
         return(View(collectViewModel));
     }
 }
        public ActionResult Details(int id, CollectViewModel model)
        {
            using (var collectService = new CollectsService())
            {
                ViewBag.InCollect = collectService.IsCollectionsUser(id, GetUserId());

                if (ModelState.IsValid)
                {
                    collectService.ChangeRadioButtonChoose(id, GetUserId(), model.Gift.Id);
                }

                var collectViewModel = collectService.GetCollectViewModel(id, GetUserId());
                return(View(collectViewModel));
            }
        }