How can i get data from REMOTE database using OnStart method?
protected override int OnStart(StudyLoaderArgs studyLoaderArgs)
{
ApplicationEntity ae = studyLoaderArgs.Server as ApplicationEntity;
_ae = ae;
EventResult result = EventResult.Success;
AuditedInstances loadedInstances = new AuditedInstances();
try
{
XmlDocument doc = RetrieveHeaderXml(studyLoaderArgs);
StudyXml studyXml = new StudyXml();
studyXml.SetMemento(doc);
_instances = GetInstances(studyXml).GetEnumerator();
loadedInstances.AddInstance(studyXml.PatientId, studyXml.PatientsName, studyXml.StudyInstanceUid);
return studyXml.NumberOfStudyRelatedInstances;
}
finally
{
AuditHelper.LogOpenStudies(new string[] { ae.AETitle }, loadedInstances, EventSource.CurrentUser, result);
}
}
i need to use OnStart in main project. How cn i use or call OnStart method