protected void Page_Load(object sender, EventArgs e)
{
_studyInstanceUid = Request.QueryString[ImageServerConstants.QueryStrings.StudyInstanceUID];
_serverae = Request.QueryString[ImageServerConstants.QueryStrings.ServerAE];
if (!String.IsNullOrEmpty(_studyInstanceUid) && !String.IsNullOrEmpty(_serverae))
{
ServerPartitionDataAdapter adaptor = new ServerPartitionDataAdapter();
ServerPartitionSelectCriteria criteria = new ServerPartitionSelectCriteria();
criteria.AeTitle.EqualTo(_serverae);
IList<ServerPartition> partitions = adaptor.Get(criteria);
if (partitions != null && partitions.Count>0)
{
if (partitions.Count==1)
{
Partition = partitions[0];
//TODO: Do something if parition is inactive. Perhapse show an alert on the screen?
LoadStudy();
}
else
{
Response.Write(String.Format(ErrorMessages.MultiplePartitionsExistWithAETitle, _serverae));
}
}
}
//Hide the UserPanel information
IMasterProperties master = Master as IMasterProperties;
if(master != null) master.DisplayUserInformationPanel = false;
}