markus / FinalService / KCOM_FinalService / ConsoleApp1 / Program.cs @ f714bef8
이력 | 보기 | 이력해설 | 다운로드 (3.49 KB)
1 | 7ca218b3 | KangIngu | 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 | |||
48 | //FINAL_PDF item = _entity.FINAL_PDF.Where(d => d.ID == "ngKwBgMotw8d56dea3839120d").FirstOrDefault(); |
||
49 | f714bef8 | djkim | FINAL_PDF item = _entity.FINAL_PDF.Where(d => d.ID == "f8Gv6hVdw8d6e881c26a4199").FirstOrDefault(); |
50 | 7ca218b3 | KangIngu | //_entity.FINAL_PDF.AddObject(new FINAL_PDF |
51 | //{ |
||
52 | // ID = Guid.NewGuid().ToString(), |
||
53 | // CREATE_DATETIME = DateTime.Now, |
||
54 | // CREATE_USER_ID = "h2011357", |
||
55 | // DOCINFO_ID = "ac77a75e-39d1-1764-eae3-cd252ddf4324", |
||
56 | // DOCUMENT_ID = "11111116", |
||
57 | // MARKUPINFO_ID = "LDEeSHCzVT8d56b76220a8e9e", |
||
58 | // PROJECT_NO = "000000", |
||
59 | // TOTAL_PAGE = 8, |
||
60 | // STATUS = 0, |
||
61 | // CURRENT_PAGE = 1, |
||
62 | //}); |
||
63 | //_entity.SaveChanges(); |
||
64 | |||
65 | MarkupToPDF.MarkupToPDF pdf = new MarkupToPDF.MarkupToPDF(); |
||
66 | pdf.EndFinal += Pdf_EndFinal; |
||
67 | pdf.FinalMakeError += Pdf_FinalMakeError; |
||
68 | //pdf.MakeFinalPDF(_entity.FINAL_PDF.FirstOrDefault()); |
||
69 | pdf.MakeFinalPDF(item); |
||
70 | } |
||
71 | } |
||
72 | |||
73 | private static void Pdf_FinalMakeError(object sender, MarkupToPDF.MakeFinalErrorArgs e) |
||
74 | { |
||
75 | |||
76 | } |
||
77 | |||
78 | private static void Pdf_EndFinal(object sender, MarkupToPDF.EndFinalEventArgs e) |
||
79 | { |
||
80 | |||
81 | //경로 에러가 있음 "\\\\192.168.0.67\\finalpdf\\resulttmpE468.pdf" |
||
82 | } |
||
83 | } |
||
84 | } |