예제 #1
0
        public static GetClientsResult GetAllClients()
        {
            ///////////////////////
            // Standard API call //
            ///////////////////////

            // Create Service
            ClientService service = new ClientService();

            // Create request
            GetClientsRequest request = new GetClientsRequest();

            // Create and fill credentials
            request.SourceCredentials = new SourceCredentials();
            request.SourceCredentials.SourceName = SOURCE_NAME;
            request.SourceCredentials.Password = SOURCE_PASSWORD;
            request.SourceCredentials.SiteIDs = SITE_IDS;

            request.UserCredentials = new UserCredentials();
            request.UserCredentials.Username = MNGR_NAME;
            request.UserCredentials.Password = MNGR_PASSWORD;
            request.UserCredentials.SiteIDs = SITE_IDS;

            request.PageSize = 50;

                //string[] client_ids = {"100015484"};
            //request.ClientIDs = client_ids;

            request.SearchText = "";

            // Run call with request and fill result
            GetClientsResult result = service.GetClients(request);

            return result;
        }
예제 #2
0
 /// <remarks/>
 public void GetClientsAsync(GetClientsRequest Request, object userState) {
     if ((this.GetClientsOperationCompleted == null)) {
         this.GetClientsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetClientsOperationCompleted);
     }
     this.InvokeAsync("GetClients", new object[] {
                 Request}, this.GetClientsOperationCompleted, userState);
 }
예제 #3
0
 /// <remarks/>
 public void GetClientsAsync(GetClientsRequest Request) {
     this.GetClientsAsync(Request, null);
 }
예제 #4
0
 public GetClientsResult GetClients(GetClientsRequest Request) {
     object[] results = this.Invoke("GetClients", new object[] {
                 Request});
     return ((GetClientsResult)(results[0]));
 }