프로젝트

일반

사용자정보

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

markus / ConvertService / ServiceBase / Markus.Service.StationController / ViewModel / ConvertAddDialogViewModel.cs @ 8c128693

이력 | 보기 | 이력해설 | 다운로드 (2.71 KB)

1
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
        private string _ConverAdd_Project_NO;
28
        public string ConverAdd_Project_NO
29
        {
30
            get { return _ConverAdd_Project_NO; }
31
            set
32
            {
33
                _ConverAdd_Project_NO = value;
34
                OnPropertyChanged(() => ConverAdd_Project_NO);
35
            }
36
        }
37

    
38
        private string _ConverAdd_DOCUMENT_ID;
39
        public string ConverAdd_DOCUMENT_ID
40
        {
41
            get { return _ConverAdd_DOCUMENT_ID; }
42
            set
43
            {
44
                _ConverAdd_DOCUMENT_ID = value;
45
                OnPropertyChanged(() => ConverAdd_DOCUMENT_ID);
46
            }
47
        }
48

    
49
        private string _ConverAdd_DOCUMENT_URL;
50
        public string ConverAdd_DOCUMENT_URL
51
        {
52
            get { return _ConverAdd_DOCUMENT_URL; }
53
            set
54
            {
55
                _ConverAdd_DOCUMENT_URL = value;
56
                OnPropertyChanged(() => ConverAdd_DOCUMENT_URL);
57
            }
58
        }
59

    
60
        #endregion
61

    
62
        #region Command
63

    
64
        public DelegateCommand ConverAdd_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 void ConverAdd_OK(object obj)
76
        {
77

    
78
            try
79
            {
80

    
81
                using (markusEntities entities = new markusEntities())
82
                {
83
                    string ConverAdd_ID = GuidExtension.shortGuid();
84
                    var items = entities.SELECT_CONVERT_INSERT(ConverAdd_ID, ConverAdd_Project_NO, ConverAdd_DOCUMENT_URL, ConverAdd_DOCUMENT_ID);
85
                    System.Diagnostics.Debug.WriteLine(items);
86

    
87
                }
88
                MessageBox.Show("데이터베이스에 추가 완료! ");
89
            }
90
            catch (Exception ex)
91
            {
92
                MessageBox.Show(ex.ToString());
93
            }
94

    
95
            ConverAdd_Project_NO = null;
96
            ConverAdd_DOCUMENT_ID = null;
97
            ConverAdd_DOCUMENT_URL = null;
98

    
99
        }
100

    
101
        #endregion
102

    
103
        #endregion
104
    }
105
}
클립보드 이미지 추가 (최대 크기: 500 MB)