프로젝트

일반

사용자정보

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

markus / KCOM_API / PemssService.svc.cs @ 0f6604ce

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

1 0f6604ce taeseongkim
using KCOMDataModel.DataModel;
2
using System;
3
using System.Collections.Generic;
4
using System.Linq;
5
using System.Runtime.Serialization;
6
using System.ServiceModel;
7
using System.ServiceModel.Activation;
8
using System.ServiceModel.Web;
9
using System.Text;
10
11
namespace KCOM_API
12
{
13
    [ServiceContract(Namespace = "")]
14
    [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
15
    public class PemssService : System.Web.Services.WebService
16
    {
17
        private string PemssUri;
18
19
        public PemssService()
20
        {
21
            PemssUri = Properties.Settings.Default.PEMSS_URL;
22
        }
23
24
        [OperationContract]
25
        public List<PemssAPI.DataModel.Requirement> GetrequirementList(string pId, string dId)
26
        {
27
            KCOM_API.PemssApi api = new KCOM_API.PemssApi(PemssUri);
28
            return api.GetRequirementItems(pId,dId);
29
        }
30
31
        [OperationContract]
32
        public bool SetRequirementComment(string pId, string dId, string mdId, string commentId, string comment, bool condition, string uId)
33
        {
34
            KCOM_API.PemssApi api = new KCOM_API.PemssApi(PemssUri);
35
            return api.SetRequirementComment(pId,dId,mdId,commentId,comment,condition,uId);
36
        }
37
38
        [OperationContract]
39
        public bool RemoveRequirementComment(string pId, string dId, string mdId, string commentId, string uId)
40
        {
41
            KCOM_API.PemssApi api = new KCOM_API.PemssApi(PemssUri);
42
            return api.RemoveRequirementComment(pId, dId, mdId, commentId, uId);
43
        }
44
45
        [OperationContract]
46
        public PemssAPI.DataModel.DocumentInfo GetDocumentInfo(string pId,string dId)
47
        {
48
            try
49
            {
50
                KCOM_API.PemssApi api = new KCOM_API.PemssApi(PemssUri);
51
                return api.GetDocumentInfo(pId, dId);
52
            }
53
            catch (Exception ex)
54
            {
55
                throw new FaultException($"GetDocumentInfo PemssUri : {PemssUri} pId : {pId}   dId : {dId}  {ex.Message}");
56
            }
57
        }
58
    }
59
}
클립보드 이미지 추가 (최대 크기: 500 MB)