프로젝트

일반

사용자정보

개정판 cb33ad14

IDcb33ad14aeee5444d38fb4aea8a25258e712733f
상위 5529d2a2
하위 101da246

백흠경이(가) 5년 이상 전에 추가함

issue #999: add GetMarkupData() to CommentUserInfo class

Change-Id: I03b06eb325c7cd19a08d3d9cab66dd2328b2a374

차이점 보기:

KCOM/Events/Implementation/TopMenuEvent.cs
496 496
                    {
497 497
                        foreach(var item in MySelectItem)
498 498
                        {
499
                            save.MarkupSave(item);
499
                            save.MarkupSave(item, save.page_no);
500 500
                        }
501 501
                        //save.MarkupSave(menu.gridViewMarkup.SelectedItems.FirstOrDefault() as IKCOM.MarkupInfoItem);
502 502
                    }
......
505 505
                        //menu.ChangeCommentReact();
506 506
                        foreach (var item in MySelectItem)
507 507
                        {
508
                            save.MarkupSave(item);
508
                            save.MarkupSave(item, save.page_no);
509 509
                        }
510 510
                        //save.MarkupSave(menu.gridViewMarkup.SelectedItems.FirstOrDefault() as IKCOM.MarkupInfoItem);
511 511
                    }
......
516 516
                    {
517 517
                        foreach (var item in MySelectItem)
518 518
                        {
519
                            save.MarkupSave(item);
519
                            save.MarkupSave(item, save.page_no);
520 520
                        }
521 521
                        //save.MarkupSave(menu.gridViewMarkup.SelectedItems.FirstOrDefault() as IKCOM.MarkupInfoItem);
522 522
                    }
......
524 524
                save.PageAngleSave(App.ViewInfo.ProjectNO, ViewerDataModel.Instance.RotationDocs);
525 525

  
526 526
            }
527
            catch //(Exception ex)
527
            catch (Exception ex)
528 528
            {
529
                this.ParentOfType<MainWindow>().dzMainMenu.DialogMessage_Alert("세이브 실패", "Alert");
529
                this.ParentOfType<MainWindow>().dzMainMenu.DialogMessage_Alert(string.Format("세이브 실패:{0}", ex.Message), "Alert");
530 530
            }
531 531
        }
532 532

  
KCOM/Events/Save.cs
89 89

  
90 90
        }
91 91

  
92

  
93 92
        //마크업 저장하기
94
        public void MarkupSave(MarkupInfoItem UserState)
93
        public void MarkupSave(MarkupInfoItem UserState, int iPageNo)
95 94
        {
96 95
            try
97 96
            {
98 97
                List<MARKUP_DATA> ml_markupdata = new List<MARKUP_DATA>();
99 98

  
100
                ViewerDataModel.Instance.MarkupList_USER.Where(d => d.MarkupInfoID == UserState.MarkupInfoID).ToList().GroupBy(p => p.ID).Select(g => g.First()).ToList().ForEach(value =>
99
                ///ViewerDataModel.Instance.MarkupList_USER.Where(d => d.MarkupInfoID == UserState.MarkupInfoID).ToList().GroupBy(p => p.ID).Select(g => g.First()).ToList().ForEach(value =>
100
                ViewerDataModel.Instance.MarkupControls_USER.Where(d => d.MarkupInfoID == UserState.MarkupInfoID).ToList().GroupBy(p => p.CommentID).Select(g => g.First()).ToList().ForEach(value =>
101 101
                {
102
                    ml_markupdata.Add(new MARKUP_DATA
103
                    {
104
                        ID = value.ID,
105
                        DATA = value.Data, 
106
                        DATA_TYPE = value.Data_Type,
107
                        PAGENUMBER = value.PageNumber,
108
                        MARKUPINFO_VERSION_ID = UserState.MarkupVersionID,
109
                        SYMBOL_ID = value.Symbol_ID,
110
                        GROUP_ID = value.Group_ID,
111
                    });
112

  
102
                    ml_markupdata.Add(value.GetMarkupData(App.ViewInfo.UserID, iPageNo, UserState.MarkupVersionID));
113 103
                });
114 104

  
115 105
                Logger.sendReqLog("GetMarkupDataListperPage: ", UserState + "," + Project_No + "," + document_id + "," + user_id  + "," + ml_markupdata, 1);
116 106
                Logger.sendResLog("GetMarkupDataListperPage", Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.BaseClient.SaveMarkupData(UserState, Project_No, document_id, user_id, ml_markupdata).ToString(), 1);
117
                //Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.BaseClient.SaveMarkupData(UserState, Project_No, document_id, user_id, ml_markupdata);
118 107
                TempFile.Remove(); //임시파일삭제
119 108
            }
120 109
            catch (Exception)
121 110
            {
122 111
                throw;
123 112
            }
124
            
125 113
        }
126 114

  
127
        
128

  
129 115
        public void SymbolSave(string Name, string Url, string Data)
130 116
        {
131 117
            try
KCOM/Services/BaseServices.cs
487 487
                    {
488 488
                        if ((item.UserID == App.ViewInfo.UserID) && (this.pageNavigator.CurrentPage != null))
489 489
                        {
490

  
491 490
                            var instance = ViewerDataModel.Instance.MarkupList_USER.Where(d => d.PageNumber == pageNavigator.CurrentPage.PageNumber && d.MarkupInfoID == item.MarkupInfoID).ToList();
492 491
                            var my_item = Common.ViewerDataModel.Instance.MarkupControls_USER.FirstOrDefault();
493 492
                            Common.ViewerDataModel.Instance.current_page_commentcnt = Common.ViewerDataModel.Instance.MarkupList_USER.Where(data => data.PageNumber == pageNavigator.CurrentPage.PageNumber && data.MarkupInfoID == item.MarkupInfoID).ToList().Count;
......
537 536
                        Common.ViewerDataModel.Instance.MarkupControls_USER.ToList().ForEach(delegate (MarkupToPDF.Common.CommentUserInfo markupitem)
538 537
                        {
539 538
                            markupitem.Visibility = Visibility.Hidden;
540
                            if (markupitem.IsNew)
541
                            {
542
                                var root = MarkupParser.MarkupToString(markupitem, App.ViewInfo.UserID);
543
                                ViewerDataModel.Instance.MarkupList_USER.Add(new MarkupItemEx
544
                                {
545
                                    ID = markupitem.CommentID,
546
                                    Data = root.ConvertData,
547
                                    Data_Type = root.DATA_TYPE,
548
                                    MarkupInfoID = markupitem.MarkupInfoID,
549
                                    PageNumber = this.pageNavigator.CurrentPage.PageNumber,
550
                                });
551
                            }
552 539
                        });
553 540
                    }
554 541
                }
MarkupToPDF/Common/CommentUserInfo.cs
1
using MarkupToPDF.Controls.Common;
1
using KCOMDataModel.DataModel;
2
using MarkupToPDF.Controls.Common;
3
using MarkupToPDF.Controls.Parsing;
2 4
using System;
3 5
using System.Collections.Generic;
4 6
using System.Linq;
......
75 77
        /// </summary>
76 78
        /// <returns>serialized string</returns>
77 79
        public virtual string Serialize() { return string.Empty; }
80

  
81
        /// <summary>
82
        /// return MARKUP_DATA
83
        /// </summary>
84
        /// <param name="sUserID"></param>
85
        /// <param name="iPageNo"></param>
86
        /// <returns></returns>
87
        public virtual MARKUP_DATA GetMarkupData(string sUserID, int iPageNo, string sMarkupVersionID)
88
        {
89
            var root = MarkupParser.MarkupToString(this, sUserID);
90
            return new MARKUP_DATA
91
            {
92
                ID = this.CommentID,
93
                DATA = root.ConvertData,
94
                DATA_TYPE = root.DATA_TYPE,
95
                PAGENUMBER = iPageNo,
96
                MARKUPINFO_VERSION_ID = sMarkupVersionID,
97
                SYMBOL_ID = this.SymbolID,
98
                GROUP_ID = this.GroupID
99
            };
100
        }
78 101
    }
79 102
}
80
 

내보내기 Unified diff

클립보드 이미지 추가 (최대 크기: 500 MB)