1 |
5c387707
|
semi
|
using System;
|
2 |
|
|
using System.Collections.Generic;
|
3 |
|
|
using System.ComponentModel;
|
4 |
|
|
using System.Linq;
|
5 |
|
|
using System.Text;
|
6 |
|
|
using System.Threading.Tasks;
|
7 |
|
|
|
8 |
|
|
namespace Markus.Service.StationController.Data
|
9 |
|
|
{
|
10 |
|
|
public class FinalPDF : INotifyPropertyChanged
|
11 |
|
|
{
|
12 |
|
|
public bool Equals(FinalPDF other)
|
13 |
|
|
{
|
14 |
|
|
if (other is null)
|
15 |
|
|
return false;
|
16 |
|
|
|
17 |
|
|
return this.ConvertID == other.ConvertID && this.ProjectNumber == other.ProjectNumber;
|
18 |
|
|
}
|
19 |
|
|
|
20 |
|
|
public override bool Equals(object obj) => Equals(obj as FinalPDF);
|
21 |
|
|
public override int GetHashCode()
|
22 |
|
|
{
|
23 |
|
|
var id = (ConvertID != null) ? ConvertID : "";
|
24 |
|
|
var project = (ProjectNumber != null) ? ProjectNumber : "";
|
25 |
|
|
|
26 |
|
|
return (id + project).GetHashCode();
|
27 |
|
|
}
|
28 |
|
|
|
29 |
|
|
public FinalPDF()
|
30 |
|
|
{
|
31 |
|
|
|
32 |
|
|
}
|
33 |
|
|
|
34 |
919dee1b
|
semi
|
public FinalPDF(string convertId, string projectNo, int? Status, string documentID, string markupInfoID, string docInfoID, string documentName, string documentNo, string createUserID,//20
|
35 |
|
|
string revision, int? currentPageNo, int? totalPage, string exception, string groupNo, DateTime create_datetime, DateTime? start_datetime, DateTime? end_datetime, string originfilePath,
|
36 |
|
|
string convertPath, string markusLink, string user_id="")
|
37 |
5c387707
|
semi
|
{
|
38 |
|
|
DocumentID = documentID;
|
39 |
|
|
ConvertID = convertId;
|
40 |
|
|
ProjectNumber = projectNo;
|
41 |
|
|
MarkupInfo_ID = markupInfoID;
|
42 |
|
|
Create_User_ID = createUserID;
|
43 |
|
|
ConvertState = (StatusCodeType)Status;
|
44 |
|
|
DocInfo_ID = docInfoID;
|
45 |
|
|
DocumentName = documentName;
|
46 |
|
|
DocumentNo = documentNo;
|
47 |
|
|
Revision = revision;
|
48 |
|
|
CurrentPageNo = currentPageNo;
|
49 |
|
|
TotalPage = totalPage;
|
50 |
|
|
Exception = exception;
|
51 |
|
|
GroupNo = groupNo;
|
52 |
|
|
CreateTime = create_datetime;
|
53 |
|
|
StartTime = start_datetime;
|
54 |
|
|
EndTime = end_datetime;
|
55 |
|
|
ConvertPath = convertPath;
|
56 |
|
|
MarkusLink = markusLink;
|
57 |
|
|
OriginfilePath = originfilePath;
|
58 |
919dee1b
|
semi
|
User_ID = user_id;
|
59 |
5c387707
|
semi
|
|
60 |
|
|
TimeSpan duration = TimeSpan.MinValue;
|
61 |
|
|
if (EndTime.HasValue)
|
62 |
|
|
{
|
63 |
|
|
duration = EndTime.Value - CreateTime;
|
64 |
|
|
}
|
65 |
|
|
if (duration != TimeSpan.MinValue)
|
66 |
|
|
{
|
67 |
|
|
TotalTime = duration.ToString();
|
68 |
|
|
}
|
69 |
|
|
|
70 |
|
|
if (OriginfilePath != null)
|
71 |
|
|
{
|
72 |
|
|
string result = "";
|
73 |
|
|
if (originfilePath.Contains("/"))
|
74 |
|
|
{
|
75 |
|
|
result = originfilePath.Substring(originfilePath.LastIndexOf("/") + 1);
|
76 |
|
|
}
|
77 |
|
|
else
|
78 |
|
|
{
|
79 |
|
|
result = originfilePath.Substring(originfilePath.LastIndexOf("%") + 1);
|
80 |
|
|
}
|
81 |
|
|
this._FileName = result;
|
82 |
|
|
}
|
83 |
|
|
else
|
84 |
|
|
{
|
85 |
|
|
this._FileName = "";
|
86 |
|
|
}
|
87 |
|
|
}
|
88 |
|
|
|
89 |
|
|
private string _DocInfo_ID;
|
90 |
|
|
public string DocInfo_ID
|
91 |
|
|
{
|
92 |
|
|
get
|
93 |
|
|
{
|
94 |
|
|
return _DocInfo_ID;
|
95 |
|
|
}
|
96 |
|
|
set
|
97 |
|
|
{
|
98 |
|
|
if (_DocInfo_ID != value)
|
99 |
|
|
{
|
100 |
|
|
_DocInfo_ID = value;
|
101 |
|
|
OnPropertyChanged("DocInfo_ID");
|
102 |
|
|
|
103 |
|
|
}
|
104 |
|
|
}
|
105 |
|
|
}
|
106 |
|
|
|
107 |
|
|
private string _Create_User_ID;
|
108 |
|
|
public string Create_User_ID
|
109 |
|
|
{
|
110 |
|
|
get
|
111 |
|
|
{
|
112 |
|
|
return _Create_User_ID;
|
113 |
|
|
}
|
114 |
|
|
set
|
115 |
|
|
{
|
116 |
|
|
if (_Create_User_ID != value)
|
117 |
|
|
{
|
118 |
|
|
_Create_User_ID = value;
|
119 |
|
|
OnPropertyChanged("Create_User_ID");
|
120 |
|
|
|
121 |
|
|
}
|
122 |
|
|
}
|
123 |
|
|
}
|
124 |
|
|
|
125 |
|
|
private string _MarkupInfo_ID;
|
126 |
|
|
public string MarkupInfo_ID
|
127 |
|
|
{
|
128 |
|
|
get
|
129 |
|
|
{
|
130 |
|
|
return _MarkupInfo_ID;
|
131 |
|
|
}
|
132 |
|
|
set
|
133 |
|
|
{
|
134 |
|
|
if (_MarkupInfo_ID != value)
|
135 |
|
|
{
|
136 |
|
|
_MarkupInfo_ID = value;
|
137 |
|
|
OnPropertyChanged("MarkupInfo_ID");
|
138 |
|
|
|
139 |
|
|
}
|
140 |
|
|
}
|
141 |
|
|
}
|
142 |
|
|
|
143 |
|
|
private string _FileName;
|
144 |
|
|
public string FileName
|
145 |
|
|
{
|
146 |
|
|
get
|
147 |
|
|
{
|
148 |
|
|
return _FileName;
|
149 |
|
|
}
|
150 |
|
|
set
|
151 |
|
|
{
|
152 |
|
|
if (_FileName != value)
|
153 |
|
|
{
|
154 |
|
|
_FileName = value;
|
155 |
|
|
OnPropertyChanged("FileName");
|
156 |
|
|
}
|
157 |
|
|
}
|
158 |
|
|
}
|
159 |
|
|
|
160 |
|
|
private string _OriginfilePath;
|
161 |
|
|
public string OriginfilePath
|
162 |
|
|
{
|
163 |
|
|
get
|
164 |
|
|
{
|
165 |
|
|
return _OriginfilePath;
|
166 |
|
|
}
|
167 |
|
|
set
|
168 |
|
|
{
|
169 |
|
|
if (_OriginfilePath != value)
|
170 |
|
|
{
|
171 |
|
|
_OriginfilePath = value;
|
172 |
|
|
OnPropertyChanged("OriginfilePath");
|
173 |
|
|
}
|
174 |
|
|
}
|
175 |
|
|
}
|
176 |
|
|
|
177 |
|
|
private string _MarkusLink;
|
178 |
|
|
public string MarkusLink
|
179 |
|
|
{
|
180 |
|
|
get
|
181 |
|
|
{
|
182 |
|
|
return _MarkusLink;
|
183 |
|
|
}
|
184 |
|
|
set
|
185 |
|
|
{
|
186 |
|
|
if (_MarkusLink != value)
|
187 |
|
|
{
|
188 |
|
|
_MarkusLink = value;
|
189 |
|
|
OnPropertyChanged("MarkusLink");
|
190 |
|
|
|
191 |
|
|
}
|
192 |
|
|
}
|
193 |
|
|
}
|
194 |
|
|
|
195 |
|
|
private string _ConvertPath;
|
196 |
|
|
public string ConvertPath
|
197 |
|
|
{
|
198 |
|
|
get
|
199 |
|
|
{
|
200 |
|
|
return _ConvertPath;
|
201 |
|
|
}
|
202 |
|
|
set
|
203 |
|
|
{
|
204 |
|
|
if (_ConvertPath != value)
|
205 |
|
|
{
|
206 |
|
|
_ConvertPath = value;
|
207 |
|
|
OnPropertyChanged("ConvertPath");
|
208 |
|
|
}
|
209 |
|
|
}
|
210 |
|
|
}
|
211 |
|
|
|
212 |
|
|
private string _TotalTime;
|
213 |
|
|
public string TotalTime
|
214 |
|
|
{
|
215 |
|
|
get
|
216 |
|
|
{
|
217 |
|
|
return _TotalTime;
|
218 |
|
|
}
|
219 |
|
|
set
|
220 |
|
|
{
|
221 |
|
|
if (_TotalTime != value)
|
222 |
|
|
{
|
223 |
|
|
_TotalTime = value;
|
224 |
|
|
OnPropertyChanged("TotalTime");
|
225 |
|
|
|
226 |
|
|
}
|
227 |
|
|
}
|
228 |
|
|
}
|
229 |
|
|
|
230 |
|
|
private DateTime? _EndTime;
|
231 |
|
|
public DateTime? EndTime
|
232 |
|
|
{
|
233 |
|
|
get
|
234 |
|
|
{
|
235 |
|
|
return _EndTime;
|
236 |
|
|
}
|
237 |
|
|
set
|
238 |
|
|
{
|
239 |
|
|
if (value == null)
|
240 |
|
|
{
|
241 |
|
|
_EndTime = null;
|
242 |
|
|
OnPropertyChanged("EndTime");
|
243 |
|
|
}
|
244 |
|
|
else if (_EndTime != value)
|
245 |
|
|
{
|
246 |
|
|
_EndTime = value;
|
247 |
|
|
OnPropertyChanged("EndTime");
|
248 |
|
|
}
|
249 |
|
|
}
|
250 |
|
|
}
|
251 |
|
|
|
252 |
|
|
private DateTime? _StartTime;
|
253 |
|
|
public DateTime? StartTime
|
254 |
|
|
{
|
255 |
|
|
get
|
256 |
|
|
{
|
257 |
|
|
return _StartTime;
|
258 |
|
|
}
|
259 |
|
|
set
|
260 |
|
|
{
|
261 |
|
|
if (value == null)
|
262 |
|
|
{
|
263 |
|
|
_StartTime = null;
|
264 |
|
|
OnPropertyChanged("StartTime");
|
265 |
|
|
}
|
266 |
|
|
else if (_StartTime != value)
|
267 |
|
|
{
|
268 |
|
|
_StartTime = value;
|
269 |
|
|
OnPropertyChanged("StartTime");
|
270 |
|
|
}
|
271 |
|
|
}
|
272 |
|
|
}
|
273 |
|
|
|
274 |
|
|
private DateTime _CreateTime;
|
275 |
|
|
public DateTime CreateTime
|
276 |
|
|
{
|
277 |
|
|
get
|
278 |
|
|
{
|
279 |
|
|
return _CreateTime;
|
280 |
|
|
}
|
281 |
|
|
set
|
282 |
|
|
{
|
283 |
|
|
if (_CreateTime != value)
|
284 |
|
|
{
|
285 |
|
|
_CreateTime = value;
|
286 |
|
|
OnPropertyChanged("CreateTime");
|
287 |
|
|
}
|
288 |
|
|
}
|
289 |
|
|
}
|
290 |
|
|
|
291 |
|
|
private string _GroupNo;
|
292 |
|
|
public string GroupNo
|
293 |
|
|
{
|
294 |
|
|
get
|
295 |
|
|
{
|
296 |
|
|
return _GroupNo;
|
297 |
|
|
}
|
298 |
|
|
set
|
299 |
|
|
{
|
300 |
|
|
if (_GroupNo != value)
|
301 |
|
|
{
|
302 |
|
|
_GroupNo = value;
|
303 |
|
|
OnPropertyChanged("GroupNo");
|
304 |
|
|
|
305 |
|
|
}
|
306 |
|
|
}
|
307 |
|
|
}
|
308 |
|
|
|
309 |
|
|
private string _Exception;
|
310 |
|
|
public string Exception
|
311 |
|
|
{
|
312 |
|
|
get
|
313 |
|
|
{
|
314 |
|
|
return _Exception;
|
315 |
|
|
}
|
316 |
|
|
set
|
317 |
|
|
{
|
318 |
|
|
if (_Exception != value)
|
319 |
|
|
{
|
320 |
|
|
_Exception = value;
|
321 |
|
|
OnPropertyChanged("Exception");
|
322 |
|
|
|
323 |
|
|
}
|
324 |
|
|
}
|
325 |
|
|
}
|
326 |
|
|
|
327 |
919dee1b
|
semi
|
private int? _TotalPage;
|
328 |
|
|
public int? TotalPage
|
329 |
5c387707
|
semi
|
{
|
330 |
|
|
get
|
331 |
|
|
{
|
332 |
|
|
return _TotalPage;
|
333 |
|
|
}
|
334 |
|
|
set
|
335 |
|
|
{
|
336 |
|
|
if (_TotalPage != value)
|
337 |
|
|
{
|
338 |
|
|
_TotalPage = value;
|
339 |
|
|
OnPropertyChanged("TotalPage");
|
340 |
|
|
}
|
341 |
|
|
}
|
342 |
|
|
}
|
343 |
|
|
|
344 |
919dee1b
|
semi
|
private int? _CurrentPageNo;
|
345 |
|
|
public int? CurrentPageNo
|
346 |
5c387707
|
semi
|
{
|
347 |
|
|
get
|
348 |
|
|
{
|
349 |
|
|
return _CurrentPageNo;
|
350 |
|
|
}
|
351 |
|
|
set
|
352 |
|
|
{
|
353 |
|
|
if (_CurrentPageNo != value)
|
354 |
|
|
{
|
355 |
|
|
_CurrentPageNo = value;
|
356 |
|
|
OnPropertyChanged("CurrentPageNo");
|
357 |
|
|
}
|
358 |
|
|
}
|
359 |
|
|
}
|
360 |
|
|
|
361 |
|
|
private string _Revision;
|
362 |
|
|
public string Revision
|
363 |
|
|
{
|
364 |
|
|
get
|
365 |
|
|
{
|
366 |
|
|
return _Revision;
|
367 |
|
|
}
|
368 |
|
|
set
|
369 |
|
|
{
|
370 |
|
|
if (_Revision != value)
|
371 |
|
|
{
|
372 |
|
|
_Revision = value;
|
373 |
|
|
OnPropertyChanged("Revision");
|
374 |
|
|
|
375 |
|
|
}
|
376 |
|
|
}
|
377 |
|
|
}
|
378 |
|
|
|
379 |
|
|
|
380 |
|
|
private string _DocumentNo;
|
381 |
|
|
public string DocumentNo
|
382 |
|
|
{
|
383 |
|
|
get
|
384 |
|
|
{
|
385 |
|
|
return _DocumentNo;
|
386 |
|
|
}
|
387 |
|
|
set
|
388 |
|
|
{
|
389 |
|
|
if (_DocumentNo != value)
|
390 |
|
|
{
|
391 |
|
|
_DocumentNo = value;
|
392 |
|
|
OnPropertyChanged("DocumentNo");
|
393 |
|
|
|
394 |
|
|
}
|
395 |
|
|
}
|
396 |
|
|
}
|
397 |
|
|
|
398 |
|
|
private string _DocumentName;
|
399 |
|
|
public string DocumentName
|
400 |
|
|
{
|
401 |
|
|
get
|
402 |
|
|
{
|
403 |
|
|
return _DocumentName;
|
404 |
|
|
}
|
405 |
|
|
set
|
406 |
|
|
{
|
407 |
|
|
if (_DocumentName != value)
|
408 |
|
|
{
|
409 |
|
|
_DocumentName = value;
|
410 |
|
|
OnPropertyChanged("DocumentName");
|
411 |
|
|
|
412 |
|
|
}
|
413 |
|
|
}
|
414 |
|
|
}
|
415 |
|
|
|
416 |
|
|
private StatusCodeType _ConvertState;
|
417 |
|
|
public StatusCodeType ConvertState
|
418 |
|
|
{
|
419 |
|
|
get
|
420 |
|
|
{
|
421 |
|
|
return _ConvertState;
|
422 |
|
|
}
|
423 |
|
|
set
|
424 |
|
|
{
|
425 |
|
|
if (_ConvertState != value)
|
426 |
|
|
{
|
427 |
|
|
_ConvertState = value;
|
428 |
|
|
OnPropertyChanged("ConvertState");
|
429 |
|
|
}
|
430 |
|
|
}
|
431 |
|
|
}
|
432 |
|
|
|
433 |
|
|
private string _DocumentID;
|
434 |
|
|
public string DocumentID
|
435 |
|
|
{
|
436 |
|
|
get
|
437 |
|
|
{
|
438 |
|
|
return _DocumentID;
|
439 |
|
|
}
|
440 |
|
|
set
|
441 |
|
|
{
|
442 |
|
|
if (_DocumentID != value)
|
443 |
|
|
{
|
444 |
|
|
_DocumentID = value;
|
445 |
|
|
OnPropertyChanged("DocumentID");
|
446 |
|
|
|
447 |
|
|
}
|
448 |
|
|
}
|
449 |
|
|
}
|
450 |
|
|
|
451 |
|
|
private string _ProjectNumber;
|
452 |
|
|
public string ProjectNumber
|
453 |
|
|
{
|
454 |
|
|
get
|
455 |
|
|
{
|
456 |
|
|
return _ProjectNumber;
|
457 |
|
|
}
|
458 |
|
|
set
|
459 |
|
|
{
|
460 |
|
|
if (_ProjectNumber != value)
|
461 |
|
|
{
|
462 |
|
|
_ProjectNumber = value;
|
463 |
|
|
OnPropertyChanged("ProjectNumber");
|
464 |
|
|
}
|
465 |
|
|
}
|
466 |
|
|
}
|
467 |
|
|
|
468 |
|
|
private string _ConvertID;
|
469 |
|
|
public string ConvertID
|
470 |
|
|
{
|
471 |
|
|
get
|
472 |
|
|
{
|
473 |
|
|
return _ConvertID;
|
474 |
|
|
}
|
475 |
|
|
set
|
476 |
|
|
{
|
477 |
|
|
if (_ConvertID != value)
|
478 |
|
|
{
|
479 |
|
|
_ConvertID = value;
|
480 |
|
|
OnPropertyChanged("ConvertID");
|
481 |
|
|
}
|
482 |
|
|
}
|
483 |
|
|
}
|
484 |
|
|
|
485 |
919dee1b
|
semi
|
|
486 |
|
|
private string _User_ID;
|
487 |
|
|
public string User_ID
|
488 |
|
|
{
|
489 |
|
|
get
|
490 |
|
|
{
|
491 |
|
|
return _User_ID;
|
492 |
|
|
}
|
493 |
|
|
set
|
494 |
|
|
{
|
495 |
|
|
if (_User_ID != value)
|
496 |
|
|
{
|
497 |
|
|
_User_ID = value;
|
498 |
|
|
OnPropertyChanged("User_ID");
|
499 |
|
|
}
|
500 |
|
|
}
|
501 |
|
|
}
|
502 |
|
|
|
503 |
|
|
private string _Merged;
|
504 |
|
|
public string Merged
|
505 |
|
|
{
|
506 |
|
|
get
|
507 |
|
|
{
|
508 |
|
|
return _Merged;
|
509 |
|
|
}
|
510 |
|
|
set
|
511 |
|
|
{
|
512 |
|
|
if (_Merged != value)
|
513 |
|
|
{
|
514 |
|
|
_Merged = value;
|
515 |
|
|
OnPropertyChanged("Merged");
|
516 |
|
|
}
|
517 |
|
|
}
|
518 |
|
|
}
|
519 |
|
|
|
520 |
5c387707
|
semi
|
public event PropertyChangedEventHandler PropertyChanged;
|
521 |
|
|
private void OnPropertyChanged(string propertyName)
|
522 |
|
|
{
|
523 |
|
|
if (PropertyChanged != null)
|
524 |
|
|
{
|
525 |
|
|
PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
|
526 |
|
|
}
|
527 |
|
|
|
528 |
|
|
}
|
529 |
|
|
|
530 |
|
|
public enum StatusCodeType
|
531 |
|
|
{
|
532 |
|
|
None = 0,
|
533 |
|
|
Wait = 1,
|
534 |
|
|
PageLoading = 2,
|
535 |
|
|
Saving = 3,
|
536 |
|
|
Completed = 4,
|
537 |
|
|
UploadError = 5,
|
538 |
|
|
Error11 = 11,
|
539 |
|
|
FileError = 50,
|
540 |
|
|
PageError = 55,
|
541 |
|
|
NeedsPassword = 60,
|
542 |
|
|
Error = 99,
|
543 |
|
|
All_Error = 100,
|
544 |
|
|
All = 1000
|
545 |
|
|
}
|
546 |
|
|
}
|
547 |
|
|
} |