コード例 #1
0
  }//ButtonSubmit_Click() 
       
  /// <summary>Page Load.</summary>
  public void Page_Load
  (
   object     sender, 
   EventArgs  e
  ) 
  {
  
   string exceptionMessage = null;
   
   if (!Page.IsPostBack) 
   {
    DocumentUniqueId = System.Guid.NewGuid();
   }//if (!Page.IsPostBack)  

   serverMapPath = this.MapPath("");
   if ( serverMapPath != null)
   {
    filenameConfigurationXml = serverMapPath + @"\" + filenameConfigurationXml;
   }//if ( serverMapPath != null)
   UtilityXml.XmlDocumentNodeInnerText
   (
        filenameConfigurationXml,
    ref exceptionMessage,
        XPathDatabaseConnectionString,
    ref databaseConnectionString
   );
   if ( exceptionMessage != null )
   {
    return;
   }//if ( exceptionMessage != null ) 
   
  }//Page_Load
コード例 #2
0
  }//public static void ConfigurationXml()

  /// <summary>Read the XML Configuration file.</summary>
  public static void ConfigurationXml
  (
   ref String filenameConfigurationXml,
   ref String exceptionMessage,
   ref String databaseConnectionString,
   ref String sqlServerName
  )
  {
   UtilityXml.XmlDocumentNodeInnerText
   (
         filenameConfigurationXml,
     ref exceptionMessage,
         XPathDatabaseConnectionString,
     ref databaseConnectionString
   );

   UtilityXml.XmlDocumentNodeInnerText
   (
         filenameConfigurationXml,
     ref exceptionMessage,
         XPathSQLServerName,
     ref sqlServerName
   );

   if ( sqlServerName == null || sqlServerName == String.Empty )
   {
    sqlServerName = Environment.MachineName;
   }//if ( sqlServerName == null || sqlServerName == String.Empty ) 

  }//ConfigurationXml	 
コード例 #3
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)
   if ( exceptionMessage != null )
   {
    Feedback = exceptionMessage;
    return;
   }//if ( exceptionMessage != null ) 
   UtilityXml.XmlDocumentNodeInnerText
   (
         filenameConfigurationXml,
     ref exceptionMessage,         
         GutenbergRogetThesaurusOfEnglishWordsAndPhrases.XPathDatabaseConnectionString,
     ref GutenbergRogetThesaurusOfEnglishWordsAndPhrases.DatabaseConnectionString
   );
   if ( exceptionMessage != null )
   {
    Feedback = exceptionMessage;
    return;
   }//if ( exceptionMessage != null ) 
  }//Page_Load
コード例 #4
0
  /// <summary>Page Load.</summary>
  public void Page_Load
  (
   object     sender, 
   EventArgs  e
  ) 
  {

   String  exceptionMessage  =  null;

   ServerMapPath = this.MapPath("");

   /* 
   FilenameConfigurationXml = Server.MapPath( FilenameConfigurationXml );
   */

   if ( ServerMapPath != null)
   {
    FilenameConfigurationXml = ServerMapPath + @"\" + FilenameConfigurationXml;
   }//if ( ServerMapPath != null)

   UtilityXml.XmlDocumentNodeInnerText
   (
        FilenameConfigurationXml,
    ref exceptionMessage,         
        TheWordSerialization.XPathDatabaseConnectionString,
    ref DatabaseConnectionString
   );

   if ( exceptionMessage != null )
   {
    Feedback = exceptionMessage;
    return;
   }//if ( exceptionMessage != null )

  }//Page_Load
コード例 #5
0
  }//public static void ConfigurationXml()

  /// <summary>Read the XML Configuration file.</summary>
  public static void ConfigurationXml
  (
       string filenameConfigurationXml,
   ref string exceptionMessage,
   ref string databaseConnectionString,
   ref int    smtpPort,
   ref string smtpServer
  )
  {
   try
   {
    UtilityXml.XmlDocumentNodeInnerText
    (
          filenameConfigurationXml,
      ref exceptionMessage,
          XPathDatabaseConnectionString,
      ref databaseConnectionString
    );
    UtilityXml.GetNodeValue
    (
         filenameConfigurationXml,
     ref exceptionMessage,
         XPathPort,
     ref smtpPort
    );
    UtilityXml.GetNodeValue
    (
         filenameConfigurationXml,
     ref exceptionMessage,
         XPathServer,
     ref smtpServer
    );
   }//try
   catch ( Exception exception ) { UtilityException.ExceptionLog( exception, "Exception", ref exceptionMessage ); }
  }//ConfigurationXml	 
コード例 #6
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)

   UtilityXml.XmlDocumentNodeInnerText
   (
        FilenameConfigurationXml,
    ref exceptionMessage,         
        UtilityContact.XPathDatabaseConnectionString,
    ref DatabaseConnectionString
   );

   if ( exceptionMessage != null )
   {
    Response.Write ( exceptionMessage );
    return;
   }//if ( exceptionMessage != null )
   
   ContactBrowse();

  }//Page_Load
コード例 #7
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)
   if ( exceptionMessage != null )
   {
    Feedback = exceptionMessage;
    return;
   }//if ( exceptionMessage != null ) 

   UtilityXml.XmlDocumentNodeInnerText
   (
         filenameConfigurationXml,
     ref exceptionMessage,         
         GutenbergWebsterUnabridgedDictionary.XPathDatabaseConnectionString,
     ref GutenbergWebsterUnabridgedDictionary.DatabaseConnectionString
   );

   if ( exceptionMessage != null )
   {
    Feedback = exceptionMessage;
    return;
   }//if ( exceptionMessage != null ) 
  }//Page_Load
コード例 #8
0
  }//public String Feedback

  /// <summary>Page Load.</summary>
  public void Page_Load
  (
   object     sender, 
   EventArgs  e
  ) 
  {

   int             SequenceOrderIdContact    =  System.Convert.ToInt32( Request.QueryString["SequenceOrderId"] );
  
   String          exceptionMessage          =  null;

   ServerMapPath = this.MapPath("");
   
   if ( ServerMapPath != null)
   {
    FilenameConfigurationXml = ServerMapPath + @"\" + FilenameConfigurationXml;
   }//if ( ServerMapPath != null)

   UtilityXml.XmlDocumentNodeInnerText
   (
        FilenameConfigurationXml,
    ref exceptionMessage,
        UtilityContact.XPathDatabaseConnectionString,
    ref DatabaseConnectionString
   );

   if ( exceptionMessage != null )
   {
    //Response.Write ( exceptionMessage );
    Feedback = exceptionMessage;
    return;
   }//if ( exceptionMessage != null )
  
  }
コード例 #9
0
  ///<summary>The entry point for the application.</summary>
  ///<param name="argv">Command-line arguments.</param>
  public static void Main
  (
   string[] argv
  )
  {
   string databaseConnectionString  = DatabaseConnectionString;
   string exceptionMessage          = null;
   
   UtilityXml.XmlDocumentNodeInnerText
   ( 
        FilenameConfigurationXml,
    ref exceptionMessage, 
        XPathDatabaseConnectionString,
    ref databaseConnectionString 
   );

   UtilityDatabase.DatabaseMaintenance
   (
        DatabaseConnectionString,
    ref exceptionMessage,
        FilenameConfigurationXml,
        XPathTheseAreTheFirstFruitsDatabase,
        XPathTheseAreTheFirstFruitsTable,
        XPathSQLTable,
        new string[] { XPathPatternFilename, PatternFilename },
        XPathImportPatternFilename
   );
  
  }//public static void Main
コード例 #10
0
        private void Page_Load
        (
            object sender,
            System.EventArgs e
        )
        {
            String exceptionMessage = null;

            serverMapPath = this.MapPath("");
            if (serverMapPath != null)
            {
                filenameConfigurationXml = serverMapPath + @"\" + filenameConfigurationXml;
            }//if ( serverMapPath != null)
            UtilityXml.XmlDocumentNodeInnerText
            (
                filenameConfigurationXml,
                ref exceptionMessage,
                XPathDatabaseConnectionString,
                ref databaseConnectionString
            );

            if (exceptionMessage != null)
            {
                Feedback = exceptionMessage;
            }

            if (!Page.IsPostBack)
            {
                BindGrid();
            } //if ( !Page.IsPostBack )
        }     //private void Page_Load()
コード例 #11
0
        }     //public static void ScriptServerDatabase()

        ///<summary>ConfigurationFile().</summary>
        public static void ConfigurationFile()
        {
            string databaseConnectionString = null;
            string databaseScript           = null;
            string exceptionMessage         = null;

            UtilityXml.XmlDocumentNodeInnerText
            (
                FilenameConfigurationXml,
                ref exceptionMessage,
                XPathDatabaseConnectionString,
                ref databaseConnectionString
            );
            if (databaseConnectionString != null && databaseConnectionString != String.Empty)
            {
                DatabaseConnectionString = databaseConnectionString;
            }

            UtilityXml.XmlDocumentNodeInnerText
            (
                FilenameConfigurationXml,
                ref exceptionMessage,
                XPathDatabaseScriptFilename,
                ref databaseScript
            );
            if (databaseScript != null && databaseScript != String.Empty)
            {
                DatabaseScriptFilename = databaseScript;
            }
        }//ConfigurationFile().
コード例 #12
0
  }//public static void ConfigurationXml()

  /// <summary>Read the XML Configuration file.</summary>
  /// <param name="filenameConfigurationXml">The XML Configuration file.</param>
  /// <param name="exceptionMessage">The exception message.</param>
  /// <param name="databaseConnectionString">The database connection string.</param>  
  public static void ConfigurationXml
  (
       string filenameConfigurationXml,
   ref string exceptionMessage,
   ref string databaseConnectionString
  )
  {
   UtilityXml.XmlDocumentNodeInnerText
   (
         filenameConfigurationXml,
     ref exceptionMessage,
         XPathDatabaseConnectionString,
     ref databaseConnectionString
    );//ConfigurationXml()
  }//ConfigurationXml	 
コード例 #13
0
  ///<summary>The entry point for the application.</summary>
  ///<param name="argv">Command-line parameters.</param>
  public static void Main
  (
   string[] argv
  )
  {
   int    argumentTotal                = argv.Length;

   string exceptionMessage             = null;
   string filenameImport               = null;
   string filenameExport               = null;
   string scriptureReferenceAssociates = null;

   if ( ArgumentFilenameImport < argumentTotal )
   {
    filenameImport = argv[ ArgumentFilenameImport ];
   }
   if ( ArgumentFilenameExport < argumentTotal )
   {
    filenameExport = argv[ ArgumentFilenameExport ];
   }
   if ( ArgumentScriptureReferenceAssociates < argumentTotal )
   {
    scriptureReferenceAssociates = argv[ ArgumentScriptureReferenceAssociates ];
   }
   #if (DEBUG)
    System.Console.WriteLine("Filename Import: {0}", filenameImport);
    System.Console.WriteLine("Filename Export: {0}", filenameExport);
   #endif

   UtilityXml.XmlDocumentNodeInnerText
   (
         filenameConfigurationXml,
     ref exceptionMessage,         
         XPathDatabaseConnectionString,
     ref DatabaseConnectionString
   );

   #if (DEBUG)
    System.Console.WriteLine("Database Connection String: {0}", DatabaseConnectionString);
   #endif

   ImportExport
   ( 
    filenameImport, 
    filenameExport,
    scriptureReferenceAssociates 
   );
  }//public static void Main.
  ///<summary>ConfigurationFile().</summary>
  public static void ConfigurationFile()
  {

   string databaseConnectionString  =  null;
   string exceptionMessage          = null;
   string newsServer                = null;
   string newsGroup                 = null;

   UtilityXml.XmlDocumentNodeInnerText
   (
         FilenameConfigurationXml,
     ref exceptionMessage,         
         XPathNewsServer,
     ref databaseConnectionString
   );
   if ( databaseConnectionString != null && databaseConnectionString != String.Empty )
   {
    DatabaseConnectionString = databaseConnectionString;
   } 

   UtilityXml.XmlDocumentNodeInnerText
   (
         FilenameConfigurationXml,
     ref exceptionMessage,         
         XPathNewsServer,
     ref newsServer
   );
   if ( newsServer != null && newsServer != String.Empty )
   {
    NewsServer = newsServer;
   } 

   UtilityXml.XmlDocumentNodeInnerText
   (
         FilenameConfigurationXml,
     ref exceptionMessage,         
         UtilitySimpleMailTransferProtocolSMTP.XPathNewsGroup,
     ref newsGroup
   );
   if ( newsGroup != null && newsGroup != String.Empty )
   {
    NewsGroup = newsGroup;
   } 
     	
  }//ConfigurationFile().
コード例 #15
0
  }//public String Feedback

  /// <summary>Page Load.</summary>
  public void Page_Load
  (
   object     sender, 
   EventArgs  e
  ) 
  {

   int             SequenceOrderIdContact    =  System.Convert.ToInt32( Request.QueryString["SequenceOrderId"] );
  
   String          exceptionMessage          =  null;

   ServerMapPath = this.MapPath("");
   
   if ( ServerMapPath != null)
   {
    FilenameConfigurationXml = ServerMapPath + @"\" + FilenameConfigurationXml;
   }//if ( ServerMapPath != null)

   UtilityXml.XmlDocumentNodeInnerText
   (
        FilenameConfigurationXml,
    ref exceptionMessage,
        UtilityContact.XPathDatabaseConnectionString,
    ref DatabaseConnectionString
   );

   if ( exceptionMessage != null )
   {
    //Response.Write ( exceptionMessage );
    Feedback = exceptionMessage;
    return;
   }//if ( exceptionMessage != null )
  
   if (!Page.IsPostBack)
   {
   	//HtmlGenericControlTitle.InnerText = "";
    //TextBox
    /*
    HtmlAnchorNew.Value                       =  "New";
    HtmlAnchorNew.Attributes["style"]         =  STYLE_HTML_ANCHOR;
    */

   }//if (!Page.IsPostBack)
  }//public void Page_Load
コード例 #16
0
  /// <summary>Page Load.</summary>
  public void Page_Load
  (
   object     sender, 
   EventArgs  e
  ) 
  {

   String  exceptionMessage  =  null;

   ServerMapPath = this.MapPath("");

   /* 
   FilenameConfigurationXml = Server.MapPath( FilenameConfigurationXml );
   */

   if ( ServerMapPath != null)
   {
    FilenameConfigurationXml = ServerMapPath + @"\" + FilenameConfigurationXml;
   }//if ( ServerMapPath != null)

   UtilityXml.XmlDocumentNodeInnerText
   (
        FilenameConfigurationXml,
    ref exceptionMessage,         
        UtilityFileUpload.XPathDatabaseConnectionString,
    ref DatabaseConnectionString
   );

   if ( exceptionMessage != null )
   {
    Feedback = exceptionMessage;
    return;
   }//if ( exceptionMessage != null )

   if ( !Page.IsPostBack )
   {
   	FileUploadSource.Focus();
   	Page.SetFocus( FileUploadSource );
    FileUploadSource.Attributes.Add("autocomplete", "on");
    HtmlInputFileTarget.Attributes.Add("autocomplete", "on");
   }//if ( !Page.IsPostBack )
   	
  }//Page_Load
コード例 #17
0
  }//Page_Load

  /// <summary>PageBuild.</summary>
  public void PageBuild()
  {
   String              exceptionMessage                =  null;
   
   ServerMapPath = this.MapPath("");
   if ( ServerMapPath != null)
   {
    FilenameConfigurationXml = ServerMapPath + @"\" + FilenameConfigurationXml;
   }//if ( ServerMapPath != null)

   UtilityXml.XmlDocumentNodeInnerText
   (
        FilenameConfigurationXml,
    ref exceptionMessage,         
        XPathDatabaseConnectionString,
    ref DatabaseConnectionString
   );

   UtilityXml.XmlDocumentNodeInnerText
   (
        FilenameConfigurationXml,
    ref exceptionMessage,         
        XPathSQLSelect,
    ref DatabaseSQLSelect
   );

   UtilityXml.XmlDocumentNodeInnerText
   (
        FilenameConfigurationXml,
    ref exceptionMessage,         
        XPathXmlStylesheet,
    ref FilenameXmlStylesheet
   );

   if ( exceptionMessage != null )
   {
    Feedback = exceptionMessage;
    return;
   }//if ( exceptionMessage != null )

  }//PageBuild()
コード例 #18
0
  }//public void ButtonReset_Click()

  /// <summary>ButtonSubmit_Click().</summary>
  public void ButtonSubmit_Click
  (
   Object sender, 
   EventArgs e
  )
  {
   String   exceptionMessage  =  null;
   Contact  contact           =  null;

   UtilityXml.XmlDocumentNodeInnerText
   (
        FilenameConfigurationXml,
    ref exceptionMessage,         
        UtilityContact.XPathDatabaseConnectionString,
    ref DatabaseConnectionString
   );
   
   contact = new Contact
   (
    SequenceOrderId,
    FirstName,
    LastName,
    OtherName,
    Company,
    Prefix,
    Suffix,
    Commentary,
    ScriptureReference
   );
   
   Session["contact"] = contact;
      
   UtilityContact.ContactDetailSave
   (
        DatabaseConnectionString,
    ref exceptionMessage,
    ref contact
   );
   
  }//ButtonSubmit_Click()
コード例 #19
0
        }//public static void ConfigurationXml()

        /// <summary>ConfigurationXml.</summary>
        public static void ConfigurationXml
        (
            ref String filenameConfigurationXml,
            ref String exceptionMessage,
            ref String connectionStringDatabase,
            ref String connectionStringFormatIndexingService
        )
        {
            UtilityXml.XmlDocumentNodeInnerText
            (
                filenameConfigurationXml,
                ref exceptionMessage,
                XPathConnectionStringDatabase,
                ref connectionStringDatabase
            );

   #if (DEBUG)
            System.Console.WriteLine
            (
                "Connection String Database: {0}",
                connectionStringDatabase
            );
   #endif

            UtilityXml.XmlDocumentNodeInnerText
            (
                filenameConfigurationXml,
                ref exceptionMessage,
                XPathConnectionStringFormatIndexingService,
                ref connectionStringFormatIndexingService
            );

   #if (DEBUG)
            System.Console.WriteLine
            (
                "Connection String Format Indexing Service: {0}",
                connectionStringFormatIndexingService
            );
   #endif
        }//public static void ConfigurationXml()
コード例 #20
0
  /// <summary>Page Load.</summary>
  public void Page_Load
  (
   object     sender, 
   EventArgs  e
  ) 
  {

   String  exceptionMessage  =  null;

   ServerMapPath = this.MapPath("");

   /* 
   FilenameConfigurationXml = Server.MapPath( FilenameConfigurationXml );
   */

   if ( ServerMapPath != null)
   {
    FilenameConfigurationXml = ServerMapPath + @"\" + FilenameConfigurationXml;
   }//if ( ServerMapPath != null)

   UtilityXml.XmlDocumentNodeInnerText
   (
        FilenameConfigurationXml,
    ref exceptionMessage,         
        UtilityImage.XPathDatabaseConnectionString,
    ref DatabaseConnectionString
   );

   if ( exceptionMessage != null )
   {
    Response.Write( exceptionMessage );
    return;
   }//if ( exceptionMessage != null )

   Master.Page.Header.Title = "Simple Content Page";
   //Master.Page.Header.Metadata.Add("Keywords", "Master, Content, Menu, SiteMapDataSource, contentplaceholder");
   //Master.Page.Header.Metadata.Add("Description", "Master, Content, Menu, SiteMapDataSource, contentplaceholder");
   	
  }//Page_Load
コード例 #21
0
  }//public static void ConfigurationXml()

  /// <summary>Read the XML Configuration file.</summary>
  public static void ConfigurationXml
  (
   ref String filenameConfigurationXml,
   ref String exceptionMessage,
   ref String databaseConnectionString,
   ref String faxServerName,
   ref String faxNumber
  )
  {
   UtilityXml.XmlDocumentNodeInnerText
   (
         filenameConfigurationXml,
     ref exceptionMessage,
         XPathDatabaseConnectionString,
     ref databaseConnectionString
   );

   UtilityXml.XmlDocumentNodeInnerText
   (
         filenameConfigurationXml,
     ref exceptionMessage,
         XPathFaxServerName,
     ref faxServerName
   );

   if ( faxServerName == null || faxServerName == String.Empty )
   {
    faxServerName = Environment.MachineName;
   }//if ( faxServerName == null || faxServerName == String.Empty ) 

   UtilityXml.XmlDocumentNodeInnerText
   (
         filenameConfigurationXml,
     ref exceptionMessage,
         XPathFaxNumber,
     ref faxNumber
   );
  }//ConfigurationXml	 
コード例 #22
0
  }//Page_Load

  /// <summary>PageBuild.</summary>
  public void PageBuild()
  {
   String              exceptionMessage                =  null;
   String              feedbackMessage                 =  null;
   
   ServerMapPath = this.MapPath("");
   if ( ServerMapPath != null)
   {
    FilenameConfigurationXml = ServerMapPath + @"\" + FilenameConfigurationXml;
   }//if ( ServerMapPath != null)

   UtilityXml.XmlDocumentNodeInnerText
   (
        FilenameConfigurationXml,
    ref exceptionMessage,         
        XPathDatabaseConnectionString,
    ref DatabaseConnectionString
   );

   UtilityUnicode.Treasure
   (
    ref feedbackMessage,
    ref exceptionMessage
   );

   if ( exceptionMessage != null )
   {
    Feedback = exceptionMessage;
    return;
   }//if ( feedbackMessage != null )
   else
   {
    Feedback = feedbackMessage;
   }   	

  }//PageBuild()
コード例 #23
0
  /// <summary>Page Load.</summary>
  public void Page_Load
  (
   object     sender, 
   EventArgs  e
  ) 
  {
   string              tableName                       = null;
   string              exceptionMessage                = null;

   ArrayList           columnName                      = null;
 
   ServerMapPath = this.MapPath("");
   if ( ServerMapPath != null)
   {
    FilenameConfigurationXml = ServerMapPath + @"\" + FilenameConfigurationXml;
   }//if ( ServerMapPath != null)

   UtilityXml.XmlDocumentNodeInnerText
   (
        FilenameConfigurationXml,
    ref exceptionMessage,         
        XPathDatabaseConnectionString,
    ref DatabaseConnectionString
   );

   UtilityXml.XmlDocumentNodeInnerText
   (
        FilenameConfigurationXml,
    ref exceptionMessage,         
        XPathSQLSelect,
    ref DatabaseSQLSelect
   );

   UtilityXml.XmlDocumentNodeInnerText
   (
        FilenameConfigurationXml,
    ref exceptionMessage,         
        XPathXmlStylesheet,
    ref FilenameXmlStylesheet
   );

   if ( exceptionMessage != null )
   {
    Feedback = exceptionMessage;
    return;
   }//if ( exceptionMessage != null )

   if ( !Page.IsPostBack )
   {
    UtilityDatabase.DataSetTableColumn
    (
     ref DatabaseSQLSelect,
     ref DataSetDataGrid,
     ref exceptionMessage,
     ref tableName,
     ref columnName
    );
    
    DataSourceBind();
 
   }//if ( !Page.IsPostBack )
   else
   {
    DataSetDataGrid = (DataSet) Session["DataSetDataGrid"];
   }//else ( Page.IsPostBack )
   
  }//Page_Load
コード例 #24
0
  }//Page_Load

  /// <summary>PageBuild.</summary>
  public void PageBuild()
  {
   String              columnNameCurrent               =  null;
   String              exceptionMessage                =  null;
   String              tableName                       =  null;
   
   ArrayList           columnName                      =  null;

   GridViewURI = new System.Web.UI.WebControls.GridView();
    
   ServerMapPath = this.MapPath("");
   if ( ServerMapPath != null)
   {
    FilenameConfigurationXml = ServerMapPath + @"\" + FilenameConfigurationXml;
   }//if ( ServerMapPath != null)

   UtilityXml.XmlDocumentNodeInnerText
   (
        FilenameConfigurationXml,
    ref exceptionMessage,         
        XPathDatabaseConnectionString,
    ref DatabaseConnectionString
   );

   UtilityXml.XmlDocumentNodeInnerText
   (
        FilenameConfigurationXml,
    ref exceptionMessage,         
        XPathSQLSelect,
    ref DatabaseSQLSelect
   );

   UtilityXml.XmlDocumentNodeInnerText
   (
        FilenameConfigurationXml,
    ref exceptionMessage,         
        XPathXmlStylesheet,
    ref FilenameXmlStylesheet
   );

   if ( exceptionMessage != null )
   {
    Feedback = exceptionMessage;
    return;
   }//if ( exceptionMessage != null )

   UtilityDatabase.DataSetTableColumn
   (
    ref DatabaseSQLSelect,
    ref DataSetURI,
    ref exceptionMessage,
    ref tableName,
    ref columnName
   );
    
   DataSourceBind();

   foreach( object columnNameObject in columnName )
   {
    columnNameCurrent              =  ( String ) columnNameObject;
    BoundFieldURI                  =  new BoundField();
    BoundFieldURI.DataField        =  columnNameCurrent;
    BoundFieldURI.HeaderText       =  columnNameCurrent;
    BoundFieldURI.SortExpression   =  columnNameCurrent;
     
    if ( String.Compare( columnNameCurrent, "Dated", true ) == 0 )
    {
     //BoundFieldURI.DataFormatString =  "{T}";  //"{0:c}"
    }//if ( String.Compare( columnNameCurrent, "Dated", true ) == 0 )

    GridViewURI.Columns.Add( BoundFieldURI );
     
   }//foreach( object columnNameObject in columnName )

   GridViewURI.AllowSorting              =  true;
   GridViewURI.AllowPaging               =  true;
   GridViewURI.AutoGenerateColumns       =  false;
   GridViewURI.AutoGenerateEditButton    =  true;
   GridViewURI.AutoGenerateSelectButton  =  true;
   
   GridViewURI.BorderWidth               =  1;
   GridViewURI.CellPadding               =  1;
   GridViewURI.DataKeyNames              =  PrimaryKeyColumn;
   GridViewURI.ID                        =  "URI";
   GridViewURI.SelectedIndex             =  0;

   // Manually register the event-handling methods.

   GridViewURI.RowCancelingEdit    += new GridViewCancelEditEventHandler( GridViewURI_RowCancelingEdit );
   GridViewURI.RowEditing          += new GridViewEditEventHandler( GridViewURI_RowEdit );
   GridViewURI.RowUpdating         += new GridViewUpdateEventHandler( GridViewURI_RowUpdating );
   
   /*
   GridViewURI.CancelCommand += new GridViewCommandEventHandler(dataGrid_Cancel);
   GridViewURI.DeleteCommand += new GridViewCommandEventHandler(dataGrid_Delete);
   GridViewURI.EditCommand   += new GridViewCommandEventHandler(dataGrid_Edit);
   GridViewURI.UpdateCommand += new GridViewCommandEventHandler(dataGrid_Update);
   */
   
   PlaceHolderURI.Controls.Add( GridViewURI );
 
  }//PageBuild()
コード例 #25
0
  /// <summary>Page Load.</summary>
  public void Page_Load
  (
   object     sender, 
   EventArgs  e
  ) 
  {

   Boolean                      statusImpersonateValidUser     =  false;
   Boolean                      statusRevertToSelf             =  false;

   int                          statusLogonUserA               =  -1;
   int                          statusDuplicateToken           =  -1;

   IntPtr                       token                          =  IntPtr.Zero;
   IntPtr                       tokenDuplicate                 =  IntPtr.Zero;

   String                       domainName                     =  null;
   String                       exceptionMessage               =  null;
   String                       password                       =  null;
   String                       userName                       =  null;
   
   ServerMapPath = this.MapPath("");
   if ( ServerMapPath != null)
   {
    FilenameConfigurationXml = ServerMapPath + @"\" + FilenameConfigurationXml;
   }//if ( ServerMapPath != null)

   UtilityXml.XmlDocumentNodeInnerText
   (
        FilenameConfigurationXml,
    ref exceptionMessage,         
        UtilitySubnetMask.XPathDatabaseConnectionString,
    ref DatabaseConnectionString
   );

   if ( exceptionMessage != null )
   {
    Feedback = exceptionMessage;
    return;
   }//if ( exceptionMessage != null )

   UtilityImpersonate.Impersonate
   (
    ref FilenameConfigurationXml,
    ref userName,
    ref domainName,
    ref password,
    ref windowsImpersonationContext,
    ref exceptionMessage,
    ref statusImpersonateValidUser,
    ref statusRevertToSelf,
    ref statusLogonUserA,
    ref statusDuplicateToken,
    ref token,
    ref tokenDuplicate
   );

   if ( exceptionMessage != null )
   {
     Feedback = exceptionMessage;
     return;
   }//if ( exceptionMessage != null )

  }//Page_Load
コード例 #26
0
  }//public static void ConfigurationXml()

  /// <summary>ConfigurationXml.</summary>
  public static void ConfigurationXml
  (
   ref String         filenameConfigurationXml,
   ref String         exceptionMessage,
   ref String         connectionStringDatabase,
   ref String         databaseName,
   ref String         directoryDatafile,
   ref String         tableName,
   ref String         userName,
   ref String         domainName,
   ref String         password
  )
  {

   UtilityXml.XmlDocumentNodeInnerText
   (
         filenameConfigurationXml,
     ref exceptionMessage,         
         XPathConnectionStringDatabase,
     ref connectionStringDatabase
   );

   UtilityXml.XmlDocumentNodeInnerText
   (
         filenameConfigurationXml,
     ref exceptionMessage,         
         XPathBCPDatabase,
     ref databaseName
   );

   UtilityXml.XmlDocumentNodeInnerText
   (
         filenameConfigurationXml,
     ref exceptionMessage,         
         XPathBCPDirectoryDataFile,
     ref directoryDatafile
   );

   UtilityXml.XmlDocumentNodeInnerText
   (
         filenameConfigurationXml,
     ref exceptionMessage,         
         XPathBCPTable,
     ref tableName
   );

   UtilityImpersonate.GetUsernamePasswordDomainName
   (
    ref filenameConfigurationXml,
    ref userName,
    ref domainName,
    ref password,
    ref exceptionMessage
   );

   UtilityDebug.Write
   (
    String.Format
    (
     "filenameConfigurationXml: {0} | connectionStringDatabase: {1} | databaseName: {2} | directoryDatafile: {3} | tableName: {4}", 
     filenameConfigurationXml,
     connectionStringDatabase,
     databaseName,
     directoryDatafile,
     tableName
    )
   );
      
  }//public static void ConfigurationXml()
コード例 #27
0
  }//public String ScriptureReference
  
  /// <summary>Page Load.</summary>
  public void Page_Load
  (
   object     sender, 
   EventArgs  e
  ) 
  {

   String     exceptionMessage          =  null;
   
   int        sequenceOrderId           =  System.Convert.ToInt32( Request.QueryString["SequenceOrderId"] );
   
   DataSet    dataSetContact            =  null;
   DataSet[]  dataSetMultiple           =  new DataSet[ UtilityContact.SQLSelectContactDetailGridView.Length ];
      
   Contact    contact                   =  null;
   
   ServerMapPath = this.MapPath("");
   if ( ServerMapPath != null)
   {
    FilenameConfigurationXml = ServerMapPath + @"\" + FilenameConfigurationXml;
   }//if ( ServerMapPath != null)

   UtilityXml.XmlDocumentNodeInnerText
   (
        FilenameConfigurationXml,
    ref exceptionMessage,         
        UtilityContact.XPathDatabaseConnectionString,
    ref DatabaseConnectionString
   );

   if ( exceptionMessage != null )
   {
    Response.Write ( exceptionMessage );
    return;
   }//if ( exceptionMessage != null )
   
   UtilityContact.ContactDetail
   (
        DatabaseConnectionString,
    ref exceptionMessage,
    ref dataSetContact,
    ref sequenceOrderId,
    ref contact,
    ref dataSetMultiple
   );

   Session["contact"] = contact;
   Session["dataSetMultiple"] = dataSetMultiple;   

   if ( exceptionMessage != null )
   {
    Response.Write ( exceptionMessage );
    return;
   }//if ( exceptionMessage != null )

   /*
   UtilityDatabase.PrintValues( dataSet );
   
   Response.Write( dataSet.Tables.Count );
   Response.Write( dataSet.Tables["Table"].Rows.Count );
   */
   
   if ( Page.IsPostBack )
   {
   	return;
   }

   PageRefresh();
  
  }//Page_Load
コード例 #28
0
  }//public static void PageBuild()

  /// <summary>PageBuildTextBox().</summary>
  public void PageBuildTextBox()
  {

   int          dataTableCount                = -1;
   int          dataTableTotal                = -1;
   int          theWordIdColumnIndex          = 0;

   DateTime     dated                         = DateTime.Now;

   System.Web.UI.WebControls.Label            label  =  null;
   
   String       columnNameForeignKey          = null;
   String       exceptionMessage              = null;
   String[]     sourceName                    = null;
   String[]     sourceSQL                     = null;
   String       tableName                     = null;

   System.Web.UI.WebControls.TextBox          textBox  =  null;
   
   XmlNodeList  sourceXML                     = null;

   TheWord.SourceSQLQuery
   (
        filenameConfigurationXml,
    ref exceptionMessage,
    ref sourceXML,
    ref sourceSQL,
    ref sourceName
   );

   if ( exceptionMessage != null )
   {
    Feedback = exceptionMessage;
    return;
   }//if ( exceptionMessage != null ) 
   
   if ( !Page.IsPostBack )
   {

    theWord.DataSetInitialize
    (
         databaseConnectionString,
     ref exceptionMessage,
         nodeRoot,
         sourceSQL,
         sourceName
    );

    if ( exceptionMessage != null )
    {
     Feedback = exceptionMessage;
     return;
    }//if ( exceptionMessage != null ) 
          	
   }//if ( Page.IsPostBack )

    UtilityXml.XmlDocumentNodeInnerText
    (
         filenameConfigurationXml,
     ref exceptionMessage,         
         TheWord.XPathColumnForeign,
     ref columnNameForeignKey
    );

   dataTableTotal           = theWord.DataSetTheWord.Tables.Count;

   linkButtonAdd            = new System.Web.UI.WebControls.LinkButton[ dataTableTotal ];

   for( dataTableCount = 0; dataTableCount < theWord.DataSetTheWord.Tables.Count; ++dataTableCount )
   {
   	theWord.DataSetTheWord.Tables[dataTableCount].TableName = sourceName[dataTableCount];
   }

   dataTableCount = -1;

   foreach( DataTable dataTable in theWord.DataSetTheWord.Tables )
   {
    ++dataTableCount;
    tableName                                                 = dataTable.TableName;

    PlaceHolderGridView.Controls.Add
    ( 
     new LiteralControl
     (
      "<b>" + tableName + "</b>"
     ) 
    );

    foreach(DataRow dataRow in dataTable.Rows)
    {
     foreach(DataColumn dataColumn in dataTable.Columns)
     {
      label         =  new System.Web.UI.WebControls.Label(); 
      label.Id      =  "Label" + dataColumn.ColumnName;
      label.Text    =  dataColumn.ColumnName + ": ";
      PlaceHolderGridView.Controls.Add( label );
                     
      textBox       =  new System.Web.UI.WebControls.TextBox();
      textBox.ID    =  "TextBox" + dataColumn.ColumnName;
      textBox.Text  =  dataRow[dataColumn].ToString();
      PlaceHolderGridView.Controls.Add( textBox );
       
      label         =  new System.Web.UI.WebControls.Label(); 
      label.Text    =  "<br />";
      PlaceHolderGridView.Controls.Add( label );
     }//foreach(DataColumn dataColumn in dataTable.Columns)
    }//foreach(DataRow dataRow in dataTable.Rows)
    
    if ( dataTableCount == 0 )
    {
     PlaceHolderGridView.Controls.Add
     ( 
      new LiteralControl( "<br />" )
     );
    }
    else
    {
     linkButtonAdd[dataTableCount]                              = new System.Web.UI.WebControls.LinkButton();
     linkButtonAdd[dataTableCount].ID                           = dataTableCount + "|" + tableName + "|" + "Add";
     linkButtonAdd[dataTableCount].Text                         = "  Add <br />";

     // Register the event-handling method for the Click event. 
     linkButtonAdd[dataTableCount].Click                       += new EventHandler(this.LinkButtonAdd_Click);

     PlaceHolderGridView.Controls.Add( linkButtonAdd[dataTableCount]  );
    } 

   }//foreach( DataTable dataTable in theWord.DataSetTheWord.Tables )

  }//public static void PageBuildTextBox()
コード例 #29
0
  }//Page_Load
  
  /// <summary>PageBuild().</summary>
  public void PageBuild()
  {

   int          dataTableCount                = -1;
   int          dataTableTotal                = -1;
   int          theWordIdColumnIndex          = 0;

   DateTime     dated                         = DateTime.Now;

   System.Web.UI.WebControls.Label            label  =  null;
   
   String       columnNameForeignKey          = null;
   String       exceptionMessage              = null;
   String[]     sourceName                    = null;
   String[]     sourceSQL                     = null;
   String       tableName                     = null;

   System.Web.UI.WebControls.TextBox          textBox  =  null;
   
   XmlNodeList  sourceXML                     = null;

   TheWord.SourceSQLQuery
   (
        filenameConfigurationXml,
    ref exceptionMessage,
    ref sourceXML,
    ref sourceSQL,
    ref sourceName
   );

   if ( exceptionMessage != null )
   {
    Feedback = exceptionMessage;
    return;
   }//if ( exceptionMessage != null ) 
   
   if ( !Page.IsPostBack )
   {

    theWord.DataSetInitialize
    (
         databaseConnectionString,
     ref exceptionMessage,
         nodeRoot,
         sourceSQL,
         sourceName
    );

    if ( exceptionMessage != null )
    {
     Feedback = exceptionMessage;
     return;
    }//if ( exceptionMessage != null ) 
          	
   }//if ( Page.IsPostBack )

    UtilityXml.XmlDocumentNodeInnerText
    (
         filenameConfigurationXml,
     ref exceptionMessage,         
         TheWord.XPathColumnForeign,
     ref columnNameForeignKey
    );

   dataTableTotal           = theWord.DataSetTheWord.Tables.Count;

   GridViewTheWord          = new System.Web.UI.WebControls.GridView[ dataTableTotal ];
   linkButtonAdd            = new System.Web.UI.WebControls.LinkButton[ dataTableTotal ];

   for( dataTableCount = 0; dataTableCount < theWord.DataSetTheWord.Tables.Count; ++dataTableCount )
   {
   	theWord.DataSetTheWord.Tables[dataTableCount].TableName = sourceName[dataTableCount];
   }

   dataTableCount = -1;

   foreach( DataTable dataTable in theWord.DataSetTheWord.Tables )
   {
    ++dataTableCount;
    
    GridViewTheWord[dataTableCount]                           = new System.Web.UI.WebControls.GridView();
    
    tableName                                                 = dataTable.TableName;

    GridViewTheWord[dataTableCount].BorderWidth               = 1;
    GridViewTheWord[dataTableCount].CellPadding               = 1;
    GridViewTheWord[dataTableCount].DataSource                = dataTable;

    GridViewTheWord[dataTableCount].AllowPaging               = true;
    GridViewTheWord[dataTableCount].AllowSorting              = true;    

    GridViewTheWord[dataTableCount].AutoGenerateColumns       = false;
      
    GridViewTheWord[dataTableCount].AutoGenerateDeleteButton  = true;    
    GridViewTheWord[dataTableCount].AutoGenerateEditButton    = true;
    GridViewTheWord[dataTableCount].AutoGenerateSelectButton  = true;

    switch ( DataColumnFieldGridView )
    {
     case DataColumnField.Bound:

      foreach( DataColumn dataColumn in dataTable.Columns )
      {
       BoundField boundField      = null;
       boundField                 = new BoundField();
       boundField.DataField       = dataColumn.ColumnName;
       boundField.HeaderText      = dataColumn.ColumnName;
       boundField.SortExpression  = dataColumn.ColumnName;
       GridViewTheWord[dataTableCount].Columns.Add( boundField );
      }
      break;

     case DataColumnField.Template:
      foreach( DataColumn dataColumn in dataTable.Columns )
      {
       TemplateField                    templateField    = null;
       //System.Web.UI.WebControls.Label  label            = null;
       
       templateField                     = new TemplateField();
      
       templateField.HeaderText          = dataColumn.ColumnName;
       templateField.SortExpression      = dataColumn.ColumnName;
       
       //templateField.EditItemTemplate    = new DataGridTemplate(ListItemType.EditItem,  dataColumn.ColumnName);       
       //templateField.FooterTemplate    = new DataGridTemplate(ListItemType.Footer,    dataColumn.ColumnName);
       //templateField.HeaderTemplate    = new DataGridTemplate(ListItemType.Header,    dataColumn.ColumnName);
       templateField.ItemTemplate      = new DataGridTemplate(ListItemType.Item,      dataColumn.ColumnName);

       GridViewTheWord[dataTableCount].Columns.Add( templateField );
      }
      break;

     case DataColumnField.TextBox:
      PlaceHolderGridView.Controls.Add
      ( 
       new LiteralControl
       (
        "<b>" + tableName + "</b><br />"
       ) 
      );

      foreach( DataColumn dataColumn in dataTable.Columns )
      {
       label         =  new System.Web.UI.WebControls.Label(); 
       //label.Id      =  dataColumn.ColumnName;
       label.Text    =  dataColumn.ColumnName + ": ";
       PlaceHolderGridView.Controls.Add( label );
                     
       textBox       =  new System.Web.UI.WebControls.TextBox();
       //textBox.Name  =  dataColumn.ColumnName;
       textBox.Text  =  dataColumn.ColumnName;
       PlaceHolderGridView.Controls.Add( textBox );
       
       label         =  new System.Web.UI.WebControls.Label(); 
       label.Text    =  "<br />";
       PlaceHolderGridView.Controls.Add( label );

      }
      break;

    }  

    GridViewTheWord[dataTableCount].DataBind();
    GridViewTheWord[dataTableCount].ID                        = tableName;

    theWordIdColumnIndex = UtilityDatabase.DataTableColumnIndex
    (
     theWord.DataSetTheWord.Tables[tableName],
     columnNameForeignKey  
    );
    
    if ( DataColumnFieldGridView <= DataColumnField.Template )
    {
     if ( theWordIdColumnIndex >= 0 )
     {     
      //UtilityDatabase.DataSetTableColumnVisible( GridViewTheWord[dataTableCount], theWordIdColumnIndex, false );
      GridViewTheWord[dataTableCount].Columns[theWordIdColumnIndex].Visible = false;
     }//if ( theWordIdColumnIndex >= 0 ) 

     //GridViewTheWord[dataTableCount].UserDeletingRow += new GridViewRowCancelEventHandler( GridViewDeleteEventArgs );

     PlaceHolderGridView.Controls.Add
     ( 
      new LiteralControl
      (
       "<b>" + GridViewTheWord[dataTableCount].ID + "</b>"
      ) 
     );
    }
    
    if ( dataTableCount != 0 )
    {
     linkButtonAdd[dataTableCount]                              = new System.Web.UI.WebControls.LinkButton();
     linkButtonAdd[dataTableCount].ID                           = dataTableCount + "|" + tableName + "|" + "Add";
     linkButtonAdd[dataTableCount].Text                         = "Add <br />";

     // Register the event-handling method for the Click event. 
     linkButtonAdd[dataTableCount].Click                       += new EventHandler(this.LinkButtonAdd_Click);

     PlaceHolderGridView.Controls.Add( linkButtonAdd[dataTableCount]  );
    } 

    if ( DataColumnFieldGridView <= DataColumnField.Template )
    {
     PlaceHolderGridView.Controls.Add(GridViewTheWord[dataTableCount]);
     PlaceHolderGridView.Controls.Add(new LiteralControl("<br />"));
    }

   }//foreach( DataTable dataTable in theWord.DataSetTheWord.Tables )

  }//public static void PageBuild()
コード例 #30
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)
   UtilityXml.XmlDocumentNodeInnerText
   (
         filenameConfigurationXml,
     ref exceptionMessage,         
         TheWord.XPathDatabaseConnectionString,
     ref databaseConnectionString
   );
   UtilityXml.XmlDocumentNodeInnerText
   (
         filenameConfigurationXml,
     ref exceptionMessage,         
         TheWord.XPathNodeRoot,
     ref nodeRoot
   );
   if ( exceptionMessage != null )
   {
    Feedback = exceptionMessage;
    return;
   }//if ( exceptionMessage != null ) 

   // Check to see if the cookies have already been saved for this session.
   if (Session["theWord"] == null)
   { 
    theWord = new TheWord();
   }
   else
   { 
    theWord = (TheWord) Session["theWord"];
   }

   switch ( DataColumnFieldGridView )
   {
   	case DataColumnField.Bound:
     PageBuild();
     break;

   	case DataColumnField.Template:
     PageBuild();
     break;

   	case DataColumnField.TextBox:
     PageBuildTextBox();
     break;
   }
   
   // Store the cookies received in the session state for future retrieval by this session.
   Session["theWord"] = theWord;

  }//Page_Load