markus / ConvertService / ServiceBase / Markus.Service.StationController / ViewModel / FinalPDFAddDialogViewModel.cs @ 3bde451b
이력 | 보기 | 이력해설 | 다운로드 (2.72 KB)
1 |
using Markus.Service.Extensions; |
---|---|
2 |
using System; |
3 |
using System.Collections.Generic; |
4 |
using System.Linq; |
5 |
using System.Text; |
6 |
using System.Threading.Tasks; |
7 |
using System.Windows; |
8 |
using Telerik.Windows.Controls; |
9 |
|
10 |
namespace Markus.Service.StationController.ViewModel |
11 |
{ |
12 |
class FinalPDFAddDialogViewModel : Mvvm.ToolKit.ViewModelBase |
13 |
{ |
14 |
#region Construrtor |
15 |
|
16 |
public FinalPDFAddDialogViewModel() |
17 |
{ |
18 |
FinalPDFAdd_OKCommand = new DelegateCommand(FinalPDFAdd_OK); |
19 |
} |
20 |
|
21 |
#endregion |
22 |
|
23 |
#region Propertise |
24 |
|
25 |
private string _FinalPDFAdd_Project_NO; |
26 |
public string FinalPDFAdd_Project_NO |
27 |
{ |
28 |
get { return _FinalPDFAdd_Project_NO; } |
29 |
set |
30 |
{ |
31 |
_FinalPDFAdd_Project_NO = value; |
32 |
OnPropertyChanged(() => FinalPDFAdd_Project_NO); |
33 |
} |
34 |
} |
35 |
|
36 |
private string _FinalPDFAdd_Document_ID; |
37 |
public string FinalPDFAdd_Document_ID |
38 |
{ |
39 |
get { return _FinalPDFAdd_Document_ID; } |
40 |
set |
41 |
{ |
42 |
_FinalPDFAdd_Document_ID = value; |
43 |
OnPropertyChanged(() => FinalPDFAdd_Document_ID); |
44 |
} |
45 |
} |
46 |
|
47 |
private string _FinalPDFAdd_DocInfo_ID; |
48 |
public string FinalPDFAdd_DocInfo_ID |
49 |
{ |
50 |
get { return _FinalPDFAdd_DocInfo_ID; } |
51 |
set |
52 |
{ |
53 |
_FinalPDFAdd_DocInfo_ID = value; |
54 |
OnPropertyChanged(() => FinalPDFAdd_DocInfo_ID); |
55 |
} |
56 |
} |
57 |
|
58 |
#endregion |
59 |
|
60 |
#region Command |
61 |
|
62 |
public DelegateCommand FinalPDFAdd_OKCommand { get; private set; } |
63 |
|
64 |
#endregion |
65 |
|
66 |
#region Fuction |
67 |
|
68 |
#region ConverAdd_OK |
69 |
/// <summary> |
70 |
/// 그리드 상단 Conver 추가 버튼 |
71 |
/// ProjectNo, DocumentURL, DocumentID, 입력해서 저장 프로시저에서 추가 |
72 |
/// </summary> |
73 |
public void FinalPDFAdd_OK(object obj) |
74 |
{ |
75 |
|
76 |
try |
77 |
{ |
78 |
|
79 |
using (markusEntities entities = new markusEntities()) |
80 |
{ |
81 |
string ConverAdd_ID = GuidExtension.shortGuid(); |
82 |
var items = entities.SELECT_FINAL_PDF_INSERT(ConverAdd_ID, FinalPDFAdd_Project_NO, FinalPDFAdd_DocInfo_ID, FinalPDFAdd_Document_ID); |
83 |
System.Diagnostics.Debug.WriteLine(items); |
84 |
|
85 |
} |
86 |
MessageBox.Show("데이터베이스에 추가 완료! "); |
87 |
} |
88 |
catch (Exception ex) |
89 |
{ |
90 |
MessageBox.Show(ex.ToString()); |
91 |
} |
92 |
|
93 |
FinalPDFAdd_Project_NO = null; |
94 |
FinalPDFAdd_DocInfo_ID = null; |
95 |
FinalPDFAdd_Document_ID = null; |
96 |
|
97 |
|
98 |
} |
99 |
|
100 |
#endregion |
101 |
|
102 |
#endregion |
103 |
} |
104 |
} |