}//Page_Load

  public void ApplyFilter_Click
  (
   Object sender, 
   EventArgs e
  ) 
  {
   string                         exceptionMessage                    = null;
   string[]                       scriptureReference                  = new string[] 
                                                                        { 
                                                                          TextBoxScriptureReferenceTextRetrieval.Text.Trim()
                                                                        };
                                                                     
   string                          scriptureReferenceCrosswalkURIHtml = null;
   string                          scriptureReferenceCrosswalkURIXml  = null;
      
   ScriptureReferenceTextSubset[]  scriptureReferenceTextSubset       = null;

   //scriptureReferenceCrosswalkURI = ScriptureReference.ScriptureReferenceURICrosswalk( new string[] {"Genesis 1"} );   
   scriptureReferenceCrosswalkURIHtml = ScriptureReference.ScriptureReferenceURICrosswalkHtml(scriptureReference);
   TextBoxScriptureReferenceCrosswalkURIHtml.Text = scriptureReferenceCrosswalkURIHtml;

   scriptureReferenceCrosswalkURIXml = ScriptureReference.ScriptureReferenceURICrosswalkXml(scriptureReference);
   TextBoxScriptureReferenceCrosswalkURIXml.Text = scriptureReferenceCrosswalkURIXml;

   //TextBoxScriptureReferenceCrosswalkURIXml.SelectAll();
    
   //scriptureReferenceTextSubset = ScriptureReference.ScriptureReferenceText( new string[] {"Genesis 1"} );
   scriptureReferenceTextSubset = ScriptureReference.ScriptureReferenceText( scriptureReference, exceptionMessage );
   LabelExceptionMessage.Text = exceptionMessage;
   RepeaterScriptureReferenceTextRetrieval.DataSource = scriptureReferenceTextSubset;
   RepeaterScriptureReferenceTextRetrieval.DataBind();
  }//ApplyFilter_Click
Beispiel #2
0
 /// <summary>Page Load.</summary>
 public void Page_Load
 (
  object     sender, 
  EventArgs  e
 ) 
 {
  string exceptionMessage = null;
  
  serverMapPath = this.MapPath("");
  if ( serverMapPath != null)
  {
   filenameConfigurationXml = serverMapPath + @"\" + filenameConfigurationXml;
  }//if ( serverMapPath != null)
  ScriptureReference.ConfigurationXml
  (
       filenameConfigurationXml,
   ref exceptionMessage,
   ref databaseConnectionString
  );
  if ( exceptionMessage != null )
  {
   Feedback = exceptionMessage;
   return;
  }//if ( exceptionMessage != null ) 
  
  if ( Page.IsPostBack )
  {
   PageSubmit();
  } 
  
 }//Page_Load
Beispiel #3
0
  }//ConfigurationXml	 

  /// <summary>Scripture Reference URI.</summary>
  /// <param name="databaseConnectionString">The database connection string.</param>
  /// <param name="filenameConfigurationXml">The filename configuration Xml.</param>
  /// <param name="exceptionMessage">The exception message.</param>  
  /// <param name="dataSet">The dataset.</param>
  public static void ScriptureReferenceURI
  (
       string  databaseConnectionString,
       string  filenameConfigurationXml,
   ref string  exceptionMessage,
   ref DataSet dataSet
  )
  {
   bool                                         boolView                                  = false;
   
   int                                          columnIndexScriptureReference             = -1;
   
   string                                       dataColumnName                            = null;
   string                                       scriptureReferenceColumnValue             = null;
   string                                       scriptureReferenceColumnName              = null;
   string                                       scriptureReferenceColumnNameURI           = null;
   string                                       scriptureReferenceURI                     = null;   
   string[][]                                   scriptureReferenceArray                   = null;    
   string                                       columnNamePrimary                         = null;
   string                                       columnValuePrimary                        = null; 
   string                                       tableName                                 = null;
   
   ArrayList                                    scriptureReferenceSet                     = null;
   ArrayList                                    scriptureReferenceURISet                  = null;
   ScriptureReferenceBookChapterVersePrePost[]  scriptureReferenceBookChapterVersePrePost = null;
   StringBuilder                                columnSet                                 = null;   
   StringBuilder                                uriCrosswalkXml                           = null;
   StringBuilder                                uriCrosswalkHtml                          = null;   
   StringBuilder                                SQLStatement                              = null;      
   OleDbConnection                              oleDbConnection                           = null;
   XmlNodeList                                  scriptureReferenceColumnSet               = null;

   scriptureReferenceColumnSet = UtilityXml.SelectNodes
   (
        filenameConfigurationXml,
    ref exceptionMessage,
        XPathColumnScriptureReference
   );
   try
   {
    oleDbConnection = UtilityDatabase.DatabaseConnectionInitialize
    (
         databaseConnectionString,
     ref exceptionMessage
    ); 

    foreach ( DataTable dataTable in dataSet.Tables )
    {
   
     columnIndexScriptureReference = UtilityDatabase.DataTableColumnIndex
     (
      dataTable,
      "ScriptureReference"
     ); 
     
     if ( columnIndexScriptureReference < 0 )
     {
      continue;
     }           	
    	
     tableName                = dataTable.TableName;
     scriptureReferenceSet    = new ArrayList();
     scriptureReferenceURISet = new ArrayList();
     SQLStatement = new StringBuilder();
     
     if ( tableName.IndexOf("View" ) < 0 )
     {
      boolView = false;
      SQLStatement.AppendFormat
      (
       InformationSchemaColumnNamePrimaryColumnSQL,
       tableName
      );
     }
     else
     {
      boolView = true;	
      SQLStatement.AppendFormat
      (
       InformationSchemaColumnNamePrimaryColumnSQL,
       tableName.Substring(4)
      );
     }

      #if (DEBUG)
       System.Console.WriteLine("SQLStatement: {0}", SQLStatement);
      #endif
     
     columnNamePrimary = (string) UtilityDatabase.DatabaseQuery
     (
          databaseConnectionString,
      ref exceptionMessage,
          SQLStatement.ToString(),
          CommandType.Text
     );
     
     if ( boolView == true )
     {
      columnNamePrimary = String.Concat( tableName.Substring(4), columnNamePrimary );	
     }	 

     #if (DEBUG)
      System.Console.WriteLine("ColumnNamePrimary: {0}", columnNamePrimary);
     #endif
     
     foreach ( DataColumn dataColumn in dataTable.Columns )
     {
      dataColumnName = dataColumn.ColumnName.Trim();
      /*
      #if (DEBUG)
       System.Console.WriteLine("Table Name: {0} | ColumnName: {1}", tableName, dataColumnName);
      #endif
      */
      if ( dataColumnName.IndexOf( ScriptureReferenceURIColumnNamePostfix ) >= 0 )
      {
       continue;
      }
      if ( dataColumnName.IndexOf( ScriptureReferenceColumnNamePostfix ) >= 0 )
      {
       scriptureReferenceSet.Add( dataColumnName );
       scriptureReferenceColumnName    = dataColumnName;
       scriptureReferenceColumnNameURI = scriptureReferenceColumnName + "URI";
       if ( dataTable.Columns.Contains( scriptureReferenceColumnNameURI ) == false )
       {
        /*
        #if (DEBUG)
         System.Console.WriteLine("Table Name: {0} | ColumnName: {1}", tableName, scriptureReferenceColumnNameURI);
        #endif
        */
        scriptureReferenceURISet.Add( scriptureReferenceColumnNameURI );
       }//if dataTable.Columns.Contains( scriptureReferenceColumnNameURI ) == false )
      }//if ( dataColumnName.IndexOf( ScriptureReferenceColumnNamePostfix ) >= 0 )
     }//foreach ( DataColumn dataColumn in dataTable.Columns )

     foreach ( object columnName in scriptureReferenceURISet )
     {
      scriptureReferenceColumnNameURI = columnName.ToString().Trim();
      dataTable.Columns.Add( scriptureReferenceColumnNameURI );
     }

     foreach ( DataColumn dataColumn in dataTable.Columns )
     {
      dataColumnName = dataColumn.ColumnName.Trim();
      /*
       #if (DEBUG)
        System.Console.WriteLine("Table Name: {0} | ColumnName: {1}", tableName, dataColumnName);
       #endif
      */ 
     }//foreach ( DataColumn dataColumn in dataTable.Columns )

     foreach ( DataRow dataRow in dataTable.Rows )
     {
      columnValuePrimary = dataRow[columnNamePrimary].ToString().Trim();
      columnSet = new StringBuilder();
      /*
       #if (DEBUG)
        System.Console.WriteLine("ColumnValuePrimary: {0}", columnValuePrimary);
       #endif
      */ 
      foreach ( object columnName in scriptureReferenceSet )
      {
       #if (DEBUG)
        System.Console.WriteLine("ColumnName: {0}", columnName);
       #endif
       scriptureReferenceColumnName  = columnName.ToString().Trim();
       scriptureReferenceColumnValue = dataRow[scriptureReferenceColumnName].ToString().Trim();
     
       #if (DEBUG)
        System.Console.WriteLine
        (
         "Scripture Reference Column Name: {0} | Value: {1}", 
         scriptureReferenceColumnName,
         scriptureReferenceColumnValue
        );
       #endif
       scriptureReferenceColumnNameURI = scriptureReferenceColumnName + "URI";
       if ( scriptureReferenceColumnValue != null && scriptureReferenceColumnValue != string.Empty )
       {
        ScriptureReference.ScriptureReferenceParser
        (
             new string[] { scriptureReferenceColumnValue },
             databaseConnectionString,
         ref exceptionMessage,
         ref scriptureReferenceBookChapterVersePrePost,
         ref scriptureReferenceArray,
         ref uriCrosswalkHtml,
         ref uriCrosswalkXml
        );//ScriptureReference.ScriptureReferenceParser()
        scriptureReferenceURI = uriCrosswalkHtml.ToString();
        if ( UtilityDatabase.DataSetTableColumnContains( dataSet, tableName, scriptureReferenceColumnNameURI ) == false )
        {
         UtilityDatabase.DataSetTableColumnAdd( dataSet, tableName, scriptureReferenceColumnNameURI );	
         dataRow[scriptureReferenceColumnNameURI] = scriptureReferenceURI;
         continue;
        }//if ( DataSetTableColumnContains( dataSet, dataTable, scriptureReferenceColumnNameURI ) )	
        dataRow[scriptureReferenceColumnNameURI] = scriptureReferenceURI;
        if ( scriptureReferenceURISet.IndexOf( scriptureReferenceColumnNameURI ) >= 0 )
        {
         continue;
        }

        if ( columnSet.Length != 0 )
        {
         columnSet.Append(',');
        }
        columnSet.AppendFormat
        (
         UtilityDatabase.DatabaseTemplateSQLSet,
         scriptureReferenceColumnNameURI,
         scriptureReferenceURI
        ); 
        /*
        #if (DEBUG)
         System.Console.WriteLine("columnSet: {0}", columnSet);      
        #endif
        */
        SQLStatement = new StringBuilder();
        SQLStatement.AppendFormat
        (
         UtilityDatabase.DatabaseTemplateSQLUpdateScriptureReferenceURISet,
         tableName,
         columnSet,
         columnNamePrimary,
         columnValuePrimary
        );   
        #if (DEBUG)
         System.Console.WriteLine("SQL Statement: {0}", SQLStatement.ToString() );      
        #endif
        UtilityDatabase.DatabaseNonQuery
        (
             oleDbConnection,
         ref exceptionMessage,
             SQLStatement.ToString()
        );
       }//if ( scriptureReferenceColumnValue != null && scriptureReferenceColumnValue != string.Empty )
      }//foreach ( object columnName in dataTableColumnName )
     }//foreach ( DataRow dataRow in dataTable )
    }//foreach ( DataTable dataTable in dataSet ) 
    UtilityDatabase.DatabaseConnectionHouseKeeping
    (
         oleDbConnection,
     ref exceptionMessage
    );
   }//try
   catch (OleDbException exception)
   {
    //exceptionMessage = exception.Message;
    exceptionMessage = UtilityEventLog.WriteEntryOleDbErrorCollection( exception );
    System.Console.WriteLine("OleDbException: {0}", exceptionMessage);
   }//catch (OleDbException exception)
   catch (SecurityException exception)
   {
    exceptionMessage = exception.Message;
    System.Console.WriteLine( "SecurityException: {0}", exception.Message );
   }//catch (SecurityException exception)
   catch (SystemException exception)
   {
    exceptionMessage = exception.Message;
    System.Console.WriteLine( "SystemException: {0}", exception.Message );
   }//catch (SystemException exception)
   catch (Exception exception)
   {
    exceptionMessage = exception.Message;   
    System.Console.WriteLine( "Exception: {0}", exception.Message );
   }//catch (Exception exception)
  }//public static void ScriptureReferenceURI()
Beispiel #4
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); }
        }
Beispiel #5
0
        public static void Main(string[] argv)
        {
            int    scriptureReferenceVerseCount = -1;
            string exceptionMessage             = null;
            string scriptureReference           = null;

            string[][] scriptureReferenceArray = null;

            StringBuilder scriptureReferenceText = null;
            StringBuilder uriCrosswalkHtml       = null;
            StringBuilder uriCrosswalkXml        = null;

            StringBuilder[] scriptureReferenceBookChapterVersePrePostCondition = null;
            StringBuilder[] scriptureReferenceBookChapterVersePrePostSelect    = null;
            StringBuilder   scriptureReferenceBookChapterVersePrePostQuery     = null;

            IDataReader iDataReader = null;

            ScriptureReferenceBookChapterVersePrePost[] scriptureReferenceBookChapterVersePrePost = null;

            if (argv.Length < 1)
            {
                return;
            }
            else
            {
                scriptureReference = argv[0];
            }

            ScriptureReference.ConfigurationXml
            (
                filenameConfigurationXml,
                ref exceptionMessage,
                ref DatabaseConnectionString
            );

            System.Console.WriteLine(DatabaseConnectionString);

            ScriptureReference.ScriptureReferenceParser
            (
                new string[] { scriptureReference },
                DatabaseConnectionString,
                ref exceptionMessage,
                ref scriptureReferenceBookChapterVersePrePost,
                ref scriptureReferenceArray,
                ref uriCrosswalkHtml,
                ref uriCrosswalkXml
            );

            ScriptureReference.ScriptureReferenceQuery
            (
                DatabaseConnectionString,
                ref exceptionMessage,
                ref scriptureReferenceBookChapterVersePrePost,
                ref iDataReader,
                ref scriptureReferenceVerseCount,
                ref scriptureReferenceText,
                ref scriptureReferenceBookChapterVersePrePostCondition,
                ref scriptureReferenceBookChapterVersePrePostSelect,
                ref scriptureReferenceBookChapterVersePrePostQuery
            );

            if (iDataReader != null)
            {
                iDataReader.Close();
            }

            DataSet dataSet = new DataSet();

            UtilityDatabase.DatabaseQuery
            (
                DatabaseConnectionString,
                ref exceptionMessage,
                ref dataSet,
                scriptureReferenceBookChapterVersePrePostQuery.ToString(),
                CommandType.Text
            );

            StringBuilder sbScriptureReferenceVerseText = new StringBuilder();

            foreach (DataTable dataTable in dataSet.Tables)
            {
                foreach (DataRow dataRow in dataTable.Rows)
                {
                    sbScriptureReferenceVerseText.Append(dataRow["verseText"]);
                }
            }

            System.Console.WriteLine(sbScriptureReferenceVerseText);

            SpVoice spVoice = new SpVoice();

            spVoice.Speak
            (
                sbScriptureReferenceVerseText.ToString(),
                SpeechVoiceSpeakFlags.SVSFlagsAsync
            );
            spVoice.WaitUntilDone(Timeout.Infinite);
        }
Beispiel #6
0
	public void ScriptureMark()
	{
		int                                          scriptureReferenceVerseCount                       = -1;
		string                                       exceptionMessage                                   = null;
		string[][]                                   scriptureReferenceArray                            = null;

		StringBuilder                                scriptureReferenceText                             = null;  
		StringBuilder                                uriCrosswalkHtml                                   = null;
		StringBuilder                                uriCrosswalkXml                                    = null;   
		StringBuilder[]                              scriptureReferenceBookChapterVersePrePostCondition = null;
		StringBuilder[]                              scriptureReferenceBookChapterVersePrePostSelect    = null;
		StringBuilder                                scriptureReferenceBookChapterVersePrePostQuery     = null;

		IDataReader                                  iDataReader                                        = null;
		ScriptureReferenceBookChapterVersePrePost[]  scriptureReferenceBookChapterVersePrePost          = null;

		StringBuilder				     scriptureReferenceBookChapterVersePrePostMinMax	= null;									
		ScriptureReference.ConfigurationXml
		(
			filenameConfigurationXml,
			ref exceptionMessage,
			ref databaseConnectionString
		);
		
		ScriptureReference.ScriptureReferenceParser
		(  
			new string[] { ScriptureReferenceSearch },
			databaseConnectionString,
			ref exceptionMessage,
			ref scriptureReferenceBookChapterVersePrePost,
			ref scriptureReferenceArray,
			ref uriCrosswalkHtml,
			ref uriCrosswalkXml
		);
		
		ScriptureReference.ScriptureReferenceQuery
		(
				databaseConnectionString,
			ref exceptionMessage,
			ref scriptureReferenceBookChapterVersePrePost,
			ref iDataReader,
			ref scriptureReferenceVerseCount,
			ref scriptureReferenceText,
			ref scriptureReferenceBookChapterVersePrePostCondition,
			ref scriptureReferenceBookChapterVersePrePostSelect,
			ref scriptureReferenceBookChapterVersePrePostQuery
		);

		if ( iDataReader != null )
		{
			iDataReader.Close();
		}

		DataSet dataSet = new DataSet();
		
		scriptureReferenceBookChapterVersePrePostMinMax = new StringBuilder();
		for (int index = 0; index < scriptureReferenceBookChapterVersePrePostCondition.Length; ++index)
		{
			scriptureReferenceBookChapterVersePrePostMinMax.AppendFormat
			(
				ScriptureReferenceBookChapterVersePrePost.SQLSelectChapterVerseIdSequenceMinimumMaximum,
				scriptureReferenceBookChapterVersePrePostCondition[index]
			); 				
		}

		UtilityDatabase.DatabaseQuery
		(
			databaseConnectionString,
			ref exceptionMessage,
			ref dataSet,
			scriptureReferenceBookChapterVersePrePostMinMax.ToString(),
			CommandType.Text
		);
		
		StringBuilder chapterVerseIdSequenceMinimumMaximum = new StringBuilder();
		
		int verseIdSequenceMinimum , verseIdSequenceMaximum;
		int chapterIdSequenceMinimum, chapterIdSequenceMaximum;

		foreach ( DataTable dataTable in dataSet.Tables )
		{
			foreach ( DataRow dataRow in dataTable.Rows )
			{
				verseIdSequenceMinimum = Convert.ToInt32(dataRow["verseIdSequenceMinimum"]);
				verseIdSequenceMaximum = Convert.ToInt32(dataRow["verseIdSequenceMaximum"]);
				chapterIdSequenceMinimum = Convert.ToInt32(dataRow["chapterIdSequenceMinimum"]);
				chapterIdSequenceMaximum = Convert.ToInt32(dataRow["chapterIdSequenceMaximum"]);

				chapterVerseIdSequenceMinimumMaximum.AppendFormat
				(
					ScriptureReferenceBookChapterVersePrePost.ChapterVerseIdSequenceMinimumMaximumFormat,
					chapterIdSequenceMinimum,
					100 * chapterIdSequenceMinimum / ScriptureReferenceBookChapterVersePrePost.ChapterIdSequenceMaximum,
					verseIdSequenceMinimum,
					100 * verseIdSequenceMinimum / ScriptureReferenceBookChapterVersePrePost.VerseIdSequenceMaximum
				);

				if (verseIdSequenceMinimum != verseIdSequenceMaximum)
				{
					chapterVerseIdSequenceMinimumMaximum.Append("  ");
					chapterVerseIdSequenceMinimumMaximum.AppendFormat
					(
						ScriptureReferenceBookChapterVersePrePost.ChapterVerseIdSequenceMinimumMaximumFormat,
						chapterIdSequenceMaximum,
						100 * chapterIdSequenceMaximum / ScriptureReferenceBookChapterVersePrePost.ChapterIdSequenceMaximum,
						verseIdSequenceMaximum,
						100 * verseIdSequenceMaximum / ScriptureReferenceBookChapterVersePrePost.VerseIdSequenceMaximum
					);
				}

				chapterVerseIdSequenceMinimumMaximum.Append("<br />");
			}
		}			
		
		//Response.Write(chapterVerseIdSequenceMinimumMaximum.ToString());

		ScriptureReferenceResultSet = chapterVerseIdSequenceMinimumMaximum.ToString();					
	}
Beispiel #7
0
  /// <summary>PageSubmit().</summary>
  public void PageSubmit()
  {
   int                                          scriptureReferenceVerseCount                       = -1;
   string                                       exceptionMessage                                   = null;
   string                                       scriptureReference                                 = ScriptureReferenceSearch;
   string[][]                                   scriptureReferenceArray                            = null;

   StringBuilder                                scriptureReferenceText                             = null;  
   StringBuilder                                uriCrosswalkHtml                                   = null;
   StringBuilder                                uriCrosswalkXml                                    = null;   
   StringBuilder[]                              scriptureReferenceBookChapterVersePrePostCondition = null;
   StringBuilder[]                              scriptureReferenceBookChapterVersePrePostSelect    = null;
   StringBuilder                                scriptureReferenceBookChapterVersePrePostQuery     = null;

   IDataReader                                  iDataReader                                        = null;
   ScriptureReferenceBookChapterVersePrePost[]  scriptureReferenceBookChapterVersePrePost          = null;

   if ( scriptureReference == null || scriptureReference == string.Empty )
   {
    PageReset();
    return;
   }//if ( scriptureReference == null ) 

   try
   {

    ScriptureReference.ScriptureReferenceParser
    (  
         new string[] { scriptureReference },
         databaseConnectionString,
     ref exceptionMessage,
     ref scriptureReferenceBookChapterVersePrePost,
     ref scriptureReferenceArray,
     ref uriCrosswalkHtml,
     ref uriCrosswalkXml
    );	

    ScriptureReference.ScriptureReferenceQuery
    ( 
         databaseConnectionString,
     ref exceptionMessage,
     ref scriptureReferenceBookChapterVersePrePost,
     ref iDataReader,
     ref scriptureReferenceVerseCount,
     ref scriptureReferenceText,
     ref scriptureReferenceBookChapterVersePrePostCondition,
     ref scriptureReferenceBookChapterVersePrePostSelect,
     ref scriptureReferenceBookChapterVersePrePostQuery
    );
   
    if ( exceptionMessage != null )
    {
     Feedback = exceptionMessage;
    }//if ( exceptionMessage != null ) 
 
   }//try 
   catch (Exception exception) 
   {
    Feedback = exception.Message;
   }//catch
   finally 
   { 
    if ( iDataReader != null )
    {
     iDataReader.Close();
    }//if ( iDataReader != null ) 
   }//finally
   
   if ( scriptureReferenceVerseCount == 0 )
   {
    CrosswalkURIHtml = CrosswalkBibleURI;
    CrosswalkURIXml  = CrosswalkBibleURI;
    ScriptureReferenceResultSet = "";
   }//if ( scriptureReferenceVerseCount == 0 )
   else
   {
    CrosswalkURIHtml = uriCrosswalkHtml.ToString();
    CrosswalkURIXml  = uriCrosswalkXml.ToString();
    ScriptureReferenceResultSet = scriptureReferenceText.ToString();
   }//if ( scriptureReferenceVerseCount == 0 )
  }//public void PageSubmit()
  }//public static void Main.

  ///<summary>ImportExport.</summary>
  ///<param name="filenameImport">The filename import.</param>
  ///<param name="filenameExport">The filename export.</param>
  ///<param name="scriptureReferenceAssociates">The alphabet sequence associates.</param>
  public static void ImportExport
  (
   string filenameImport,
   string filenameExport,
   string scriptureReferenceAssociates
  )
  {

   int[]                                 alphabetSequenceIndex              = null;
   int                                   dataRowIndex                       = -1;

   string exceptionMessage                                                  = null;
   string fileNameWithoutExtension                                          = null;
   string record                                                            = null;
   string[]                              word                               = null;

   System.Data.DataColumn                dataColumn                         = null;
   System.Data.DataColumn                dataColumnForeignKey               = null;
   System.Data.DataColumn                dataColumnPrimaryKey               = null;

   System.Data.DataRelation              dataRelation                       = null;
   System.Data.DataRow                   dataRow                            = null;
   System.Data.DataSet                   dataSet                            = null;

   System.Data.DataTable                 dataTableAlphabetSequence          = null;
   System.Data.DataTable                 dataTableTheWord                   = null;

   StreamReader                          streamReader                       = null;

   ScriptureReferenceAlphabetSequence[]  scriptureReferenceAlphabetSequence = null;

   StringBuilder                         sbTitle                            = null;

   sbTitle = new StringBuilder();

   try
   {
    if (!File.Exists(filenameImport))
    {
     System.Console.WriteLine("File not found: {0}", filenameImport); 
     return;
    }
    fileNameWithoutExtension = Path.GetFileNameWithoutExtension( filenameImport ); 
    dataSet = new DataSet();
    dataSet.DataSetName = TheWord.NodeRoot;
    // Create an instance of StreamReader to read from a file.
    // The using statement also closes the StreamReader.
     
    streamReader = new StreamReader(filenameImport); 

    // Create a new DataTable.
    dataTableTheWord = new DataTable(DataTableNameTheWord);

    dataColumn                =  new DataColumn();
    dataColumn.ColumnName     =  "SequenceOrderId";
    dataColumn.DataType       =  System.Type.GetType("System.Int32");
    dataColumn.DefaultValue   =  null;
    dataTableTheWord.Columns.Add( dataColumn );
    dataColumnPrimaryKey      = dataTableTheWord.Columns["SequenceOrderId"];

    dataColumn                = new DataColumn();
    dataColumn.ColumnName     = "Dated";
    dataColumn.DataType       = System.Type.GetType("System.DateTime");
    dataTableTheWord.Columns.Add( dataColumn );

    dataColumn                = new DataColumn();
    dataColumn.ColumnName     = "ScriptureReference";
    dataColumn.DataType       = System.Type.GetType("System.String");
    dataTableTheWord.Columns.Add( dataColumn );

    dataColumn                = new DataColumn();
    dataColumn.ColumnName     = "Title";
    dataColumn.DataType       = System.Type.GetType("System.String");
    dataTableTheWord.Columns.Add( dataColumn );

    dataSet.Tables.Add( dataTableTheWord );

    dataRow                   = dataTableTheWord.NewRow();
    dataRow["Dated"]          = System.DateTime.Today;

    dataTableTheWord.Rows.Add( dataRow );

    // Create a new DataTable.
    dataTableAlphabetSequence = new DataTable(DataTableNameAlphabetSequence);

    dataColumn = new DataColumn();
    dataColumn.ColumnName    = "TheWordId";
    dataColumn.DataType      = System.Type.GetType("System.Int32");
    dataColumn.DefaultValue  = null;
    dataTableAlphabetSequence.Columns.Add( dataColumn );
    dataColumnForeignKey     = dataTableAlphabetSequence.Columns["TheWordId"];

    dataColumn               = new DataColumn();
    dataColumn.ColumnName    = "SequenceOrderId";
    dataColumn.DataType      = System.Type.GetType("System.Int32");
    dataTableAlphabetSequence.Columns.Add( dataColumn );

    dataColumn               = new DataColumn();
    dataColumn.ColumnName    = "Word";
    dataColumn.DataType      = System.Type.GetType("System.String");
    dataTableAlphabetSequence.Columns.Add( dataColumn );

    dataColumn               = new DataColumn();
    dataColumn.ColumnName    = "AlphabetSequenceIndex";
    dataColumn.DataType      = System.Type.GetType("System.Int32");
    dataTableAlphabetSequence.Columns.Add( dataColumn );

    dataColumn               = new DataColumn();
    dataColumn.ColumnName    = "Commentary";
    dataColumn.DataType      = System.Type.GetType("System.String");
    dataColumn.DefaultValue  = null;
    dataTableAlphabetSequence.Columns.Add( dataColumn );

    dataColumn               = new DataColumn();
    dataColumn.ColumnName    = "ScriptureReference";
    dataColumn.DataType      = System.Type.GetType("System.String");
    dataTableAlphabetSequence.Columns.Add( dataColumn );

    dataSet.Tables.Add( dataTableAlphabetSequence );

    #if (DEBUG)   
     System.Console.WriteLine("Data Column Primary Key: {0}", dataColumnPrimaryKey);
     System.Console.WriteLine("Data Column Foreign Key: {0}", dataColumnForeignKey);
    #endif 
    
    dataRelation = new DataRelation
    (
      DataRelationNameAlphabetSequence, 
      dataColumnPrimaryKey,
      dataColumnForeignKey
    );

    dataRelation.Nested = true;
    dataSet.Relations.Add( dataRelation );

    // Read and display lines from the file until the end of 
    // the file is reached.
      
    while ( true ) 
    {
     record = streamReader.ReadLine();

     if ( record == null )
     {
      break;
     }

     dataRow = dataTableAlphabetSequence.NewRow();
     dataRow["Word"] = record;
     sbTitle.Append( record );
     sbTitle.Append( Environment.NewLine );
     dataTableAlphabetSequence.Rows.Add( dataRow );
    }//while ( true ) 

    alphabetSequenceIndex              = new int[dataTableAlphabetSequence.Rows.Count];
    scriptureReferenceAlphabetSequence = new ScriptureReferenceAlphabetSequence[dataTableAlphabetSequence.Rows.Count];
    word                               = new String[dataTableAlphabetSequence.Rows.Count];

    dataRowIndex = 0;
    foreach ( DataRow dataRowCurrent in dataTableAlphabetSequence.Rows )
    {
     word[dataRowIndex]                = ( string ) dataRowCurrent["Word"];
     System.Console.WriteLine( dataRowCurrent["Word"] );
     ++dataRowIndex;
    }//foreach ( DataRow dataRowCurrent in dataTableAlphabetSequence.Rows )

    UtilityDatabase.DataSetTableRowColumn
    (
     dataSet,
     "TheWord",
     0,
     "Title",
     sbTitle.ToString()
    );

    AlphabetSequence.AlphabetSequenceQuery
    (
     ref  DatabaseConnectionString,
     ref  exceptionMessage,
     ref  word,
          scriptureReferenceAssociates,
     ref  alphabetSequenceIndex,
     ref  scriptureReferenceAlphabetSequence
    );

    for ( dataRowIndex = 0; dataRowIndex < dataTableAlphabetSequence.Rows.Count; ++dataRowIndex )
    {

     UtilityDatabase.DataSetTableRowColumn
     (
      dataSet,
      DataTableNameAlphabetSequence,
      dataRowIndex,
      "AlphabetSequenceIndex",
      scriptureReferenceAlphabetSequence[ dataRowIndex ].AlphabetSequence
     );

     UtilityDatabase.DataSetTableRowColumn
     (
      dataSet,
      DataTableNameAlphabetSequence,
      dataRowIndex,
      "ScriptureReference",
      scriptureReferenceAlphabetSequence[ dataRowIndex ].ScriptureReferenceCurrent
     );

     UtilityDatabase.DataSetTableRowColumn
     (
      dataSet,
      DataTableNameAlphabetSequence,
      dataRowIndex,
      "SequenceOrderId",
      scriptureReferenceAlphabetSequence[ dataRowIndex ].SequenceOrderId
     );

    }//foreach ( DataRow dataRowCurrent in dataTableAlphabetSequence.Rows )

    ScriptureReference.ScriptureReferenceURI
    (
         TheWord.DatabaseConnectionString,
         TheWord.FilenameConfigurationXml,
     ref exceptionMessage,
     ref dataSet
    );//ScriptureReference.ScriptureReferenceURI

    UtilityXml.WriteXml
    (
         dataSet,
     ref exceptionMessage,
     ref filenameExport,
     ref TheWord.FilenameXslt
    );
   }//try
   catch (Exception exception)
   {
    System.Console.WriteLine("Exception: ", exception.Message);
   }//catch (Exception exception)
   finally
   {
   }//finally
  }//public static void ImportExport