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