示例#1
0
        public IActionResult VisiterProfile( )
        {
            string currentUserId             = User.Identity.Name;
            var    curUser                   = _userManager.GetUserAsync(HttpContext.User).Result;
            var    patientUses               = _patientUserRepository.GetAll();
            var    patientUserDetail         = _patientUserRepository.GetByEmail(curUser.Email);
            PatientUserViewModel patientUser = new PatientUserViewModel {
                Name = patientUserDetail.Name, Age = patientUserDetail.Age, Gender = patientUserDetail.Gender, City = patientUserDetail.City, CNIC = patientUserDetail.CNIC, Country = patientUserDetail.Country, Email = patientUserDetail.Email, Phone = patientUserDetail.Phone
            };

            return(View(patientUser));
        }
示例#2
0
        public IActionResult VisiterDashboard()
        {
            var patientUserDetail = _patientUserRepository.GetAll();
            List <PatientUserViewModel> PatientUserList = new List <PatientUserViewModel>();
            PatientUserViewModel        patientUser;

            foreach (var visiter in patientUserDetail)
            {
                patientUser = new PatientUserViewModel {
                    Name = visiter.Name, Age = visiter.Age, Gender = visiter.Gender, City = visiter.City, CNIC = visiter.CNIC, Country = visiter.Country, Email = visiter.Email, Phone = visiter.Phone
                };
                PatientUserList.Add(patientUser);
            }

            ViewData["Message"] = "Your visiter patient here's.";
            return(View(PatientUserList));
        }