Exemplo n.º 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            int?offerId = GetOfferId();

            if (offerId.HasValue)
            {
                int attractionCount = service.GetAttractions(offerId.Value).Count();
                AttractionPanel.Visible = attractionCount > 0;
            }
            if (User.Identity.IsAuthenticated)
            {
                attractionIdToReservedMap = service.GetAttractionIdToReservedMap(service.GetClientId(User.Identity.Name));
            }
        }
Exemplo n.º 2
0
        // GET: Offers/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            tOferta tOferta = service.FindOffer(id.Value);

            if (tOferta == null)
            {
                return(HttpNotFound());
            }
            ViewBag.IsReserved         = IsOfferReserved(id.Value);
            ViewBag.AttractionReserved = new AttractionReserved(service.GetAttractionIdToReservedMap(AuthorizeUtil.GetUserId(service, User)));
            return(View(tOferta));
        }