Beispiel #1
0
        public IHttpActionResult Get(int id)
        {
            SuspectService suspectService = CreateSuspectService();
            var            suspect        = suspectService.GetSuspectById(id);

            return(Ok(suspect));
        }
Beispiel #2
0
        public IHttpActionResult Get()
        {
            SuspectService suspectService = CreateSuspectService();
            var            suspects       = suspectService.GetSuspects();

            return(Ok(suspects));
        }
Beispiel #3
0
        private SuspectService CreateSuspectService()
        {
            var userId         = Guid.Parse(User.Identity.GetUserId());
            var suspectService = new SuspectService(userId);

            return(suspectService);
        }
        /// <summary>
        /// After the user has selected any persons they wish to add to the incident this method adds those
        /// persons to the incident and navigates to the incident details page
        /// </summary>
        private void OnDoneSelectingIdentitesClick(object sender, RoutedEventArgs e)
        {
            _suspectsToAdd.AddRange(_femaleSearchResults.Where(x => x.AddToIncident).Select(x => x.Suspect));
            _suspectsToAdd.AddRange(_maleSearchResults.Where(x => x.AddToIncident).Select(x => x.Suspect));

            SuspectService.AddSuspectsToIncident(_incidentId, _suspectsToAdd);

            Frame.Navigate(typeof(IncidentDetailsPaneView), _incidentId);
        }