markus / FinalServiceV3 / KCOM_FinalService / RefinalDPF / Program.cs @ faf998c6
이력 | 보기 | 이력해설 | 다운로드 (1.59 KB)
1 |
using System; |
---|---|
2 |
using System.Collections.Generic; |
3 |
using System.Linq; |
4 |
using System.Text; |
5 |
using System.Threading.Tasks; |
6 |
|
7 |
namespace RefinalDPF |
8 |
{ |
9 |
class Program |
10 |
{ |
11 |
private static string MarkusConnectionString; |
12 |
|
13 |
static void Main(string[] args) |
14 |
{ |
15 |
Console.WriteLine("Start Any Key"); |
16 |
Console.ReadKey(); |
17 |
|
18 |
service.ServiceDeepViewClient service = new service.ServiceDeepViewClient(); |
19 |
|
20 |
using (Markus.EntityModel.MarkusModel _entity = new Markus.EntityModel.MarkusModel(MarkusConnectionString)) |
21 |
{ |
22 |
var lstFinalPDF =_entity.FINAL_PDF.Where(x => x.STATUS == 105).GroupBy(x=>x.MARKUPINFO_ID).ToList(); |
23 |
|
24 |
foreach (var item in lstFinalPDF) |
25 |
|
26 |
if(item.Count() > 0) |
27 |
{ |
28 |
var firstItem = item.OrderByDescending(x => x.CREATE_DATETIME).First(); |
29 |
|
30 |
var result = service.SetFinalPDF(firstItem.PROJECT_NO, firstItem.DOCINFO_ID, firstItem.MARKUPINFO_ID, firstItem.CREATE_USER_ID); |
31 |
|
32 |
if(result.Exception != null) |
33 |
{ |
34 |
Console.WriteLine(result.Exception); |
35 |
Console.ReadKey(); |
36 |
} |
37 |
else |
38 |
{ |
39 |
Console.WriteLine($"{firstItem.PROJECT_NO}, {firstItem.DOCINFO_ID}, {firstItem.MARKUPINFO_ID}, {firstItem.CREATE_USER_ID}"); |
40 |
Console.ReadKey(); |
41 |
} |
42 |
} |
43 |
} |
44 |
} |
45 |
} |
46 |
} |