Пример #1
0
        private static void LoadEventSentEmail(EventRow eventRow, EventDataTable systemEvent, int sentEmailID)
        {
            BulkLoader bulkLoader;
            DataTable  eventSentEmailTable;

            using (AdoDataConnection connection = new AdoDataConnection(s_dbAdapterContainer.Connection, typeof(SqlDataAdapter), false))
            {
                // Query an empty table with matching schema --
                // union table to itself to eliminate unique key constraints
                eventSentEmailTable           = connection.RetrieveData("SELECT * FROM EventSentEmail WHERE 1 IS NULL UNION ALL SELECT * FROM EventSentEmail WHERE 1 IS NULL");
                eventSentEmailTable.TableName = "EventSentEmail";
            }

            foreach (MeterData.EventRow evt in systemEvent)
            {
                if (eventRow.LineID == evt.LineID)
                {
                    eventSentEmailTable.Rows.Add(0, evt.ID, sentEmailID);
                }
            }

            bulkLoader                = new BulkLoader();
            bulkLoader.Connection     = s_dbAdapterContainer.Connection;
            bulkLoader.CommandTimeout = s_dbAdapterContainer.CommandTimeout;
            bulkLoader.Load(eventSentEmailTable);
        }
Пример #2
0
            public override global::System.Data.DataTable Clone()
            {
                EventDataTable cln = ((EventDataTable)(base.Clone()));

                cln.InitVars();
                return(cln);
            }
Пример #3
0
 private void InitClass()
 {
     this.DataSetName             = "SAPDataSetEvent";
     this.Prefix                  = "";
     this.EnforceConstraints      = true;
     this.SchemaSerializationMode = global::System.Data.SchemaSerializationMode.IncludeSchema;
     this.tableEvent              = new EventDataTable();
     base.Tables.Add(this.tableEvent);
 }
Пример #4
0
 private void InitClass()
 {
     this.DataSetName             = "Events";
     this.Prefix                  = "";
     this.Namespace               = "http://tempuri.org/Events.xsd";
     this.EnforceConstraints      = true;
     this.SchemaSerializationMode = global::System.Data.SchemaSerializationMode.IncludeSchema;
     this.tableEvent              = new EventDataTable();
     base.Tables.Add(this.tableEvent);
 }
Пример #5
0
 private void InitClass()
 {
     this.DataSetName             = "EventsDataSet";
     this.Prefix                  = "";
     this.Namespace               = "http://schemas.microsoft.com/office/project/server/webservices/EventsDataSet/";
     this.EnforceConstraints      = false;
     this.SchemaSerializationMode = global::System.Data.SchemaSerializationMode.IncludeSchema;
     this.tableEvent              = new EventDataTable();
     base.Tables.Add(this.tableEvent);
 }
Пример #6
0
 internal void InitVars(bool initTable)
 {
     this.tableEvent = ((EventDataTable)(base.Tables["Event"]));
     if ((initTable == true))
     {
         if ((this.tableEvent != null))
         {
             this.tableEvent.InitVars();
         }
     }
 }
Пример #7
0
 internal EventRow(global::System.Data.DataRowBuilder rb) :
     base(rb)
 {
     this.tableEvent = ((EventDataTable)(this.Table));
 }
        private static void LoadEventSentEmail(EventRow eventRow, EventDataTable systemEvent, int sentEmailID)
        {
            BulkLoader bulkLoader;
            DataTable eventSentEmailTable;

            using (AdoDataConnection connection = new AdoDataConnection(s_dbAdapterContainer.Connection, typeof(SqlDataAdapter), false))
            {
                // Query an empty table with matching schema --
                // union table to itself to eliminate unique key constraints
                eventSentEmailTable = connection.RetrieveData("SELECT * FROM EventSentEmail WHERE 1 IS NULL UNION ALL SELECT * FROM EventSentEmail WHERE 1 IS NULL");
                eventSentEmailTable.TableName = "EventSentEmail";
            }

            foreach (MeterData.EventRow evt in systemEvent)
            {
                if (eventRow.LineID == evt.LineID)
                    eventSentEmailTable.Rows.Add(0, evt.ID, sentEmailID);
            }

            bulkLoader = new BulkLoader();
            bulkLoader.Connection = s_dbAdapterContainer.Connection;
            bulkLoader.CommandTimeout = s_dbAdapterContainer.CommandTimeout;
            bulkLoader.Load(eventSentEmailTable);
        }