프로젝트

일반

사용자정보

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

markus / MarkupToPDF / Common / GetUserSign.cs @ c247e6b4

이력 | 보기 | 이력해설 | 다운로드 (1.19 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.Text;
8

    
9
namespace MarkupToPDF.Common
10
{
11
    public class GetUserSign
12
    {
13
        /// <summary>
14
        /// get signature of given user of given project
15
        /// </summary>
16
        /// <param name="UserID"></param>
17
        /// <param name="ProjectNo"></param>
18
        /// <returns></returns>
19
        public string GetSign(string UserID, string ProjectNo)
20
        {
21
            var ModelWFConnectionString = ConnectStringBuilder.ProjectCIConnectString(ProjectNo).ToString();
22
            if (null != ModelWFConnectionString)
23
            {
24
                using (CIEntities entity = new CIEntities(ModelWFConnectionString))
25
                {
26
                    var _sign = entity.SIGN_INFO.Where(sin => sin.MEMBER_USER_ID == UserID);
27
                    if (_sign.Count() > 0)
28
                    {
29
                        return _sign.First().SIGN_STR;
30
                    }
31
                    else
32
                    {
33
                        return null;
34
                    }
35
                }
36
            }
37

    
38
            return null;
39
        }
40
    }
41
}
클립보드 이미지 추가 (최대 크기: 500 MB)