프로젝트

일반

사용자정보

개정판 b17bdcc4

IDb17bdcc4e380a62e590f2a7da4afeae9a8509ce8
상위 74aa670a
하위 e406a370

유성호이(가) 약 2년 전에 추가함

issue #0000
document list 조회 수정
excel import 수정
summary list 수정

Change-Id: I85a63fcc6c875524c6ab1695747c9439a0366e8c

차이점 보기:

ID2.Manager/ID2.Manager/Main.cs
82 82
        #endregion
83 83

  
84 84
        #region Document List 조회
85
        public void GetDocList()
85
        public void DocumentListBinding()
86 86
        {
87
            this.documents = new DocumentController().GetAllDocuments().ToList();
88
            this.orgDocuments = JsonConvert.DeserializeObject<List<Documents>>(JsonConvert.SerializeObject(this.documents));
89

  
90 87
            GridViewComboBoxColumn ColUserList = this.radGridViewDocuments.Columns["PersonInCharge"] as GridViewComboBoxColumn;
91 88
            ColUserList.DataSource = informations.UserList;
92 89
            ColUserList.DisplayMember = "Name";
......
104 101

  
105 102
            //Summary
106 103
            GridViewSummaryRowItem summaryRowItem = new GridViewSummaryRowItem()
107
                {
108
                    new GridViewSummaryItem("DocumentNo", "{0:#,###} / " + totalCount, GridAggregateFunction.Count)
109
                };
104
            {
105
                new GridViewSummaryItem("DocumentNo", "{0:#,###} / " + totalCount, GridAggregateFunction.Count)
106
            };
110 107
            this.radGridViewDocuments.SummaryRowsTop.Add(summaryRowItem);
111 108
            this.radGridViewDocuments.MasterView.SummaryRows[0].PinPosition = PinnedRowPosition.Top;
112 109
            this.radGridViewDocuments.MasterTemplate.BottomPinnedRowsMode = GridViewBottomPinnedRowsMode.Fixed;
113 110
        }
111

  
112
        public void GetDocList()
113
        {
114
            this.documents = new DocumentController().GetAllDocuments().ToList();
115
            this.orgDocuments = JsonConvert.DeserializeObject<List<Documents>>(JsonConvert.SerializeObject(this.documents));
116
        }
114 117
        #endregion
115 118

  
116 119
        #region button, checkbox event
......
135 138
        private void RadButtonSearch_Click(object sender, EventArgs e)
136 139
        {
137 140
            this.GetDocList();
141
            this.DocumentListBinding();
138 142
        }
139 143

  
140 144
        private void RadButtonMapping_Click(object sender, EventArgs e)
......
371 375
        #endregion
372 376

  
373 377
        #region Excel
378
        private UserInfo GetUser(string user)
379
        {
380
            UserInfo userInfo = informations.UserList.Where(x => x.ID.Equals(user)).FirstOrDefault();
381
            if (userInfo != null) return userInfo;
382

  
383
            userInfo = informations.UserList.Where(x => x.Name.Equals(user)).FirstOrDefault();
384
            if (userInfo != null) return userInfo;
385

  
386
            return userInfo ?? new UserInfo();
387
        }
388

  
374 389
        private void RadButtonElementExcelImport_Click(object sender, EventArgs e)
375 390
        {
376 391
            using (OpenFileDialog ofd = new OpenFileDialog()
......
465 480

  
466 481
                               Place = ws.Rows[p.Index].Cells[5].Value == null ? string.Empty : ws.Rows[p.Index].Cells[5].Value.ToString(),
467 482
                               DocumentNo = ws.Rows[p.Index].Cells[6].Value == null ? string.Empty : ws.Rows[p.Index].Cells[6].Value.ToString(),
468
                               PersonInCharge = ws.Rows[p.Index].Cells[7].Value == null ? string.Empty : ws.Rows[p.Index].Cells[7].Value.ToString(),
483
                               PersonInCharge = ws.Rows[p.Index].Cells[7].Value == null ? string.Empty : this.GetUser(ws.Rows[p.Index].Cells[7].Value.ToString()).ID,
469 484
                               JobLevel = ws.Rows[p.Index].Cells[8].Value == null ? string.Empty : ws.Rows[p.Index].Cells[8].Value.ToString(),
470 485
                               IsTypical = ws.Rows[p.Index].Cells[9].Value == null ? string.Empty : ws.Rows[p.Index].Cells[9].Value.ToString(),
471 486
                               RevisonNo = ws.Rows[p.Index].Cells[10].Value == null ? string.Empty : ws.Rows[p.Index].Cells[10].Value.ToString(),
......
504 519
                           }));
505 520

  
506 521
                    this.documents.AddRange(appendDocuments);
507
                    if (this.radGridViewDocuments.DataSource != null)
508
                        this.radGridViewDocuments.DataSource = null;
509
                    this.radGridViewDocuments.DataSource = this.documents;
522
                    this.DocumentListBinding();
510 523

  
511 524
                    //foreach (Documents appDoc in appendDocuments)
512 525
                    //{
......
575 588
                            //templateWorksheet.Cells[rowIndex, 4].Value = doc.DocumentNo;
576 589
                            templateWorksheet.Cells[rowIndex, 5].Value = doc.Place;
577 590
                            templateWorksheet.Cells[rowIndex, 6].Value = doc.DocumentNo;
578
                            templateWorksheet.Cells[rowIndex, 7].Value = doc.PersonInCharge;
591
                            templateWorksheet.Cells[rowIndex, 7].Value = this.GetUser(doc.PersonInCharge).ID;
579 592
                            templateWorksheet.Cells[rowIndex, 8].Value = doc.JobLevel;
580 593
                            templateWorksheet.Cells[rowIndex, 9].Value = doc.IsTypical;
581 594
                            templateWorksheet.Cells[rowIndex, 10].Value = doc.RevisonNo;

내보내기 Unified diff

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