示例#1
0
        private void Button_Click_9(object sender, RoutedEventArgs e)
        {
            RequestAPIManager manager = new RequestAPIManager();

            manager.checkpassword(703, 123456).ContinueWith(t =>
            {
                Dictionary <string, string> x = t.Result;
                if (x == null)
                {
                    MessageBox.Show("获取数据失败");
                    return;
                }
                Console.WriteLine("返回消息:" + x["mes"]);
            });
        }
示例#2
0
        private void Button_Click_6(object sender, RoutedEventArgs e)
        {
            RequestAPIManager manager = new RequestAPIManager();

            manager.getShuihaoAndGs().ContinueWith(t =>
            {
                List <ShuihaoAndGs> x = t.Result;
                if (x == null)
                {
                    MessageBox.Show("获取数据失败");
                    return;
                }
                x.ForEach(item => { Console.WriteLine("返回消息:" + item.ToString()); });
            });
        }
示例#3
0
        private void Button_Click_1(object sender, RoutedEventArgs e)
        {
            RequestAPIManager manager = new RequestAPIManager();

            manager.getUsers(0).ContinueWith(t =>
            {
                UserPage x = t.Result;
                if (x == null)
                {
                    MessageBox.Show("获取数据失败");
                    return;
                }
                Console.WriteLine("总共数量:" + x.count);
                x.data.ForEach(item => { Console.WriteLine(item.rm); });
            });
        }
示例#4
0
        private void Button_Click_5(object sender, RoutedEventArgs e)
        {
            RequestAPIManager manager = new RequestAPIManager();

            manager.AddPj(370, 666).ContinueWith(t =>
            {
                Countmes x = t.Result;
                if (x == null)
                {
                    MessageBox.Show("获取数据失败");
                    return;
                }

                Console.WriteLine("返回消息:" + x.ToString());
            });
        }
示例#5
0
        private void Button_Click_2(object sender, RoutedEventArgs e)
        {
            RequestAPIManager manager = new RequestAPIManager();
            var u = new User();

            u.bh       = 666;
            u.gsm      = "";
            u.shuihao  = "";
            u.rm       = "";
            u.lianxifs = "";
            u._id      = 23;
            u.address  = "湖头";
            manager.UpdateCust(u).ContinueWith(t =>
            {
                Dictionary <string, string> x = t.Result;
                if (x == null)
                {
                    MessageBox.Show("获取数据失败");
                    return;
                }
                Console.WriteLine("返回消息:" + x["mes"]);
            });
        }
示例#6
0
        private void Button_Click_3(object sender, RoutedEventArgs e)
        {
            RequestAPIManager manager = new RequestAPIManager();
            var u = new User();

            u.bh       = 888;
            u.gsm      = "888公司";
            u.shuihao  = "888税号";
            u.rm       = "888人名";
            u.lianxifs = "888联系";

            u.address = "湖头";
            manager.AddCustMes(u).ContinueWith(t =>
            {
                GetUser x = t.Result;
                if (x == null)
                {
                    MessageBox.Show("获取数据失败");
                    return;
                }

                Console.WriteLine("返回消息:" + x.mes);
            });
        }