Beispiel #1
0
        public ActionResult FoundPatients(FoundPatientsViewModel foundPatientsViewModel)
        {
            var blockChainApiService    = new Logic.Services.BlockChainService();
            var foundPatients           = blockChainApiService.GetAllPatients();
            var foundPatientsViewModel2 = new FoundPatientsViewModel();

            foundPatientsViewModel2.FoundPatients = foundPatients;

            return(View(foundPatientsViewModel2));
        }
Beispiel #2
0
        public ActionResult SearchPatient(SearchPatientViewModel searchPatientViewModel)
        {
            //search for all patients
            var blockChainApiService   = new Logic.Services.BlockChainService();
            var foundPatients          = blockChainApiService.GetAllPatients();
            var foundPatientsViewModel = new FoundPatientsViewModel();

            foundPatientsViewModel.FoundPatients = foundPatients;

            if (foundPatients.Count() < 1)
            {
                return(RedirectToAction("NoPatientsFound", "Home"));
            }
            else
            {
                return(RedirectToAction("FoundPatients", "Home", new { foundPatientsViewModel = foundPatientsViewModel }));
            }
        }