프로젝트

일반

사용자정보

개정판 3ad12023

ID3ad120236f53a27f5410759a8ff4280197ef8650
상위 2b282b13
하위 860f46f8, 0c624340

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

issue #000: final pdf bookmark 사용자명,부서 추가

Change-Id: Id5dc0ee5176256f5775900f2a2b6b507cd79523f

차이점 보기:

FinalService/KCOM_FinalService/MarkupToPDF/MarkupToPDF.cs
407 407
            var array = memStream.ToArray();
408 408
            File.WriteAllBytes(dest, array);
409 409
        }
410

  
410
        
411 411
        public bool SetStampInPDF(FINAL_PDF finaldata, string testFile, MARKUP_INFO markupInfo)
412 412
        {
413 413
            string pdfFilePath = null;
414
            List<MEMBER> memberlist = null;
414 415
            FileInfo tempFileInfo = new FileInfo(testFile);
415 416

  
416 417
            if (!Directory.Exists(_FinalPDFStorgeLocal))
......
418 419
                Directory.CreateDirectory(_FinalPDFStorgeLocal);
419 420
            }
420 421
            pdfFilePath = _FinalPDFStorgeLocal + @"\" + tempFileInfo.Name;
421

  
422
            using (CIEntities cIEntities = new CIEntities(KCOMDataModel.Common.ConnectStringBuilder.ProjectCIConnectString(finaldata.PROJECT_NO).ToString()))
423
            {
424
                memberlist = cIEntities.MEMBER.ToList();
425
            }
422 426
            using (KCOMEntities _entity = new KCOMEntities(ConnectStringBuilder.KCOMConnectionString().ToString()))
423 427
            {
424 428
                FINAL_PDF pdfLink = _entity.FINAL_PDF.Where(data => data.ID == finaldata.ID).FirstOrDefault();
......
434 438
                    List<Dictionary<string, object>> root = new List<Dictionary<string, object>>();
435 439

  
436 440
                    var dic = new Dictionary<string, object>();
437
                    MarkupDataSet.Select(d => d.PAGENUMBER).ToList().ForEach(a =>
438
                      {
439
                          bookmark = new Dictionary<string, object>();
440
                          bookmark.Add("Title", "Commented Page : " + a);
441
                          bookmark.Add("Page", a + " Fit");
442
                          //bookmark.Add("Page", "2 /XYZ 50 500 50 50");
443
                          bookmark.Add("Action", "GoTo");
444
                          bookmark.Add("Kids", outlines);
445
                          root.Add(bookmark);
446
                      });
441
                    foreach (var data in MarkupDataSet)
442
                    {
443

  
444
                        string userid = data.MARKUP_INFO_VERSION.MARKUP_INFO.USER_ID;
445

  
446
                        var member = memberlist.Where(u => u.ID == userid).FirstOrDefault();
447
                        string username = member.NAME;
448
                        string userdept = member.DEPARTMENT;
449
                        bookmark = new Dictionary<string, object>();
450
                        bookmark.Add("Title", string.Format("User:{0}[{1}] Commented Page : {2}", username, userdept, data.PAGENUMBER));
451
                        bookmark.Add("Page", data.PAGENUMBER + " Fit");
452
                        bookmark.Add("Action", "GoTo");
453
                        bookmark.Add("Kids", outlines);
454
                        root.Add(bookmark);
455
                    }
447 456

  
448 457

  
449 458
                    using (PdfStamper pdfStamper = new PdfStamper(pdfReader, new FileStream(pdfFilePath, FileMode.Create)))

내보내기 Unified diff

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