public async Task <ActionResult> Index(string bloodGroup, string appointmentDate)
        {
            if (Session["IsAdmin"] != null && (bool)Session["IsAdmin"])
            {
                List <PatientDetails> patients = await apiCall.GetAllPatientDetails(bloodGroup, appointmentDate);

                return(View(patients));
            }
            else
            {
                return(RedirectToAction(nameof(Error)));
            }
        }
Example #2
0
        public async Task <ActionResult> Index(string bloodGroup, string appointmentDate)
        {
            List <PatientDetails> patients = await apiCall.GetAllPatientDetails(bloodGroup, appointmentDate);

            return(View(patients));
        }