Ejemplo n.º 1
0
        public ActionResult ViewSurvey(string SurveyID)
        {
            KnockAndCheckDAL DAL = new KnockAndCheckDAL();

            ViewBag.Patient  = DAL.SpecificPatient(DAL.GetCheckup(SurveyID).PatientID);
            ViewBag.Form     = DAL.GetFormBySurveyID(SurveyID);
            ViewBag.Checkup  = DAL.GetCheckup(SurveyID);
            ViewBag.UserName = DAL.GetUserName(DAL.GetCheckup(SurveyID).Id);

            return(View());
        }
Ejemplo n.º 2
0
        public ActionResult SpecificPatient(string PatientID)
        {
            KnockAndCheckDAL DAL = new KnockAndCheckDAL();

            ViewBag.CurrentUser = User.Identity.GetUserName();
            ViewBag.Patient     = DAL.SpecificPatient(PatientID);
            ViewBag.Surveys     = DAL.GetSurveysByID(PatientID);

            DateTime Date = Convert.ToDateTime(DAL.SpecificPatient(PatientID).DoB);

            DateTime Today = DateTime.Now;

            int Age = Today.Year - Date.Year;

            if (Date > Today.AddYears(-Age))
            {
                Age--;
            }

            ViewBag.Age = Age;

            return(View("Patient"));
        }