コード例 #1
0
 /// <remarks/>
 public void SubmitNumericDataBatchAsync(DataPoint[] batch, bool partialProcess, bool autoResubmit, object userState) {
     if ((this.SubmitNumericDataBatchOperationCompleted == null)) {
         this.SubmitNumericDataBatchOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSubmitNumericDataBatchOperationCompleted);
     }
     this.InvokeAsync("SubmitNumericDataBatch", new object[] {
                 batch,
                 partialProcess,
                 autoResubmit}, this.SubmitNumericDataBatchOperationCompleted, userState);
 }
コード例 #2
0
 public System.Guid SubmitNumericDataBatch(DataPoint[] batch, bool partialProcess, bool autoResubmit) {
     object[] results = this.Invoke("SubmitNumericDataBatch", new object[] {
                 batch,
                 partialProcess,
                 autoResubmit});
     return ((System.Guid)(results[0]));
 }
コード例 #3
0
 /// <remarks/>
 public void SubmitNumericDataBatchAsync(DataPoint[] batch, bool partialProcess, bool autoResubmit) {
     this.SubmitNumericDataBatchAsync(batch, partialProcess, autoResubmit, null);
 }
        private void SubmitBatch(IEnumerable<EnvianceInterfaceRecord> records)
        {
            if (IsAuthenticated)
            {
                if (records.Count() > 0)
                {
                    List<DataPoint> points = new List<DataPoint>();
                    foreach (EnvianceInterfaceRecord record in records)
                    {
                        DataPoint dataPoint = new DataPoint();
                        TagID tag = new TagID();
                        tag.Tag = record.TagName;
                        dataPoint.Collector = record.ConnectorName;
                        dataPoint.RequirementId = tag;
                        dataPoint.Value = record.EmissionVolume;
                        dataPoint.Complete = record.EventDate;
                        points.Add(dataPoint);

                    }

                    currentBatchId = dataService.SubmitNumericDataBatch(points.ToArray(), true, false);
                }

            }
            else
            {
                throw new Exception(String.Format(NOT_AUTHENTICATED_CALL_ERROR_FORMAT, " SubmitBatch"));
            }

        }