프로젝트

일반

사용자정보

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

markus / MarkupToPDF / Common / GetUserSign.cs @ cdfb57ff

이력 | 보기 | 이력해설 | 다운로드 (2.1 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.Net;
8
using System.Runtime.InteropServices;
9
using System.ServiceModel;
10
using System.Text;
11

    
12
namespace MarkupToPDF.Common
13
{
14
    public class GetUserSign
15
    {
16
        /// 
17
        /// <summary>
18
        /// Application Data Folder
19
        /// </summary>
20
        /// 
21
        public static string AppDataFolder
22
        {
23
            get
24
            {
25
                return Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData), "MARKUS");
26
            }
27
        }
28

    
29
        
30
	    /// <summary>
31
        /// get signature of given user of given project
32
        /// </summary>
33
        /// <param name="UserID"></param>
34
        /// <param name="ProjectNo"></param>
35
        /// <returns></returns>
36
        public static string GetSign(string UserID, string ProjectNo,bool isExternal= false)
37
        {
38
            BasicHttpBinding _binding;
39
            EndpointAddress _EndPoint;
40

    
41
            _binding = new BasicHttpBinding(BasicHttpSecurityMode.TransportCredentialOnly);
42
            _binding.MaxBufferSize = 2147483647;
43
            _binding.MaxReceivedMessageSize = 2147483647;
44
            _binding.OpenTimeout = new TimeSpan(0, 1, 0);
45
            _binding.ReceiveTimeout = new TimeSpan(0, 10, 0);
46
            _binding.CloseTimeout = new TimeSpan(0, 5, 0);
47
            _binding.SendTimeout = new TimeSpan(0, 5, 0);
48
            _binding.TextEncoding = System.Text.Encoding.UTF8;
49
            _binding.TransferMode = TransferMode.Buffered;
50

    
51
            string sBaseServiceURL = CommonLib.Common.GetConfigString("BaseClientAddress", "URL", "", isExternal);
52
            //CommonLib.Common.GetConfigString("BaseClientAddress", "URL", "");
53

    
54
            _EndPoint = new EndpointAddress(string.Format("{0}/ServiceDeepView.svc", sBaseServiceURL));
55

    
56
            markus_api.ServiceDeepViewClient client = new markus_api.ServiceDeepViewClient(_binding, _EndPoint);
57
            var _sign = client.GetSignData(ProjectNo, UserID);           
58

    
59
            return _sign;
60
        }
61
    }
62
}
클립보드 이미지 추가 (최대 크기: 500 MB)