개정판 6c781c0c
issue #573 : Direct DB Connection Modify
Client Method Modify
KCOM/Events/Implementation/TopMenuEvent.cs | ||
---|---|---|
483 | 483 |
//save.MarkupSave(menu.gridViewMarkup.SelectedItems.FirstOrDefault() as IKCOM.MarkupInfoItem); |
484 | 484 |
} |
485 | 485 |
} |
486 |
using (KCOMDataModel.DataModel.CIEntities Entity = new KCOMDataModel.DataModel.CIEntities(KCOMDataModel.Common.ConnectStringBuilder.ProjectCIConnectString(App.ViewInfo.ProjectNO).ToString())) |
|
487 |
{ |
|
488 |
KCOMDataModel.DataModel.DOCPAGE _docpage = new KCOMDataModel.DataModel.DOCPAGE(); |
|
489 |
|
|
490 |
|
|
491 |
ViewerDataModel.Instance.Document_Info.OrderBy(i => i.PAGE_NUMBER).ToList().ForEach(data => |
|
492 |
{ |
|
493 |
_docpage = (from info in Entity.DOCPAGE |
|
494 |
where info.ID == data.ID |
|
495 |
select info).FirstOrDefault(); |
|
496 |
|
|
497 |
if (_docpage.PAGE_ANGLE != data.PAGE_ANGLE) |
|
498 |
{ |
|
499 |
_docpage.PAGE_ANGLE = data.PAGE_ANGLE; |
|
500 |
} |
|
501 |
}); |
|
502 |
|
|
503 |
Entity.SaveChanges(); |
|
504 |
} |
|
486 |
save.PageAngleSave(App.ViewInfo.ProjectNO, ViewerDataModel.Instance.Document_Info.OrderBy(i => i.PAGE_NUMBER).ToList()); |
|
487 |
|
|
505 | 488 |
} |
506 | 489 |
catch (Exception ex) |
507 | 490 |
{ |
... | ... | |
546 | 529 |
PrintWindow.Header = Type; |
547 | 530 |
|
548 | 531 |
List<IKCOM.MarkupInfoItem> markupinfo = new List<IKCOM.MarkupInfoItem>(); |
549 |
|
|
550 |
using (KCOMDataModel.DataModel.CIEntities Entity = new KCOMDataModel.DataModel.CIEntities(KCOMDataModel.Common.ConnectStringBuilder.ProjectCIConnectString(App.ViewInfo.ProjectNO).ToString())) |
|
551 |
{ |
|
552 |
var docinfo = from info in Entity.DOCINFO |
|
553 |
where info.DOCUMENT_ID == App.ViewInfo.DocumentItemID |
|
554 |
&& info.PROJECT_NO == App.ViewInfo.ProjectNO |
|
555 |
select info; |
|
556 |
|
|
557 |
var docitem = docinfo.First(); |
|
558 |
|
|
559 |
foreach (KCOMDataModel.DataModel.MARKUP_INFO markinfo in docitem.MARKUP_INFO) |
|
560 |
{ |
|
561 |
var member = (from mem in Entity.MEMBER |
|
562 |
where mem.ID == markinfo.USER_ID |
|
563 |
select mem).First(); |
|
564 |
|
|
565 |
_result = new IKCOM.MarkupInfoItem |
|
566 |
{ |
|
567 |
MarkupInfoID = markinfo.ID, |
|
568 |
Consolidate = markinfo.CONSOLIDATE, |
|
569 |
CreateTime = markinfo.UPDATE_TIME.HasValue ? markinfo.UPDATE_TIME.Value : markinfo.CREATE_TIME, |
|
570 |
DisplayColor = SetColor(markinfo.ID), |
|
571 |
UserID = markinfo.USER_ID, |
|
572 |
UserName = member.NAME, |
|
573 |
Depatment = member.DEPARTMENT, |
|
574 |
}; |
|
575 |
|
|
576 |
_result.MarkupList = new List<IKCOM.MarkupItem>(); |
|
577 |
var markup_Version = markinfo.MARKUP_INFO_VERSION.OrderByDescending(p => p.CREATE_DATE).First(); |
|
578 |
|
|
579 |
foreach (KCOMDataModel.DataModel.MARKUP_DATA markdata in markup_Version.MARKUP_DATA) |
|
580 |
{ |
|
581 |
IKCOM.MarkupItem markitem = new IKCOM.MarkupItem() |
|
582 |
{ |
|
583 |
ID = markdata.ID, |
|
584 |
PageNumber = markdata.PAGENUMBER, |
|
585 |
}; |
|
586 |
_result.MarkupList.Add(markitem); |
|
587 |
} |
|
588 |
|
|
589 |
_result.PageCount = _result.MarkupList.GroupBy(i => i.PageNumber).Count(); |
|
590 |
|
|
591 |
markupinfo.Add(_result); |
|
592 |
} |
|
593 |
|
|
594 |
|
|
595 |
|
|
596 |
//PrintWindow.Content = new KCOM.Control.PrintControl(@"http://honeyhead.net/Pages/000000/111111/11111111/", docitem.PROJECT_NO, docitem, markupinfo, 1, docitem.DOCUMENT_ID, "VP-001-001", "http://honeyhead.net/Ensemble/000000_app/VPCS_DOCLIB/100/001/TEST_C.pdf", isprint); |
|
597 |
|
|
598 |
//강인구 추가 |
|
599 |
var Tile_Url = string.Format(@"{0}/TileSource/{1}_Tile/{2}/{3}/", |
|
600 |
App.SystemInfo.HostName, |
|
601 |
App.ViewInfo.ProjectNO, |
|
602 |
(Convert.ToInt64(App.ViewInfo.DocumentItemID) / 100).ToString(), |
|
603 |
App.ViewInfo.DocumentItemID |
|
604 |
); |
|
605 |
|
|
606 |
|
|
607 |
PrintWindow.Content = new KCOM.Control.PrintControl( |
|
608 |
Tile_Url, |
|
609 |
docitem.PROJECT_NO, |
|
610 |
docitem, markupinfo, |
|
611 |
this.ParentOfType<MainWindow>().dzMainMenu.pageNavigator.CurrentPage.PageNumber, |
|
612 |
docitem.DOCUMENT_ID, |
|
613 |
this.ParentOfType<MainWindow>().dzMainMenu._DocItem.DOCUMENT_NO, |
|
614 |
docitem.ORIGINAL_FILE, isprint); |
|
615 |
|
|
616 |
//http://cloud.devdoftech.co.kr:5977/TileSource/000000_Tile/111111/11111111/1.jpg |
|
617 |
} |
|
532 |
markupinfo = Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.BaseClient.GetPrintDocItemList(App.ViewInfo.ProjectNO, App.ViewInfo.DocumentItemID, ViewerDataModel.Instance._markupInfoList.ToList()); |
|
533 |
|
|
534 |
var Tile_Url = string.Format(@"{0}/TileSource/{1}_Tile/{2}/{3}/", |
|
535 |
App.SystemInfo.HostName, |
|
536 |
App.ViewInfo.ProjectNO, |
|
537 |
(Convert.ToInt64(App.ViewInfo.DocumentItemID) / 100).ToString(), |
|
538 |
App.ViewInfo.DocumentItemID |
|
539 |
); |
|
540 |
|
|
541 |
PrintWindow.Content = new KCOM.Control.PrintControl( |
|
542 |
Tile_Url, |
|
543 |
App.ViewInfo.ProjectNO, |
|
544 |
this.ParentOfType<MainWindow>().dzMainMenu._DocInfo, markupinfo, |
|
545 |
this.ParentOfType<MainWindow>().dzMainMenu.pageNavigator.CurrentPage.PageNumber, |
|
546 |
App.ViewInfo.DocumentItemID, |
|
547 |
this.ParentOfType<MainWindow>().dzMainMenu._DocItem.DOCUMENT_NO, |
|
548 |
this.ParentOfType<MainWindow>().dzMainMenu._DocItem.ORIGINAL_FILE, isprint); |
|
618 | 549 |
|
619 | 550 |
//프린트 팝업 옵션 |
620 | 551 |
//PrintWindow.BorderThickness = new Thickness(3); |
... | ... | |
625 | 556 |
PrintWindow.Background.Opacity = 0.6; |
626 | 557 |
|
627 | 558 |
Telerik.Windows.Controls.StyleManager.SetTheme(PrintWindow, new Telerik.Windows.Controls.VisualStudio2013Theme()); |
628 |
//Telerik.Windows.Controls.StyleManager.SetTheme(PrintWindow, new Telerik.Windows.Controls.Office2013Theme()); |
|
629 | 559 |
PrintWindow.ShowDialog(); |
630 | 560 |
} |
631 | 561 |
|
내보내기 Unified diff