Пример #1
0
        public ActionResult AddForPerson(int personId)
        {
            Person p = this.personTasks.GetPerson(personId);

            if (p != null)
            {
                PersonResponsibilityViewModel vm = new PersonResponsibilityViewModel(p);
                vm.PopulateDropDowns(this.responsibilityTasks.GetPersonResponsibilityTypes());
                return(View(vm));
            }
            return(new HttpNotFoundResult());
        }
Пример #2
0
        public ActionResult Add(int eventId)
        {
            Event e = this.eventTasks.GetEvent(eventId);

            if (e != null)
            {
                PersonResponsibilityViewModel vm = new PersonResponsibilityViewModel(e, e.EventSources.Select(x => this.sourceTasks.GetSourceDTO(x.Source.Id)).ToList());
                vm.PopulateDropDowns(this.responsibilityTasks.GetPersonResponsibilityTypes());
                return(View(vm));
            }
            return(new HttpNotFoundResult());
        }
Пример #3
0
        public ActionResult Edit(int id)
        {
            PersonResponsibility pr = this.responsibilityTasks.GetPersonResponsibility(id);

            if (pr != null)
            {
                PersonResponsibilityViewModel vm = new PersonResponsibilityViewModel(pr, pr.Event.EventSources.Select(x => this.sourceTasks.GetSourceDTO(x.Source.Id)).ToList());
                vm.PopulateDropDowns(this.responsibilityTasks.GetPersonResponsibilityTypes());
                return(View(vm));
            }
            return(new HttpNotFoundResult());
        }