调用weiAPI免密登录原创
金蝶云社区-迷路的绵羊
迷路的绵羊
28人赞赏了该文章 488次浏览 未经作者许可,禁止转载编辑于2024年03月28日 11:40:06

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);

            }


图标赞 28
28人点赞
还没有人点赞,快来当第一个点赞的人吧!
图标打赏
0人打赏
还没有人打赏,快来当第一个打赏的人吧!

您的鼓励与嘉奖将成为创作者们前进的动力,如果觉得本文还不错,可以给予作者创作打赏哦!

请选择打赏金币数 *

10金币20金币30金币40金币50金币60金币
可用金币: 0