Beispiel #1
0
        public ExaminationDeleteViewModel ToExamDeleteViewModel(Examination exam)
        {
            var result = new ExaminationDeleteViewModel
            {
                PatientFirstName = exam.Patient.FirstName,
                PatientLastName  = exam.Patient.LastName,
                ExamDate         = exam.DateOfVisit,
                Diagnose         = exam.DiagnoseCode
            };

            return(result);
        }
Beispiel #2
0
        // GET: Examinations/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Examination examination = db.Examinations.SingleOrDefault(exam => exam.ID == id);

            if (examination == null)
            {
                return(HttpNotFound());
            }
            ExaminationTranslator      examDeleteTranslator = new ExaminationTranslator();
            ExaminationDeleteViewModel viewModel            = examDeleteTranslator.ToExamDeleteViewModel(examination);

            return(View(viewModel));
        }