프로젝트

일반

사용자정보

개정판 95e7bd84

ID95e7bd8431fcf028c86da386202c28ff956b654e
상위 cdb2c0a2
하위 ad3c4ac3

semi 이(가) 4년 이상 전에 추가함

수정사항 & Add Dialog validation 하는 중

Change-Id: Id53bbd718ea1cc5aebfc97f0216fe6a3f464ee00

차이점 보기:

ConvertService/ServiceBase/Markus.Service.StationController/Controls/DatabaseFilter.xaml
19 19
            <RowDefinition />
20 20
            <RowDefinition />
21 21
        </Grid.RowDefinitions>
22
        <Grid Grid.Row="0">
22
        <Grid Grid.Row="0" >
23 23
            <Grid.RowDefinitions>
24
                <RowDefinition Height="10"/>
24 25
                <RowDefinition />
26
                <RowDefinition Height="10"/>
25 27
                <RowDefinition />
26
                <RowDefinition/>
28
                <RowDefinition Height="10" />
29
                <RowDefinition />
30
                <RowDefinition Height="10" />
27 31
            </Grid.RowDefinitions>
28 32
            <Grid.ColumnDefinitions>
29 33
                <ColumnDefinition Width="Auto"/>
......
39 43
                <ColumnDefinition Width="*"/>
40 44
            </Grid.ColumnDefinitions>
41 45

  
42
            <TextBlock Text="Project Number  " Grid.Row="0" Grid.Column="0" VerticalAlignment="Center" HorizontalAlignment="Left"/>
43
            <telerik:RadComboBox Grid.Row="0" Grid.Column="1" Height="22" HorizontalAlignment="Stretch"
46
            <TextBlock Text="Project Number  " Grid.Row="1" Grid.Column="0" VerticalAlignment="Center" HorizontalAlignment="Left"/>
47
            <telerik:RadComboBox Grid.Row="1" Grid.Column="1" Height="22" HorizontalAlignment="Stretch"
44 48
                                         DisplayMemberPath="Project_NOAndProject_Name"
45 49
                                         ItemsSource="{Binding ProjectNames}" 
46 50
                                         SelectedItem="{Binding ProjectNumberFilter}"
47 51
                                         AllowMultipleSelection="False"
48 52
                                         EmptyText="Project_NO : Project_Name"/>
49
            <TextBlock Text="Unique Key  " Grid.Row="0" Grid.Column="3" VerticalAlignment="Center" HorizontalAlignment="Left"/>
53
            <TextBlock Text="Unique Key  " Grid.Row="1" Grid.Column="3" VerticalAlignment="Center" HorizontalAlignment="Left"/>
50 54
            <telerik:RadMaskedTextInput IsClearButtonVisible="True" maskedInput:MaskedInputExtensions.MaxTextLength="1000"
51 55
         EmptyContent="UniqueKey" Value="{Binding UniqueKeyFilter, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}"
52
         TextMode="PlainText" Grid.Row="0" Grid.Column="4" Mask=""
56
         TextMode="PlainText" Grid.Row="1" Grid.Column="4" Mask=""
53 57
         HorizontalAlignment="Stretch"
54 58
         VerticalAlignment="Center" Margin="2,0"/>
55 59

  
56
            <TextBlock Text="Service ID  " Grid.Row="0" Grid.Column="6"   VerticalAlignment="Center" HorizontalAlignment="Left"/>
60
            <TextBlock Text="Service ID  " Grid.Row="1" Grid.Column="6"   VerticalAlignment="Center" HorizontalAlignment="Left"/>
57 61
            <telerik:RadMaskedTextInput IsClearButtonVisible="True" maskedInput:MaskedInputExtensions.MaxTextLength="1000"
58 62
         EmptyContent="Service ID" Value="{Binding Service_IDFilter, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}"
59
         TextMode="PlainText" Grid.Row="0" Grid.Column="7" Mask=""
63
         TextMode="PlainText" Grid.Row="1" Grid.Column="7" Mask=""
60 64
         HorizontalAlignment="Stretch"
61 65
         VerticalAlignment="Center" Margin="2,0"/>
62 66

  
63
            <TextBlock Text="Revision  " Grid.Row="0" Grid.Column="9" VerticalAlignment="Center"  HorizontalAlignment="Left"/>
67
            <TextBlock Text="Revision  " Grid.Row="1" Grid.Column="9" VerticalAlignment="Center"  HorizontalAlignment="Left"/>
64 68
            <telerik:RadMaskedTextInput IsClearButtonVisible="True" maskedInput:MaskedInputExtensions.MaxTextLength="1000"
65 69
         EmptyContent="Revision" Value="{Binding RevisionFilter, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}"
66
         TextMode="PlainText" Grid.Row="0" Grid.Column="10" Mask=""
70
         TextMode="PlainText" Grid.Row="1" Grid.Column="10" Mask=""
67 71
         HorizontalContentAlignment="Stretch"
68 72
         VerticalAlignment="Center" HorizontalAlignment="Stretch" Margin="2,0"/>
69 73

  
70
            <TextBlock Text="Docuemnt Name  " Grid.Row="1" Grid.Column="0" VerticalAlignment="Center" HorizontalAlignment="Left"/>
74
            <TextBlock Text="Docuemnt Name  " Grid.Row="3" Grid.Column="0" VerticalAlignment="Center" HorizontalAlignment="Left"/>
71 75
            <telerik:RadMaskedTextInput IsClearButtonVisible="True" maskedInput:MaskedInputExtensions.MaxTextLength="1000"
72 76
         EmptyContent="Docuemnt Name" Value="{Binding Document_NameFilter , UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}"
73
         TextMode="PlainText" Grid.Row="1" Grid.Column="1" Mask=""
77
         TextMode="PlainText" Grid.Row="3" Grid.Column="1" Mask=""
74 78
         HorizontalContentAlignment="Stretch"
75 79
         VerticalAlignment="Center" HorizontalAlignment="Stretch" Margin="2,0"/>
76 80

  
77
            <TextBlock Text="Docuemnt NO  " Grid.Row="1" Grid.Column="3"  VerticalAlignment="Center" HorizontalAlignment="Left"/>
81
            <TextBlock Text="Docuemnt NO  " Grid.Row="3" Grid.Column="3"  VerticalAlignment="Center" HorizontalAlignment="Left"/>
78 82
            <telerik:RadMaskedTextInput IsClearButtonVisible="True" maskedInput:MaskedInputExtensions.MaxTextLength="1000"
79 83
         EmptyContent="Docuemnt NO" Value="{Binding Docuemnt_NOFilter , UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}"
80
         TextMode="PlainText" Grid.Row="1" Grid.Column="4" Mask=""
84
         TextMode="PlainText" Grid.Row="3" Grid.Column="4" Mask=""
81 85
         HorizontalAlignment="Stretch"
82 86
         VerticalAlignment="Center" Margin="2,0"/>
83 87

  
84
            <TextBlock Text="Reconverter " Grid.Row="1" Grid.Column="6"  VerticalAlignment="Center" HorizontalAlignment="Left"/>
88
            <TextBlock Text="Reconverter " Grid.Row="3" Grid.Column="6"  VerticalAlignment="Center" HorizontalAlignment="Left"/>
85 89
            <telerik:RadMaskedTextInput IsClearButtonVisible="True" maskedInput:MaskedInputExtensions.MaxTextLength="1000"
86 90
         EmptyContent="Reconverter"  Value="{Binding ReconverterFilter, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}"
87
         TextMode="PlainText" Grid.Row="1" Grid.Column="7" Mask=""
91
         TextMode="PlainText" Grid.Row="3" Grid.Column="7" Mask=""
88 92
         HorizontalAlignment="Stretch"
89 93
         VerticalAlignment="Center" Margin="2,0"/>
90 94

  
91
            <TextBlock Text="Group NO " Grid.Row="1" Grid.Column="9"  VerticalAlignment="Center" HorizontalAlignment="Left"/>
95
            <TextBlock Text="Group NO " Grid.Row="3" Grid.Column="9"  VerticalAlignment="Center" HorizontalAlignment="Left"/>
92 96
            <telerik:RadMaskedTextInput IsClearButtonVisible="True" maskedInput:MaskedInputExtensions.MaxTextLength="1000"
93 97
         EmptyContent="Group NO"  Value="{Binding GroupNOFilter, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}"
94
         TextMode="PlainText" Grid.Row="1" Grid.Column="10" Mask=""
98
         TextMode="PlainText" Grid.Row="3" Grid.Column="10" Mask=""
95 99
         HorizontalAlignment="Stretch"
96 100
         VerticalAlignment="Center" Margin="2,0"/>
97 101

  
98
            <TextBlock Text="Document_URL " Grid.Row="2" Grid.Column="0"  VerticalAlignment="Center" HorizontalAlignment="Left"/>
102
            <TextBlock Text="Document_URL " Grid.Row="5" Grid.Column="0"  VerticalAlignment="Center" HorizontalAlignment="Left"/>
99 103
            <telerik:RadMaskedTextInput IsClearButtonVisible="True"  maskedInput:MaskedInputExtensions.MaxTextLength="1000"
100 104
         EmptyContent="DOCUMENT_URL"  Value="{Binding DOCUMENT_URLFilter, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}"
101
         TextMode="PlainText" Grid.Row="2" Grid.Column="1" Grid.ColumnSpan="11" Mask=""
105
         TextMode="PlainText" Grid.Row="5" Grid.Column="1" Grid.ColumnSpan="11" Mask=""
102 106
         HorizontalAlignment="Stretch"
103 107
         VerticalAlignment="Center" Margin="2,0"/>
104 108
        </Grid>
ConvertService/ServiceBase/Markus.Service.StationController/Data/ConvertCOUNT.cs
25 25

  
26 26
        }
27 27

  
28
        public ConvertCOUNT(string projectNO, int count, int exception_count)
28
        public ConvertCOUNT(string projectNO, double count, double exception_count)
29 29
        {
30 30
            Project_NO = projectNO;
31 31
            Count = count;
32 32
            ExceptionCount = exception_count;
33
            StringCount = count + " / ";
33 34
        }
34 35

  
35 36
        private string _Project_NO;
......
81 82
                    OnPropertyChanged("Count");
82 83
                }
83 84
            }
84
        }  
85
        }
85 86

  
86 87

  
88
        private string  _StringCount;
89
        public string StringCount
90
        {
91
            get
92
            {
93
                return _StringCount;
94
            }
95
            set
96
            {
97
                if (_StringCount != value)
98
                {
99
                    _StringCount = value;
100
                    OnPropertyChanged("StringCount");
101
                }
102
            }
103
        }
87 104

  
88 105
    }
89 106
}
ConvertService/ServiceBase/Markus.Service.StationController/Data/ConvertPDF.cs
67 67
            OriginfilePath = originfilePath;
68 68
            ReConverter = reconverter;
69 69

  
70
            TimeSpan duration = TimeSpan.MinValue;
71
            if (EndTime.HasValue)
72
            {
73
                duration = EndTime.Value - CreateTime;
74
            }
75
            if (duration != TimeSpan.MinValue)
76
            {
77
                TotalTime = duration.ToString();
78
            }
79

  
70 80
            string result = "";
71 81
            if (originfilePath.Contains("/"))
72 82
            {
......
187 197
            }
188 198
        }
189 199

  
200
        private string _TotalTime;
201
        public string TotalTime
202
        {
203
            get
204
            {
205
                return _TotalTime;
206
            }
207
            set
208
            {
209
                if (_TotalTime != value)
210
                {
211
                    _TotalTime = value;
212
                    OnPropertyChanged("TotalTime");
213

  
214
                }
215
            }
216
        }
217

  
190 218
        private DateTime? _StartTime;
191 219
        public DateTime? StartTime
192 220
        {
ConvertService/ServiceBase/Markus.Service.StationController/Data/FinalPDF.cs
56 56
            MarkusLink = markusLink;
57 57
            OriginfilePath = originfilePath;
58 58

  
59
            TimeSpan duration = TimeSpan.MinValue;
60
            if (EndTime.HasValue)
61
            {
62
                duration = EndTime.Value - CreateTime;
63
            }
64
            if (duration != TimeSpan.MinValue)
65
            {
66
                TotalTime = duration.ToString();
67
            }
68

  
59 69
            if (OriginfilePath != null)
60 70
            {
61 71
                string result = "";
......
198 208
            }
199 209
        }
200 210

  
211
        private string _TotalTime;
212
        public string TotalTime
213
        {
214
            get
215
            {
216
                return _TotalTime;
217
            }
218
            set
219
            {
220
                if (_TotalTime != value)
221
                {
222
                    _TotalTime = value;
223
                    OnPropertyChanged("TotalTime");
224

  
225
                }
226
            }
227
        }
228

  
201 229
        private DateTime? _EndTime;
202 230
        public DateTime? EndTime
203 231
        {
ConvertService/ServiceBase/Markus.Service.StationController/Data/FinalPDFCOUNT.cs
25 25

  
26 26
        }
27 27

  
28
        public FinalPDFCOUNT(string projectNO, int count, int exception_count)
28
        public FinalPDFCOUNT(string projectNO, double count, double exception_count)
29 29
        {
30 30
            Project_NO = projectNO;
31 31
            Count = count;
32 32
            ExceptionCount = exception_count;
33
            StringCount = count + " / ";
33 34
        }
34 35

  
35 36
        private string _Project_NO;
......
82 83
                }
83 84
            }
84 85
        }
86

  
87

  
88
        private string _StringCount;
89
        public string StringCount
90
        {
91
            get
92
            {
93
                return _StringCount;
94
            }
95
            set
96
            {
97
                if (_StringCount != value)
98
                {
99
                    _StringCount = value;
100
                    OnPropertyChanged("StringCount");
101
                }
102
            }
103
        }
85 104
    }
86 105
}
ConvertService/ServiceBase/Markus.Service.StationController/ViewModel/ConvertAddDialogViewModel.cs
8 8
using Microsoft.Win32;
9 9
using Markus.Service.Extensions;
10 10
using System.Windows;
11
using System.Windows.Controls;
12
using System.ComponentModel;
11 13

  
12 14
namespace Markus.Service.StationController.ViewModel
13 15
{
14
    class ConvertAddDialogViewModel : Mvvm.ToolKit.ViewModelBase
16
    class ConvertAddDialogViewModel : Mvvm.ToolKit.ViewModelBase, IDataErrorInfo
15 17
    {
16 18
        #region Construrtor
17 19

  
......
22 24

  
23 25
        #endregion
24 26

  
27
        #region IDataErrorInfo Members
28

  
29
        public string Error
30
        {
31
            get { throw new NotImplementedException(); }
32
        }
33

  
34
        public string this[string columnName]
35
        {
36
            get
37
            {
38
                string result = null;
39
                if (string.IsNullOrEmpty(ConverAdd_Project_NO))
40
                {
41
                    if (string.IsNullOrEmpty(ConverAdd_Project_NO))
42
                        result = "Please enter a Project NO";
43
                }
44
                if (columnName == "ConverAdd_DOCUMENT_ID")
45
                {
46
                    if (string.IsNullOrEmpty(ConverAdd_DOCUMENT_ID))
47
                        result = "Please enter a DOCUMENT ID";
48
                }
49
                if (columnName == "ConverAdd_DOCUMENT_URL")
50
                {
51
                    if (string.IsNullOrEmpty(ConverAdd_DOCUMENT_URL))
52
                        result = "Please enter a DOCUMENT URL";
53
                }
54
                return result;
55
            }
56
        }
57

  
58
        #endregion
59

  
25 60
        #region Propertise
26 61

  
27 62
        DataService.DataServiceClient WcfClient = new DataService.DataServiceClient();
......
32 67
            get { return _ConverAdd_Project_NO; }
33 68
            set
34 69
            {
35
                _ConverAdd_Project_NO = value;
36
                OnPropertyChanged(() => ConverAdd_Project_NO);
70
                if (_ConverAdd_Project_NO != value)
71
                {
72
                    _ConverAdd_Project_NO = value;
73
                    OnPropertyChanged(() => ConverAdd_Project_NO);
74
                }
37 75
            }
38 76
        }
39 77

  
......
43 81
            get { return _ConverAdd_DOCUMENT_ID; }
44 82
            set
45 83
            {
46
                _ConverAdd_DOCUMENT_ID = value;
47
                OnPropertyChanged(() => ConverAdd_DOCUMENT_ID);
84
                if (_ConverAdd_DOCUMENT_ID != value)
85
                {
86
                    _ConverAdd_DOCUMENT_ID = value;
87
                    OnPropertyChanged(() => ConverAdd_DOCUMENT_ID);
88
                }
48 89
            }
49 90
        }
50 91

  
......
54 95
            get { return _ConverAdd_DOCUMENT_URL; }
55 96
            set
56 97
            {
57
                _ConverAdd_DOCUMENT_URL = value;
58
                OnPropertyChanged(() => ConverAdd_DOCUMENT_URL);
98
                if (_ConverAdd_DOCUMENT_URL != value)
99
                {
100
                    _ConverAdd_DOCUMENT_URL = value;
101
                    OnPropertyChanged(() => ConverAdd_DOCUMENT_URL);
102
                }
103
            }
104
        }
105

  
106
        private bool _Bool_Project_NO;
107
        public bool Bool_Project_NO
108
        {
109
            get { return _Bool_Project_NO; }
110
            set
111
            {
112
                _Bool_Project_NO = value;
113
                OnPropertyChanged(() => Bool_Project_NO);
114

  
115
            }
116
        }
117

  
118
        private bool _Bool_DOCUMENT_ID;
119
        public bool Bool_DOCUMENT_ID
120
        {
121
            get { return _Bool_DOCUMENT_ID; }
122
            set
123
            {
124
                _Bool_DOCUMENT_ID = value;
125
                OnPropertyChanged(() => Bool_DOCUMENT_ID);
59 126
            }
60 127
        }
61 128

  
......
76 143
        /// </summary>
77 144
        public async void ConverAdd_OK(object obj)
78 145
        {
79

  
80
            try
146
            if (String.IsNullOrEmpty(ConverAdd_Project_NO) || String.IsNullOrEmpty(ConverAdd_DOCUMENT_URL)|| String.IsNullOrEmpty(ConverAdd_DOCUMENT_ID) )
81 147
            {
82
                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

  
86
                MessageBox.Show("데이터베이스에 추가 완료! ");
148
                if (String.IsNullOrEmpty(ConverAdd_Project_NO))
149
                {
150
                    ConverAdd_Project_NO = "Project_NOisEmpty";
151
                }
152
                if (String.IsNullOrEmpty(ConverAdd_DOCUMENT_URL))
153
                {
154
                    ConverAdd_DOCUMENT_URL = "DOCUMENT_URLisEmpty";
155
                }
156
                if (String.IsNullOrEmpty(ConverAdd_DOCUMENT_ID))
157
                {
158
                    ConverAdd_DOCUMENT_ID = "DOCUMENT_IDisEmpty";
159
                }
87 160
            }
88
            catch (Exception ex)
161
            else
89 162
            {
90
                MessageBox.Show(ex.ToString());
163
                try
164
                {
165
                    string ConverAdd_ID = GuidExtension.shortGuid();
166
                    var items = await WcfClient.GET_SELECT_CONVERT_INSERTAsync(ConverAdd_ID, ConverAdd_Project_NO, ConverAdd_DOCUMENT_URL, ConverAdd_DOCUMENT_ID);
167
                    System.Diagnostics.Debug.WriteLine(items);
168

  
169
                    MessageBox.Show("데이터베이스에 추가 완료! ");
170
                }
171
                catch (Exception ex)
172
                {
173
                    MessageBox.Show(ex.ToString());
174
                }
175

  
176
                ConverAdd_Project_NO = null;
177
                ConverAdd_DOCUMENT_ID = null;
178
                ConverAdd_DOCUMENT_URL = null;
91 179
            }
92

  
93
            ConverAdd_Project_NO = null;
94
            ConverAdd_DOCUMENT_ID = null;
95
            ConverAdd_DOCUMENT_URL = null;
96

  
97 180
        }
98 181

  
99 182
        #endregion
100 183

  
101 184
        #endregion
102 185
    }
103
}
186
    public class NameValidator : ValidationRule
187
    {
188
        public override ValidationResult Validate(object value, System.Globalization.CultureInfo cultureInfo)
189
        {
190
            if (value == null)
191
                return new ValidationResult(false, "value cannot be empty.");
192

  
193
            return ValidationResult.ValidResult;
194
        }
195
    }
196
}
ConvertService/ServiceBase/Markus.Service.StationController/ViewModel/DashBoardViewModel.cs
14 14
using System.Windows.Threading;
15 15
using ConverCOUNT = Markus.Service.StationController.Data.ConvertCOUNT;
16 16
using System.Collections.ObjectModel;
17
using System.ComponentModel;
18
using System.Windows.Data;
19
using System.Diagnostics;
20
using Microsoft.Win32;
21
using System.Windows.Controls;
17 22

  
18 23
namespace Markus.Service.StationController.ViewModel
19 24
{
......
25 30
        public DashBoardViewModel()
26 31
        {
27 32
            RemoveCreateTimeFilterCommand = new DelegateCommand(RemoveCreateTimeFilter);
33
            ConvertPDFMarkusLinkCommand = new DelegateCommand(ConvertPDFMarkusLink);
34
            FinalPDFMarkusLinkCommand = new DelegateCommand(FinalPDFMarkusLink);
35
            ConvertPathFileSearchCommand = new DelegateCommand(ConvertPathFileSearch);
28 36
        }
29 37

  
30 38
        #endregion
......
161 169
            }
162 170
        }
163 171

  
172
        public ICollectionView DashBoard_Convert
173
        {
174
            get
175
            {
176
                var view = CollectionViewSource.GetDefaultView(ConvertView);
177
                return view;
178
            }
179
        }
180

  
181
        private System.Collections.ObjectModel.ObservableCollection<ConvertPDF> _ConvertView;
182
        public System.Collections.ObjectModel.ObservableCollection<ConvertPDF> ConvertView
183
        {
184
            get
185
            {
186
                if (_ConvertView == null)
187
                {
188
                    _ConvertView = new System.Collections.ObjectModel.ObservableCollection<ConvertPDF>();
189
                }
190
                return _ConvertView;
191
            }
192
            set
193
            {
194
                _ConvertView = value;
195
                OnPropertyChanged(() => ConvertView);
196
            }
197
        }
198

  
199
        public ICollectionView DashBoard_FinalPDF
200
        {
201
            get
202
            {
203
                var view = CollectionViewSource.GetDefaultView(FinalPDFView);
204
                return view;
205
            }
206
        }
207

  
208
        private System.Collections.ObjectModel.ObservableCollection<FinalPDF> _FinalPDFView;
209
        public System.Collections.ObjectModel.ObservableCollection<FinalPDF> FinalPDFView
210
        {
211
            get
212
            {
213
                if (_FinalPDFView == null)
214
                {
215
                    _FinalPDFView = new System.Collections.ObjectModel.ObservableCollection<FinalPDF>();
216
                }
217
                return _FinalPDFView;
218
            }
219
            set
220
            {
221
                _FinalPDFView = value;
222
                OnPropertyChanged(() => FinalPDFView);
223
            }
224
        }
225

  
226
        private ObservableCollection<FinalPDF> _SelectedFinalPDFList;
227
        public ObservableCollection<FinalPDF> SelectedFinalPDFList
228
        {
229
            get
230
            {
231
                if (_SelectedFinalPDFList == null)
232
                {
233
                    _SelectedFinalPDFList = new ObservableCollection<FinalPDF>();
234
                }
235
                return _SelectedFinalPDFList;
236
            }
237
            set
238
            {
239
                _SelectedFinalPDFList = value;
240
                OnPropertyChanged(() => SelectedFinalPDFList);
241
            }
242
        }
243

  
244
        private ObservableCollection<ConvertPDF> _SelectedConvertList;
245
        public ObservableCollection<ConvertPDF> SelectedConvertList
246
        {
247
            get
248
            {
249
                if (_SelectedConvertList == null)
250
                {
251
                    _SelectedConvertList = new ObservableCollection<ConvertPDF>();
252
                }
253
                return _SelectedConvertList;
254
            }
255
            set
256
            {
257
                _SelectedConvertList = value;
258
                OnPropertyChanged(() => SelectedConvertList);
259
            }
260
        }
164 261
        #endregion
165 262

  
166 263
        #region Command
167 264

  
168 265
        public DelegateCommand RemoveCreateTimeFilterCommand { get; private set; }
266
        public DelegateCommand ConvertPDFMarkusLinkCommand { get; private set; }
267
        public DelegateCommand FinalPDFMarkusLinkCommand { get; private set; }
268
        public DelegateCommand ConvertPathFileSearchCommand { get; private set; }
169 269

  
170 270
        #endregion
171 271

  
......
221 321

  
222 322
        #region Function
223 323

  
324
        #region ConvertPathFileSearch
325

  
326
        /// <summary>
327
        ///  ConvertPath 파일 탐색기로 열리는 아이콘
328
        /// </summary>
329

  
330
        public void ConvertPathFileSearch(object obj)
331
        {
332
            if (obj is ConvertPDF)
333
            {
334
                if (obj != null)
335
                {
336
                    var convertitem = obj as ConvertPDF;
337

  
338
                    if (!string.IsNullOrEmpty(convertitem.ConvertPath))
339
                    {
340
                        System.Diagnostics.Process.Start("explorer.exe", convertitem.ConvertPath);
341
                    }
342
                }
343
            }
344
        }
345

  
346
        #endregion
347

  
348
        #region FinalPDFPathFileSearch
349

  
350
        /// <summary>
351
        ///  ConvertPath 파일 탐색기로 열리는 아이콘
352
        /// </summary>
353

  
354
        public void FinalPDFPathFileSearch(object obj)
355
        {
356
            if (obj is FinalPDF)
357
            {
358
                if (obj != null)
359
                {
360
                    var convertitem = obj as FinalPDF;
361

  
362
                    SaveFileDialog saveFileDialog = new SaveFileDialog();
363

  
364
                    saveFileDialog.FileName = "Document"; // Default file name
365
                    saveFileDialog.DefaultExt = ".txt"; // Default file extension
366
                    saveFileDialog.Filter = "Csv documents (.Csv)|*.csv|Excel(2017~2019)Worksheets|*.xlsx"; // Filter files by extension
367

  
368

  
369
                    if (saveFileDialog.ShowDialog() == true)
370
                    {
371
                    }
372
                }
373
            }
374
        }
375

  
376
        #endregion
377

  
378
        #region MarkusLink
379

  
380
        private void ConvertPDFMarkusLink(object obj)
381
        {
382
            if (obj is ConvertPDF)
383
            {
384

  
385
                if (obj != null)
386
                {
387
                    var convertitem = obj as ConvertPDF;
388

  
389
                    SelectedConvertList.Add(convertitem);
390

  
391
                    ProcessStartInfo startInfo = null;
392

  
393
                    startInfo = new ProcessStartInfo("iexplore.exe", convertitem.MarkusLink);
394

  
395
                    Process.Start(startInfo);
396
                }
397

  
398
            }
399
        }
400

  
401
        private void FinalPDFMarkusLink(object obj)
402
        {
403
            if (obj is FinalPDF)
404
            {
405

  
406
                if (obj != null)
407
                {
408
                    var convertitem = obj as FinalPDF;
409

  
410
                    SelectedFinalPDFList.Add(convertitem);
411

  
412
                    ProcessStartInfo startInfo = null;
413

  
414
                    startInfo = new ProcessStartInfo("iexplore.exe", convertitem.MarkusLink);
415

  
416
                    Process.Start(startInfo);
417
                }
418

  
419
            }
420
        }
421

  
422
        #endregion
423

  
424

  
224 425
        #region RemoveCreateTimeFilter
225 426

  
226 427
        public void RemoveCreateTimeFilter(object obj)
......
240 441
        /// </summary>
241 442
        private void DataSelect()
242 443
        {
444
            if (ConvertView == null)
445
            {
446
               ConvertView = new System.Collections.ObjectModel.ObservableCollection<ConvertPDF>();
447
            }
448

  
449
            ConvertView_DataSelect(new[] { (ConvertPDF.StatusCodeType)(SelectedStatus.Value) }, ConvertView);
450

  
451
            if (FinalPDFView == null)
452
            {
453
                FinalPDFView = new System.Collections.ObjectModel.ObservableCollection<FinalPDF>();
454
            }
455

  
456
            FinalPDFView_DataSelect(new[] { (FinalPDF.StatusCodeType)(SelectedStatus.Value) }, FinalPDFView);
457

  
243 458
            if (ConvertCOUNTDashBoard == null)
244 459
            {
245 460
                ConvertCOUNTDashBoard = new ObservableCollection<ConvertCOUNT>();
......
252 467
            if (SelectedStatus != null)
253 468
            {
254 469
                ConvertDataSelect(new[] { (ConvertPDF.StatusCodeType)(SelectedStatus.Value) }, ConvertCOUNTDashBoard);
255
                FinalPDFDataSelect(new[] { (ConvertPDF.StatusCodeType)(SelectedStatus.Value) }, FinalPDFCOUNTDashBoard);
470
                FinalPDFDataSelect(new[] { (FinalPDF.StatusCodeType)(SelectedStatus.Value) }, FinalPDFCOUNTDashBoard);
471
            }
472
        }
473

  
474
        private async void FinalPDFView_DataSelect(IEnumerable<FinalPDF.StatusCodeType> statusCodeTypeList, System.Collections.ObjectModel.ObservableCollection<FinalPDF> collection)
475
        {
476
            try
477
            {
478
                int _status = 0;
479
                if (SelectedStatus != null)
480
                {
481
                    _status = (int)SelectedStatus.Value;
482
                }
483

  
484
                var Listitems = from x in await WcfClient.GET_SELECT_FINAL_PDF_ITEMAsync(null, null, null, null, null, null, null, null, _status, 5, null, null, null, null, null, null, null, null, null, null)
485
                                let MarkusLink = "kcom://" + CreateMarkusParam(x.ID, x.DOCUMENT_ID, "doftech")
486
                                select new FinalPDF(x.ID, x.PROJECT_NO, x.STATUS, x.DOCUMENT_ID, x.MARKUPINFO_ID, x.DOCINFO_ID, x.DOCUMENT_NAME, x.DOCUMENT_NO, x.CREATE_USER_ID,
487
                        x.REVISION, x.CURRENT_PAGE, x.TOTAL_PAGE, x.EXCEPTION, x.GROUP_NO, x.CREATE_DATETIME, x.START_DATETIME, x.END_DATETIME
488
                     , x.ORIGINAL_FILE, x.CONVERT_PATH, MarkusLink);
489

  
490
                if (collection.Count() == 0)
491
                {
492
                    if (statusCodeTypeList.Count() == 1)
493
                    {
494
                        foreach (var x in Listitems)
495
                        {
496
                            collection.Add(x);
497
                        }
498
                    }
499
                }
500
                else
501
                {
502
                    foreach (var newitem in Listitems)
503
                    {
504
                        collection.UpdateWhere(changeitem =>
505
                        ConvertItemEx.ChangeValues(changeitem, newitem), x => x.ProjectNumber == newitem.ProjectNumber && x.ConvertID == newitem.ConvertID);
506
                    }
507

  
508
                    if (statusCodeTypeList.Count() == 1)
509
                    {
510
                        for (int i = collection.Count() - 1; i >= 0; --i)
511
                        {
512
                            var item = collection[i];
513

  
514
                            if (Listitems.Count(x => x.ConvertID == item.ConvertID && x.ProjectNumber == item.ProjectNumber) == 0)
515
                            {
516
                                collection.RemoveAt(i);
517
                            }
518
                        }
519
                    }
520

  
521
                    if (statusCodeTypeList.Count() == 1)
522
                    {
523
                        foreach (var item in Listitems)
524
                        {
525
                            if (collection.Count(x => x.ConvertID == item.ConvertID && x.ProjectNumber == item.ProjectNumber) == 0)
526
                            {
527
                                for (int i = 0; i < 5; i++)
528
                                {
529
                                    if (i < collection.Count() - 1)
530
                                    {
531
                                        if (DateTime.Compare(collection[i].CreateTime, item.CreateTime) < 0)
532
                                        {
533
                                            collection.Insert(i, item);
534
                                            break;
535
                                        }
536
                                    }
537
                                    else
538
                                    {
539
                                        collection.Add(item);
540
                                        break;
541
                                    }
542
                                }
543

  
544
                            }
545

  
546
                        }
547
                    }
548
                }
549
            }
550
            catch (Exception ex)
551
            {
552
                MessageBox.Show(ex.ToString());
553
                System.Diagnostics.Debug.WriteLine(ex.ToString());
554
            }
555
        }
556

  
557
        private async void ConvertView_DataSelect(IEnumerable<ConvertPDF.StatusCodeType> statusCodeTypeList, System.Collections.ObjectModel.ObservableCollection<ConvertPDF> collection)
558
        {
559
            try
560
            {
561
                int _status = 0;
562
                if (SelectedStatus != null)
563
                {
564
                    _status = (int)SelectedStatus.Value;
565
                }
566

  
567
                var Listitems = from num in await WcfClient.GET_SELECT_CONVERT_ITEMAsync(null, null, null, _status, 5, null, null, null, null, null, null, null, null, null, null, null, null, null, null)
568
                                let MarkusLink = "kcom://" + CreateMarkusParam(num.PROJECT_NO, num.DOCUMENT_ID, "doftech")
569
                                select new ConvertPDF(num.SERVICE_ID, num.ID, num.PROJECT_NO, num.STATUS, num.DOCUMENT_ID, num.DOCUMENT_NAME, num.DOCUMENT_NO, num.DOCUMENT_URL, num.REVISION, num.CURRENT_PAGE,
570
                                                        num.TOTAL_PAGE, num.EXCEPTION, num.GROUP_NO, num.CREATE_DATETIME, num.START_DATETIME, num.END_DATETIME, num.DOCUMENT_URL, num.CONVERT_PATH, MarkusLink, num.RECONVERTER);
571

  
572
                if (collection.Count() == 0)
573
                {
574
                    if (statusCodeTypeList.Count() == 1)
575
                    {
576
                        foreach (var Listitem in Listitems.ToList())
577
                        {
578
                            collection.Add(Listitem);
579
                        }
580
                    }
581
                }
582
                else
583
                {
584
                    foreach (var Listitem in Listitems)
585
                    {
586
                        collection.UpdateWhere(changeitem =>
587
                        ConvertItemEx.ChangeValues(changeitem, Listitem), x => x.ProjectNumber == Listitem.ProjectNumber && x.ConvertID == Listitem.ConvertID);
588
                    }
589
                    if (statusCodeTypeList.Count() == 1)
590
                    {
591
                        for (int i = collection.Count() - 1; i >= 0; --i)
592
                        {
593
                            var item = collection[i];
594

  
595
                            if (Listitems.Count(x => x.ConvertID == item.ConvertID && x.ProjectNumber == item.ProjectNumber) == 0)
596
                            {
597
                                collection.RemoveAt(i);
598
                            }
599
                        }
600
                    }
601

  
602
                    if (statusCodeTypeList.Count() == 1)
603
                    {
604
                        foreach (var item in Listitems)
605
                        {
606
                            if (collection.Count(x => x.ConvertID == item.ConvertID && x.ProjectNumber == item.ProjectNumber) == 0)
607
                            {
608
                                for (int i = 0; i < 5; i++)
609
                                {
610
                                    if (i < collection.Count() - 1)
611
                                    {
612
                                        if (DateTime.Compare(collection[i].CreateTime, item.CreateTime) < 0)
613
                                        {
614
                                            collection.Insert(i, item);
615
                                            break;
616
                                        }
617
                                    }
618
                                    else
619
                                    {
620
                                        collection.Add(item);
621
                                        break;
622
                                    }
623
                                }
624

  
625
                            }
626

  
627
                        }
628
                    }
629
                }
630
            }
631
            catch (Exception ex)
632
            {
633
                MessageBox.Show(ex.ToString());
256 634
            }
257 635
        }
258 636

  
637
        public static string CreateMarkusParam(string projectNo, string documentID, string userID)
638
        {
639
            ViewInfo viewInfo = new ViewInfo();
640

  
641
            viewInfo.DocumentItemID = documentID;
642
            viewInfo.ProjectNO = projectNo;
643
            viewInfo.UserID = userID;
644

  
645
            return ParamEncoding(JsonConvert.SerializeObject(viewInfo));
646

  
647
        }
648

  
649
        public static string ParamEncoding(string EncodingText, System.Text.Encoding oEncoding = null)
650
        {
651

  
652
            if (oEncoding == null)
653
                oEncoding = System.Text.Encoding.UTF8;
654

  
655
            return Convert.ToBase64String(oEncoding.GetBytes(EncodingText));
656

  
657
        }
658

  
259 659
        private async void ConvertDataSelect(IEnumerable<ConvertPDF.StatusCodeType> statusCodeTypeList, ObservableCollection<ConvertCOUNT> collection)
260 660
        {
261 661
            try
......
336 736
            }
337 737
        }
338 738

  
339
        private async void FinalPDFDataSelect(IEnumerable<ConvertPDF.StatusCodeType> statusCodeTypeList, ObservableCollection<FinalPDFCOUNT> collection)
739
        private async void FinalPDFDataSelect(IEnumerable<FinalPDF.StatusCodeType> statusCodeTypeList, ObservableCollection<FinalPDFCOUNT> collection)
340 740
        {
341 741
            try
342 742
            {
......
420 820
        #endregion
421 821
    }
422 822
}
823

  
824
public class NameValidator : ValidationRule
825
{
826
    public override ValidationResult Validate
827
      (object value, System.Globalization.CultureInfo cultureInfo)
828
    {
829
        if (value == null)
830
            return new ValidationResult(false, "value cannot be empty.");
831
        else
832
        {
833
            if (value.ToString().Length > 3)
834
                return new ValidationResult
835
                (false, "Name cannot be more than 3 characters long.");
836
        }
837
        return ValidationResult.ValidResult;
838
    }
839
}
ConvertService/ServiceBase/Markus.Service.StationController/ViewModel/DataBaseItemsModel.cs
519 519
            }
520 520
        }
521 521

  
522
        static DateTime DefaultCreateTime = DateTime.Now;
522
        static DateTime DefaultCreateTime = DateTime.Now.AddHours(-1);
523 523
        private DateTime _SelectedCreateTimeBegin = DefaultCreateTime;
524 524
        public DateTime SelectedCreateTimeBegin
525 525
        {
......
1390 1390

  
1391 1391
        public void RemoveCreateTimeFilter(object obj)
1392 1392
        {
1393
            DefaultCreateTime = DateTime.Now;
1393
            DefaultCreateTime = DateTime.Now.AddHours(-1);
1394 1394
            SelectedCreateTimeBegin = DefaultCreateTime;
1395 1395
            SelectedCreateTimeEnd = DefaultCreateTime;
1396 1396
        }
......
1418 1418
            RevisionFilter = null;
1419 1419
            GroupNOFilter = null;
1420 1420
            DOCUMENT_URLFilter = null;
1421
            DefaultCreateTime = DateTime.Now;
1421
            DefaultCreateTime = DateTime.Now.AddHours(-1);
1422 1422
            SelectedCreateTimeBegin = DefaultCreateTime;
1423 1423
            SelectedCreateTimeEnd = DefaultCreateTime;
1424 1424
            dispatcherTimer.Tick -= new EventHandler(SearchTimer_Tick);
......
1436 1436

  
1437 1437
        public void ConvertAdd(object obj)
1438 1438
        {
1439
            if (SearchTimerOn == true)
1440
            {
1441
                dispatcherTimer.Tick -= new EventHandler(SearchTimer_Tick);
1442
            }
1443
            else
1439
            try
1444 1440
            {
1445
                dispatcherTimer.Tick -= new EventHandler(Timer_Tick);
1446
            }
1441
                if (SearchTimerOn == true)
1442
                {
1443
                    dispatcherTimer.Tick -= new EventHandler(SearchTimer_Tick);
1444
                }
1445
                else
1446
                {
1447
                    dispatcherTimer.Tick -= new EventHandler(Timer_Tick);
1448
                }
1447 1449

  
1448
            Views.ConvertAddDialog convertAddDialog = new Views.ConvertAddDialog();
1450
                Views.ConvertAddDialog convertAddDialog = new Views.ConvertAddDialog();
1449 1451

  
1450
            convertAddDialog.Owner = Application.Current.MainWindow;
1451
            convertAddDialog.WindowStartupLocation = WindowStartupLocation.CenterOwner;
1452
                convertAddDialog.Owner = Application.Current.MainWindow;
1453
                convertAddDialog.WindowStartupLocation = WindowStartupLocation.CenterOwner;
1452 1454

  
1453
            convertAddDialog.ShowDialog();
1455
                convertAddDialog.ShowDialog();
1454 1456

  
1455
            if (SearchTimerOn == true)
1456
            {
1457
                dispatcherTimer.Tick += new EventHandler(SearchTimer_Tick);
1457
                if (SearchTimerOn == true)
1458
                {
1459
                    dispatcherTimer.Tick += new EventHandler(SearchTimer_Tick);
1460
                }
1461
                else
1462
                {
1463
                    dispatcherTimer.Tick += new EventHandler(Timer_Tick);
1464
                }
1458 1465
            }
1459
            else
1466
            catch(Exception ex)
1460 1467
            {
1461
                dispatcherTimer.Tick += new EventHandler(Timer_Tick);
1468
                MessageBox.Show(ex.ToString());
1462 1469
            }
1463 1470
        }
1464 1471

  
ConvertService/ServiceBase/Markus.Service.StationController/ViewModel/FinalPDFViewModel.cs
45 45
            RemoveCreateTimeFilterCommand = new DelegateCommand(RemoveCreateTimeFilter);
46 46
            ResetCommand = new DelegateCommand(Reset);
47 47
            ConverAddCommand = new DelegateCommand(ConverAdd);
48
            ConvertPathFileSearchCommand = new DelegateCommand(ConvertPathFileSearch);
48
            FinalPDFPathFileSearchCommand = new DelegateCommand(FinalPDFPathFileSearch);
49 49
        }
50 50

  
51 51
        #endregion
......
549 549
        }
550 550

  
551 551

  
552
        static DateTime DefaultCreateTime = DateTime.Now;
552
        static DateTime DefaultCreateTime = DateTime.Now.AddHours(-1);
553 553
        private DateTime _SelectedCreateTimeBegin = DefaultCreateTime;
554 554
        public DateTime SelectedCreateTimeBegin
555 555
        {
......
687 687
        public DelegateCommand DataFilterCommand { get; private set; }
688 688
        public DelegateCommand ResetCommand { get; private set; }
689 689
        public DelegateCommand ConverAddCommand { get; private set; }
690
        public DelegateCommand ConvertPathFileSearchCommand { get; private set; }
690
        public DelegateCommand FinalPDFPathFileSearchCommand { get; private set; }
691 691

  
692 692
        #endregion
693 693

  
......
1283 1283
            {
1284 1284
                var item = items.First();
1285 1285

  
1286
                var _CREATE_DATETIME = DateTime.Now;
1286
                var _CREATE_DATETIME = DateTime.Now.AddHours(-1);
1287 1287
                var _STATUS = (int)StatusCodeType.None;
1288 1288

  
1289 1289
                await WcfClient.GET_SELECT_RERECONVERT_ITEMAsync(_ConvertItem.ConvertID, 0, _CREATE_DATETIME, _STATUS, null);
......
1468 1468

  
1469 1469
        public void RemoveCreateTimeFilter(object obj)
1470 1470
        {
1471
            DefaultCreateTime = DateTime.Now;
1471
            DefaultCreateTime = DateTime.Now.AddHours(-1); ;
1472 1472
            SelectedCreateTimeBegin = DefaultCreateTime;
1473 1473
            SelectedCreateTimeEnd = DefaultCreateTime;
1474 1474

  
......
1498 1498
            GROUP_NOFilter = null;
1499 1499
            REVISIONFilter = null;
1500 1500

  
1501
            DefaultCreateTime = DateTime.Now;
1501
            DefaultCreateTime = DateTime.Now.AddHours(-1);
1502 1502
            SelectedCreateTimeBegin = DefaultCreateTime;
1503 1503
            SelectedCreateTimeEnd = DefaultCreateTime;
1504 1504

  
......
1548 1548
        #endregion
1549 1549

  
1550 1550

  
1551
        #region ConvertPathFileSearch
1551
        #region FinalPDFPathFileSearch
1552 1552

  
1553 1553
        /// <summary>
1554 1554
        ///  ConvertPath 파일 탐색기로 열리는 아이콘
1555 1555
        /// </summary>
1556 1556

  
1557
        public void ConvertPathFileSearch(object obj)
1557
        public void FinalPDFPathFileSearch(object obj)
1558 1558
        {
1559 1559
            if (obj is FinalPDF)
1560 1560
            {
1561 1561
                if (obj != null)
1562 1562
                {
1563
                    var convertitem = obj as ConvertPDF;
1563
                    var convertitem = obj as FinalPDF;
1564 1564

  
1565 1565
                    SaveFileDialog saveFileDialog = new SaveFileDialog();
1566 1566

  
ConvertService/ServiceBase/Markus.Service.StationController/ViewModel/MainViewModel.cs
71 71
        {
72 72
            base.Loaded();
73 73

  
74
            NavigationItems = new List<MenuItem>
74
            Application.Current.MainWindow.Height = System.Windows.SystemParameters.WorkArea.Height * 0.8;
75
            Application.Current.MainWindow.Width = System.Windows.SystemParameters.WorkArea.Width * 0.8;
76

  
77

  
78
           NavigationItems = new List<MenuItem>
75 79
            {
76 80
                
77 81
                  new MenuItem
ConvertService/ServiceBase/Markus.Service.StationController/Views/ConvertAddDialog.xaml
2 2
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3 3
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4 4
        xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
5
        xmlns:VM="clr-namespace:Markus.Service.StationController.ViewModel"
5
        xmlns:VM="clr-namespace:Markus.Service.StationController.ViewModel"          
6 6
        Header="Convert Items Insert" Height="300" Width="500" telerik:StyleManager.Theme="VisualStudio2013" >
7 7
    <telerik:RadWindow.DataContext>
8 8
        <VM:ConvertAddDialogViewModel/>
......
10 10
    <Grid Height="130" Width="480">
11 11
        <Grid.Resources>
12 12
            <ResourceDictionary>
13

  
14 13
                <Style x:Key="InfoStyle" TargetType="{x:Type TextBox}">
15 14
                    <Setter Property="Margin" Value="5,5,0,0"/>
16 15
                    <Setter Property="VerticalAlignment" Value="Center"/>
......
25 24
                    <Setter Property="Template">
26 25
                        <Setter.Value>
27 26
                            <ControlTemplate TargetType="{x:Type TextBox}">
28
                                <Border x:Name="Bd" 
29
                    BorderThickness="{TemplateBinding BorderThickness}" 
30
                    SnapsToDevicePixels="true">
27
                                <Border x:Name="Bd" BorderThickness="{TemplateBinding BorderThickness}" SnapsToDevicePixels="true">
31 28
                                    <ScrollViewer x:Name="PART_ContentHost" BorderThickness="{TemplateBinding BorderThickness}"
32
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
29
                                                  SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
33 30
                                </Border>
34 31
                            </ControlTemplate>
35 32
                        </Setter.Value>
......
73 70
                    <ColumnDefinition Width="1.5*"/>
74 71
                </Grid.ColumnDefinitions>
75 72
                <Grid.RowDefinitions>
76
                    <RowDefinition Height="25"/>
77
                    <RowDefinition Height="25"/>
73
                    <RowDefinition />
74
                    <RowDefinition />
78 75
                </Grid.RowDefinitions>
79 76
                <TextBlock Grid.Row="0" Text="Project NO" />
80 77
                <TextBlock Grid.Row="0" Grid.Column="4" Text="DOCUMENT ID" />
81 78
                <TextBlock Grid.Row="1" Grid.Column="0" Text="Document URL" />
82 79

  
83
                <TextBox Text="{Binding ConverAdd_Project_NO, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Grid.Row="0" Grid.Column="2" />
84
                <TextBox Text="{Binding ConverAdd_DOCUMENT_ID, Mode=TwoWay,  UpdateSourceTrigger=PropertyChanged}" Grid.Row="0" Grid.Column="6" />
85
                <TextBox Text="{Binding ConverAdd_DOCUMENT_URL,  Mode=TwoWay,  UpdateSourceTrigger=PropertyChanged}" Grid.Row="1" Grid.Column="2" Grid.ColumnSpan="5"/>
80
                <TextBox Text="{Binding ConverAdd_Project_NO, Mode=TwoWay,  UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True}" Grid.Row="0" Grid.Column="2" />
81
                <TextBox Text="{Binding ConverAdd_DOCUMENT_ID, Mode=TwoWay,  UpdateSourceTrigger=PropertyChanged,  ValidatesOnDataErrors=True }" Grid.Row="0" Grid.Column="6" />
82
                <TextBox Text="{Binding ConverAdd_DOCUMENT_URL,  Mode=TwoWay,  UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True }" Grid.Row="1" Grid.Column="2" Grid.ColumnSpan="5"/>
83
           
86 84
            </Grid>
85
            
87 86
            <StackPanel Orientation="Horizontal" Grid.Row="1" HorizontalAlignment="Right" Margin="0 0 0 10" Grid.Column="1">
88 87

  
89 88
                <telerik:RadButton Content=" SEND" MinWidth="50" Margin="8 0" VerticalAlignment="Center"
ConvertService/ServiceBase/Markus.Service.StationController/Views/DashBoard.xaml
14 14
             mc:Ignorable="d"  Background="White" DataContext="{DynamicResource DashBoardViewModel}" 
15 15
      d:DesignHeight="450" d:DesignWidth="1000">
16 16
    <UserControl.Resources>
17
        <Style TargetType="telerik:GridViewCell" x:Key="StretchCellStyle">
18
            <Setter Property="Margin" Value="0"/>
19
            <Setter Property="Padding" Value="0"/>
20
            <Setter Property="VerticalContentAlignment" Value="Stretch"/>
21
            <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
22
        </Style>
23
        <Style TargetType="{x:Type telerik:GridViewCell}" x:Key="OriginalFileGridViewCell">
24
            <Setter Property="HorizontalContentAlignment" Value="Left"/>
25
        </Style>
26
        <Style x:Key="axisLabelStyle" TargetType="TextBlock">
27
            <Setter Property="FontFamily" Value="Segoe UI" />
28
        </Style>
17 29
        <SolidColorBrush x:Key="ActualBrush" Color="#FFCCCCCC" />
18 30
        <SolidColorBrush x:Key="TargetBrush" Color="#FF1B9DDE" />
19 31
        <Style x:Key="TextBlockCountryStyle" TargetType="TextBlock">
20 32
            <Setter Property="FontSize" Value="12" />
21 33
            <Setter Property="Foreground" Value="Black" />
22
            <Setter Property="Margin" Value="0 0 14 0" />
34
            <Setter Property="Margin" Value="0 0 40 0" />
35
        </Style>
36
        <Style TargetType="{x:Type controls:RowIndexColumn}">
37
            <Setter Property="TextAlignment" Value="Center"/>
38
        </Style>
39
        <Style x:Key="TextBlockCountryStyle_Exception" TargetType="TextBlock">
40
            <Setter Property="FontSize" Value="12" />
41
            <Setter Property="Foreground" Value="Blue" />
42
            <Setter Property="Margin" Value="0 0 0 0" />
23 43
        </Style>
24 44
        <telerik:ChartPalette x:Key="ActualTargetChartPalette">
25 45
            <telerik:ChartPalette.GlobalEntries>
......
32 52
        <RectangleGeometry x:Key="LineSeriesLegendGeometry" Rect="0 5 12 2" />
33 53
        <VM:DashBoardViewModel x:Key="DashBoardViewModel"/>
34 54
        <controls:RightAlignedLabelStrategy x:Key="RightAlignedLabelStrategy"/>
55
        <DataTemplate x:Key="RowDetailsTemplate">
56
            <local:DataBaseViewInfo />
57
        </DataTemplate>
35 58
    </UserControl.Resources>
36 59
    <i:Interaction.Triggers>
37 60
        <i:EventTrigger  EventName="Loaded">
......
86 109
                    <ColumnDefinition Width="*" />
87 110
                    <ColumnDefinition Width="Auto" />
88 111
                </Grid.ColumnDefinitions>
89
                <telerik:RadCartesianChart x:Name="chart" Palette="{StaticResource ActualTargetChartPalette}" ClipToBounds="False" Margin="0,50,0,50">
112
                <Grid.RowDefinitions>
113
                    <RowDefinition Height="*"/>
114
                    <RowDefinition Height="Auto"/>
115
                </Grid.RowDefinitions>
116
                <telerik:RadCartesianChart x:Name="chart" Palette="{StaticResource ActualTargetChartPalette}" ClipToBounds="False" Margin="0,50,0,50" Grid.Row="0">
90 117
                    <telerik:RadCartesianChart.VerticalAxis>
91 118
                        <telerik:CategoricalAxis IsInverse="True" 
92 119
                                         MajorTickStyle="{StaticResource TransparentTickStyle}" 
......
94 121
                                         LabelStyle="{StaticResource TextBlockCountryStyle}" />
95 122
                    </telerik:RadCartesianChart.VerticalAxis>
96 123
                    <telerik:RadCartesianChart.HorizontalAxis>
97
                        <telerik:LinearAxis ShowLabels="False" ElementBrush="Transparent" />
124
                        <telerik:LinearAxis  Minimum="0" Maximum="15000" MajorStep="3000" LabelStyle="{StaticResource axisLabelStyle}"/>
98 125
                    </telerik:RadCartesianChart.HorizontalAxis>
99 126
                    <telerik:RadCartesianChart.Series>
100 127
                        <telerik:BarSeries CategoryBinding="Project_NO" 
101 128
                                   ValueBinding="Count" 
102 129
                                   ItemsSource="{Binding ConvertCOUNTDashBoard}"
103 130
                                   CombineMode="None" 
104
                                   ShowLabels="False" 
105
                                   ClipToPlotArea="False" >
131
                                   ShowLabels="True" 
132
                                   ClipToPlotArea="True" >
106 133
                            <telerik:BarSeries.PointAnimation>
107 134
                                <telerik:ChartMoveAnimation Delay="0:0:0.125" Duration="0:0:1.55" MoveAnimationType="Left" >
108 135
                                    <telerik:ChartMoveAnimation.Easing>
......
119 146
                                <telerik:SeriesLegendSettings Title="Count" MarkerGeometry="{StaticResource SolidRectLegendGeometry}" />
120 147
                            </telerik:BarSeries.LegendSettings>
121 148
                            <telerik:BarSeries.LabelDefinitions>
122
                                <telerik:ChartSeriesLabelDefinition Binding="Count" Format="{}{0:F1}" DefaultVisualStyle="{StaticResource TextBlockCountryStyle}" Strategy="{StaticResource RightAlignedLabelStrategy}" />
149
                                <telerik:ChartSeriesLabelDefinition Binding="StringCount"  DefaultVisualStyle="{StaticResource TextBlockCountryStyle}" Strategy="{StaticResource RightAlignedLabelStrategy}" />
123 150
                            </telerik:BarSeries.LabelDefinitions>
124 151
                        </telerik:BarSeries>
125 152
                        <telerik:BarSeries CategoryBinding="Project_NO" 
126 153
                                       ValueBinding="ExceptionCount" 
127 154
                                       ItemsSource="{Binding ConvertCOUNTDashBoard}"
128
                                       CombineMode="None"  >
155
                                       CombineMode="None" 
156
                                       ShowLabels="True" 
157
                                       ClipToPlotArea="True"   >
158
                            <telerik:BarSeries.LabelDefinitions>
159
                                <telerik:ChartSeriesLabelDefinition Binding="ExceptionCount" Format="{}{0:F1}" DefaultVisualStyle="{StaticResource TextBlockCountryStyle_Exception}" Strategy="{StaticResource RightAlignedLabelStrategy}" />
160
                            </telerik:BarSeries.LabelDefinitions>
129 161
                            <telerik:BarSeries.PointAnimation>
130 162
                                <telerik:ChartMoveAnimation Delay="0:0:0.125" Duration="0:0:1.55" MoveAnimationType="Left" >
131 163
                                    <telerik:ChartMoveAnimation.Easing>
......
145 177
                    </telerik:RadCartesianChart.Series>
146 178
                </telerik:RadCartesianChart>
147 179

  
148
                <telerik:RadLegend Grid.Column="1" Grid.Row="1" Margin="24,4,0,0" MinWidth="76" Items="{Binding LegendItems, ElementName=chart}" />
180
                <telerik:RadLegend Grid.Column="1" Grid.Row="0" Margin="24,4,0,0" MinWidth="76" Items="{Binding LegendItems, ElementName=chart}" />
181

  
182
                <telerik:RadGridView  GroupRenderMode="Flat" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"  
183
							 ItemsSource="{Binding DashBoard_Convert}" 
184
                             SelectionMode="Extended"
185
                             SelectionUnit="FullRow"
186
                             CanUserSelect ="True"
187
                             RowDetailsTemplate="{StaticResource RowDetailsTemplate}"  
188
							 AutoGenerateColumns="False" 
189
                             ColumnWidth="*" CanUserFreezeColumns="False"
190
                             Grid.Row="1" Grid.ColumnSpan="2"  ScrollViewer.CanContentScroll="True" IsFilteringAllowed="True"
191
                             LeftFrozenColumnCount="6" 
192
                             RightFrozenColumnCount="0">
193
                    <i:Interaction.Behaviors>
194
                        <controls:GridViewSelectionUtilities SelectedItems="{Binding SelectedConvertList, Source={StaticResource DashBoardViewModel}}" />
195
                    </i:Interaction.Behaviors>
196
                    <telerik:RadGridView.Columns>
197
                        <telerik:GridViewToggleRowDetailsColumn />
198
                        <controls:RowIndexColumn Header="#" Width="30" CellStyle="{StaticResource RowNumberStyle}" />
199
                        <telerik:GridViewDataColumn x:Name="commend" Header="Markus " Width="0.5*"  >
200
                            <telerik:GridViewDataColumn.CellTemplate>
201
                                <DataTemplate>
202
                                    <telerik:RadButton Content="Click" BorderThickness="0"
203
                                                   Background="Transparent"
204
                                                   Command="{Binding MarkusLinkCommand, Source={StaticResource DashBoardViewModel}}" CommandParameter="{Binding DataContext, RelativeSource={RelativeSource Self}}"/>
205
                                </DataTemplate>
206
                            </telerik:GridViewDataColumn.CellTemplate>
207
                        </telerik:GridViewDataColumn>
208
                        <telerik:GridViewDataColumn Header="ProjectNO" 
209
											DataMemberBinding="{Binding ProjectNumber}" Width="*" />
210
                        <telerik:GridViewDataColumn Header="CurrentPageNo" 
211
											DataMemberBinding="{Binding CurrentPageNo, Mode=TwoWay}" Width="*" />
212
                        <telerik:GridViewDataColumn Header="TotalPageNo" 
213
											DataMemberBinding="{Binding TotalPage, Mode=TwoWay}" Width="*"  />
214
                        <telerik:GridViewDynamicHyperlinkColumn Header="원본파일" CellStyle="{StaticResource OriginalFileGridViewCell}"
215
                                                        NavigateUrlFormatString=" {0}"
216
													    NavigateUrlMemberPaths="OriginfilePath"
217
														Width="2*">
218
                            <telerik:GridViewDynamicHyperlinkColumn.CellTemplate>
219
                                <DataTemplate>
220
                                    <TextBlock Text="{Binding FileName}" HorizontalAlignment="Left"/>
221
                                </DataTemplate>
222
                            </telerik:GridViewDynamicHyperlinkColumn.CellTemplate>
223
                        </telerik:GridViewDynamicHyperlinkColumn>
224

  
225
                        <telerik:GridViewDataColumn Header=" ConvertPath" IsReadOnly="True" Width="*" CellStyle="{StaticResource StretchCellStyle}">
226
                            <telerik:GridViewDataColumn.CellTemplate>
227
                                <DataTemplate>
228
                                    <Grid>
229
                                        <!--<Grid.ColumnDefinitions>
230
                                            <ColumnDefinition/>
231
                                            <ColumnDefinition Width="Auto"/>
232
                                        </Grid.ColumnDefinitions>
233
                                        <TextBox TextAlignment="Left" Text="{Binding ConvertPath}" Background="Transparent" BorderBrush="Transparent" BorderThickness="0" Foreground="Black"/>-->
234
                                        <telerik:RadButton Background="Transparent" BorderBrush="Transparent" BorderThickness="0" Foreground="Black"
235
                                                   Command="{Binding ConvertPathFileSearchCommand, Source={StaticResource DashBoardViewModel}}" CommandParameter="{Binding DataContext, RelativeSource={RelativeSource Self}}">
236
                                            <Image Source="/Markus.Service.StationController;component/Resources/File_Search_Icon.png"  Stretch="None" />
237
                                        </telerik:RadButton>
238
                                    </Grid>
239
                                </DataTemplate>
240
                            </telerik:GridViewDataColumn.CellTemplate>
241
                        </telerik:GridViewDataColumn>
242

  
243
                        <telerik:GridViewDataColumn Header="CreateTime" IsReadOnly="True"   Background="Transparent" 
244
											DataMemberBinding="{Binding CreateTime, Mode=TwoWay, StringFormat=\{0:yyyy.MM.dd HH:mm:ss\}}" Width="*" />
245
                        <telerik:GridViewDataColumn Header="TotalTime" IsReadOnly="True"   Background="Transparent" 
246
											DataMemberBinding="{Binding TotalTime, Mode=TwoWay, StringFormat=\{0:yyyy.MM.dd HH:mm:ss\}}" Width="*" />
247
                    </telerik:RadGridView.Columns>
248
                </telerik:RadGridView>
149 249
            </Grid>
150 250
        </Border>
151 251
        <TextBlock Text="FinalPDF Items" Grid.Row="2" Grid.Column="1" HorizontalAlignment="Center" Margin="0,20,0,20"/>
......
155 255
                    <ColumnDefinition Width="*" />
156 256
                    <ColumnDefinition Width="Auto" />
157 257
                </Grid.ColumnDefinitions>
158
                <telerik:RadCartesianChart x:Name="char1" Palette="{StaticResource ActualTargetChartPalette}" ClipToBounds="False" Margin="0,50,0,50">
258
                <Grid.RowDefinitions>
259
                    <RowDefinition Height="*"/>
260
                    <RowDefinition Height="Auto"/>
261
                </Grid.RowDefinitions>
262
                <telerik:RadCartesianChart x:Name="char1" Palette="{StaticResource ActualTargetChartPalette}" ClipToBounds="False" Margin="0,50,0,50" Grid.Row="0">
159 263
                    <telerik:RadCartesianChart.VerticalAxis>
160 264
                        <telerik:CategoricalAxis IsInverse="True" 
161 265
                                         MajorTickStyle="{StaticResource TransparentTickStyle}" 
......
163 267
                                         LabelStyle="{StaticResource TextBlockCountryStyle}" />
164 268
                    </telerik:RadCartesianChart.VerticalAxis>
165 269
                    <telerik:RadCartesianChart.HorizontalAxis>
166
                        <telerik:LinearAxis ShowLabels="False" ElementBrush="Transparent" />
270
                        <telerik:LinearAxis  Minimum="0" Maximum="50000" MajorStep="10000" LabelStyle="{StaticResource axisLabelStyle}"/>
167 271
                    </telerik:RadCartesianChart.HorizontalAxis>
168 272
                    <telerik:RadCartesianChart.Series>
169 273
                        <telerik:BarSeries CategoryBinding="Project_NO" 
170 274
                                   ValueBinding="Count" 
171 275
                                   ItemsSource="{Binding FinalPDFCOUNTDashBoard}"
172 276
                                   CombineMode="None" 
173
                                   ShowLabels="False" 
174
                                   ClipToPlotArea="False" >
277
                                   ShowLabels="True" 
278
                                   ClipToPlotArea="True" >
175 279
                            <telerik:BarSeries.PointAnimation>
176 280
                                <telerik:ChartMoveAnimation Delay="0:0:0.125" Duration="0:0:1.55" MoveAnimationType="Left" >
177 281
                                    <telerik:ChartMoveAnimation.Easing>
......
188 292
                                <telerik:SeriesLegendSettings Title="Count" MarkerGeometry="{StaticResource SolidRectLegendGeometry}" />
189 293
                            </telerik:BarSeries.LegendSettings>
190 294
                            <telerik:BarSeries.LabelDefinitions>
191
                                <telerik:ChartSeriesLabelDefinition Binding="Count" Format="{}{0:F1}" DefaultVisualStyle="{StaticResource TextBlockCountryStyle}" Strategy="{StaticResource RightAlignedLabelStrategy}" />
295
                                <telerik:ChartSeriesLabelDefinition Binding="StringCount"  DefaultVisualStyle="{StaticResource TextBlockCountryStyle}" Strategy="{StaticResource RightAlignedLabelStrategy}" />
192 296
                            </telerik:BarSeries.LabelDefinitions>
193 297
                        </telerik:BarSeries>
194 298
                        <telerik:BarSeries CategoryBinding="Project_NO" 
195 299
                                       ValueBinding="ExceptionCount" 
196 300
                                       ItemsSource="{Binding FinalPDFCOUNTDashBoard}"
197
                                       CombineMode="None"  >
301
                                       CombineMode="None" 
302
                                      ShowLabels="True" 
303
                                      ClipToPlotArea="True"   >
304
                            <telerik:BarSeries.LabelDefinitions>
305
                                <telerik:ChartSeriesLabelDefinition Binding="ExceptionCount" Format="{}{0:F1}" DefaultVisualStyle="{StaticResource TextBlockCountryStyle_Exception}" Strategy="{StaticResource RightAlignedLabelStrategy}" />
306
                            </telerik:BarSeries.LabelDefinitions>
198 307
                            <telerik:BarSeries.PointAnimation>
199 308
                                <telerik:ChartMoveAnimation Delay="0:0:0.125" Duration="0:0:1.55" MoveAnimationType="Left" >
200 309
                                    <telerik:ChartMoveAnimation.Easing>
......
214 323
                    </telerik:RadCartesianChart.Series>
215 324
                </telerik:RadCartesianChart>
216 325

  
217
                <telerik:RadLegend Grid.Column="1" Grid.Row="1" MinWidth="76" Items="{Binding LegendItems, ElementName=char1}" />
326
                <telerik:RadLegend Grid.Column="1" Grid.Row="0" MinWidth="76" Items="{Binding LegendItems, ElementName=char1}" />
327

  
328
                <telerik:RadGridView  GroupRenderMode="Flat" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"  
329
							 ItemsSource="{Binding DashBoard_FinalPDF}" 
330
                             SelectionMode="Extended"
331
                             SelectionUnit="FullRow"
332
                             CanUserSelect ="True"
333
                             RowDetailsTemplate="{StaticResource RowDetailsTemplate}"  
334
							 AutoGenerateColumns="False"
335
                             ColumnWidth="*" CanUserFreezeColumns="False"
336
                             Grid.Row="1" Grid.ColumnSpan="2" ScrollViewer.CanContentScroll="True" IsFilteringAllowed="True"
337
                             LeftFrozenColumnCount="6" 
338
                             RightFrozenColumnCount="0">
339
                    <i:Interaction.Behaviors>
340
                        <controls:GridViewSelectionUtilities SelectedItems="{Binding SelectedFinalPDFList, Source={StaticResource DashBoardViewModel}}" />
341
                    </i:Interaction.Behaviors>
342
                    <telerik:RadGridView.Columns>
343
                        <telerik:GridViewToggleRowDetailsColumn />
344
                        <controls:RowIndexColumn Header="#" Width="30" CellStyle="{StaticResource RowNumberStyle}" />
345
                        <telerik:GridViewDataColumn Header="Markus " Width="0.5*"  CellStyle="{StaticResource StretchCellStyle}">
346
                            <telerik:GridViewDataColumn.CellTemplate>
347
                                <DataTemplate>
348
                                    <telerik:RadButton Content="Click" BorderThickness="0"
349
                                                   Background="Transparent"
350
                                                   Command="{Binding MarkusLinkCommand, Source={StaticResource DashBoardViewModel}}" CommandParameter="{Binding DataContext, RelativeSource={RelativeSource Self}}"/>
351
                                </DataTemplate>
352
                            </telerik:GridViewDataColumn.CellTemplate>
353
                        </telerik:GridViewDataColumn>
354
                        <telerik:GridViewDataColumn Header="ProjectNO" 
355
											DataMemberBinding="{Binding ProjectNumber}" Width="*" />
356
                        <telerik:GridViewDataColumn Header="DocumentID"
357
											DataMemberBinding="{Binding DocumentID}" Width="*" />
358
                        <telerik:GridViewDataColumn Header="DocInfoID"
359
											DataMemberBinding="{Binding DocInfo_ID}" Width="*" />
360
                        <telerik:GridViewDataColumn Header="MarkusInfoID"
361
											DataMemberBinding="{Binding MarkupInfo_ID}" Width="*" />
362
                        <telerik:GridViewDataColumn Header="Create UserID"
363
											DataMemberBinding="{Binding Create_User_ID}" Width="*" />
364
                        <telerik:GridViewDataColumn Header="CurrentPageNo"
365
											DataMemberBinding="{Binding CurrentPageNo, Mode=TwoWay}" Width="*" />
366
                        <telerik:GridViewDataColumn Header="TotalPageNo"
367
											DataMemberBinding="{Binding TotalPage, Mode=TwoWay}" Width="*"  />
368
                        <telerik:GridViewDynamicHyperlinkColumn Header="원본파일"  CellStyle="{StaticResource OriginalFileGridViewCell}"
369
                                                        NavigateUrlFormatString=" {0}"
370
													    NavigateUrlMemberPaths="OriginfilePath"
371
														Width="2*">
372
                            <telerik:GridViewDynamicHyperlinkColumn.CellTemplate>
373
                                <DataTemplate>
... 이 차이점은 표시할 수 있는 최대 줄수를 초과해서 이 차이점은 잘렸습니다.

내보내기 Unified diff

클립보드 이미지 추가 (최대 크기: 500 MB)