프로젝트

일반

사용자정보

통계
| 브랜치(Branch): | 개정판:

markus / PemssApiTest / MainWindow.xaml.cs @ b7645ccc

이력 | 보기 | 이력해설 | 다운로드 (3.39 KB)

1
using Newtonsoft.Json.Linq;
2
using System;
3
using System.Collections.Generic;
4
using System.Linq;
5
using System.Text;
6
using System.Threading.Tasks;
7
using System.Windows;
8
using System.Windows.Controls;
9
using System.Windows.Data;
10
using System.Windows.Documents;
11
using System.Windows.Input;
12
using System.Windows.Media;
13
using System.Windows.Media.Imaging;
14
using System.Windows.Navigation;
15
using System.Windows.Shapes;
16

    
17
namespace PemssApiTest
18
{
19
    /// <summary>
20
    /// MainWindow.xaml에 대한 상호 작용 논리
21
    /// </summary>
22
    public partial class MainWindow : Window
23
    {
24
        public MainWindow()
25
        {
26
            InitializeComponent();
27
        }
28

    
29
        private void requirementCall_Click(object sender, RoutedEventArgs e)
30
        {
31
            //http://pemss.i-on.net/rest/ext/list/requirement?pId=P00000000001&dId=D0000000008B
32

    
33
            KCOM_API.PemssApi api = new KCOM_API.PemssApi("http://pemss.i-on.net");
34
            var items = api.GetRequirementItems("P00000000001", "D0000000008B");
35

    
36
            foreach (var item in items)
37
            {
38
                System.Diagnostics.Debug.WriteLine(item.mdText);
39
            }
40
        }
41

    
42
        private void DocumentInfoCall_Click(object sender, RoutedEventArgs e)
43
        {
44
            KCOM_API.PemssApi api = new KCOM_API.PemssApi("http://pemss.i-on.net");
45
            var items = api.GetDocumentInfo("111111", "116");
46

    
47
            System.Diagnostics.Debug.WriteLine(items.slipNo);
48
        }
49

    
50
        private void GetSymbolList_Click(object sender, RoutedEventArgs e)
51
        {
52
            ServiceDeepView.ServiceDeepViewClient client = new ServiceDeepView.ServiceDeepViewClient();
53
            var result = client.GetSymbolList("admin");
54

    
55
            if(result != null)
56
            {
57

    
58
            }
59
        }
60

    
61
        private void GetCompareRectCall_Click(object sender, RoutedEventArgs e)
62
        {
63
            ServiceDeepView.ServiceDeepViewClient client = new ServiceDeepView.ServiceDeepViewClient();
64
            var result = client.GetCompareRect("111111", "116", "116", "1", "1", "true");
65

    
66
            if (result != null)
67
            {
68

    
69
            }
70
        }
71

    
72
        private void CommentAddCall_Click(object sender, RoutedEventArgs e)
73
        {
74
            KCOM_API.PemssApi api = new KCOM_API.PemssApi("http://pemss.i-on.net");
75
            //var items = api.SetRequirementComment("P00000000001", "D0000000008B");
76

    
77
            //foreach (var item in items)
78
            //{
79
            //    System.Diagnostics.Debug.WriteLine(item.mdText);
80
            //}
81
        }
82

    
83
        private void GetMarkupDataForPageCall_Click(object sender, RoutedEventArgs e)
84
        {
85
            ServiceDeepView.ServiceDeepViewClient client = new ServiceDeepView.ServiceDeepViewClient();
86
            var result = client.GetMarkupDataForPage("111111", "AuUZwSlog68d714c36d38b0ca", 1);
87

    
88
            if (result != null)
89
            {
90

    
91
            }
92
        }
93

    
94
        private void CallRest_Click(object sender, RoutedEventArgs e)
95
        {
96
            KCOM_API.PemssApi api = new KCOM_API.PemssApi("http://pemss.i-on.net");
97

    
98
            var result = api.GetWebClientString("http://pemss.i-on.net/rest/ext/list/bidders?dId=116");
99

    
100
            if (result != null)
101
            {
102
                JObject jObject = JObject.Parse(result, new JsonLoadSettings());
103

    
104
                foreach (JToken item in JArray.Parse(jObject["rows"].ToString()))
105
                {
106
                }
107
            }
108
        }
109
    }
110
}
클립보드 이미지 추가 (최대 크기: 500 MB)