Exemplo n.º 1
0
        // GET: Event/Details/5
        public ActionResult Details(int id)
        {
            //SessionManager.EventId = id;
            Event e = _eventRequester.Get(id);

            if (!(SessionManager.User is null))
            {
                ViewBag.UserId = SessionManager.User.Id;
            }

            ViewBag.EventId = id;
            //TempData["EventId"] = id;

            return(View(new EventWithComment()
            {
                Id = e.Id,
                Name = e.Name,
                Type = e.Type,
                Organizer = e.Organizer,
                Date = e.Date,
                Location = e.Location,
                Tickets = e.Tickets,
                Price = e.Price,
                Description = e.Description,
                CommentList = _apiRequester.GetAll <G.GetComment>("comment/event/" + id).ToList()
            }));
        }
Exemplo n.º 2
0
        // GET: User
        public ActionResult Index()
        {
            if (!(SessionManager.User is null))
            {
                return(View(_userRequester.Get(SessionManager.User.Id)));
            }

            ViewBag.Message = "You must be logged in to access your profile";
            return(RedirectToAction("Index", "Auth"));
        }
Exemplo n.º 3
0
 public User Get(int id)
 {
     return(_userRepository.Get(id));
 }
Exemplo n.º 4
0
 public Event Get(int id)
 {
     return(_eventRepository.Get(id));
 }