protected override void OnPreRender(EventArgs e) { base.OnPreRender(e); if (_partition != null && _study == null) { StudyNotFoundException exception = new StudyNotFoundException(_studyInstanceUid); ExceptionHandler.ThrowException(exception); } if (_partition == null) { PartitionNotFoundException exception = new PartitionNotFoundException(_serverae, "The Server Partition is null in Default.aspx -> OnPreRender()"); ExceptionHandler.ThrowException(exception); } if (_study == null) { StudyNotFoundException exception = new StudyNotFoundException(_studyInstanceUid); ExceptionHandler.ThrowException(exception); } else { SetPageTitle(String.Format("{0}:{1}", NameFormatter.Format(_study.PatientsName), _study.PatientId), false); } }
protected void LoadStudy() { if (String.IsNullOrEmpty(_studyInstanceUid)) { return; } if (_partition == null) { return; } StudyAdaptor studyAdaptor = new StudyAdaptor(); StudySelectCriteria criteria = new StudySelectCriteria(); criteria.StudyInstanceUid.EqualTo(_studyInstanceUid); criteria.ServerPartitionKey.EqualTo(Partition.GetKey()); Study study = studyAdaptor.GetFirst(HttpContext.Current.GetSharedPersistentContext(), criteria); if (study != null) { _study = StudySummaryAssembler.CreateStudySummary(HttpContext.Current.GetSharedPersistentContext(), study); } else { StudyNotFoundException exception = new StudyNotFoundException(_studyInstanceUid); ExceptionHandler.ThrowException(exception); } StudyDetailsPanel.Study = _study; StudyDetailsPanel.DataBind(); GenerateAuditLog(); }