프로젝트

일반

사용자정보

개정판 986f7d35

ID986f7d359d29a0bea8c9be065cd506152c07aeb8
상위 b2ff5ff4
하위 3295dabe

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

Feature: Verification에서 Document를 선택했을때 Document를 상세 창에 연동 시킨다.

Change-Id: Iad576f8756bd4405dad6d74f4ca00286bb02864b

차이점 보기:

ID2.Manager/ID2.Manager/Controls/Verification.cs
18 18
{
19 19
    public partial class Verification : UserControl
20 20
    {
21
        public delegate void DocumentSelected(Documents doc);
22
        public event DocumentSelected OnDocumentSelected;
23

  
21 24
        readonly Informations informations = Informations.Instance;
22 25
        readonly string IniFilePath = System.IO.Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), 
23 26
            Application.ProductName, $"{Application.ProductName}.ini");
......
229 232
                {
230 233
                    CompareAndMark(this.designAutoCAD, this.designAutoCAD.Entities, this.designAVEVA, this.designAVEVA.Entities);
231 234
                }
235

  
236
                if(OnDocumentSelected != null) OnDocumentSelected(doc);
232 237
            }
233 238
        }
234 239

  
ID2.Manager/ID2.Manager/Main.cs
65 65
        public Main()
66 66
        {
67 67
            InitializeComponent();
68
            this.LayoutValidation.Controls.Add(new Controls.Verification() { Dock = DockStyle.Fill });
68
            var verification = new Controls.Verification() { Dock = DockStyle.Fill };
69
            verification.OnDocumentSelected += BindingDocumentToDetailEditor;
70
            this.LayoutValidation.Controls.Add(verification);
69 71
            this.DockMainTabStrip.Select();
70 72

  
71 73
            var appDataPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), Application.ProductName);
......
400 402
        }
401 403

  
402 404
        /// <summary>
405
        /// 선택한 Document와 상세 편집 창을 연동시킨다.
406
        /// </summary>
407
        /// <param name="doc"></param>
408
        public void BindingDocumentToDetailEditor(Documents doc)
409
        {
410
            briefAndImagesReview.Clear();
411
            briefAndImagesValidation.Clear();
412

  
413
            //FrRemarks 추가
414

  
415
            briefAndImagesReview.DataBindings.Add(new Binding("BriefDoftech", doc, "ToRemarks", false, DataSourceUpdateMode.OnPropertyChanged, null));
416
            briefAndImagesReview.DataBindings.Add(new Binding("BriefSec", doc, "FrRemarks", false, DataSourceUpdateMode.OnPropertyChanged, null));
417

  
418
            briefAndImagesValidation.DataBindings.Add(new Binding("BriefDoftech", doc, "ProdRemarks", false, DataSourceUpdateMode.OnPropertyChanged, null));
419
            briefAndImagesValidation.DataBindings.Add(new Binding("BriefSec", doc, "ClientRemarks", false, DataSourceUpdateMode.OnPropertyChanged, null));
420

  
421
            if (doc.AttFiles != null)
422
            {
423
                if (doc.AttFiles.Any(x => x.Category == "toreview"))
424
                {
425
                    var images = doc.AttFiles.Where(x => x.Category == "toreview").Select(x => new AttImageInfo { ID = x.FileID, Data = x.FileData });
426
                    briefAndImagesReview.SetToImages(images.ToList());
427
                }
428

  
429
                if (doc.AttFiles.Any(x => x.Category == "frreview"))
430
                {
431
                    var images = doc.AttFiles.Where(x => x.Category == "frreview").Select(x => new AttImageInfo { ID = x.FileID, Data = x.FileData });
432
                    briefAndImagesReview.SetFrImages(images.ToList());
433
                }
434

  
435
                if (doc.AttFiles.Any(x => x.Category == "prodvalidation"))
436
                {
437
                    var images = doc.AttFiles.Where(x => x.Category == "prodvalidation").Select(x => new AttImageInfo { ID = x.FileID, Data = x.FileData });
438
                    briefAndImagesValidation.SetToImages(images.ToList());
439
                }
440

  
441
                if (doc.AttFiles.Any(x => x.Category == "clientvalidation"))
442
                {
443
                    var images = doc.AttFiles.Where(x => x.Category == "clientvalidation").Select(x => new AttImageInfo { ID = x.FileID, Data = x.FileData });
444
                    briefAndImagesValidation.SetFrImages(images.ToList());
445
                }
446
            }
447
        }
448

  
449
        /// <summary>
403 450
        /// 선택된 행의 AutoCAD와 PDF 파일을 보여준다.
404 451
        /// </summary>
405 452
        /// <param name="sender"></param>
......
416 463
                //        cell.ReadOnly = true;
417 464
                //    }
418 465
                //}
419

  
420
                briefAndImagesReview.Clear();
421
                briefAndImagesValidation.Clear();
422

  
423
                //FrRemarks 추가
424

  
425
                briefAndImagesReview.DataBindings.Add(new Binding("BriefDoftech", doc, "ToRemarks", false, DataSourceUpdateMode.OnPropertyChanged, null));
426
                briefAndImagesReview.DataBindings.Add(new Binding("BriefSec", doc, "FrRemarks", false, DataSourceUpdateMode.OnPropertyChanged, null));
427

  
428
                briefAndImagesValidation.DataBindings.Add(new Binding("BriefDoftech", doc, "ProdRemarks", false,DataSourceUpdateMode.OnPropertyChanged, null));
429
                briefAndImagesValidation.DataBindings.Add(new Binding("BriefSec", doc, "ClientRemarks", false, DataSourceUpdateMode.OnPropertyChanged, null));
430

  
431
                if (doc.AttFiles != null)
432
                {
433
                    if (doc.AttFiles.Count(x => x.Category == "toreview") > 0)
434
                    {
435
                        var images = doc.AttFiles.Where(x => x.Category == "toreview").Select(x =>new AttImageInfo { ID = x.FileID, Data = x.FileData });
436
                        briefAndImagesReview.SetToImages(images.ToList());
437
                    }
438

  
439
                    if (doc.AttFiles.Count(x => x.Category == "frreview") > 0)
440
                    {
441
                        var images = doc.AttFiles.Where(x => x.Category == "frreview").Select(x => new AttImageInfo { ID = x.FileID, Data = x.FileData });
442
                        briefAndImagesReview.SetFrImages(images.ToList());
443
                    }
444

  
445
                    if (doc.AttFiles.Count(x => x.Category == "prodvalidation") > 0)
446
                    {
447
                        var images = doc.AttFiles.Where(x => x.Category == "prodvalidation").Select(x => new AttImageInfo { ID = x.FileID, Data = x.FileData });
448
                        briefAndImagesValidation.SetToImages(images.ToList());
449
                    }
450

  
451
                    if (doc.AttFiles.Count(x => x.Category == "clientvalidation") > 0)
452
                    {
453
                        var images = doc.AttFiles.Where(x => x.Category == "clientvalidation").Select(x => new AttImageInfo { ID = x.FileID, Data = x.FileData });
454
                        briefAndImagesValidation.SetFrImages(images.ToList());
455
                    }
456
                }
466
                BindingDocumentToDetailEditor(doc);
457 467
            }
458 468
        }
459 469

  

내보내기 Unified diff

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