public GetInformationXMLResult GetInformationXML(GetInformationXMLParameters parameters) { using (TransactionScope scope = new TransactionScope()) { GetInformationXMLResult result = null; using (IDbConnection connection = new DbConnection(ConnectionString)) { connection.Open(); using (IDbCommand command = connection.CreateCommand()) { command.CommandText = "UIMessageHandler.GetInformationXML"; ((OracleCommand)command).BindByName = true; foreach (IDbDataParameter parameter in GetInformationXMLTranslator.TranslateParameters(parameters)) { command.Parameters.Add(parameter); } command.Prepare(); command.CommandType = CommandType.StoredProcedure; command.ExecuteNonQuery(); result = GetInformationXMLTranslator.TranslateResult(command.Parameters); } } scope.Complete(); return(result); } }
public static GetInformationXMLResult TranslateResult(IDataParameterCollection resultParameters) { GetInformationXMLResult result = new GetInformationXMLResult(); object data; data = ((IDbDataParameter)resultParameters["XML_O"]).Value; if (data != null && !((OracleClob)data).IsNull) { result.InformationXML = ((OracleClob)data).Value; } return(result); }