프로젝트

일반

사용자정보

개정판 0b75c341

ID0b75c34175cdc8e65077615292b5c6e0a8effa59
상위 a2a00b53
하위 63a36cc0

김태성이(가) 5년 이상 전에 추가함

PEMSS의 정합성 코멘트는 제외하고 Export 되도록 수정

Change-Id: I289cc872cf12b9d43fb415d0381271acca61f00a

차이점 보기:

PemssAPI/PemssApi.cs
7 7
using System.Collections.Specialized;
8 8
using System.Net.Http;
9 9
using System.Net.Http.Headers;
10
using System.Net;
11
using Newtonsoft.Json;
10 12

  
11 13
namespace KCOM_API
12 14
{
......
142 144
        /// </summary>
143 145
        /// <param name="pId">프로젝트 ID</param>
144 146
        /// <param name="dId">Document ID</param>
145
        /// <param name="mdId">MR 상세 아이템 ID</param>
147
        /// <param name="mrId">MR 상세 아이템 ID</param>
146 148
        /// <param name="commentId"></param>
147 149
        /// <param name="uId"></param>
148 150
        /// <returns></returns>
......
155 157
                //http://pemss.i-on.net/rest/ext/comment/requirement?dId=116&mdId=MD0000000352&commentId=1&uId=유저아이디
156 158

  
157 159
                var values = new NameValueCollection(){
160
                    { "pId",pId},
158 161
                    { "dId",dId},
159 162
                    { "mdId", mdId},
160 163
                    { "commentId" , commentId},
161 164
                    { "uId", uId}
162 165
                };
163 166

  
164
                var jsonObj = DeleteWebClientString($"{gPemssUri}","/rest/ext/comment/requirement", values);
165
                                    //+ $"dId={dId}&mdId={mdId}&commentId={commentId}&uId={uId}");
167
                //var jsonObj = DeleteWebClientString($"{gPemssUri}/rest/ext/comment/requirement",values);
168
                var jsonObj = DeleteWebClientString($"{gPemssUri}/rest/ext/comment/requirement?dId={dId}&mdId={mdId}&commentId={commentId}&uId={uId}", values);
169
                // + $"dId={dId}&mdId={mdId}&commentId={commentId}&uId={uId}", values);
166 170

  
167 171
                // var jsonObj = DeleteWebClientString($"{gPemssUri}/rest/ext/comment/requirement", values);
168 172

  
......
311 315
            }
312 316
        }
313 317

  
314
        private string DeleteWebClientString(string baseUri, string RestApi, NameValueCollection data)
318
        private string DeleteWebClientString(string RestApi, NameValueCollection valus)
315 319
        {
316 320
            try
317 321
            {
318
                using (var client = new HttpClient())
322
               
323
                using (System.Net.WebClient client = new System.Net.WebClient {  Encoding = System.Text.Encoding.UTF8 })
319 324
                {
320
                    client.BaseAddress = new Uri(baseUri);
321
                    client.DefaultRequestHeaders.Accept.Clear();
322
                    client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
325
                    var response = client.UploadValues(RestApi, "DELETE", valus);
326
                    var result = System.Text.Encoding.UTF8.GetString(response);
323 327

  
324
                    var response = client.SendAsync(new HttpRequestMessage(HttpMethod.Delete, RestApi)
328
                    if (string.IsNullOrWhiteSpace(result.Replace("{", "").Replace("}", "")))
325 329
                    {
326
                        Content = new StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(data), System.Text.Encoding.UTF8, "application/json")
327
                    });
328

  
329
                    var result = response.Result;
330

  
331
                        return result.IsSuccessStatusCode.ToString();
330
                        return null;
331
                    }
332
                    else
333
                    {
334
                        return result;
335
                    }
332 336
                }
333 337
            }
334 338
            catch (Exception ex)

내보내기 Unified diff

클립보드 이미지 추가 (최대 크기: 500 MB)