markus / ConvertService / ServiceBase / Markus.Service.DataBase / Extentions / MarkusAPI.cs @ 082cbc54
이력 | 보기 | 이력해설 | 다운로드 (1.06 KB)
1 |
using Newtonsoft.Json; |
---|---|
2 |
using System; |
3 |
using System.Collections.Generic; |
4 |
using System.Linq; |
5 |
using System.Text; |
6 |
using System.Threading.Tasks; |
7 |
using Markus.Service.DataBase.Data; |
8 |
|
9 |
namespace Markus.Service.DataBase.Extensions |
10 |
{ |
11 |
//// userID는 관리자 계정인 doftech |
12 |
//string markusLink = "kcom://" + MarkusAPI.CreateMarkusParam(projectNo, documentID, userID); |
13 |
public class MarkusAPI |
14 |
{ |
15 |
public static string CreateMarkusParam(string projectNo, string documentID, string userID) |
16 |
{ |
17 |
ViewInfo viewInfo = new ViewInfo(); |
18 |
|
19 |
viewInfo.DocumentItemID = documentID; |
20 |
viewInfo.ProjectNO = projectNo; |
21 |
viewInfo.UserID = userID; |
22 |
|
23 |
return ParamEncoding(JsonConvert.SerializeObject(viewInfo)); |
24 |
|
25 |
} |
26 |
|
27 |
public static string ParamEncoding(string EncodingText, System.Text.Encoding oEncoding = null) |
28 |
{ |
29 |
|
30 |
if (oEncoding == null) |
31 |
oEncoding = System.Text.Encoding.UTF8; |
32 |
|
33 |
return Convert.ToBase64String(oEncoding.GetBytes(EncodingText)); |
34 |
|
35 |
} |
36 |
} |
37 |
} |