protected void Page_Load(object sender, EventArgs e)
        {
            int?id      = service.GetClientId(User.Identity.Name);
            int?offerId = GetOfferId();
            int count   = 0;

            if (id.HasValue && offerId.HasValue)
            {
                count = service.GetAttractionHistoryList(id.Value, offerId.Value).Count();
                AttractionPanel.Visible = count > 0;
            }
        }
Beispiel #2
0
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            int?userId = AuthorizeUtil.GetUserId(service, User);

            if (userId == null)
            {
                return(RedirectToAction("Login", "Account"));
            }
            var history     = service.GetOfferHistory(userId.Value, id.Value);
            var attractions = service.GetAttractionHistoryList(userId.Value, id.Value);

            return(View(new OfferHistoryDetails {
                History = history, Attractions = attractions
            }));
        }