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