コード例 #1
0
        public ActionResult ManageAccount(PatientModel patientModel)
        {
            if (Convert.ToString(Session["key"]) != "patient")
            {
                return(RedirectToAction("Login", "Home"));
            }
            Admin_Api adminApi = new Admin_Api();
            var       model    = adminApi.UpdatePatient(patientModel);

            var m = model.Where(p => p.pid == patientModel.pid);

            return(View("~/Views/Patient/ManageAccount.cshtml", m));
        }
        public ActionResult ManagePatients(PatientModel patientUpdates)
        {
            if (Convert.ToString(Session["key"]) != "admin")
            {
                return(RedirectToAction("Login", "Home"));
            }

            Admin_Api adminGetAllPatients = new Admin_Api();
            var       model = adminGetAllPatients.UpdatePatient(patientUpdates);

            if (model != null)
            {
                return(View("~/Views/Administrator/AdminViewPatients.cshtml", model));
            }
            return(View("~/Views/Error.cshtml"));
        }