프로젝트

일반

사용자정보

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

markus / MarkupToPDF / Common / GetUserSign.cs @ 5928384e

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

1
using KCOMDataModel.Common;
2
using KCOMDataModel.DataModel;
3
using System;
4
using System.Collections.Generic;
5
using System.IO;
6
using System.Linq;
7
using System.Runtime.InteropServices;
8
using System.ServiceModel;
9
using System.Text;
10

    
11
namespace MarkupToPDF.Common
12
{
13
    public class GetUserSign
14
    {
15
        /// 
16
        /// <summary>
17
        /// 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
        
29
	    /// <summary>
30
        /// get signature of given user of given project
31
        /// </summary>
32
        /// <param name="UserID"></param>
33
        /// <param name="ProjectNo"></param>
34
        /// <returns></returns>
35
        public static string GetSign(string UserID, string ProjectNo)
36
        {
37
            BasicHttpBinding _binding;
38
            EndpointAddress _EndPoint;
39

    
40
            _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
            _binding.TransferMode = TransferMode.Buffered;            
49

    
50
            string sBaseServiceURL = CommonLib.Common.GetConfigString("BaseClientAddress", "URL", "");
51

    
52
            _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
        }
59
    }
60
}
클립보드 이미지 추가 (최대 크기: 500 MB)