Beispiel #1
0
        public void updateIoTHub(int Id, Edit iotHub)
        {
            DBHelper._IoTHub dbhelp         = new DBHelper._IoTHub();
            IoTHub           existingIoTHub = dbhelp.GetByid(Id);

            if (existingIoTHub == null)
            {
                throw new CDSException(10901);
            }

            existingIoTHub.IoTHubName                      = iotHub.IoTHubName;
            existingIoTHub.Description                     = iotHub.Description;
            existingIoTHub.CompanyID                       = iotHub.CompanyId;
            existingIoTHub.IoTHubEndPoint                  = iotHub.IoTHubEndPoint;
            existingIoTHub.IoTHubConnectionString          = iotHub.IoTHubConnectionString;
            existingIoTHub.EventConsumerGroup              = iotHub.EventConsumerGroup;
            existingIoTHub.EventHubStorageConnectionString = iotHub.EventHubStorageConnectionString;
            existingIoTHub.UploadContainer                 = iotHub.UploadContainer;

            dbhelp.Update(existingIoTHub);
        }
Beispiel #2
0
        public void updateIoTHub(string IoTHubAlias, Edit iotHub)
        {
            DBHelper._IoTHub dbhelp         = new DBHelper._IoTHub();
            IoTHub           existingIoTHub = dbhelp.GetByid(IoTHubAlias);

            existingIoTHub.IoTHubAlias                       = iotHub.IoTHubAlias;
            existingIoTHub.Description                       = iotHub.Description;
            existingIoTHub.CompanyID                         = iotHub.CompanyId;
            existingIoTHub.P_IoTHubEndPoint                  = iotHub.P_IoTHubEndPoint;
            existingIoTHub.P_IoTHubConnectionString          = iotHub.P_IoTHubConnectionString;
            existingIoTHub.P_EventConsumerGroup              = iotHub.P_EventConsumerGroup;
            existingIoTHub.P_EventHubStorageConnectionString = iotHub.P_EventHubStorageConnectionString;
            existingIoTHub.P_UploadContainer                 = iotHub.P_UploadContainer;
            existingIoTHub.S_IoTHubEndPoint                  = iotHub.S_IoTHubEndPoint;
            existingIoTHub.S_IoTHubConnectionString          = iotHub.S_IoTHubConnectionString;
            existingIoTHub.S_EventConsumerGroup              = iotHub.S_EventConsumerGroup;
            existingIoTHub.S_EventHubStorageConnectionString = iotHub.S_EventHubStorageConnectionString;
            existingIoTHub.S_UploadContainer                 = iotHub.S_UploadContainer;

            dbhelp.Update(existingIoTHub);
        }