コード例 #1
0
        public ActionResult ListOfPatients()            //return Listt of patients
        {
            List <Patient> patientList = CreateListOf.Patients();
            Sorting        sort        = new Sorting(patientList, "");

            ViewBag.UserId = User.Identity.GetUserId();
            return(View(sort));
        }
コード例 #2
0
        [Authorize(Roles = "admin, doctor, nurse")]        // patients list
        public ActionResult ListOfPatients(Sorting s)
        {
            List <Patient> patients = CreateListOf.Patients();
            Sorting        sort     = new Sorting(patients, s.HowToSort);

            ViewBag.UserId = User.Identity.GetUserId();
            patients       = sort.Patients();

            return(View(new Sorting(patients)));
        }