프로젝트

일반

사용자정보

통계
| 브랜치(Branch): | 개정판:

markus / FinalService / KCOM_FinalService / ConsoleApp1 / Program.cs @ 84e1aacc

이력 | 보기 | 이력해설 | 다운로드 (3.49 KB)

1
using KCOMDataModel;
2
using KCOMDataModel.Common;
3
using KCOMDataModel.DataModel;
4
using System;
5
using System.Collections.Generic;
6
using System.IO;
7
using System.Linq;
8
using System.Text;
9

    
10
namespace ConsoleApp1
11
{
12
    class Program
13
    {
14
        static void Main(string[] args)
15
        {
16
            string PdfFilePathRoot = "";
17
            string _FinalPDFStorgeLocal = "";
18
            string _FinalPDFStorgeRemote = "";
19

    
20
            //using (KCOMEntities _entity = new KCOMEntities(KCOMDataModel.Common.ConnectStringBuilder.KCOMConnectionString().ToString()))
21
            //{
22
            //    var _properties = _entity.PROPERTIES.Where(pro => pro.PROPERTY == "000000");
23

    
24
            //    if (_properties.Count() > 0)
25
            //    {
26
            //        PdfFilePathRoot = _properties.Where(t => t.TYPE == MarkupToPDF.PropertiesType.Const_TileSorcePath).First().VALUE;
27
            //        _FinalPDFStorgeLocal = _properties.Where(t => t.TYPE == MarkupToPDF.PropertiesType.Const_FinalPDFStorgeLocal).First().VALUE;
28
            //        _FinalPDFStorgeRemote = _properties.Where(t => t.TYPE == MarkupToPDF.PropertiesType.Const_FinalPDFStorgeRemote).First().VALUE;
29
            //    }
30
            //}
31
            //    using (CIEntities _entity = new CIEntities(ConnectStringBuilder.ProjectCIConnectString("000000").ToString()))
32
            //{
33
            //    var _DOCINFO = _entity.DOCINFO.Where(doc => doc.ID == "e16c382e-5c33-3883-d45b-47e4f4d4c23f");
34

    
35
            //    if (_DOCINFO.Count() > 0)
36
            //    {
37
            //       var  DocInfoItem = _DOCINFO.FirstOrDefault();
38

    
39
            //        PdfFilePathRoot = PdfFilePathRoot + @"\" + "000000" + "_Tile" + @"\"
40
            //                         + (System.Convert.ToInt64("11111111") / 100).ToString()
41
            //                         + @"\" + "11111111" + @"\";
42
            //    }
43
            //}
44

    
45
            using (KCOMEntities _entity = new KCOMEntities(KCOMDataModel.Common.ConnectStringBuilder.KCOMConnectionString().ToString()))
46
            {
47
                FINAL_PDF item = _entity.FINAL_PDF.Where(d => d.ID == "f8Gv6hVdw8d6e881c26a4199").FirstOrDefault();
48
                ///FINAL_PDF item = _entity.FINAL_PDF.Where(d => d.ID == "Bm6qsYD9Hu8d6e7c702626345").FirstOrDefault();
49
                //_entity.FINAL_PDF.AddObject(new FINAL_PDF
50
                //{
51
                //    ID = Guid.NewGuid().ToString(),
52
                //    CREATE_DATETIME = DateTime.Now,
53
                //    CREATE_USER_ID = "h2011357",
54
                //    DOCINFO_ID = "ac77a75e-39d1-1764-eae3-cd252ddf4324",
55
                //    DOCUMENT_ID = "11111116",
56
                //    MARKUPINFO_ID = "LDEeSHCzVT8d56b76220a8e9e",
57
                //    PROJECT_NO = "000000",
58
                //    TOTAL_PAGE = 8,
59
                //    STATUS = 0,
60
                //    CURRENT_PAGE = 1,
61
                //});
62
                //_entity.SaveChanges();
63

    
64
                MarkupToPDF.MarkupToPDF pdf = new MarkupToPDF.MarkupToPDF();
65
                pdf.EndFinal += Pdf_EndFinal;
66
                pdf.FinalMakeError += Pdf_FinalMakeError;
67
                //pdf.MakeFinalPDF(_entity.FINAL_PDF.FirstOrDefault());
68
                pdf.MakeFinalPDF(item);
69
            }
70
        }
71

    
72
        private static void Pdf_FinalMakeError(object sender, MarkupToPDF.MakeFinalErrorArgs e)
73
        {
74
            
75
        }
76

    
77
        private static void Pdf_EndFinal(object sender, MarkupToPDF.EndFinalEventArgs e)
78
        {
79

    
80
            //경로 에러가 있음 "\\\\192.168.0.67\\finalpdf\\resulttmpE468.pdf"
81
        }
82
    }
83
}
클립보드 이미지 추가 (최대 크기: 500 MB)