Esempio n. 1
0
        static void DeleteRequests(string requestId)
        {
            Console.WriteLine("\nIn DeleteRequests");

            //Set Identifier
            localhostDemandService.Identifier[] ids = new localhostDemandService.Identifier[1];
            ids[0]    = new DemandServiceTest.localhostDemandService.Identifier();
            ids[0].id = requestId;

            //Call Webservice
            deleteRequestsResponse response = serviceProxy.deleteRequests(ids);

            Console.WriteLine("deleteRequests Succeeded");
            Console.WriteLine("Number of requests deleted: " + response.@return);
        }
Esempio n. 2
0
        static void GetRequests(string requestId)
        {
            Console.WriteLine("\nIn GetRequests");

            //Set Identifier
            localhostDemandService.Identifier[] ids = new localhostDemandService.Identifier[1];

            ids[0]    = new DemandServiceTest.localhostDemandService.Identifier();
            ids[0].id = requestId;

            //Call Webservice
            Request[] requests = serviceProxy.getRequests(ids);

            Console.WriteLine("GetRequests Succeeded");
            Console.WriteLine("Returned Request: " + requests[0].id);
        }
 /// <remarks/>
 public void getRequestsAsync(Identifier[] getRequests1, object userState) {
     if ((this.getRequestsOperationCompleted == null)) {
         this.getRequestsOperationCompleted = new System.Threading.SendOrPostCallback(this.OngetRequestsOperationCompleted);
     }
     this.InvokeAsync("getRequests", new object[] {
                 getRequests1}, this.getRequestsOperationCompleted, userState);
 }
 /// <remarks/>
 public void getRequestsAsync(Identifier[] getRequests1) {
     this.getRequestsAsync(getRequests1, null);
 }
 /// <remarks/>
 public void deleteRequestsAsync(Identifier[] deleteRequests1) {
     this.deleteRequestsAsync(deleteRequests1, null);
 }
        static void DeleteRequests(string requestId)
        {
            Console.WriteLine("\nIn DeleteRequests");

            //Set Identifier
            localhostDemandService.Identifier[] ids = new localhostDemandService.Identifier[1];
            ids[0] = new DemandServiceTest.localhostDemandService.Identifier();
            ids[0].id = requestId;

            //Call Webservice
            deleteRequestsResponse response = serviceProxy.deleteRequests(ids);

            Console.WriteLine("deleteRequests Succeeded");
            Console.WriteLine("Number of requests deleted: " + response.@return);
        }
        static void SetRequestFields(string requestId)
        {
            Console.WriteLine("\nIn SetRequestFields");

            //Set Identifier
            localhostDemandService.Identifier reqId = new localhostDemandService.Identifier();
            reqId.id = requestId;

            //Set Fields
            SimpleField[] fields = new SimpleField[3];
            //Description
            fields[0] = new SimpleField();
            fields[0].token = "REQ.DESCRIPTION";
            fields[0].stringValue = new String[] { "WebService Test Update" };

            //Department
            fields[1] = new SimpleField();
            fields[1].token = "REQ.DEPARTMENT_NAME";
            fields[1].stringValue = new String[] { "Manufacturing" };

            //Module
            fields[2] = new SimpleField();
            fields[2].token = "REQD.VP.MODULE";
            fields[2].stringValue = new String[] { "Module B" };

            //Set the dateValue for each field to a valid value instead of NULL.
            foreach (SimpleField field in fields)
                field.dateValue = DateTime.Now;

            //Call Webservice
            setRequestFields srf = new setRequestFields();
            srf.requestId = reqId;
            srf.fields = fields;
            setRequestFieldsResponse response = serviceProxy.setRequestFields(srf);

            Console.WriteLine("SetRequestFields Succeeded");
            Console.WriteLine("Return Code: " + response.@return);
        }
        static void GetRequests(string requestId)
        {
            Console.WriteLine("\nIn GetRequests");

            //Set Identifier
            localhostDemandService.Identifier[] ids = new localhostDemandService.Identifier[1];

            ids[0] = new DemandServiceTest.localhostDemandService.Identifier();
            ids[0].id = requestId;

            //Call Webservice
            Request[] requests = serviceProxy.getRequests(ids);

            Console.WriteLine("GetRequests Succeeded");
            Console.WriteLine("Returned Request: "+ requests[0].id);
        }