개정판 24678e06
issue #000: Add Commons.cs file
Change-Id: I14ae2a26673890b4be08a1c989faf570629ad3d1
KCOM/Events/SaveCommand.cs | ||
---|---|---|
61 | 61 |
} |
62 | 62 |
#endregion |
63 | 63 |
|
64 |
//GUID생성(최민수 사원 수정) //조장원 대리 다시 변경 |
|
65 |
public static string shortGuid() |
|
66 |
{ |
|
67 |
byte[] bytes = new byte[16]; |
|
68 |
using (var provider = System.Security.Cryptography.RandomNumberGenerator.Create()) |
|
69 |
{ |
|
70 |
provider.GetBytes(bytes); |
|
71 |
} |
|
72 |
|
|
73 |
var guid = new Guid(bytes); |
|
74 |
|
|
75 |
return Convert.ToBase64String(guid.ToByteArray()) |
|
76 |
.Substring(0, 10) |
|
77 |
.Replace("/", "") |
|
78 |
.Replace("+", "") + DateTime.UtcNow.Ticks.ToString("x"); |
|
79 |
} |
|
80 |
|
|
81 |
//조장원 네자리 |
|
82 |
public static string shortCommentKey() |
|
83 |
{ |
|
84 |
byte[] bytes = new byte[3]; |
|
85 |
using (var provider = System.Security.Cryptography.RandomNumberGenerator.Create()) |
|
86 |
{ |
|
87 |
provider.GetBytes(bytes); |
|
88 |
} |
|
89 |
|
|
90 |
return Convert.ToBase64String(bytes); |
|
91 |
} |
|
92 |
|
|
93 |
//강인구 추가 |
|
94 |
public static string shortFileKey() |
|
95 |
{ |
|
96 |
//byte[] bytes = new byte[3]; |
|
97 |
//using (var provider = System.IO.Path.GetRandomFileName()) |
|
98 |
//{ |
|
99 |
// provider.GetBytes(bytes); |
|
100 |
//} |
|
101 |
|
|
102 |
return System.IO.Path.GetRandomFileName(); |
|
103 |
} |
|
104 |
|
|
105 | 64 |
public void MarkupConsolidate() |
106 | 65 |
{ |
107 | 66 |
|
... | ... | |
141 | 100 |
{ |
142 | 101 |
SYMBOL_PRIVATE symbol_private = new SYMBOL_PRIVATE |
143 | 102 |
{ |
144 |
ID = shortGuid(), |
|
103 |
ID = Commons.shortGuid(),
|
|
145 | 104 |
MEMBER_USER_ID = App.ViewInfo.UserID, |
146 | 105 |
NAME = Name, |
147 | 106 |
IMAGE_URL = Url, |
... | ... | |
162 | 121 |
{ |
163 | 122 |
SYMBOL_PUBLIC symbol_public = new SYMBOL_PUBLIC |
164 | 123 |
{ |
165 |
ID = shortGuid(), |
|
124 |
ID = Commons.shortGuid(),
|
|
166 | 125 |
DEPARTMENT = Department, |
167 | 126 |
NAME = Name, |
168 | 127 |
IMAGE_URL = Url, |
내보내기 Unified diff