markus / MarkupToPDF / Common / GetUserSign.cs @ f513c215
이력 | 보기 | 이력해설 | 다운로드 (1.99 KB)
1 | 787a4489 | KangIngu | using KCOMDataModel.Common; |
---|---|---|---|
2 | using KCOMDataModel.DataModel; |
||
3 | using System; |
||
4 | using System.Collections.Generic; |
||
5 | using System.IO; |
||
6 | using System.Linq; |
||
7 | e52385b9 | ljiyeon | using System.Runtime.InteropServices; |
8 | 2aac9b2b | djkim | using System.ServiceModel; |
9 | 787a4489 | KangIngu | using System.Text; |
10 | |||
11 | namespace MarkupToPDF.Common |
||
12 | { |
||
13 | public class GetUserSign |
||
14 | { |
||
15 | e52385b9 | ljiyeon | /// |
16 | c247e6b4 | humkyung | /// <summary> |
17 | e52385b9 | ljiyeon | /// Application Data Folder |
18 | /// </summary> |
||
19 | /// |
||
20 | public static string AppDataFolder |
||
21 | { |
||
22 | get |
||
23 | { |
||
24 | return Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData), "MARKUS"); |
||
25 | } |
||
26 | } |
||
27 | |||
28 | 5928384e | djkim | |
29 | 5529d2a2 | humkyung | /// <summary> |
30 | c247e6b4 | humkyung | /// get signature of given user of given project |
31 | /// </summary> |
||
32 | /// <param name="UserID"></param> |
||
33 | /// <param name="ProjectNo"></param> |
||
34 | /// <returns></returns> |
||
35 | 661b7416 | humkyung | public static string GetSign(string UserID, string ProjectNo) |
36 | 787a4489 | KangIngu | { |
37 | 661b7416 | humkyung | BasicHttpBinding _binding; |
38 | EndpointAddress _EndPoint; |
||
39 | |||
40 | 2aac9b2b | djkim | _binding = new BasicHttpBinding(BasicHttpSecurityMode.TransportCredentialOnly); |
41 | _binding.MaxBufferSize = 2147483647; |
||
42 | _binding.MaxReceivedMessageSize = 2147483647; |
||
43 | _binding.OpenTimeout = new TimeSpan(0, 1, 0); |
||
44 | _binding.ReceiveTimeout = new TimeSpan(0, 10, 0); |
||
45 | _binding.CloseTimeout = new TimeSpan(0, 5, 0); |
||
46 | _binding.SendTimeout = new TimeSpan(0, 5, 0); |
||
47 | _binding.TextEncoding = System.Text.Encoding.UTF8; |
||
48 | e52385b9 | ljiyeon | _binding.TransferMode = TransferMode.Buffered; |
49 | |||
50 | 5928384e | djkim | string sBaseServiceURL = CommonLib.Common.GetConfigString("BaseClientAddress", "URL", ""); |
51 | c247e6b4 | humkyung | |
52 | 2aac9b2b | djkim | _EndPoint = new EndpointAddress(string.Format("{0}/ServiceDeepView.svc", sBaseServiceURL)); |
53 | |||
54 | markus_api.ServiceDeepViewClient client = new markus_api.ServiceDeepViewClient(_binding, _EndPoint); |
||
55 | var _sign = client.GetSignData(ProjectNo, UserID); |
||
56 | |||
57 | return _sign; |
||
58 | 787a4489 | KangIngu | } |
59 | } |
||
60 | 5529d2a2 | humkyung | } |