Beispiel #1
0
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     this.oleDbConnection1 = new System.Data.OleDb.OleDbConnection();
     this.dvSearchSites = new System.Data.DataView();
     this.objdsSiteUseSearch = new NBADWDataEntryApplication.dsSiteUseSearch();
     this.oleDbdacdAquaticActivity = new System.Data.OleDb.OleDbDataAdapter();
     this.oleDbDeleteCommand1 = new System.Data.OleDb.OleDbCommand();
     this.oleDbInsertCommand2 = new System.Data.OleDb.OleDbCommand();
     this.oleDbSelectCommand2 = new System.Data.OleDb.OleDbCommand();
     this.oleDbUpdateCommand1 = new System.Data.OleDb.OleDbCommand();
     this.objdscdAquaticActivity = new NBADWDataEntryApplication.dscdAquaticActivity();
     this.oleDbdaSiteUseSearch = new System.Data.OleDb.OleDbDataAdapter();
     this.oleDbInsertCommand5 = new System.Data.OleDb.OleDbCommand();
     this.oleDbSelectCommand5 = new System.Data.OleDb.OleDbCommand();
     this.oleDbInsertCommand1 = new System.Data.OleDb.OleDbCommand();
     this.oleDbSelectCommand1 = new System.Data.OleDb.OleDbCommand();
     this.oleDbdaWatersheds = new System.Data.OleDb.OleDbDataAdapter();
     this.oleDbInsertCommand3 = new System.Data.OleDb.OleDbCommand();
     this.oleDbSelectCommand3 = new System.Data.OleDb.OleDbCommand();
     this.objdsWatersheds = new NBADWDataEntryApplication.dsWatersheds();
     this.oleDbdaDE_Agencies = new System.Data.OleDb.OleDbDataAdapter();
     this.oleDbDeleteCommand2 = new System.Data.OleDb.OleDbCommand();
     this.oleDbInsertCommand4 = new System.Data.OleDb.OleDbCommand();
     this.oleDbSelectCommand4 = new System.Data.OleDb.OleDbCommand();
     this.oleDbUpdateCommand2 = new System.Data.OleDb.OleDbCommand();
     this.oleDbSelectCommand6 = new System.Data.OleDb.OleDbCommand();
     this.oleDbInsertCommand6 = new System.Data.OleDb.OleDbCommand();
     this.objdsDE_Agencies = new NBADWDataEntryApplication.dsDE_Agencies();
     ((System.ComponentModel.ISupportInitialize)(this.dvSearchSites)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.objdsSiteUseSearch)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.objdscdAquaticActivity)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.objdsWatersheds)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.objdsDE_Agencies)).BeginInit();
     this.dgResults.PageIndexChanged += new System.Web.UI.WebControls.DataGridPageChangedEventHandler(this.dgResults_PageIndexChanged);
     this.dgResults.EditCommand += new System.Web.UI.WebControls.DataGridCommandEventHandler(this.dgResults_EditCommand);
     this.dgResults.SortCommand += new System.Web.UI.WebControls.DataGridSortCommandEventHandler(this.dgResults_SortCommand);
     //
     // oleDbConnection1
     //
     try
     {
         //this.oleDbConnection1.ConnectionString = @"Jet OLEDB:Registry Path=;Data Source=""C:\Data_Warehouse\Tabular_Data\DE-HRAA.mdb"";Jet OLEDB:System database=;Jet OLEDB:Global Bulk Transactions=1;User ID=Admin;Provider=""Microsoft.Jet.OLEDB.4.0"";Jet OLEDB:Don't Copy Locale on Compact=False;Jet OLEDB:SFP=False;Jet OLEDB:Encrypt Database=False;Jet OLEDB:Engine Type=5;Jet OLEDB:Compact Without Replica Repair=False;Jet OLEDB:Global Partial Bulk Ops=2;Extended Properties=;Mode=Share Deny None;Jet OLEDB:Create System Database=False;Jet OLEDB:Database Locking Mode=1";
         this.oleDbConnection1.ConnectionString = Session["ConnectionString"].ToString();
     }
     catch(System.NullReferenceException)
     {
         Server.Transfer("Login.aspx");
     }
     //
     // dvSearchSites
     //
     this.dvSearchSites.Table = this.objdsSiteUseSearch._DE_SiteSearch;
     //
     // objdsSiteUseSearch
     //
     this.objdsSiteUseSearch.DataSetName = "dsSiteUseSearch";
     this.objdsSiteUseSearch.Locale = new System.Globalization.CultureInfo("en-US");
     //
     // oleDbdacdAquaticActivity
     //
     this.oleDbdacdAquaticActivity.DeleteCommand = this.oleDbDeleteCommand1;
     this.oleDbdacdAquaticActivity.InsertCommand = this.oleDbInsertCommand2;
     this.oleDbdacdAquaticActivity.SelectCommand = this.oleDbSelectCommand2;
     this.oleDbdacdAquaticActivity.TableMappings.AddRange(new System.Data.Common.DataTableMapping[] {
                                                                                                        new System.Data.Common.DataTableMapping("Table", "cdAquaticActivity", new System.Data.Common.DataColumnMapping[] {
                                                                                                                                                                                                                             new System.Data.Common.DataColumnMapping("AquaticActivityCd", "AquaticActivityCd"),
                                                                                                                                                                                                                             new System.Data.Common.DataColumnMapping("AquaticActivity", "AquaticActivity")})});
     this.oleDbdacdAquaticActivity.UpdateCommand = this.oleDbUpdateCommand1;
     //
     // oleDbDeleteCommand1
     //
     this.oleDbDeleteCommand1.CommandText = "DELETE FROM cdAquaticActivity WHERE (AquaticActivityCd = ?) AND (AquaticActivity " +
         "= ? OR ? IS NULL AND AquaticActivity IS NULL)";
     this.oleDbDeleteCommand1.Connection = this.oleDbConnection1;
     this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_AquaticActivityCd", System.Data.OleDb.OleDbType.SmallInt, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "AquaticActivityCd", System.Data.DataRowVersion.Original, null));
     this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_AquaticActivity", System.Data.OleDb.OleDbType.VarWChar, 50, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "AquaticActivity", System.Data.DataRowVersion.Original, null));
     this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_AquaticActivity1", System.Data.OleDb.OleDbType.VarWChar, 50, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "AquaticActivity", System.Data.DataRowVersion.Original, null));
     //
     // oleDbInsertCommand2
     //
     this.oleDbInsertCommand2.CommandText = "INSERT INTO cdAquaticActivity(AquaticActivityCd, AquaticActivity) VALUES (?, ?)";
     this.oleDbInsertCommand2.Connection = this.oleDbConnection1;
     this.oleDbInsertCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("AquaticActivityCd", System.Data.OleDb.OleDbType.SmallInt, 0, "AquaticActivityCd"));
     this.oleDbInsertCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("AquaticActivity", System.Data.OleDb.OleDbType.VarWChar, 50, "AquaticActivity"));
     //
     // oleDbSelectCommand2
     //
     this.oleDbSelectCommand2.CommandText = "SELECT AquaticActivityCd, AquaticActivity FROM cdAquaticActivity";
     this.oleDbSelectCommand2.Connection = this.oleDbConnection1;
     //
     // oleDbUpdateCommand1
     //
     this.oleDbUpdateCommand1.CommandText = "UPDATE cdAquaticActivity SET AquaticActivityCd = ?, AquaticActivity = ? WHERE (Aq" +
         "uaticActivityCd = ?) AND (AquaticActivity = ? OR ? IS NULL AND AquaticActivity I" +
         "S NULL)";
     this.oleDbUpdateCommand1.Connection = this.oleDbConnection1;
     this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("AquaticActivityCd", System.Data.OleDb.OleDbType.SmallInt, 0, "AquaticActivityCd"));
     this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("AquaticActivity", System.Data.OleDb.OleDbType.VarWChar, 50, "AquaticActivity"));
     this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_AquaticActivityCd", System.Data.OleDb.OleDbType.SmallInt, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "AquaticActivityCd", System.Data.DataRowVersion.Original, null));
     this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_AquaticActivity", System.Data.OleDb.OleDbType.VarWChar, 50, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "AquaticActivity", System.Data.DataRowVersion.Original, null));
     this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_AquaticActivity1", System.Data.OleDb.OleDbType.VarWChar, 50, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "AquaticActivity", System.Data.DataRowVersion.Original, null));
     //
     // objdscdAquaticActivity
     //
     this.objdscdAquaticActivity.DataSetName = "dscdAquaticActivity";
     this.objdscdAquaticActivity.Locale = new System.Globalization.CultureInfo("en-US");
     //
     // oleDbdaSiteUseSearch
     //
     this.oleDbdaSiteUseSearch.InsertCommand = this.oleDbInsertCommand5;
     this.oleDbdaSiteUseSearch.SelectCommand = this.oleDbSelectCommand5;
     this.oleDbdaSiteUseSearch.TableMappings.AddRange(new System.Data.Common.DataTableMapping[] {
                                                                                                    new System.Data.Common.DataTableMapping("Table", "DE-SiteSearch", new System.Data.Common.DataColumnMapping[] {
                                                                                                                                                                                                                     new System.Data.Common.DataColumnMapping("AgencyCd", "AgencyCd"),
                                                                                                                                                                                                                     new System.Data.Common.DataColumnMapping("AgencySiteID", "AgencySiteID"),
                                                                                                                                                                                                                     new System.Data.Common.DataColumnMapping("AquaticActivity", "AquaticActivity"),
                                                                                                                                                                                                                     new System.Data.Common.DataColumnMapping("AquaticActivityCd", "AquaticActivityCd"),
                                                                                                                                                                                                                     new System.Data.Common.DataColumnMapping("AquaticSiteID", "AquaticSiteID"),
                                                                                                                                                                                                                     new System.Data.Common.DataColumnMapping("AquaticSiteName", "AquaticSiteName"),
                                                                                                                                                                                                                     new System.Data.Common.DataColumnMapping("AquaticSiteUseID", "AquaticSiteUseID"),
                                                                                                                                                                                                                     new System.Data.Common.DataColumnMapping("DrainageCd", "DrainageCd"),
                                                                                                                                                                                                                     new System.Data.Common.DataColumnMapping("WaterBodyID", "WaterBodyID"),
                                                                                                                                                                                                                     new System.Data.Common.DataColumnMapping("WaterBodyName", "WaterBodyName"),
                                                                                                                                                                                                                     new System.Data.Common.DataColumnMapping("AquaticSiteDesc", "AquaticSiteDesc"),
                                                                                                                                                                                                                     new System.Data.Common.DataColumnMapping("WaterBodyName_Abrev", "WaterBodyName_Abrev")})});
     //
     // oleDbInsertCommand5
     //
     this.oleDbInsertCommand5.CommandText = "INSERT INTO [DE-SiteSearch] (AgencyCd, AgencySiteID, AquaticActivity, AquaticActi" +
         "vityCd, AquaticSiteID, AquaticSiteName, DrainageCd, WaterBodyID, WaterBodyName, " +
         "AquaticSiteDesc, WaterBodyName_Abrev) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)";
     this.oleDbInsertCommand5.Connection = this.oleDbConnection1;
     this.oleDbInsertCommand5.Parameters.Add(new System.Data.OleDb.OleDbParameter("AgencyCd", System.Data.OleDb.OleDbType.VarWChar, 4, "AgencyCd"));
     this.oleDbInsertCommand5.Parameters.Add(new System.Data.OleDb.OleDbParameter("AgencySiteID", System.Data.OleDb.OleDbType.VarWChar, 10, "AgencySiteID"));
     this.oleDbInsertCommand5.Parameters.Add(new System.Data.OleDb.OleDbParameter("AquaticActivity", System.Data.OleDb.OleDbType.VarWChar, 50, "AquaticActivity"));
     this.oleDbInsertCommand5.Parameters.Add(new System.Data.OleDb.OleDbParameter("AquaticActivityCd", System.Data.OleDb.OleDbType.SmallInt, 0, "AquaticActivityCd"));
     this.oleDbInsertCommand5.Parameters.Add(new System.Data.OleDb.OleDbParameter("AquaticSiteID", System.Data.OleDb.OleDbType.Integer, 0, "AquaticSiteID"));
     this.oleDbInsertCommand5.Parameters.Add(new System.Data.OleDb.OleDbParameter("AquaticSiteName", System.Data.OleDb.OleDbType.VarWChar, 100, "AquaticSiteName"));
     this.oleDbInsertCommand5.Parameters.Add(new System.Data.OleDb.OleDbParameter("DrainageCd", System.Data.OleDb.OleDbType.VarWChar, 17, "DrainageCd"));
     this.oleDbInsertCommand5.Parameters.Add(new System.Data.OleDb.OleDbParameter("WaterBodyID", System.Data.OleDb.OleDbType.Integer, 0, "WaterBodyID"));
     this.oleDbInsertCommand5.Parameters.Add(new System.Data.OleDb.OleDbParameter("WaterBodyName", System.Data.OleDb.OleDbType.VarWChar, 55, "WaterBodyName"));
     this.oleDbInsertCommand5.Parameters.Add(new System.Data.OleDb.OleDbParameter("AquaticSiteDesc", System.Data.OleDb.OleDbType.VarWChar, 150, "AquaticSiteDesc"));
     this.oleDbInsertCommand5.Parameters.Add(new System.Data.OleDb.OleDbParameter("WaterBodyName_Abrev", System.Data.OleDb.OleDbType.VarWChar, 40, "WaterBodyName_Abrev"));
     //
     // oleDbSelectCommand5
     //
     this.oleDbSelectCommand5.CommandText = "SELECT AgencyCd, AgencySiteID, AquaticActivity, AquaticActivityCd, AquaticSiteID," +
         " AquaticSiteName, AquaticSiteUseID, DrainageCd, WaterBodyID, WaterBodyName, Aqua" +
         "ticSiteDesc, WaterBodyName_Abrev FROM [DE-SiteSearch]";
     this.oleDbSelectCommand5.Connection = this.oleDbConnection1;
     //
     // oleDbInsertCommand1
     //
     this.oleDbInsertCommand1.CommandText = "INSERT INTO [DE-SiteSearch] (AgencyCd, AgencySiteID, AquaticActivity, AquaticActi" +
         "vityCd, AquaticSiteID, AquaticSiteName, DrainageCd, WaterBodyID, WaterBodyName, " +
         "AquaticSiteDesc) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)";
     this.oleDbInsertCommand1.Connection = this.oleDbConnection1;
     this.oleDbInsertCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("AgencyCd", System.Data.OleDb.OleDbType.VarWChar, 4, "AgencyCd"));
     this.oleDbInsertCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("AgencySiteID", System.Data.OleDb.OleDbType.VarWChar, 10, "AgencySiteID"));
     this.oleDbInsertCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("AquaticActivity", System.Data.OleDb.OleDbType.VarWChar, 50, "AquaticActivity"));
     this.oleDbInsertCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("AquaticActivityCd", System.Data.OleDb.OleDbType.SmallInt, 0, "AquaticActivityCd"));
     this.oleDbInsertCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("AquaticSiteID", System.Data.OleDb.OleDbType.Integer, 0, "AquaticSiteID"));
     this.oleDbInsertCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("AquaticSiteName", System.Data.OleDb.OleDbType.VarWChar, 100, "AquaticSiteName"));
     this.oleDbInsertCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("DrainageCd", System.Data.OleDb.OleDbType.VarWChar, 17, "DrainageCd"));
     this.oleDbInsertCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("WaterBodyID", System.Data.OleDb.OleDbType.Integer, 0, "WaterBodyID"));
     this.oleDbInsertCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("WaterBodyName", System.Data.OleDb.OleDbType.VarWChar, 55, "WaterBodyName"));
     this.oleDbInsertCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("AquaticSiteDesc", System.Data.OleDb.OleDbType.VarChar, 150, "AquaticSiteDesc"));
     //
     // oleDbSelectCommand1
     //
     this.oleDbSelectCommand1.CommandText = "SELECT AgencyCd, AgencySiteID, AquaticActivity, AquaticActivityCd, AquaticSiteID," +
         " AquaticSiteName, AquaticSiteUseID, DrainageCd, WaterBodyID, WaterBodyName, Aqua" +
         "ticSiteDesc FROM [DE-SiteSearch]";
     this.oleDbSelectCommand1.Connection = this.oleDbConnection1;
     //
     // oleDbdaWatersheds
     //
     this.oleDbdaWatersheds.InsertCommand = this.oleDbInsertCommand3;
     this.oleDbdaWatersheds.SelectCommand = this.oleDbSelectCommand3;
     this.oleDbdaWatersheds.TableMappings.AddRange(new System.Data.Common.DataTableMapping[] {
                                                                                                 new System.Data.Common.DataTableMapping("Table", "DE-Watersheds", new System.Data.Common.DataColumnMapping[] {
                                                                                                                                                                                                                  new System.Data.Common.DataColumnMapping("WaterBodyID", "WaterBodyID"),
                                                                                                                                                                                                                  new System.Data.Common.DataColumnMapping("WaterBodyName", "WaterBodyName"),
                                                                                                                                                                                                                  new System.Data.Common.DataColumnMapping("DrainageCd", "DrainageCd")})});
     //
     // oleDbInsertCommand3
     //
     this.oleDbInsertCommand3.CommandText = "INSERT INTO [DE-Watersheds] (WaterBodyID, WaterBodyName, DrainageCd) VALUES (?, ?" +
         ", ?)";
     this.oleDbInsertCommand3.Connection = this.oleDbConnection1;
     this.oleDbInsertCommand3.Parameters.Add(new System.Data.OleDb.OleDbParameter("WaterBodyID", System.Data.OleDb.OleDbType.Integer, 0, "WaterBodyID"));
     this.oleDbInsertCommand3.Parameters.Add(new System.Data.OleDb.OleDbParameter("WaterBodyName", System.Data.OleDb.OleDbType.VarWChar, 55, "WaterBodyName"));
     this.oleDbInsertCommand3.Parameters.Add(new System.Data.OleDb.OleDbParameter("DrainageCd", System.Data.OleDb.OleDbType.VarWChar, 17, "DrainageCd"));
     //
     // oleDbSelectCommand3
     //
     this.oleDbSelectCommand3.CommandText = "SELECT WaterBodyID, WaterBodyName, DrainageCd FROM [DE-Watersheds]";
     this.oleDbSelectCommand3.Connection = this.oleDbConnection1;
     //
     // objdsWatersheds
     //
     this.objdsWatersheds.DataSetName = "dsWatersheds";
     this.objdsWatersheds.Locale = new System.Globalization.CultureInfo("en-US");
     //
     // oleDbdaDE_Agencies
     //
     this.oleDbdaDE_Agencies.InsertCommand = this.oleDbInsertCommand6;
     this.oleDbdaDE_Agencies.SelectCommand = this.oleDbSelectCommand6;
     this.oleDbdaDE_Agencies.TableMappings.AddRange(new System.Data.Common.DataTableMapping[] {
                                                                                                  new System.Data.Common.DataTableMapping("Table", "DE-Agencies", new System.Data.Common.DataColumnMapping[] {
                                                                                                                                                                                                                 new System.Data.Common.DataColumnMapping("AgencyCd", "AgencyCd"),
                                                                                                                                                                                                                 new System.Data.Common.DataColumnMapping("Agency", "Agency")})});
     //
     // oleDbDeleteCommand2
     //
     this.oleDbDeleteCommand2.CommandText = "DELETE FROM cdAgency WHERE (AgencyCd = ?) AND (Agency = ? OR ? IS NULL AND Agency" +
         " IS NULL)";
     this.oleDbDeleteCommand2.Connection = this.oleDbConnection1;
     this.oleDbDeleteCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_AgencyCd", System.Data.OleDb.OleDbType.VarWChar, 5, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "AgencyCd", System.Data.DataRowVersion.Original, null));
     this.oleDbDeleteCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_Agency", System.Data.OleDb.OleDbType.VarWChar, 60, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "Agency", System.Data.DataRowVersion.Original, null));
     this.oleDbDeleteCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_Agency1", System.Data.OleDb.OleDbType.VarWChar, 60, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "Agency", System.Data.DataRowVersion.Original, null));
     //
     // oleDbInsertCommand4
     //
     this.oleDbInsertCommand4.CommandText = "INSERT INTO cdAgency(Agency, AgencyCd) VALUES (?, ?)";
     this.oleDbInsertCommand4.Connection = this.oleDbConnection1;
     this.oleDbInsertCommand4.Parameters.Add(new System.Data.OleDb.OleDbParameter("Agency", System.Data.OleDb.OleDbType.VarWChar, 60, "Agency"));
     this.oleDbInsertCommand4.Parameters.Add(new System.Data.OleDb.OleDbParameter("AgencyCd", System.Data.OleDb.OleDbType.VarWChar, 5, "AgencyCd"));
     //
     // oleDbSelectCommand4
     //
     this.oleDbSelectCommand4.CommandText = "SELECT Agency, AgencyCd FROM cdAgency";
     this.oleDbSelectCommand4.Connection = this.oleDbConnection1;
     //
     // oleDbUpdateCommand2
     //
     this.oleDbUpdateCommand2.CommandText = "UPDATE cdAgency SET Agency = ?, AgencyCd = ? WHERE (AgencyCd = ?) AND (Agency = ?" +
         " OR ? IS NULL AND Agency IS NULL)";
     this.oleDbUpdateCommand2.Connection = this.oleDbConnection1;
     this.oleDbUpdateCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("Agency", System.Data.OleDb.OleDbType.VarWChar, 60, "Agency"));
     this.oleDbUpdateCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("AgencyCd", System.Data.OleDb.OleDbType.VarWChar, 5, "AgencyCd"));
     this.oleDbUpdateCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_AgencyCd", System.Data.OleDb.OleDbType.VarWChar, 5, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "AgencyCd", System.Data.DataRowVersion.Original, null));
     this.oleDbUpdateCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_Agency", System.Data.OleDb.OleDbType.VarWChar, 60, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "Agency", System.Data.DataRowVersion.Original, null));
     this.oleDbUpdateCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_Agency1", System.Data.OleDb.OleDbType.VarWChar, 60, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "Agency", System.Data.DataRowVersion.Original, null));
     //
     // oleDbSelectCommand6
     //
     this.oleDbSelectCommand6.CommandText = "SELECT AgencyCd, Agency FROM [DE-Agencies]";
     this.oleDbSelectCommand6.Connection = this.oleDbConnection1;
     //
     // oleDbInsertCommand6
     //
     this.oleDbInsertCommand6.CommandText = "INSERT INTO [DE-Agencies] (AgencyCd, Agency) VALUES (?, ?)";
     this.oleDbInsertCommand6.Connection = this.oleDbConnection1;
     this.oleDbInsertCommand6.Parameters.Add(new System.Data.OleDb.OleDbParameter("AgencyCd", System.Data.OleDb.OleDbType.VarWChar, 4, "AgencyCd"));
     this.oleDbInsertCommand6.Parameters.Add(new System.Data.OleDb.OleDbParameter("Agency", System.Data.OleDb.OleDbType.VarChar, 60, "Agency"));
     //
     // objdsDE_Agencies
     //
     this.objdsDE_Agencies.DataSetName = "dsDE_Agencies";
     this.objdsDE_Agencies.Locale = new System.Globalization.CultureInfo("en-US");
     ((System.ComponentModel.ISupportInitialize)(this.dvSearchSites)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.objdsSiteUseSearch)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.objdscdAquaticActivity)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.objdsWatersheds)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.objdsDE_Agencies)).EndInit();
 }
Beispiel #2
0
 public void LoadDataSet()
 {
     // Create a new dataset to hold the records returned from the call to FillDataSet.
     // A temporary dataset is used because filling the existing dataset would
     // require the databindings to be rebound.
     NBADWDataEntryApplication.dsSiteUseSearch objDataSetTemp1;
     //NBADWDataEntryApplication.dscdAquaticActivity objDataSetTemp2;
     objDataSetTemp1 = new NBADWDataEntryApplication.dsSiteUseSearch();
     //objDataSetTemp2 = new NBADWDataEntryApplication.dscdAquaticActivity();
     try
     {
         // Attempt to fill the temporary dataset.
         this.FillDataSet(objDataSetTemp1);
     }
     catch (System.Exception eFillDataSet)
     {
         // Add your error handling code here.
         throw eFillDataSet;
     }
     try
     {
         // Empty the old records from the dataset.
         objdsSiteUseSearch.Clear();
         //objdscdAquaticActivity.Clear();
         // Merge the records into the main dataset.
         objdsSiteUseSearch.Merge(objDataSetTemp1);
         //objdscdAquaticActivity.Merge(objDataSetTemp2);
     }
     catch (System.Exception eLoadMerge)
     {
         // Add your error handling code here.
         throw eLoadMerge;
     }
 }