markus / ConvertService / ServiceBase / Markus.Service.StationController / ViewModel / FinalPDFAddDialogViewModel.cs @ 9b2f01e1
이력 | 보기 | 이력해설 | 다운로드 (2.7 KB)
1 | 3bde451b | semi | 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 | 037ab674 | semi | DataService.DataServiceClient WcfClient = new DataService.DataServiceClient(); |
26 | |||
27 | 3bde451b | semi | private string _FinalPDFAdd_Project_NO; |
28 | public string FinalPDFAdd_Project_NO |
||
29 | { |
||
30 | get { return _FinalPDFAdd_Project_NO; } |
||
31 | set |
||
32 | { |
||
33 | _FinalPDFAdd_Project_NO = value; |
||
34 | OnPropertyChanged(() => FinalPDFAdd_Project_NO); |
||
35 | } |
||
36 | } |
||
37 | |||
38 | private string _FinalPDFAdd_Document_ID; |
||
39 | public string FinalPDFAdd_Document_ID |
||
40 | { |
||
41 | get { return _FinalPDFAdd_Document_ID; } |
||
42 | set |
||
43 | { |
||
44 | _FinalPDFAdd_Document_ID = value; |
||
45 | OnPropertyChanged(() => FinalPDFAdd_Document_ID); |
||
46 | } |
||
47 | } |
||
48 | |||
49 | private string _FinalPDFAdd_DocInfo_ID; |
||
50 | public string FinalPDFAdd_DocInfo_ID |
||
51 | { |
||
52 | get { return _FinalPDFAdd_DocInfo_ID; } |
||
53 | set |
||
54 | { |
||
55 | _FinalPDFAdd_DocInfo_ID = value; |
||
56 | OnPropertyChanged(() => FinalPDFAdd_DocInfo_ID); |
||
57 | } |
||
58 | } |
||
59 | |||
60 | #endregion |
||
61 | |||
62 | #region Command |
||
63 | |||
64 | public DelegateCommand FinalPDFAdd_OKCommand { get; private set; } |
||
65 | |||
66 | #endregion |
||
67 | |||
68 | #region Fuction |
||
69 | |||
70 | #region ConverAdd_OK |
||
71 | /// <summary> |
||
72 | /// 그리드 상단 Conver 추가 버튼 |
||
73 | /// ProjectNo, DocumentURL, DocumentID, 입력해서 저장 프로시저에서 추가 |
||
74 | /// </summary> |
||
75 | 037ab674 | semi | public async void FinalPDFAdd_OK(object obj) |
76 | 3bde451b | semi | { |
77 | try |
||
78 | { |
||
79 | 037ab674 | semi | string ConverAdd_ID = GuidExtension.shortGuid(); |
80 | var items = await WcfClient.GET_SELECT_CONVERT_INSERTAsync(ConverAdd_ID, FinalPDFAdd_Project_NO, FinalPDFAdd_DocInfo_ID, FinalPDFAdd_Document_ID); |
||
81 | System.Diagnostics.Debug.WriteLine(items); |
||
82 | 3bde451b | semi | |
83 | MessageBox.Show("데이터베이스에 추가 완료! "); |
||
84 | } |
||
85 | catch (Exception ex) |
||
86 | { |
||
87 | MessageBox.Show(ex.ToString()); |
||
88 | } |
||
89 | |||
90 | FinalPDFAdd_Project_NO = null; |
||
91 | FinalPDFAdd_DocInfo_ID = null; |
||
92 | FinalPDFAdd_Document_ID = null; |
||
93 | } |
||
94 | |||
95 | #endregion |
||
96 | |||
97 | #endregion |
||
98 | } |
||
99 | } |