try
{
string appId = "Appid";
string appSecret = "appSecret ";
string dbId = "dbid";
string userId = "user";
K3CloudApiClient client = new K3CloudApiClient("http://url/K3Cloud/");
string loginResult = client.LoginByAppSecret(dbId, userId, appId, appSecret, 2052);
Newtonsoft.Json.Linq.JObject loginResultObj = JObject.Parse(loginResult);
JToken loginResultType;
loginResultObj.TryGetValue("LoginResultType", out loginResultType);
if (loginResultType != null && loginResultType.Value<Int32>() == 1)
{
this.textBox2.Text = client.Save("BD_Customer", this.textBox1.Text);
}
}
catch(Exception ex)
{
MessageBox.Show(ex.Message);
}
推荐阅读