프로젝트

일반

사용자정보

개정판 354fe2b1

ID354fe2b1fbeaac552075a8465d2c45414bcfee24
상위 6c0afa20
하위 3dc5cbb3, 1a88080d

유성호이(가) 일년 이상 전에 추가함

issue #0000
excel import binding 으로 수정
헤더 그룹 view 옵션 추가

Change-Id: I3fccdbb6c1d34239e01fbe553aca889738395663

차이점 보기:

ID2.Manager/ID2.Manager/Main.cs
51 51

  
52 52
            this.radCheckBox1.CheckStateChanged += RadCheckBox_CheckStateChanged;
53 53
            this.radCheckBox2.CheckStateChanged += RadCheckBox_CheckStateChanged;
54
            this.radCheckBox2.CheckStateChanged += RadCheckBox_CheckStateChanged;
54
            this.radCheckBox3.CheckStateChanged += RadCheckBox_CheckStateChanged;
55 55
            this.radCheckBox4.CheckStateChanged += RadCheckBox_CheckStateChanged;
56 56

  
57 57
            this.radButtonSearch.Click += RadButtonSearch_Click;
......
115 115
        #region button, checkbox event
116 116
        private void RadCheckBox_CheckStateChanged(object sender, EventArgs e)
117 117
        {
118
            if (sender is RadCheckBox)
119
            {
120
                RadCheckBox checkBox = sender as RadCheckBox;
118 121

  
122
                if (checkBox.Tag != null)
123
                {
124
                    ColumnGroupsViewDefinition columnGroupsView =  this.radGridViewDocuments.MasterTemplate.ViewDefinition as ColumnGroupsViewDefinition;
125
                    GridViewColumnGroup colGroup = columnGroupsView.GetAllGroups().Where(x => x.Name.Equals(checkBox.Tag.ToString())).FirstOrDefault();
126
                    if (colGroup != null)
127
                        colGroup.IsVisible = checkBox.Checked;
128
                }
129
            }
130

  
131
            //ColumnGroupsViewDefinition columnGroupsView = this.radGridViewDocuments.MasterTemplate.ViewDefinition = columnGroupsView;
119 132
        }
120 133

  
121 134
        private void RadButtonSearch_Click(object sender, EventArgs e)
......
481 494
                               DTRemarks = ws.Rows[p.Index].Cells[44].Value == null ? string.Empty : ws.Rows[p.Index].Cells[44].Value.ToString()
482 495
                           }));
483 496

  
484

  
485
                    foreach (Documents appDoc in appendDocuments)
486
                    {
487
                        GridViewRowInfo rowInfo = this.radGridViewDocuments.Rows.AddNew();
488

  
489
                        foreach (FieldInfo fieldInfo in appDoc.GetType().GetFields(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly))
490
                        {
491
                            if (fieldInfo.GetValue(appDoc) != null)
492
                            {
493
                                var cols = rowInfo.Cells.Where(x => fieldInfo.Name.Contains($"<{x.ColumnInfo.Name}>"));
494

  
495
                                if (cols.Any())
496
                                {
497
                                    cols.FirstOrDefault().Value = fieldInfo.GetValue(appDoc);
498
                                }
499
                            }
500
                        }
501
                    }
497
                    this.documents.AddRange(appendDocuments);
498
                    this.radGridViewDocuments.DataSource = this.documents;
499

  
500
                    //foreach (Documents appDoc in appendDocuments)
501
                    //{
502
                    //    GridViewRowInfo rowInfo = this.radGridViewDocuments.Rows.AddNew();
503

  
504
                    //    foreach (FieldInfo fieldInfo in appDoc.GetType().GetFields(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly))
505
                    //    {
506
                    //        if (fieldInfo.GetValue(appDoc) != null)
507
                    //        {
508
                    //            var cols = rowInfo.Cells.Where(x => fieldInfo.Name.Contains($"<{x.ColumnInfo.Name}>"));
509

  
510
                    //            if (cols.Any())
511
                    //            {
512
                    //                cols.FirstOrDefault().Value = fieldInfo.GetValue(appDoc);
513
                    //            }
514
                    //        }
515
                    //    }
516
                    //}
502 517
                }
503 518
            }
504 519
        }
......
640 655
            List<string> dtColNames = new List<string>() { "DTIsGateWay", "DTIsImport", "DTIsRegSystem", "DTRemarks" };
641 656

  
642 657
            //도면
643
            GridViewColumnGroup docColGrp = new GridViewColumnGroup("도면");
658
            GridViewColumnGroup docColGrp = new GridViewColumnGroup("도면 ");
644 659
            GridViewColumnGroup docLinkColGrp = new GridViewColumnGroup("파일링크");
645 660
            GridViewColumnGroup docInfoColGrp = new GridViewColumnGroup("도면정보");
646 661

  
......
656 671
            docColGrp.Groups.Add(docInfoColGrp);
657 672

  
658 673
            //검토
659
            GridViewColumnGroup rvColGrp = new GridViewColumnGroup("검토");
674
            GridViewColumnGroup rvColGrp = new GridViewColumnGroup("검토", "review");
660 675
            GridViewColumnGroup rvToColGrp = new GridViewColumnGroup("도프텍");
661 676
            GridViewColumnGroup rvFrColGrp = new GridViewColumnGroup("삼성");
662 677
            GridViewColumnGroup rvEtcColGrp = new GridViewColumnGroup("기타");
......
681 696

  
682 697

  
683 698
            //작업
684
            GridViewColumnGroup wkColGrp = new GridViewColumnGroup("작업");
699
            GridViewColumnGroup wkColGrp = new GridViewColumnGroup("작업", "work");
685 700
            GridViewColumnGroup wkID2ColGrp = new GridViewColumnGroup("ID2");
686 701
            GridViewColumnGroup wkAVEVAColGrp = new GridViewColumnGroup("AVEVA");
687 702

  
......
699 714

  
700 715

  
701 716
            //Validation
702
            GridViewColumnGroup valColGrp = new GridViewColumnGroup("Validation");
717
            GridViewColumnGroup valColGrp = new GridViewColumnGroup("Validation", "validation");
703 718
            GridViewColumnGroup valLinkColGrp = new GridViewColumnGroup("파일링크");
704 719
            GridViewColumnGroup valProdColGrp = new GridViewColumnGroup("도프텍");
705 720
            GridViewColumnGroup valCntColGrp = new GridViewColumnGroup("삼성전자");
......
722 737
            valColGrp.Groups.Add(valCntColGrp);
723 738

  
724 739
            //AVEVA Net
725
            GridViewColumnGroup dtColGrp = new GridViewColumnGroup("AVEVA Net\n(Digital Twin)");
740
            GridViewColumnGroup dtColGrp = new GridViewColumnGroup("AVEVA Net\n(Digital Twin)", "avevanet");
726 741

  
727 742
            GridViewColumnGroupRow dtColGrpRow = new GridViewColumnGroupRow();
728 743
            dtColGrpRow.ColumnNames.AddRange(dtColNames);
......
738 753

  
739 754
            gridView.MasterTemplate.ViewDefinition = columnGroupsView;
740 755
        }
741

  
742
        private GridViewColumnGroupRow GetGridViewColumnGroupRow(List<string> columnNames)
743
        {
744
            GridViewColumnGroupRow gridViewColumnGroupRow = new GridViewColumnGroupRow();
745

  
746
            foreach (string columnName in columnNames)
747
            {
748
                gridViewColumnGroupRow.ColumnNames.Add(columnName);
749
            }
750

  
751
            return gridViewColumnGroupRow;
752
        }
753

  
754
        private GridViewColumnGroup GetGridViewColumnGroup(string name, string text, bool showHeader, GridViewColumnGroupRow item)
755
        {
756
            GridViewColumnGroup gridViewColumnGroup = new GridViewColumnGroup();
757
            gridViewColumnGroup.Name = name;
758
            gridViewColumnGroup.Text = text;
759
            gridViewColumnGroup.ShowHeader = showHeader;
760
            gridViewColumnGroup.Rows.Add(item);
761

  
762
            return gridViewColumnGroup;
763
        }
764 756
        #endregion
765 757

  
766

  
767 758
        class DocumentsWorker : BaseWorker
768 759
        {
769 760
            public delegate void OnWorkCompleted();

내보내기 Unified diff

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