예제 #1
0
        /// <summary>EternalXml</summary>
        public static void EternalXml
        (
            ref EternalArgument eternalArgument,
            ref string exceptionMessage
        )
        {
            DataSet   dataSet           = null;
            ArrayList databaseName      = null;
            ArrayList sqlStatementUnion = null;
            ArrayList objectName        = null;
            ArrayList ownerName         = null;
            ArrayList unionIndex        = null;
            String    filenameXml       = null;

            try
            {
                UtilityDatabase.DatabaseQuery
                (
                    DatabaseConnectionString,
                    ref exceptionMessage,
                    ref dataSet,
                    eternalArgument.sqlQuery,
                    CommandType.Text
                );
                if (exceptionMessage != null)
                {
                    return;
                }
                ;
                UtilityDatabase.SQLSelectParse
                (
                    eternalArgument.sqlQuery,
                    ref unionIndex,
                    ref sqlStatementUnion,
                    ref databaseName,
                    ref ownerName,
                    ref objectName,
                    ref exceptionMessage
                );
                if (exceptionMessage != null)
                {
                    return;
                }
                ;
                if (dataSet.Tables.Count < 1)
                {
                    return;
                }//if ( dataSet.Tables.Count < 1 )
                dataSet.DataSetName = (String)databaseName[0];
                for (int objectNameCount = 0; objectNameCount < objectName.Count; ++objectNameCount)
                {
                    dataSet.Tables[objectNameCount].TableName = (String)objectName[objectNameCount];
                }//for ( int objectNameCount = 0; objectNameCount < objectName.Count; ++objectNameCount )
                ScriptureReference.ScriptureReferenceURI
                (
                    DatabaseConnectionString,
                    FilenameConfigurationXml,
                    ref exceptionMessage,
                    ref dataSet
                );
                if (exceptionMessage != null)
                {
                    return;
                }
                ;
                if (eternalArgument.date)
                {
                    filenameXml = UtilityFile.DatePostfix(eternalArgument.filenameXml);
                }
                else
                {
                    filenameXml = eternalArgument.filenameXml;
                }
                UtilityXml.WriteXml
                (
                    dataSet,
                    ref exceptionMessage,
                    ref filenameXml,
                    ref eternalArgument.filenameStylesheet
                );
                if (exceptionMessage != null)
                {
                    return;
                }
                ;
            }
            catch (Exception exception) { UtilityException.ExceptionLog(exception, exception.GetType().Name, ref exceptionMessage); }
        }