1Newtonsoft.Json.dll
1using Newtonsoft.Json.Linq;
3、修改组织机构代码 和 客户代码、名字 4、添加类 InvokeHelper 5、添加使用
1using Newtonsoft.Json;
6、添加 public
1234 public class InvokeHelper { }
7、星空地址
12 //星空 业务站点地址 private static string CloudUrl = "http://127.0.1/K3Cloud/";
8、登录
1234567891011121314151617 //登录 public static string Login() { HttpClient httpClient = new HttpClient(); httpClient.Url = string.Concat(CloudUrl, "Kingdee.BOS.WebApi.ServicesStub.AuthService.ValidateUser.common.kdsvc"); List<object> Parameters = new List<object>(); Parameters.Add("5e5b91e99193fb");//账套 Parameters.Add("administrator");//用户名 Parameters.Add("888888");//密码 Parameters.Add(2502);//2052代表中文 httpClient.Content = JsonConvert.SerializeObject(Parameters); return httpClient.SysncRequest(); }
123456789101112131415 //保存 public static string Save(string formId, string content) { HttpClient httpClient = new HttpClient(); httpClient.Url = string.Concat(CloudUrl, "Kingdee.BOS.WebApi.ServicesStub.DynamicFormService.Save.common.kdsvc"); List<object> Parameters = new List<object>(); Parameters.Add(formId);//业务对象Id Parameters.Add(content);//Json字串 httpClient.Content = JsonConvert.SerializeObject(Parameters); return httpClient.SysncRequest(); }
评论