示例#1
0
        public List <Models.Approach> GetRouteNonMember()
        {
            MOE.Common.Models.Repositories.IApproachRepository sr =
                MOE.Common.Models.Repositories.ApproachRepositoryFactory.Create();
            var members = from r in ApproachRouteDetails
                          select r.Approach;

            return(sr.GetAllApproaches().Except(members).ToList());
        }
示例#2
0
        public ActionResult AddDetector(int versionId, int approachID, string approachIndex)
        {
            Signal signal = _signalsRepository.GetSignalVersionByVersionId(versionId);

            if (signal.Approaches.Count == 0)
            {
                signal.Approaches = _approachRepository.GetAllApproaches().Where(a => a.VersionID == signal.VersionID).ToList();
            }
            var      approach = signal.Approaches.Where(s => s.ApproachID == approachID).First();
            Detector detector = CreateNewDetector(approach, approachIndex, signal.SignalID);

            AddSelectListsToViewBag(signal);
            return(PartialView(detector));
        }