프로젝트

일반

사용자정보

통계
| 브랜치(Branch): | 개정판:

markus / ConvertService / ServiceBase / Markus.Service.StationController / ViewModel / FinalPDFAddDialogViewModel.cs @ 9b2f01e1

이력 | 보기 | 이력해설 | 다운로드 (2.7 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
        DataService.DataServiceClient WcfClient = new DataService.DataServiceClient();
26

    
27
        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
        public async void FinalPDFAdd_OK(object obj)
76
        {
77
            try
78
            {
79
                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

    
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
}
클립보드 이미지 추가 (최대 크기: 500 MB)