金蝶cloud api开发调用

using Kingdee.BOS.WebApi.Client;                    //引用k3dll
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace WindowsFormsApplication1
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            ApiClient client = new ApiClient("http://127.0.0.1/K3Cloud/");          //登陆验证的类


            bool bLogin = client.Login("5e82aa62366f89", "张三", "123456", 2052);         //账套 账号 密码 语言

            if (bLogin)
            {
                //todo:登陆成功处理业务 
                string sJson = "{\"Number\":\"CGDD000021\"}";               //读取采购订单的单号
                var result = client.Execute<string>("Kingdee.BOS.WebApi.ServicesStub.DynamicFormService.View",
                new object[] { "PUR_PurchaseOrder", sJson });           //获取采购订单信息

            }
        }
    }
}

 

 

 

 

 

posted @ 2020-06-19 08:44  唐尧  阅读(1353)  评论(0编辑  收藏  举报