프로젝트

일반

사용자정보

개정판 faebcce2

IDfaebcce2f8d856d9f8e01a1e4d650e72d7ce4017
상위 1e9c1261
하위 15183831

김태성이(가) 4년 이상 전에 추가함

final에서 폰트 검색 수정
kcomdatamodel에서 member를 RawQuery로 가져오도록 변경

Change-Id: Ibf98408afeb03209594f445837309a4413f8bb1c

차이점 보기:

FinalService/KCOM_FinalService/KCOMDataModel/Common/SelectMembersQuery.cs
1
using KCOMDataModel.DataModel;
2
using System;
3
using System.Collections.Generic;
4
using System.Linq;
5
using System.Text;
6
using System.Threading.Tasks;
7

  
8
namespace KCOMDataModel.Common
9
{
10
    public static class ObjectQuery
11
    {
12
        public static List<MEMBER> GetMemberQuery(System.Data.Objects.ObjectContext context, string UserID)
13
        {
14
            List<MEMBER> result = new List<MEMBER>();
15

  
16
            try
17
            {
18
                string query = "SELECT members.ID,members.NAME,members.DEPARTMENT FROM CIEntities.MEMBER as members where members.ID = @userId";
19

  
20
                var param = new[] { new System.Data.Objects.ObjectParameter("userId", UserID) };
21

  
22
                System.Data.Objects.ObjectQuery<System.Data.Common.DbDataRecord> memberQuery
23
                              = context.CreateQuery<System.Data.Common.DbDataRecord>(query, param);
24

  
25
                if (memberQuery.Count() > 0)
26
                {
27
                    foreach (var dataRecord in memberQuery)
28
                    {
29
                        MEMBER member = new MEMBER();
30

  
31
                        string userName = dataRecord["NAME"]?.ToString().Trim();
32
                        string ID = dataRecord["ID"]?.ToString().Trim();
33
                        string depatment = dataRecord["DEPARTMENT"]?.ToString().Trim();
34

  
35
                        member.NAME = userName;
36
                        member.ID = ID;
37
                        member.DEPARTMENT = depatment;
38

  
39
                        result.Add(member);
40
                    }
41
                }
42
            }
43
            catch (Exception ex)
44
            {
45
                throw new Exception("GetMember(System.Data.Objects.ObjectContext context, string UserID) ", ex);
46
            }
47

  
48
            return result;
49
        }
50
    }
51
}
FinalService/KCOM_FinalService/KCOMDataModel/KCOMDataModel.csproj
178 178
  </ItemGroup>
179 179
  <ItemGroup>
180 180
    <Compile Include="Common\ConnectStringBuilder.cs" />
181
    <Compile Include="Common\SelectMembersQuery.cs" />
181 182
    <Compile Include="DataModel\CIModel.Designer.cs">
182 183
      <AutoGen>True</AutoGen>
183 184
      <DesignTime>True</DesignTime>
FinalService/KCOM_FinalService/MarkupToPDF/MarkupToPDF.cs
568 568
        {
569 569
            try
570 570
            {
571
                List<MEMBER> memberlist = null;
571
        
572 572
                FileInfo tempFileInfo = new FileInfo(testFile);
573 573

  
574 574
                if (!Directory.Exists(_FinalPDFStorgeLocal))
......
576 576
                    Directory.CreateDirectory(_FinalPDFStorgeLocal);
577 577
                }
578 578
                string pdfFilePath = Path.Combine(_FinalPDFStorgeLocal, tempFileInfo.Name);
579
                using (CIEntities cIEntities = new CIEntities(KCOMDataModel.Common.ConnectStringBuilder.ProjectCIConnectString(finaldata.PROJECT_NO).ToString()))
580
                {
581
                    memberlist = cIEntities.MEMBER.ToList();
582
                }
579
          
580

  
583 581
                using (KCOMEntities _entity = new KCOMEntities(ConnectStringBuilder.KCOMConnectionString().ToString()))
584 582
                {
585 583
                    FINAL_PDF pdfLink = _entity.FINAL_PDF.Where(data => data.ID == finaldata.ID).FirstOrDefault();
......
588 586
                    using (Stream pdfStream = new FileInfo(testFile).Open(FileMode.Open, FileAccess.ReadWrite)) //
589 587
                    {
590 588
                        StatusChange("comment Cover",0);
591

  
589
                        
592 590
                        PdfReader pdfReader = new PdfReader(pdfStream);
593 591
                        //List<Dictionary<string, object>> lstoutlineTop = new List<Dictionary<string, object>>();
594 592
                        Dictionary<string, object> bookmark;
595 593
                        List<Dictionary<string, object>> outlines;
594

  
596 595
                        outlines = new List<Dictionary<string, object>>();
597 596
                        List<Dictionary<string, object>> root = new List<Dictionary<string, object>>();
598 597

  
599 598
                        var dic = new Dictionary<string, object>();
599

  
600 600
                        foreach (var data in MarkupDataSet)
601 601
                        {
602 602
                            StatusChange("MarkupDataSet", 0);
603 603

  
604 604
                            string userid = data.MARKUP_INFO_VERSION.MARKUP_INFO.USER_ID;
605 605

  
606
                            var member = memberlist.Where(u => u.ID == userid).FirstOrDefault();
607
                            string username = member.NAME;
608
                            string userdept = member.DEPARTMENT;
606
                            string username = "";
607
                            string userdept = "";
608

  
609
                            using (CIEntities cIEntities = new CIEntities(KCOMDataModel.Common.ConnectStringBuilder.ProjectCIConnectString(finaldata.PROJECT_NO).ToString()))
610
                            {
611
                                var memberlist = KCOMDataModel.Common.ObjectQuery.GetMemberQuery(cIEntities, userid);
612

  
613
                                if(memberlist.Count() > 0)
614
                                {
615
                                    username = memberlist.First().NAME;
616
                                    userdept = memberlist.First().DEPARTMENT;
617
                                }
618
                            }
619

  
609 620
                            bookmark = new Dictionary<string, object>();
610 621
                            bookmark.Add("Title", string.Format("User:{0}[{1}] Commented Page : {2}", username, userdept, data.PAGENUMBER));
611 622
                            bookmark.Add("Page", data.PAGENUMBER + " Fit");
Markus.Fonts/FontDictionary.cs
60 60

  
61 61
            foreach (var item in GetMarkusFonts())
62 62
            {
63
               if(item.FamilyNames.Contains(fontFamily.Source.Replace("./#", "")))
63
               if(item.FamilyNames.Contains(fontFamily.Source.Split('#').LastOrDefault()))
64 64
                    //fontFamily.FamilyNames.Select(x => x.Value).Except(item.FamilyNames).Count() > 0)
65 65
                {
66 66
                    result = item;

내보내기 Unified diff

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