public AeInfoExtended[] GetAeTitles(AeInfoExtended searchParams, QueryPageInfo queryPageInfo) { DbCommand dbCommand; IDataReader reader; List <AeInfoExtended> aetitles; dbCommand = DatabaseProvider.DbProviderFactory.CreateCommand(); aetitles = new List <AeInfoExtended>(); InitializeGetAeTitlesCommand(dbCommand, searchParams, queryPageInfo); using (reader = DatabaseProvider.ExecuteReader(dbCommand)) { while (reader.Read()) { aetitles.Add(GetClientInformation(reader)); } } return(aetitles.ToArray()); }
protected override void InitializeAddAeCommand(DbCommand command, AeInfoExtended clientInformation) { if (clientInformation != null) { command.CommandText = string.Format(AddAeFormatString, clientInformation.AETitle, clientInformation.Address, clientInformation.VerifyAddress ? 1 : 0, clientInformation.Mask, clientInformation.VerifyMask ? 1 : 0, clientInformation.Port, clientInformation.SecurePort, 0 // clientInformation.UseSecurePort ? 1 : 0 #if (LEADTOOLS_V19_OR_LATER_MEDICAL_CLIENT_FRIENDLY_NAME) || (LEADTOOLS_V19_OR_LATER) , clientInformation.FriendlyName #endif , (int)clientInformation.ClientPortUsage #if LEADTOOLS_V20_OR_LATER , DateTime.Now // clientInformation.LastAccessDate #endif ); } }
public AeInfoExtended[] GetRelatedAeTitles(string aetitle, int relation) { DbCommand selectCommand; IDataReader reader; List <AeInfoExtended> aes; selectCommand = DatabaseProvider.DbProviderFactory.CreateCommand(); aes = new List <AeInfoExtended>(); InitializeGetRelatedClientInformationCommand(selectCommand, aetitle, relation); using (reader = DatabaseProvider.ExecuteReader(selectCommand)) { while (reader.Read()) { AeInfoExtended info = GetAeTitle(reader.GetColumnValue <string>("RelatedAETitle")); if (info != null) { aes.Add(info); } } } return(aes.ToArray()); }
public ClientInformation() { Client = new AeInfoExtended(); Permissions = new List <string>(); }
private AeInfoExtended GetClientInformation(IDataReader reader) { AeInfoExtended ci = new AeInfoExtended(); int columnCount = reader.FieldCount; if (!reader.IsDBNull(0)) { ci.Address = reader.GetString(0); } ci.AETitle = reader.GetString(1); if (!reader.IsDBNull(2)) { ci.Port = reader.GetInt32(2); } if (!reader.IsDBNull(3)) { ci.SecurePort = reader.GetInt32(3); } if (!reader.IsDBNull(4)) { ci.VerifyAddress = reader.GetBoolean(4); } if (!reader.IsDBNull(5)) { ci.Mask = reader.GetString(5); } if (!reader.IsDBNull(6)) { ci.VerifyMask = reader.GetBoolean(6); } //if (7 < columnCount) //{ // if (!reader.IsDBNull(7)) // ci.UseSecurePort = reader.GetBoolean(7); //} #if (LEADTOOLS_V19_OR_LATER_MEDICAL_CLIENT_FRIENDLY_NAME) || (LEADTOOLS_V19_OR_LATER) if (8 < columnCount) { if (!reader.IsDBNull(8)) { ci.FriendlyName = reader.GetString(8); } } #endif #if (LEADTOOLS_V20_OR_LATER) if (9 < columnCount) { if (!reader.IsDBNull(9)) { int enumValue = reader.GetInt32(9); ClientPortUsageType portUsage = (ClientPortUsageType)enumValue; ci.ClientPortUsage = portUsage; } } if (10 < columnCount) { if (!reader.IsDBNull(10)) { DateTime dateTimeValue = reader.GetDateTime(10); ci.LastAccessDate = dateTimeValue; } else { ci.LastAccessDate = DateTime.MinValue; } } #endif //if (!reader.IsDBNull(4)) // ci.Flags = reader.GetInt64(4); return(ci); }
protected abstract void InitializeGetAeTitlesCommand(DbCommand dbCommand, AeInfoExtended searchParams, QueryPageInfo queryPageInfo);
protected abstract void InitializeUpdateCommand(DbCommand command, AeInfoExtended ae);
protected abstract void InitializeAddAeCommand(DbCommand command, AeInfoExtended AeInfo);