Exemple #1
0
        public ActionResult Add(int unitId)
        {
            Unit u = this.orgTasks.GetUnit(unitId);

            if (u != null)
            {
                UnitSourceViewModel vm = new UnitSourceViewModel(u);
                vm.PopulateDropDowns(this.sourceTasks.GetReliabilities());
                return(View(vm));
            }
            return(new HttpNotFoundResult());
        }
Exemple #2
0
        public ActionResult Edit(int id)
        {
            UnitSource us = this.sourceAttachmentTasks.GetUnitSource(id);

            if (us != null)
            {
                UnitSourceViewModel vm = new UnitSourceViewModel(us);
                vm.PopulateDropDowns(this.sourceTasks.GetReliabilities());
                vm.PopulateSource(this.sourceTasks.GetSourceDTO(us.Source.Id));
                return(View(vm));
            }
            return(new HttpNotFoundResult());
        }