프로젝트

일반

사용자정보

개정판 f714bef8

IDf714bef8a9cadb01ce034a395b096f152d6d14e8
상위 b3f088e9
하위 6a419948

김동진이(가) 5년 이상 전에 추가함

issue #000 file upload wcf add

Change-Id: Ied1a5fb1cd2f345ccade43a45efffec51561e359

차이점 보기:

KCOM/Services/BaseServices.cs
315 315
                gridViewMarkup.ItemsSource = ViewerDataModel.Instance._markupInfoList;
316 316
                SetCommentPages();
317 317

  
318
                //this.gridViewMarkup.SelectedItem = this.gridViewMarkup.Items[0];
319 318
                var select_item = ViewerDataModel.Instance._markupInfoList.Where(info => info.UserID == App.ViewInfo.UserID).OrderByDescending(order => order.Consolidate == Convert.ToInt32(true)).FirstOrDefault();
320 319
                this.gridViewMarkup.SelectedItem = select_item;
321 320

  
322 321

  
323

  
324 322
                //var markupItem = ViewerDataModel.Instance._markupInfoList.OrderByDescending(p => p.Consolidate == Convert.ToInt32(true)).ToList(); //Consolidation 된 데이터가 최상단에 올 수 있도록 변경
325 323

  
326 324
                //markupItem.ForEach(data =>
......
435 433
        private void gridViewMarkup_SelectionChanged(object sender, Telerik.Windows.Controls.SelectionChangeEventArgs e)
436 434
        {
437 435
            //this.ParentOfType<MainPage>().ReleaseAdorner();
436
            //foreach(MarkupInfoItem data in e.AddedItems)
437
            //{
438
            //    if (!ViewerDataModel.Instance.SelectedmarkupInfoItems.Contains(data))
439
            //        ViewerDataModel.Instance.SelectedmarkupInfoItems.Add(data);
440
            //}
441
            
438 442

  
439 443
            var dataSet = gridViewMarkup.SelectedItems.Cast<MarkupInfoItem>().Where(data => data.UserID == _ViewInfo.UserID);
440 444
            var dataSet_User = gridViewMarkup.Items.Cast<MarkupInfoItem>().Where(data => data.UserID == _ViewInfo.UserID);
......
474 478
            }
475 479
            else //파라미터로 넘어온 사용자가 걸리지 않은 경우
476 480
            {
477
                EmptyControlCheck();
478
                List<MarkupInfoItem> gridItem = gridViewMarkup.Items.Cast<MarkupInfoItem>().ToList(); //전체 마크업
479
                List<MarkupInfoItem> gridSelectionItem = gridViewMarkup.SelectedItems.Cast<MarkupInfoItem>().ToList(); //선택 된 마크업
480
                List<MarkupInfoItem> gridNonSelectionItem = gridItem.Except(gridSelectionItem).ToList(); //선택 되지 않은 마크업
481
                MarkupToPDF.Controls.Parsing.LayerControl layerControl = new MarkupToPDF.Controls.Parsing.LayerControl();
482
                layerControl.ProjectNo = App.ViewInfo.ProjectNO;
483
                #region 코멘트 보기
484
                if (e.AddedItems.Count() > 0)
485
                {
486
                    foreach (var item in gridSelectionItem)
487
                    {
488
                        if ((item.UserID == App.ViewInfo.UserID) && (this.pageNavigator.CurrentPage != null))
489
                        {
490

  
491
                            var instance = ViewerDataModel.Instance.MarkupList_USER.Where(d => d.PageNumber == pageNavigator.CurrentPage.PageNumber && d.MarkupInfoID == item.MarkupInfoID).ToList();
492
                            var my_item = Common.ViewerDataModel.Instance.MarkupControls_USER.FirstOrDefault();
493
                            Common.ViewerDataModel.Instance.current_page_commentcnt = Common.ViewerDataModel.Instance.MarkupList_USER.Where(data => data.PageNumber == pageNavigator.CurrentPage.PageNumber && data.MarkupInfoID == item.MarkupInfoID).ToList().Count;
494
                            if (my_item == null)
495
                            {
496
                                foreach (var markup in instance)
497
                                {
498
                                    layerControl.markupParseEx(markup.Data, Common.ViewerDataModel.Instance.MarkupControls_USER, item.DisplayColor, "", item.MarkupInfoID, markup.ID);
499
                                }
500
                            }
501
                            else
502
                            {
503
                                var test = instance.Where(data => data.MarkupInfoID == my_item.MarkupInfoID).FirstOrDefault();
504

  
505
                                if (test == null)
506
                                {
507
                                    foreach (var markup in instance)
508
                                    {
509
                                        layerControl.markupParseEx(markup.Data, Common.ViewerDataModel.Instance.MarkupControls_USER, item.DisplayColor, "", item.MarkupInfoID, markup.ID);
510
                                    }
511
                                }
512
                            }
513
                        }
514
                        else if (this.pageNavigator.CurrentPage != null)
515
                        {
516
                            var instance = ViewerDataModel.Instance.MarkupList_Pre.Where(d => d.PageNumber == pageNavigator.CurrentPage.PageNumber && d.MarkupInfoID == item.MarkupInfoID).ToList();
517
                            foreach (var markup in instance)
518
                            {
519
                                layerControl.markupParse(markup.Data, Common.ViewerDataModel.Instance.MarkupControls, item.DisplayColor, "", item.MarkupInfoID);
520
                            }
521
                        }
522
                    }
523
                    //}
524
                }
525
                #endregion
526
                #region 코멘트 숨기기
527
                else if (e.RemovedItems.Count > 0)
528
                {
529
                    var _infoItem = e.RemovedItems.Cast<MarkupInfoItem>().ToList();
530

  
531
                    (from A in _infoItem
532
                     from B in Common.ViewerDataModel.Instance.MarkupControls
533
                     where A.MarkupInfoID == B.MarkupInfoID
534
                     select B).ToList().ForEach(data =>
535
                     {
536
                         Common.ViewerDataModel.Instance.MarkupControls.Remove(data);
537
                     });
538

  
539
                    //var myComment = _infoItem.Where(d => d.MarkupInfoID == App.Custom_ViewInfoId).FirstOrDefault();
540
                    var myComment = _infoItem.Where(d => d.UserID == App.ViewInfo.UserID).FirstOrDefault();
541
                    if (myComment != null)
542
                    {
543
                        ChangeCommentReact();
544
                        Common.ViewerDataModel.Instance.MarkupControls_USER.ToList().ForEach(delegate (MarkupToPDF.Common.CommentUserInfo markupitem)
545
                        {
546
                            if (markupitem.IsNew)
547
                            {
548
                                var root = layerControl.MarkupToString(markupitem, App.ViewInfo.UserID);
549
                                ViewerDataModel.Instance.MarkupList_USER.Add(new MarkupItemEx
550
                                {
551
                                    ID = markupitem.CommentID,
552
                                    Data = root.ConvertData,
553
                                    Data_Type = root.DATA_TYPE,
554
                                    MarkupInfoID = markupitem.MarkupInfoID,
555
                                    PageNumber = this.pageNavigator.CurrentPage.PageNumber,
556
                                });
557
                            }
558
                            Common.ViewerDataModel.Instance.MarkupControls_USER.Remove(markupitem);
559
                        });
560
                    }
561
                }
562
                #endregion
481
                MarkupUserListDisplay();
563 482
            }
564 483
        }
565 484

  
......
884 803
            layerControl.ProjectNo = App.ViewInfo.ProjectNO;
885 804
            Common.ViewerDataModel.Instance.MarkupControls_USER.Clear();  //전체 제거
886 805
            Common.ViewerDataModel.Instance.MarkupControls.Clear();  //전체 제거
887
            foreach (var item in gridSelectionItem)
888
            {
889
                if (item.UserID == App.ViewInfo.UserID)
890
                {
891
                    ViewerDataModel.Instance.MarkupList_USER.Where(data => data.PageNumber == pageNavigator.CurrentPage.PageNumber && data.MarkupInfoID == item.MarkupInfoID).ToList().ForEach(delegate (MarkupItemEx markupitem)
892
                    {
893
                        layerControl.markupParseEx(markupitem.Data, Common.ViewerDataModel.Instance.MarkupControls_USER, item.DisplayColor, "", item.MarkupInfoID, markupitem.ID);
894
                    });
895
                }
896
                else
897
                {
898
                    ViewerDataModel.Instance.MarkupList_Pre.Where(data => data.PageNumber == pageNavigator.CurrentPage.PageNumber && data.MarkupInfoID == item.MarkupInfoID).ToList().ForEach(delegate (MarkupItemEx markupitem)
899
                    {
900
                        layerControl.markupParse(markupitem.Data, Common.ViewerDataModel.Instance.MarkupControls, item.DisplayColor, "", item.MarkupInfoID);
901
                    });
902
                }
903
            }
806
            //foreach (var item in gridSelectionItem)
807
            //{
808
            //    if (item.UserID == App.ViewInfo.UserID)
809
            //    {
810
            //        ViewerDataModel.Instance.MarkupList_USER.Where(data => data.PageNumber == pageNavigator.CurrentPage.PageNumber && data.MarkupInfoID == item.MarkupInfoID).ToList().ForEach(delegate (MarkupItemEx markupitem)
811
            //        {
812
            //            layerControl.markupParseEx(markupitem.Data, Common.ViewerDataModel.Instance.MarkupControls_USER, item.DisplayColor, "", item.MarkupInfoID, markupitem.ID);
813
            //        });
814
            //    }
815
            //    else
816
            //    {
817
            //        ViewerDataModel.Instance.MarkupList_Pre.Where(data => data.PageNumber == pageNavigator.CurrentPage.PageNumber && data.MarkupInfoID == item.MarkupInfoID).ToList().ForEach(delegate (MarkupItemEx markupitem)
818
            //        {
819
            //            layerControl.markupParse(markupitem.Data, Common.ViewerDataModel.Instance.MarkupControls, item.DisplayColor, "", item.MarkupInfoID);
820
            //        });
821
            //    }
822
            //}
904 823
                (from A in gridSelectionItem
905 824
                 from B in Common.ViewerDataModel.Instance.MarkupControls_USER
906 825
                 where A.MarkupInfoID == B.MarkupInfoID

내보내기 Unified diff

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