개정판 274cde11
after build event에서 version을 가져오도록 수정
Change-Id: I7a5cc54cabf6e2080c89d22b7631683eaecfebe4
KCOM/Services/BaseServices.cs | ||
---|---|---|
339 | 339 |
ViewerDataModel.Instance.MarkupControls_USER.Clear(); |
340 | 340 |
ViewerDataModel.Instance.MarkupControls.Clear(); |
341 | 341 |
|
342 |
if (e.Result != null)
|
|
342 |
try
|
|
343 | 343 |
{ |
344 |
ViewerDataModel.Instance._markupInfoList.Clear(); |
|
345 |
if (e.Result.Count > 0) ViewerDataModel.Instance.MyMarkupList.Clear(); |
|
346 | 344 |
|
347 |
foreach (var info in e.Result)
|
|
345 |
if (e.Result != null)
|
|
348 | 346 |
{ |
349 |
if (info.Depatment == null) info.Depatment = "Unknown"; |
|
347 |
ViewerDataModel.Instance._markupInfoList.Clear(); |
|
348 |
if (e.Result.Count > 0) ViewerDataModel.Instance.MyMarkupList.Clear(); |
|
350 | 349 |
|
351 |
if (info.UserID == App.ViewInfo.UserID)
|
|
350 |
foreach (var info in e.Result)
|
|
352 | 351 |
{ |
353 |
info.userDelete = true; |
|
354 |
info.DisplayColor = "#FFFF0000"; |
|
355 |
} |
|
356 |
else |
|
357 |
{ |
|
358 |
info.userDelete = false; |
|
359 |
} |
|
352 |
if (info.Depatment == null) info.Depatment = "Unknown"; |
|
360 | 353 |
|
361 |
ViewerDataModel.Instance._markupInfoList.Add(info); |
|
362 |
} |
|
354 |
if (info.UserID == App.ViewInfo.UserID) |
|
355 |
{ |
|
356 |
info.userDelete = true; |
|
357 |
info.DisplayColor = "#FFFF0000"; |
|
358 |
} |
|
359 |
else |
|
360 |
{ |
|
361 |
info.userDelete = false; |
|
362 |
} |
|
363 | 363 |
|
364 |
var userInfoList = ViewerDataModel.Instance._markupInfoList.GroupBy(f => f.UserID).Select(f => new MarkupUserInfo { UserId = f.Key, UserName = f.First().UserName }); |
|
364 |
ViewerDataModel.Instance._markupInfoList.Add(info); |
|
365 |
} |
|
365 | 366 |
|
366 |
userInfoList.ToList().ForEach(x => ViewerDataModel.Instance._markupUserList.Add(x));
|
|
367 |
var userInfoList = ViewerDataModel.Instance._markupInfoList.GroupBy(f => f.UserID).Select(f => new MarkupUserInfo { UserId = f.Key, UserName = f.First().UserName });
|
|
367 | 368 |
|
368 |
e.Result.ToList().ForEach(d =>
|
|
369 |
{ |
|
370 |
if (d.MarkupList != null)
|
|
369 |
userInfoList.ToList().ForEach(x => ViewerDataModel.Instance._markupUserList.Add(x));
|
|
370 |
|
|
371 |
e.Result.ToList().ForEach(d =>
|
|
371 | 372 |
{ |
372 |
d.MarkupList.ForEach(p =>
|
|
373 |
if (d.MarkupList != null)
|
|
373 | 374 |
{ |
374 |
if (d.UserID == App.ViewInfo.UserID)
|
|
375 |
d.MarkupList.ForEach(p =>
|
|
375 | 376 |
{ |
376 |
d.userDelete = true; |
|
377 |
d.DisplayColor = "#FFFF0000"; |
|
378 |
|
|
379 |
MarkupItemEx markup = new MarkupItemEx |
|
377 |
if (d.UserID == App.ViewInfo.UserID) |
|
380 | 378 |
{ |
381 |
Data = p.Data, |
|
382 |
Data_Type = p.Data_Type, |
|
383 |
ID = p.ID, |
|
384 |
IsUpdate = false, |
|
385 |
MarkupInfoID = d.MarkupInfoID, |
|
386 |
PageNumber = p.PageNumber, |
|
387 |
Symbol_ID = p.Symbol_ID, |
|
388 |
//Group_ID = p.Group_ID |
|
389 |
}; |
|
390 |
ViewerDataModel.Instance.MyMarkupList.Add(markup); |
|
391 |
} |
|
392 |
else |
|
393 |
{ |
|
394 |
MarkupItemEx markup = new MarkupItemEx |
|
379 |
d.userDelete = true; |
|
380 |
d.DisplayColor = "#FFFF0000"; |
|
381 |
|
|
382 |
MarkupItemEx markup = new MarkupItemEx |
|
383 |
{ |
|
384 |
Data = p.Data, |
|
385 |
Data_Type = p.Data_Type, |
|
386 |
ID = p.ID, |
|
387 |
IsUpdate = false, |
|
388 |
MarkupInfoID = d.MarkupInfoID, |
|
389 |
PageNumber = p.PageNumber, |
|
390 |
Symbol_ID = p.Symbol_ID, |
|
391 |
//Group_ID = p.Group_ID |
|
392 |
}; |
|
393 |
ViewerDataModel.Instance.MyMarkupList.Add(markup); |
|
394 |
} |
|
395 |
else |
|
395 | 396 |
{ |
396 |
Data = p.Data, |
|
397 |
Data_Type = p.Data_Type, |
|
398 |
ID = p.ID, |
|
399 |
IsUpdate = false, |
|
400 |
MarkupInfoID = d.MarkupInfoID, |
|
401 |
PageNumber = p.PageNumber, |
|
402 |
Symbol_ID = p.Symbol_ID, |
|
403 |
//Group_ID = p.Group_ID |
|
404 |
}; |
|
405 |
ViewerDataModel.Instance.MarkupList_Pre.Add(markup); |
|
406 |
} |
|
407 |
}); |
|
408 |
} |
|
409 |
}); |
|
397 |
MarkupItemEx markup = new MarkupItemEx |
|
398 |
{ |
|
399 |
Data = p.Data, |
|
400 |
Data_Type = p.Data_Type, |
|
401 |
ID = p.ID, |
|
402 |
IsUpdate = false, |
|
403 |
MarkupInfoID = d.MarkupInfoID, |
|
404 |
PageNumber = p.PageNumber, |
|
405 |
Symbol_ID = p.Symbol_ID, |
|
406 |
//Group_ID = p.Group_ID |
|
407 |
}; |
|
408 |
ViewerDataModel.Instance.MarkupList_Pre.Add(markup); |
|
409 |
} |
|
410 |
}); |
|
411 |
} |
|
412 |
}); |
|
410 | 413 |
|
411 |
var currentUser = e.Result.Where(data => data.UserID == App.ViewInfo.UserID && data.AvoidConsolidate == 0).FirstOrDefault(); |
|
414 |
var currentUser = e.Result.Where(data => data.UserID == App.ViewInfo.UserID && data.AvoidConsolidate == 0).FirstOrDefault();
|
|
412 | 415 |
|
413 |
if (currentUser == null) |
|
414 |
{ |
|
415 |
/// create a new markupinfo to do comments |
|
416 |
/// |
|
417 |
if (App.ViewInfo.NewCommentPermission) |
|
416 |
if (currentUser == null) |
|
418 | 417 |
{ |
419 |
var infoId = Commons.shortGuid(); |
|
420 |
PreviewUserMarkupInfoItem = new MarkupInfoItem |
|
418 |
/// create a new markupinfo to do comments |
|
419 |
/// |
|
420 |
if (App.ViewInfo.NewCommentPermission) |
|
421 | 421 |
{ |
422 |
CreateTime = DateTime.Now, |
|
423 |
UpdateTime = DateTime.Now, |
|
424 |
Depatment = userData.DEPARTMENT, |
|
425 |
DisplayColor = "#FFFF0000", |
|
426 |
UserID = userData.ID, |
|
427 |
UserName = userData.NAME, |
|
428 |
PageCount = 1, |
|
429 |
Description = "", |
|
430 |
MarkupInfoID = infoId, |
|
431 |
MarkupList = null, |
|
432 |
MarkupVersionID = Commons.shortGuid(), |
|
433 |
Consolidate = 0, |
|
434 |
PartConsolidate = 0, |
|
435 |
userDelete = true, |
|
436 |
AvoidConsolidate = 0, |
|
437 |
IsPreviewUser = false |
|
438 |
}; |
|
439 |
|
|
440 |
App.Custom_ViewInfoId = infoId; |
|
441 |
|
|
442 |
ViewerDataModel.Instance._markupInfoList.Insert(0, PreviewUserMarkupInfoItem); |
|
422 |
var infoId = Commons.shortGuid(); |
|
423 |
PreviewUserMarkupInfoItem = new MarkupInfoItem |
|
424 |
{ |
|
425 |
CreateTime = DateTime.Now, |
|
426 |
UpdateTime = DateTime.Now, |
|
427 |
Depatment = userData.DEPARTMENT, |
|
428 |
DisplayColor = "#FFFF0000", |
|
429 |
UserID = userData.ID, |
|
430 |
UserName = userData.NAME, |
|
431 |
PageCount = 1, |
|
432 |
Description = "", |
|
433 |
MarkupInfoID = infoId, |
|
434 |
MarkupList = null, |
|
435 |
MarkupVersionID = Commons.shortGuid(), |
|
436 |
Consolidate = 0, |
|
437 |
PartConsolidate = 0, |
|
438 |
userDelete = true, |
|
439 |
AvoidConsolidate = 0, |
|
440 |
IsPreviewUser = false |
|
441 |
}; |
|
442 |
|
|
443 |
App.Custom_ViewInfoId = infoId; |
|
444 |
|
|
445 |
ViewerDataModel.Instance._markupInfoList.Insert(0, PreviewUserMarkupInfoItem); |
|
446 |
} |
|
447 |
} |
|
448 |
else |
|
449 |
{ |
|
450 |
App.Custom_ViewInfoId = currentUser.MarkupInfoID; |
|
443 | 451 |
} |
444 |
} |
|
445 |
else |
|
446 |
{ |
|
447 |
App.Custom_ViewInfoId = currentUser.MarkupInfoID; |
|
448 |
} |
|
449 | 452 |
|
450 |
ViewerDataModel.Instance.PageNumber = 1; |
|
453 |
ViewerDataModel.Instance.PageNumber = 1;
|
|
451 | 454 |
|
452 |
/// Consolidation 된 데이터가 최상단에 올 수 있도록 변경 |
|
453 |
//var markupItem = ViewerDataModel.Instance._markupInfoList.OrderByDescending(p => p.Consolidate == Convert.ToInt32(true)).ToList(); |
|
455 |
/// Consolidation 된 데이터가 최상단에 올 수 있도록 변경
|
|
456 |
//var markupItem = ViewerDataModel.Instance._markupInfoList.OrderByDescending(p => p.Consolidate == Convert.ToInt32(true)).ToList();
|
|
454 | 457 |
|
455 |
gridViewMarkup.ItemsSource = ViewerDataModel.Instance._markupInfoList; |
|
458 |
gridViewMarkup.ItemsSource = ViewerDataModel.Instance._markupInfoList;
|
|
456 | 459 |
|
457 |
SetCommentPages(null); |
|
460 |
SetCommentPages(null);
|
|
458 | 461 |
|
459 |
// GRIDVIEW에서 팀별 GROUPING |
|
460 |
// 효성은 안함 |
|
462 |
// GRIDVIEW에서 팀별 GROUPING
|
|
463 |
// 효성은 안함
|
|
461 | 464 |
#if (Hyosung) |
462 | 465 |
#else |
463 |
/// create a group descriptor |
|
464 |
gridViewMarkup.GroupDescriptors.Clear(); |
|
465 |
GroupDescriptor descriptor = new GroupDescriptor(); |
|
466 |
descriptor.Member = "Depatment"; |
|
467 |
descriptor.DisplayContent = "DEPT"; |
|
468 |
//descriptor.SortDirection = ListSortDirection.Ascending; |
|
469 |
gridViewMarkup.GroupDescriptors.Add(descriptor); |
|
466 |
/// create a group descriptor
|
|
467 |
gridViewMarkup.GroupDescriptors.Clear();
|
|
468 |
GroupDescriptor descriptor = new GroupDescriptor();
|
|
469 |
descriptor.Member = "Depatment";
|
|
470 |
descriptor.DisplayContent = "DEPT";
|
|
471 |
//descriptor.SortDirection = ListSortDirection.Ascending;
|
|
472 |
gridViewMarkup.GroupDescriptors.Add(descriptor);
|
|
470 | 473 |
#endif |
471 | 474 |
|
472 |
GridViewMarkup_Sorting(gridViewMarkup, new GridViewSortingEventArgs(gridViewMarkup.Columns[0], SortingState.None, SortingState.None)); |
|
475 |
GridViewMarkup_Sorting(gridViewMarkup, new GridViewSortingEventArgs(gridViewMarkup.Columns[0], SortingState.None, SortingState.None));
|
|
473 | 476 |
|
474 |
var SelectedItem = ViewerDataModel.Instance._markupInfoList.Where(info => info.UserID == App.ViewInfo.UserID).OrderByDescending(order => order.UpdateTime).FirstOrDefault(); |
|
477 |
var SelectedItem = ViewerDataModel.Instance._markupInfoList.Where(info => info.UserID == App.ViewInfo.UserID).OrderByDescending(order => order.UpdateTime).FirstOrDefault();
|
|
475 | 478 |
|
476 |
if (PreviewUserMarkupInfoItem != null) |
|
477 |
{ |
|
478 |
this.gridViewMarkup.SelectedItem = PreviewUserMarkupInfoItem; |
|
479 |
} |
|
480 |
else if (SelectedItem != null) |
|
481 |
{ |
|
482 |
this.gridViewMarkup.SelectedItem = SelectedItem; |
|
483 |
} |
|
484 |
else if(ViewerDataModel.Instance._markupInfoList.Count() > 0) |
|
485 |
{ |
|
486 |
this.gridViewMarkup.SelectedItem = ViewerDataModel.Instance._markupInfoList.First(); |
|
479 |
if (PreviewUserMarkupInfoItem != null) |
|
480 |
{ |
|
481 |
this.gridViewMarkup.SelectedItem = PreviewUserMarkupInfoItem; |
|
482 |
} |
|
483 |
else if (SelectedItem != null) |
|
484 |
{ |
|
485 |
this.gridViewMarkup.SelectedItem = SelectedItem; |
|
486 |
} |
|
487 |
else if (ViewerDataModel.Instance._markupInfoList.Count() > 0) |
|
488 |
{ |
|
489 |
this.gridViewMarkup.SelectedItem = ViewerDataModel.Instance._markupInfoList.First(); |
|
490 |
} |
|
487 | 491 |
} |
488 | 492 |
} |
493 |
catch (Exception ex) |
|
494 |
{ |
|
495 |
App.FileLogger.Fatal(ex); |
|
496 |
} |
|
489 | 497 |
} |
490 | 498 |
|
491 | 499 |
private void GridViewMarkup_Sorting(object sender, GridViewSortingEventArgs e) |
내보내기 Unified diff