// GET: MedicalExaminations/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } var medicalExamination = _exanimationService.GetById(id.Value); if (medicalExamination == null) { return(HttpNotFound()); } return(View(medicalExamination)); }
public ActionResult Create(MedicalFinding medicalFinding) { medicalFinding.Doctor = _doctorService.GetByEmployeeId(User.Identity.Name); medicalFinding.Patient = _patientService.GetByOIB(Request.QueryString["oib"]); var exid = Request.QueryString["examination_id"]; MedicalExamination exam = _examinationService.GetById(Int32.Parse(exid)); exam.Examined = true; _examinationService.Update(exam); medicalFinding.Date = DateTime.Now; _medicalfindingService.Add(medicalFinding); return(RedirectToAction("Index", "MedicalExaminations")); }