Пример #1
0
        // GET: Event/Details/5
        public ActionResult Details(int id)
        {
            EventService    repo       = new EventService();
            EmployeeService emprepo    = new EmployeeService();
            InviteService   repoInvite = new InviteService();
            DocumentService repoDoc    = new DocumentService();
            Event           events     = repo.Get(id);
            IEnumerable <EventEmployeeListItem> employees = repoInvite.GetByEventId(id).Select(i => new EventEmployeeListItem(emprepo.Get(i.EmployeeId), repoInvite.Get(i.EmployeeId, id)));
            IEnumerable <DocumentList>          docs      = repoDoc.GetByEvent(id).Select(d => new DocumentList(d));
            EventDetail ev = new EventDetail(events, emprepo.Get(events.EmployeeId), employees, docs);

            return(View(ev));
        }