[Authorize(Roles = "admin")]        // Member list of medical stuff
        public ActionResult ListOfMedicalStuff(Sorting s, string who)
        {
            List <Doctor> docList;

            if (who == "Doctor")
            {
                docList = CreateListOf.Doctors();
                Sorting sort = new Sorting(docList, s.HowToSort);
                docList = sort.Doctors();
            }
            else if (who == "All")
            {
                docList = CreateListOf.MedicalStuff();
                Sorting sort = new Sorting(docList, s.HowToSort);
                docList = sort.Doctors();
            }
            else if (who == "Nurse")
            {
                docList = CreateListOf.Nurse();
                Sorting sort = new Sorting(docList, s.HowToSort);
                docList = sort.Doctors();
            }
            else
            {
                docList = CreateListOf.MedicalStuff();
            }
            if (docList == null)
            {
                throw new ArgumentOutOfRangeException();
            }
            return(View(new Sorting(docList)));
        }
Exemplo n.º 2
0
 public ActionResult PatientRegister(ApplicationUser user)  //Add new patient View
 {
     ViewBag.DoctorList = CreateListOf.Doctors();
     ViewBag.NurseList  = CreateListOf.Nurse();
     ViewBag.id         = user.Id;
     return(View());
 }