Пример #1
0
 public ActionResult Alerts()
 {
     if (User.Identity.IsAuthenticated == false)
     {
         return(RedirectToAction("Login", "Account", null));
     }
     alert.checkApp();
     alert.checkPatients();
     ViewBag.appAlerts     = alert.appointmentsAlerts.Count();
     ViewBag.patientAlerts = alert.patientsAlerts.Count();
     return(View());
 }
Пример #2
0
        // GET: Patients/Details/5
        public ActionResult Details(int?id)
        {
            if (User.Identity.IsAuthenticated == false)
            {
                return(RedirectToAction("Login", "Account", null));
            }
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Patient patient = db.Patients.Find(id);

            if (patient == null)
            {
                return(HttpNotFound());
            }
            alert.checkPatients();
            if (alert.patientsAlerts.Count > 0)
            {
                for (int i = 0; i < alert.patientsAlerts.Count; i++)
                {
                    if (alert.patientsAlerts[i].ID == id)
                    {
                        ViewBag.Alert        = "Alert: !";
                        ViewBag.AlertMessage = "Record is missing content";
                    }
                }
            }
            return(View(patient));
        }