Ejemplo n.º 1
0
        public bool ReadDisconnectStateByMeters(string key)//string[] arrKey
        {
            bool            r               = true;
            string          resultado       = "";
            TokenController tokenController = new TokenController();

            Ami_Diagnostic_Service.DiagnosticServiceClient            diagnosticServiceClient            = new Ami_Diagnostic_Service.DiagnosticServiceClient();
            Ami_Diagnostic_Service.RequestToken                       requestToken                       = new Ami_Diagnostic_Service.RequestToken();
            Ami_Diagnostic_Service.ReadDisconnectStateByMetersRequest readDisconnectStateByMetersRequest = new Ami_Diagnostic_Service.ReadDisconnectStateByMetersRequest();
            Ami_Diagnostic_Service.ReadDisconnectStateByMetersResult  readDisconnectStateByMetersResult  = new Ami_Diagnostic_Service.ReadDisconnectStateByMetersResult();
            Ami_Diagnostic_Service.EndpointCollectionRequest          endpointCollectionRequest          = new Ami_Diagnostic_Service.EndpointCollectionRequest();

            Ami_Diagnostic_Service.EndpointCollectionRequestResult endpointCollectionResult = new Ami_Diagnostic_Service.EndpointCollectionRequestResult();
            string[] ElectronicSerialNumbersCollection = null;
            ElectronicSerialNumbersCollection    = new string[1];
            ElectronicSerialNumbersCollection[0] = "2.16.840.1.114416.15.243." + key;//arrKey[0];


            endpointCollectionRequest.ElectronicSerialNumbers            = ElectronicSerialNumbersCollection;
            readDisconnectStateByMetersRequest.EndpointCollectionRequest = endpointCollectionRequest;

            try
            {
                requestToken = diagnosticServiceClient.ReadDisconnectStateByMeters(readDisconnectStateByMetersRequest);
                r            = tokenController.insert(requestToken, key, "ReadDisconnectStateByMeters");
            }
            catch (Exception e)
            {
            }
            return(r);
        }