zoukankan      html  css  js  c++  java
  • mscrm WebService开发 之 CrmDiscoveryService

    代码
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Text;
    using System.Windows.Forms;
    using CrmDiscoveryWeservice.CrmSdk.Discovery;

    namespace CrmDiscoveryWeservice
    {
        
    /// <summary>
        
    /// author:seer lin
        
    /// description:demo of using the CrmDiscoveryService to retrieve organization infomation
        
    /// </summary>
        public partial class Form1 : Form
        {
            
    public Form1()
            {
                InitializeComponent();
            }

            
    private void button1_Click(object sender, EventArgs e)
            {
                CrmDiscoveryService discoveryService 
    = new CrmDiscoveryService();
                discoveryService.UseDefaultCredentials 
    = true;
                discoveryService.Url 
    = "http://localhost:5555/MSCRMServices/2007/AD/CrmDiscoveryService.asmx";

                RetrieveOrganizationsRequest orgRequest 
    = new RetrieveOrganizationsRequest();
                RetrieveOrganizationsResponse orgResponse 
    = (RetrieveOrganizationsResponse)discoveryService.Execute(orgRequest);

                
    foreach (OrganizationDetail orgDetail in orgResponse.OrganizationDetails)
                {
                    MessageBox.Show(
    "组织名称为:"+orgDetail.OrganizationName + "\nWebService访问地址:"+orgDetail.CrmServiceUrl);
                }
            }
        }
    }
  • 相关阅读:
    O(n)回文子串(Manacher)算法
    LightOJ 1282
    LightOJ
    LightOJ
    POJ-2563
    POJ-2398
    POJ-2318
    ZOJ-3318
    [svc]ftp协议数据连接的2种模式
    [py]python中的特殊类class type和类的两面性图解
  • 原文地址:https://www.cnblogs.com/seerlin/p/1756481.html
Copyright © 2011-2022 走看看