Ejemplo n.º 1
0
        public ActionResult Delete(EventsDeleteViewModel model)
        {
            EventRepository repository = new EventRepository();

            if (model.Id.ToString() != String.Empty)
            {
                repository.Delete(model.Id);
            }


            return(RedirectToAction("Index"));
        }
Ejemplo n.º 2
0
        public ActionResult Create(EventsDeleteViewModel model, int id)
        {
            EventRepository repository = new EventRepository();

            Event events = repository.GetById(id);

            model.ImgURL      = events.ImgURL;
            model.Title       = events.Title;
            model.EventDate   = events.EventDate;
            model.EventPlace  = events.EventPlace;
            model.Organizer   = events.Organizer;
            model.Description = events.Description;

            return(View(model));
        }
Ejemplo n.º 3
0
        public ActionResult Delete(int id)
        {
            TicketRepository ticketRepository = new TicketRepository();

            Ticket tickets = ticketRepository.GetById(id);

            EventRepository repository = new EventRepository();

            Event events = repository.GetById(tickets.EventId);

            EventsDeleteViewModel model = new EventsDeleteViewModel();

            model.ImgURL      = events.ImgURL;
            model.Title       = events.Title;
            model.EventDate   = events.EventDate;
            model.EventPlace  = events.EventPlace;
            model.Organizer   = events.Organizer;
            model.Description = events.Description;


            return(View(model));
        }