프로젝트

일반

사용자정보

개정판 c7955b40

IDc7955b40e48122cfa18a51583ded63eefc874e96
상위 80391351
하위 e139272d, 53deabaf

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

search 후 Convert 수정

Change-Id: I3c9e136d7fe702e379ec5dfc7b016bb0d3a34745

차이점 보기:

ConvertService/ServiceBase/Markus.Service.StationController/Controls/GridViewSelectionUtilities.cs
95 95
                target.Add(o);
96 96
            }
97 97
        }
98
        //private static bool isSyncingSelection;
99
        //private static List<Tuple<WeakReference, List<RadGridView>>> collectionToGridViews = new List<Tuple<WeakReference, List<RadGridView>>>();
100

  
101
        //public static readonly DependencyProperty SelectedItemsProperty = DependencyProperty.RegisterAttached(
102
        //    "SelectedItems",
103
        //    typeof(INotifyCollectionChanged),
104
        //    typeof(GridViewSelectionUtilities),
105
        //    new PropertyMetadata(null, OnSelectedItemsChanged));
106

  
107
        //public static INotifyCollectionChanged GetSelectedItems(DependencyObject obj)
108
        //{
109
        //    return (INotifyCollectionChanged)obj.GetValue(SelectedItemsProperty);
110
        //}
111

  
112
        //public static void SetSelectedItems(DependencyObject obj, INotifyCollectionChanged value)
113
        //{
114
        //    obj.SetValue(SelectedItemsProperty, value);
115
        //}
116

  
117
        //private static void OnSelectedItemsChanged(DependencyObject target, DependencyPropertyChangedEventArgs args)
118
        //{
119
        //    var gridView = (RadGridView)target;
120

  
121
        //    var oldCollection = args.OldValue as INotifyCollectionChanged;
122
        //    if (oldCollection != null)
123
        //    {
124
        //        gridView.SelectionChanged -= GridView_SelectionChanged;
125
        //        oldCollection.CollectionChanged -= SelectedItems_CollectionChanged;
126
        //        RemoveAssociation(oldCollection, gridView);
127
        //    }
128

  
129
        //    var newCollection = args.NewValue as INotifyCollectionChanged;
130
        //    if (newCollection != null)
131
        //    {
132
        //        gridView.SelectionChanged += GridView_SelectionChanged;
133
        //        newCollection.CollectionChanged += SelectedItems_CollectionChanged;
134
        //        AddAssociation(newCollection, gridView);
135
        //        OnSelectedItemsChanged(newCollection, null, (IList)newCollection);
136
        //    }
137
        //}
138

  
139
        //private static void SelectedItems_CollectionChanged(object sender, NotifyCollectionChangedEventArgs args)
140
        //{
141
        //    INotifyCollectionChanged collection = (INotifyCollectionChanged)sender;
142
        //    OnSelectedItemsChanged(collection, args.OldItems, args.NewItems);
143
        //}
144

  
145
        //private static void GridView_SelectionChanged(object sender, SelectionChangeEventArgs args)
146
        //{
147
        //    if (isSyncingSelection)
148
        //    {
149
        //        return;
150
        //    }
151

  
152
        //    var collection = (IList)GetSelectedItems((RadGridView)sender);
153
        //    foreach (object item in args.RemovedItems)
154
        //    {
155
        //        collection.Remove(item);
156
        //    }
157
        //    foreach (object item in args.AddedItems)
158
        //    {
159
        //        collection.Add(item);
160
        //    }
161
        //}
162

  
163
        //private static void OnSelectedItemsChanged(INotifyCollectionChanged collection, IList oldItems, IList newItems)
164
        //{
165
        //    isSyncingSelection = true;
166

  
167
        //    var gridViews = GetOrCreateGridViews(collection);
168
        //    foreach (var gridView in gridViews)
169
        //    {
170
        //        SyncSelection(gridView, oldItems, newItems);
171
        //    }
172

  
173
        //    isSyncingSelection = false;
174
        //}
175

  
176
        //private static void SyncSelection(RadGridView gridView, IList oldItems, IList newItems)
177
        //{
178
        //    if (oldItems != null)
179
        //    {
180
        //        SetItemsSelection(gridView, oldItems, false);
181
        //    }
182

  
183
        //    if (newItems != null)
184
        //    {
185
        //        SetItemsSelection(gridView, newItems, true);
186
        //    }
187
        //}
188

  
189
        //private static void SetItemsSelection(RadGridView gridView, IList items, bool shouldSelect)
190
        //{
191
        //    foreach (var item in items)
192
        //    {
193
        //        bool contains = gridView.SelectedItems.Contains(item);
194
        //        if (shouldSelect && !contains)
195
        //        {
196
        //            gridView.SelectedItems.Add(item);
197
        //        }
198
        //        else if (contains && !shouldSelect)
199
        //        {
200
        //            gridView.SelectedItems.Remove(item);
201
        //        }
202
        //    }
203
        //}
204

  
205
        //private static void AddAssociation(INotifyCollectionChanged collection, RadGridView gridView)
206
        //{
207
        //    List<RadGridView> gridViews = GetOrCreateGridViews(collection);
208
        //    gridViews.Add(gridView);
209
        //}
210

  
211
        //private static void RemoveAssociation(INotifyCollectionChanged collection, RadGridView gridView)
212
        //{
213
        //    List<RadGridView> gridViews = GetOrCreateGridViews(collection);
214
        //    gridViews.Remove(gridView);
215

  
216
        //    if (gridViews.Count == 0)
217
        //    {
218
        //        CleanUp();
219
        //    }
220
        //}
221

  
222
        //private static List<RadGridView> GetOrCreateGridViews(INotifyCollectionChanged collection)
223
        //{
224
        //    for (int i = 0; i < collectionToGridViews.Count; i++)
225
        //    {
226
        //        var wr = collectionToGridViews[i].Item1;
227
        //        if (wr.Target == collection)
228
        //        {
229
        //            return collectionToGridViews[i].Item2;
230
        //        }
231
        //    }
232

  
233
        //    collectionToGridViews.Add(new Tuple<WeakReference, List<RadGridView>>(new WeakReference(collection), new List<RadGridView>()));
234
        //    return collectionToGridViews[collectionToGridViews.Count - 1].Item2;
235
        //}
236

  
237
        //private static void CleanUp()
238
        //{
239
        //    for (int i = collectionToGridViews.Count - 1; i >= 0; i--)
240
        //    {
241
        //        bool isAlive = collectionToGridViews[i].Item1.IsAlive;
242
        //        var behaviors = collectionToGridViews[i].Item2;
243
        //        if (behaviors.Count == 0 || !isAlive)
244
        //        {
245
        //            collectionToGridViews.RemoveAt(i);
246
        //        }
247
        //    }
248
        //}
249 98
    }
250 99
}
ConvertService/ServiceBase/Markus.Service.StationController/Data/ConvertCOUNT.cs
7 7

  
8 8
namespace Markus.Service.StationController.Data
9 9
{
10
    class ConvertCOUNT : INotifyPropertyChanged
10
    public class ConvertCOUNT : INotifyPropertyChanged
11 11
    {
12 12
        public event PropertyChangedEventHandler PropertyChanged;
13 13

  
......
49 49
            }
50 50
        }
51 51

  
52
        private int _ExceptionCount;
53
        public int ExceptionCount
52
        private double _ExceptionCount;
53
        public double ExceptionCount
54 54
        {
55 55
            get
56 56
            {
......
66 66
            }
67 67
        }
68 68

  
69
        private int _Count;
70
        public int Count
69
        private double _Count;
70
        public double Count
71 71
        {
72 72
            get
73 73
            {
ConvertService/ServiceBase/Markus.Service.StationController/Data/FinalPDFCOUNT.cs
1
using System;
2
using System.Collections.Generic;
3
using System.ComponentModel;
4
using System.Linq;
5
using System.Text;
6
using System.Threading.Tasks;
7

  
8
namespace Markus.Service.StationController.Data
9
{
10
    public class FinalPDFCOUNT : INotifyPropertyChanged
11
    {
12
        public event PropertyChangedEventHandler PropertyChanged;
13

  
14
        private void OnPropertyChanged(string propertyName)
15
        {
16
            if (PropertyChanged != null)
17
            {
18
                PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
19
            }
20

  
21
        }
22

  
23
        public FinalPDFCOUNT()
24
        {
25

  
26
        }
27

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

  
35
        private string _Project_NO;
36
        public string Project_NO
37
        {
38
            get
39
            {
40
                return _Project_NO;
41
            }
42
            set
43
            {
44
                if (_Project_NO != value)
45
                {
46
                    _Project_NO = value;
47
                    OnPropertyChanged("Project_NO");
48
                }
49
            }
50
        }
51

  
52
        private double _ExceptionCount;
53
        public double ExceptionCount
54
        {
55
            get
56
            {
57
                return _ExceptionCount;
58
            }
59
            set
60
            {
61
                if (_ExceptionCount != value)
62
                {
63
                    _ExceptionCount = value;
64
                    OnPropertyChanged("ExceptionCount");
65
                }
66
            }
67
        }
68

  
69
        private double _Count;
70
        public double Count
71
        {
72
            get
73
            {
74
                return _Count;
75
            }
76
            set
77
            {
78
                if (_Count != value)
79
                {
80
                    _Count = value;
81
                    OnPropertyChanged("Count");
82
                }
83
            }
84
        }
85
    }
86
}
ConvertService/ServiceBase/Markus.Service.StationController/Markus.Service.StationController.csproj
116 116
      <SpecificVersion>False</SpecificVersion>
117 117
      <HintPath>C:\Program Files (x86)\Progress\Telerik UI for WPF R1 2020\Binaries\WPF45\Telerik.Windows.Controls.Chart.dll</HintPath>
118 118
    </Reference>
119
    <Reference Include="Telerik.Windows.Controls.Charting, Version=2020.1.218.45, Culture=neutral, PublicKeyToken=5803cfa389c90ce7, processorArchitecture=MSIL">
120
      <SpecificVersion>False</SpecificVersion>
121
      <HintPath>C:\Program Files (x86)\Progress\Telerik UI for WPF R1 2020\Binaries\WPF45\Telerik.Windows.Controls.Charting.dll</HintPath>
122
    </Reference>
119 123
    <Reference Include="Telerik.Windows.Controls.Data, Version=2020.1.218.45, Culture=neutral, PublicKeyToken=5803cfa389c90ce7, processorArchitecture=MSIL">
120 124
      <SpecificVersion>False</SpecificVersion>
121 125
      <HintPath>C:\Program Files (x86)\Progress\Telerik UI for WPF R1 2020\Binaries\WPF45\Telerik.Windows.Controls.Data.dll</HintPath>
......
174 178
    <Compile Include="Data\ConvertCOUNT.cs" />
175 179
    <Compile Include="Data\ConvertPDF.cs" />
176 180
    <Compile Include="Data\FinalPDF.cs" />
181
    <Compile Include="Data\FinalPDFCOUNT.cs" />
177 182
    <Compile Include="Data\MenuItem.cs" />
178 183
    <Compile Include="Data\SelectedCountItem.cs" />
179 184
    <Compile Include="Data\StatusViewItem.cs" />
......
205 210
    <Compile Include="SELECT_CONVERT_ITEM_Result.cs">
206 211
      <DependentUpon>MarkusModel.tt</DependentUpon>
207 212
    </Compile>
213
    <Compile Include="SELECT_FINALPDF_COUNT_Result.cs">
214
      <DependentUpon>MarkusModel.tt</DependentUpon>
215
    </Compile>
208 216
    <Compile Include="SELECT_FINAL_PDF_Result.cs">
209 217
      <DependentUpon>MarkusModel.tt</DependentUpon>
210 218
    </Compile>
ConvertService/ServiceBase/Markus.Service.StationController/MarkusModel.Context.cs
304 304
    
305 305
            return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction<SELECT_CONVERT_COUNT>("markusEntities.SELECT_CONVERT_COUNT", p_STATUSParameter, p_BEGIN_CREATE_DATETIMEParameter, p_FINISH_CREATE_DATETIMEParameter);
306 306
        }
307
    
308
        public virtual int FINALPDF_COUNT(Nullable<int> p_STATUS, Nullable<System.DateTime> p_BEGIN_CREATE_DATETIME, Nullable<System.DateTime> p_FINISH_CREATE_DATETIME)
309
        {
310
            var p_STATUSParameter = p_STATUS.HasValue ?
311
                new ObjectParameter("P_STATUS", p_STATUS) :
312
                new ObjectParameter("P_STATUS", typeof(int));
313
    
314
            var p_BEGIN_CREATE_DATETIMEParameter = p_BEGIN_CREATE_DATETIME.HasValue ?
315
                new ObjectParameter("P_BEGIN_CREATE_DATETIME", p_BEGIN_CREATE_DATETIME) :
316
                new ObjectParameter("P_BEGIN_CREATE_DATETIME", typeof(System.DateTime));
317
    
318
            var p_FINISH_CREATE_DATETIMEParameter = p_FINISH_CREATE_DATETIME.HasValue ?
319
                new ObjectParameter("P_FINISH_CREATE_DATETIME", p_FINISH_CREATE_DATETIME) :
320
                new ObjectParameter("P_FINISH_CREATE_DATETIME", typeof(System.DateTime));
321
    
322
            return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("markusEntities.FINALPDF_COUNT", p_STATUSParameter, p_BEGIN_CREATE_DATETIMEParameter, p_FINISH_CREATE_DATETIMEParameter);
323
        }
324
    
325
        public virtual ObjectResult<SELECT_FINALPDF_COUNT_Result> SELECT_FINALPDF_COUNT(Nullable<int> p_STATUS, Nullable<System.DateTime> p_BEGIN_CREATE_DATETIME, Nullable<System.DateTime> p_FINISH_CREATE_DATETIME)
326
        {
327
            var p_STATUSParameter = p_STATUS.HasValue ?
328
                new ObjectParameter("P_STATUS", p_STATUS) :
329
                new ObjectParameter("P_STATUS", typeof(int));
330
    
331
            var p_BEGIN_CREATE_DATETIMEParameter = p_BEGIN_CREATE_DATETIME.HasValue ?
332
                new ObjectParameter("P_BEGIN_CREATE_DATETIME", p_BEGIN_CREATE_DATETIME) :
333
                new ObjectParameter("P_BEGIN_CREATE_DATETIME", typeof(System.DateTime));
334
    
335
            var p_FINISH_CREATE_DATETIMEParameter = p_FINISH_CREATE_DATETIME.HasValue ?
336
                new ObjectParameter("P_FINISH_CREATE_DATETIME", p_FINISH_CREATE_DATETIME) :
337
                new ObjectParameter("P_FINISH_CREATE_DATETIME", typeof(System.DateTime));
338
    
339
            return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction<SELECT_FINALPDF_COUNT_Result>("markusEntities.SELECT_FINALPDF_COUNT", p_STATUSParameter, p_BEGIN_CREATE_DATETIMEParameter, p_FINISH_CREATE_DATETIMEParameter);
340
        }
307 341
    }
308 342
}
ConvertService/ServiceBase/Markus.Service.StationController/MarkusModel.edmx
10 10
          <Parameter Name="P_BEGIN_CREATE_DATETIME" Type="datetime" Mode="In" />
11 11
          <Parameter Name="P_FINISH_CREATE_DATETIME" Type="datetime" Mode="In" />
12 12
        </Function>
13
        <Function Name="FINALPDF_COUNT" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
14
          <Parameter Name="P_STATUS" Type="int" Mode="In" />
15
          <Parameter Name="P_BEGIN_CREATE_DATETIME" Type="datetime" Mode="In" />
16
          <Parameter Name="P_FINISH_CREATE_DATETIME" Type="datetime" Mode="In" />
17
        </Function>
13 18
        <Function Name="SELECT_CONVERT_DELETE" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
14 19
          <Parameter Name="P_ID" Type="nvarchar" Mode="In" />
15 20
        </Function>
......
158 163
            <Parameter Name="P_BEGIN_CREATE_DATETIME" Mode="In" Type="DateTime" />
159 164
            <Parameter Name="P_FINISH_CREATE_DATETIME" Mode="In" Type="DateTime" />
160 165
          </FunctionImport>
166
          <FunctionImport Name="FINALPDF_COUNT">
167
            <Parameter Name="P_STATUS" Mode="In" Type="Int32" />
168
            <Parameter Name="P_BEGIN_CREATE_DATETIME" Mode="In" Type="DateTime" />
169
            <Parameter Name="P_FINISH_CREATE_DATETIME" Mode="In" Type="DateTime" />
170
          </FunctionImport>
171
          <FunctionImport Name="SELECT_FINALPDF_COUNT" ReturnType="Collection(markusModel.SELECT_FINALPDF_COUNT_Result)">
172
            <Parameter Name="P_STATUS" Mode="In" Type="Int32" />
173
            <Parameter Name="P_BEGIN_CREATE_DATETIME" Mode="In" Type="DateTime" />
174
            <Parameter Name="P_FINISH_CREATE_DATETIME" Mode="In" Type="DateTime" />
175
          </FunctionImport>
161 176
        </EntityContainer>
162 177
        <ComplexType Name="SELECT_CONVERT_ITEM_Result">
163 178
          <Property Type="String" Name="ID" Nullable="false" MaxLength="50" />
......
211 226
          <Property Type="Int32" Name="COUNT" Nullable="false" />
212 227
          <Property Type="Int32" Name="EXCEPTION_COUNT" Nullable="false" />
213 228
        </ComplexType>
229
        <ComplexType Name="SELECT_FINALPDF_COUNT_Result" >
230
          <Property Type="String" Name="PROJECT_NO" Nullable="false" />
231
          <Property Type="Int32" Name="COUNT" Nullable="false" />
232
          <Property Type="Int32" Name="EXCEPTION_COUNT" Nullable="false" />
233
        </ComplexType>
214 234
      </Schema>
215 235
    </edmx:ConceptualModels>
216 236
    <!-- C-S mapping content -->
......
262 282
              </ComplexTypeMapping>
263 283
            </ResultMapping>
264 284
          </FunctionImportMapping>
285
          <FunctionImportMapping FunctionImportName="FINALPDF_COUNT" FunctionName="markusModel.Store.FINALPDF_COUNT" />
286
          <FunctionImportMapping FunctionImportName="SELECT_FINALPDF_COUNT" FunctionName="markusModel.Store.FINALPDF_COUNT">
287
            <ResultMapping>
288
              <ComplexTypeMapping TypeName="markusModel.SELECT_FINALPDF_COUNT_Result" />
289
            </ResultMapping>
290
          </FunctionImportMapping>
265 291
        </EntityContainerMapping>
266 292
      </Mapping>
267 293
    </edmx:Mappings>
ConvertService/ServiceBase/Markus.Service.StationController/SELECT_FINALPDF_COUNT_Result.cs
1
//------------------------------------------------------------------------------
2
// <auto-generated>
3
//     이 코드는 템플릿에서 생성되었습니다.
4
//
5
//     이 파일을 수동으로 변경하면 응용 프로그램에서 예기치 않은 동작이 발생할 수 있습니다.
6
//     이 파일을 수동으로 변경하면 코드가 다시 생성될 때 변경 내용을 덮어씁니다.
7
// </auto-generated>
8
//------------------------------------------------------------------------------
9

  
10
namespace Markus.Service.StationController
11
{
12
    using System;
13
    
14
    public partial class SELECT_FINALPDF_COUNT_Result
15
    {
16
        public string PROJECT_NO { get; set; }
17
        public int COUNT { get; set; }
18
        public int EXCEPTION_COUNT { get; set; }
19
    }
20
}
ConvertService/ServiceBase/Markus.Service.StationController/ViewModel/DashBoardViewModel.cs
13 13
using System.Windows;
14 14
using System.Windows.Threading;
15 15
using ConverCOUNT = Markus.Service.StationController.Data.ConvertCOUNT;
16

  
16
using System.Collections.ObjectModel;
17 17

  
18 18
namespace Markus.Service.StationController.ViewModel
19 19
{
......
92 92
            }
93 93
        }
94 94

  
95
        private List<ConvertCOUNT> _DashBoard;
96
        public List<ConvertCOUNT> DashBoard
95
        private ObservableCollection<ConvertCOUNT> _ConvertCOUNTDashBoard;
96
        public ObservableCollection<ConvertCOUNT> ConvertCOUNTDashBoard
97 97
        {
98 98
            get
99 99
            {
100
                if (_DashBoard == null)
100
                if (_ConvertCOUNTDashBoard == null)
101 101
                {
102
                    _DashBoard = new List<ConvertCOUNT>();
102
                    _ConvertCOUNTDashBoard = new ObservableCollection<ConvertCOUNT>();
103 103
                }
104
                return _DashBoard;
104
                return _ConvertCOUNTDashBoard;
105 105
            }
106 106
            set
107 107
            {
108
                _DashBoard = value;
109
                OnPropertyChanged(() => DashBoard);
108
                if (_ConvertCOUNTDashBoard != value)
109
                {
110
                    _ConvertCOUNTDashBoard = value;
111
                    OnPropertyChanged(() => ConvertCOUNTDashBoard);
112
                }
113
            }
114
        }
115

  
116
        private ObservableCollection<FinalPDFCOUNT> _FinalPDFCOUNTDashBoard;
117
        public ObservableCollection<FinalPDFCOUNT> FinalPDFCOUNTDashBoard
118
        {
119
            get
120
            {
121
                if (_FinalPDFCOUNTDashBoard == null)
122
                {
123
                    _FinalPDFCOUNTDashBoard = new ObservableCollection<FinalPDFCOUNT>();
124
                }
125
                return _FinalPDFCOUNTDashBoard;
126
            }
127
            set
128
            {
129
                if (_FinalPDFCOUNTDashBoard != value)
130
                {
131
                    _FinalPDFCOUNTDashBoard = value;
132
                    OnPropertyChanged(() => FinalPDFCOUNTDashBoard);
133
                }
110 134
            }
111 135
        }
112 136

  
......
217 241
        /// </summary>
218 242
        private void DataSelect()
219 243
        {
220
            if (DashBoard == null)
244
            if (ConvertCOUNTDashBoard == null)
245
            {
246
                ConvertCOUNTDashBoard = new ObservableCollection<ConvertCOUNT>();
247
            }
248
            if(FinalPDFCOUNTDashBoard == null)
221 249
            {
222
                DashBoard = new List<ConverCOUNT>();
250
                FinalPDFCOUNTDashBoard = new ObservableCollection<FinalPDFCOUNT>();
223 251
            }
224 252

  
225 253
            if (SelectedStatus != null)
226 254
            {
227
                DataSelect(new[] { (ConvertPDF.StatusCodeType)(SelectedStatus.Value) }, DashBoard);
255
                ConvertDataSelect(new[] { (ConvertPDF.StatusCodeType)(SelectedStatus.Value) }, ConvertCOUNTDashBoard);
256
                FinalPDFDataSelect(new[] { (ConvertPDF.StatusCodeType)(SelectedStatus.Value) }, FinalPDFCOUNTDashBoard);
228 257
            }
229

  
230 258
        }
231 259

  
232
        private void DataSelect(IEnumerable<ConvertPDF.StatusCodeType> statusCodeTypeList, List<ConverCOUNT> collection)
260
        private void ConvertDataSelect(IEnumerable<ConvertPDF.StatusCodeType> statusCodeTypeList, ObservableCollection<ConvertCOUNT> collection)
233 261
        {
234 262
            try
235 263
            {
......
255 283

  
256 284
                    var items = entities.SELECT_CONVERT_COUNT(_status, Start_CreateTime, Finish_CreateTime).ToList();
257 285

  
258
                    List<ConverCOUNT> Listitems = new List<ConverCOUNT>();
286
                    List<ConvertCOUNT> Listitems = new List<ConvertCOUNT>();
259 287

  
260 288
                    for (int i = 0; i < items.Count; i++)
261 289
                    {
262
                        ConverCOUNT AddItem = new ConverCOUNT(items[i].PROJECT_NO, items[i].COUNT, items[i].EXCEPTION_COUNT);
290
                        ConvertCOUNT AddItem = new ConvertCOUNT(items[i].PROJECT_NO, items[i].COUNT, items[i].EXCEPTION_COUNT);
263 291
                        Listitems.Add(AddItem);
264 292
                    }
265 293

  
......
269 297
                        {
270 298
                            foreach (var x in Listitems)
271 299
                            {
272
                                collection.Add(x);//observationcollection add하면 오류 & telerik chart버전 문제 
300
                                collection.Add(x); 
273 301
                            }
274 302
                        }
275 303
                    }
......
320 348
            catch (Exception ex)
321 349
            {
322 350
                MessageBox.Show(ex.ToString());
323
                //System.Diagnostics.Debug.WriteLine(ex.ToString());
324 351
            }
325 352
        }
326 353

  
354
        private void FinalPDFDataSelect(IEnumerable<ConvertPDF.StatusCodeType> statusCodeTypeList, ObservableCollection<FinalPDFCOUNT> collection)
355
        {
356
            try
357
            {
358
                using (markusEntities entities = new markusEntities(App.MarkusDataBaseConnecitonString))
359
                {
360
                    int _status = 0;
361
                    if (SelectedStatus != null)
362
                    {
363
                        _status = (int)SelectedStatus.Value;
364
                    }
365

  
366
                    //DocumentID = unikey
367
                    DateTime? Start_CreateTime = null;
368
                    DateTime? Finish_CreateTime = null;
369
                    if (SelectedCreateTimeBegin != DefaultCreateTime)
370
                    {
371
                        Start_CreateTime = SelectedCreateTimeBegin;
372
                    }
373
                    if (SelectedCreateTimeEnd != DefaultCreateTime)
374
                    {
375
                        Finish_CreateTime = SelectedCreateTimeEnd;
376
                    }
377

  
378
                    var items = entities.SELECT_FINALPDF_COUNT(_status, Start_CreateTime, Finish_CreateTime).ToList();
379

  
380
                    List<FinalPDFCOUNT> Listitems = new List<FinalPDFCOUNT>();
381

  
382
                    for (int i = 0; i < items.Count; i++)
383
                    {
384
                        FinalPDFCOUNT AddItem = new FinalPDFCOUNT(items[i].PROJECT_NO, items[i].COUNT, items[i].EXCEPTION_COUNT);
385
                        Listitems.Add(AddItem);
386
                    }
387

  
388
                    if (collection.Count() == 0)
389
                    {
390
                        if (statusCodeTypeList.Count() == 1)
391
                        {
392
                            foreach (var x in Listitems)
393
                            {
394
                                collection.Add(x);
395
                            }
396
                        }
397
                    }
398
                    else
399
                    {
400

  
401
                        //세미 업데이트
402
                        foreach (var newitem in Listitems)
403
                        {
404
                            collection.UpdateWhere(changeitem =>
405
                            ConvertItemEx.ChangeValues(changeitem, newitem), x => x.Project_NO == newitem.Project_NO && x.Count == newitem.Count);
406
                        }
407

  
408

  
409
                        if (statusCodeTypeList.Count() == 1)
410
                        {
411

  
412
                            //삭제
413
                            for (int i = collection.Count() - 1; i >= 0; --i)
414
                            {
415
                                var item = collection[i];
416

  
417
                                if (Listitems.Count(x => x.Project_NO == item.Project_NO && x.Count == item.Count) == 0)
418
                                {
419
                                    collection.RemoveAt(i);
420
                                }
421
                            }
422
                        }
423

  
424
                        if (statusCodeTypeList.Count() == 1)
425
                        {
426
                            //추가 convert 후 추가됨
427
                            foreach (var item in Listitems)
428
                            {
429
                                if (collection.Count(x => x.Project_NO == item.Project_NO && x.Count == item.Count) == 0)
430
                                {
431
                                    for (int i = 0; i < 200; i++)
432
                                    {
433
                                        collection.Add(item);
434
                                        break;
435
                                    }
436
                                }
437
                            }
438
                        }
439
                    }
440
                }
441
            }
442
            catch (Exception ex)
443
            {
444
                MessageBox.Show(ex.ToString());
445
            }
446
        }
327 447
        #endregion
328 448

  
329 449
        #endregion
ConvertService/ServiceBase/Markus.Service.StationController/ViewModel/DataBaseItemsModel.cs
563 563
            dispatcherTimer.Start();
564 564
        }
565 565

  
566
        private async void SearchTimer_Tick(object sender, EventArgs e)
567
        {
568
            dispatcherTimer.Stop();
569

  
570
            if (IsAcitve)
571
            {
572
                await App.Current.Dispatcher.InvokeAsync(() =>
573
                {
574
                    DataSearch(new[] { (StatusCodeType)(SelectedStatus.Value) }, FilterConvertSource);
575

  
576
                    RealDataSelect(new[] { StatusCodeType.None, StatusCodeType.Wait, StatusCodeType.PageLoading, StatusCodeType.Saving }, RealConvertSource);
577

  
578
                    AliveDataSelect();
579
                });
580
            }
581

  
582
            //await Task.Delay(5000);
583
            await Task.Delay(10000);
584

  
585
            //System.Threading.Thread.Sleep(new TimeSpan(0,0,0,0,100));
586

  
587
            dispatcherTimer.Start();
588
        }
589

  
566 590
        public override void Closed()
567 591
        {
568 592
            if (dispatcherTimer != null)
......
1197 1221
        public void DataFilter(object obj)
1198 1222
        {
1199 1223
            dispatcherTimer.Tick -= new EventHandler(Timer_Tick);
1200
            DataSearch(new[] { (StatusCodeType)(SelectedStatus.Value) }, FilterConvertSource);
1224
            dispatcherTimer.Tick += new EventHandler(SearchTimer_Tick);
1201 1225
        }
1202 1226

  
1203 1227
        #endregion
......
1352 1376
            DefaultCreateTime = DateTime.Now;
1353 1377
            SelectedCreateTimeBegin = DefaultCreateTime;
1354 1378
            SelectedCreateTimeEnd = DefaultCreateTime;
1379
            dispatcherTimer.Tick -= new EventHandler(SearchTimer_Tick);
1355 1380
            dispatcherTimer.Tick += new EventHandler(Timer_Tick);
1356 1381
        }
1357 1382

  
......
1396 1421

  
1397 1422
                    string filePath = "@" + convertitem.ConvertPath;
1398 1423

  
1399
                    System.Diagnostics.Process.Start(filePath);
1424
                    System.Diagnostics.Process.Start("explorer.exe", filePath);
1400 1425
                }
1401 1426
            }
1402 1427
        }
ConvertService/ServiceBase/Markus.Service.StationController/Views/DashBoard.xaml
6 6
             xmlns:controls="clr-namespace:Markus.Service.StationController.Controls"
7 7
             xmlns:VM="clr-namespace:Markus.Service.StationController.ViewModel"
8 8
             xmlns:Data="clr-namespace:Markus.Service.StationController.Data"  
9
             xmlns:chart="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Chart"
10
             xmlns:chartView="clr-namespace:Telerik.Windows.Controls.ChartView;assembly=Telerik.Windows.Controls.Chart"
11
             xmlns:telerikChart="using:Telerik.UI.Xaml.Controls.Chart"
9 12
             xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
10 13
             xmlns:local="clr-namespace:Markus.Service.StationController.Views" x:Class="Markus.Service.StationController.Views.DashBoard"
11 14
             mc:Ignorable="d"  Background="White" DataContext="{DynamicResource DashBoardViewModel}" 
......
42 45
        <Grid.RowDefinitions>
43 46
            <RowDefinition Height="Auto" />
44 47
            <RowDefinition Height="Auto" />
48
            <RowDefinition Height="Auto" />
45 49
            <RowDefinition Height="*" />
46 50
        </Grid.RowDefinitions>
47 51
        <Grid.ColumnDefinitions>
48 52
            <ColumnDefinition/>
49 53
            <ColumnDefinition/>
50 54
        </Grid.ColumnDefinitions>
51
        <StackPanel Margin="0,10" Orientation="Horizontal" HorizontalAlignment="Right" Grid.Row="0"  Height="20" >
55
        <StackPanel Margin="0,10" Orientation="Horizontal" HorizontalAlignment="Left" Grid.Row="0"  Height="20" >
52 56
            <TextBlock Text="Display Count : " VerticalAlignment="Center"/>
53 57
            <telerik:RadComboBox x:Name="ComboCount" Width="100" SelectedItem="{Binding SelectedCount, Mode=TwoWay}" Margin="0,0,10,0" SelectedValuePath="DisplayMember"
54 58
                  DisplayMemberPath="ValueMember" ItemsSource="{Binding SelectedCountList}" SelectedIndex="0" />
......
75 79
                <Button Content="Clear" Margin="5"  Width="50" Height="20" HorizontalAlignment="Left" Command="{Binding RemoveCreateTimeFilterCommand, Mode=OneWay}"/>
76 80
            </StackPanel>
77 81
        </StackPanel>
78
        <Grid Grid.Row="2">
82
        <TextBlock Text="Convert Items" Grid.Row="2" Grid.Column="0" HorizontalAlignment="Center" Margin="0,20,0,0"/>
83
        <Grid Grid.Row="3" Grid.Column="0" Margin="20,0,0,0">
79 84
            <Grid.ColumnDefinitions>
80 85
                <ColumnDefinition Width="*" />
81 86
                <ColumnDefinition Width="Auto" />
82 87
            </Grid.ColumnDefinitions>
83
            <telerik:RadCartesianChart x:Name="chart" Palette="{StaticResource ActualTargetChartPalette}" MinHeight="90" MaxHeight="90" Margin="10 0 20 0" ClipToBounds="False">
88
            <telerik:RadCartesianChart x:Name="chart" Palette="{StaticResource ActualTargetChartPalette}" ClipToBounds="False" Margin="0,50,0,50">
84 89
                <telerik:RadCartesianChart.VerticalAxis>
85 90
                    <telerik:CategoricalAxis IsInverse="True" 
86 91
                                         MajorTickStyle="{StaticResource TransparentTickStyle}" 
......
93 98
                <telerik:RadCartesianChart.Series>
94 99
                    <telerik:BarSeries CategoryBinding="Project_NO" 
95 100
                                   ValueBinding="Count" 
96
                                   ItemsSource="{Binding DashBoard, UpdateSourceTrigger=PropertyChanged}" 
101
                                   ItemsSource="{Binding ConvertCOUNTDashBoard}"
97 102
                                   CombineMode="None" 
98
                                   ShowLabels="True" 
99
                                   ClipToPlotArea="False"
100
                                   >
103
                                   ShowLabels="False" 
104
                                   ClipToPlotArea="False" >
105
                        <telerik:BarSeries.PointAnimation>
106
                            <telerik:ChartMoveAnimation Delay="0:0:0.125" Duration="0:0:1.55" MoveAnimationType="Left" >
107
                                <telerik:ChartMoveAnimation.Easing>
108
                                    <BounceEase EasingMode="EaseOut" Bounces="20" Bounciness="5" />
109
                                </telerik:ChartMoveAnimation.Easing>
110
                            </telerik:ChartMoveAnimation>
111
                        </telerik:BarSeries.PointAnimation>
101 112
                        <telerik:BarSeries.PointTemplate>
102 113
                            <DataTemplate>
103 114
                                <Rectangle Fill="{StaticResource ActualBrush}" Margin="0 0 0 3" />
......
111 122
                        </telerik:BarSeries.LabelDefinitions>
112 123
                    </telerik:BarSeries>
113 124
                    <telerik:BarSeries CategoryBinding="Project_NO" 
114
                                   ValueBinding="ExceptionCount" 
115
                                   ItemsSource="{Binding DashBoard, UpdateSourceTrigger=PropertyChanged}" 
116
                                   CombineMode="None">
125
                                       ValueBinding="ExceptionCount" 
126
                                       ItemsSource="{Binding ConvertCOUNTDashBoard}"
127
                                       CombineMode="None"  >
128
                        <telerik:BarSeries.PointAnimation>
129
                            <telerik:ChartMoveAnimation Delay="0:0:0.125" Duration="0:0:1.55" MoveAnimationType="Left" >
130
                                <telerik:ChartMoveAnimation.Easing>
131
                                    <BounceEase EasingMode="EaseOut" Bounces="20" Bounciness="5" />
132
                                </telerik:ChartMoveAnimation.Easing>
133
                            </telerik:ChartMoveAnimation>
134
                        </telerik:BarSeries.PointAnimation>
117 135
                        <telerik:BarSeries.PointTemplate>
118 136
                            <DataTemplate>
119 137
                                <Rectangle Fill="{StaticResource TargetBrush}" Height="2" VerticalAlignment="Bottom" />
120 138
                            </DataTemplate>
121 139
                        </telerik:BarSeries.PointTemplate>
122 140
                        <telerik:BarSeries.LegendSettings>
123
                            <telerik:SeriesLegendSettings Title="ExceptionCountrget" MarkerGeometry="{StaticResource LineSeriesLegendGeometry}" />
141
                            <telerik:SeriesLegendSettings Title="ExceptionCount" MarkerGeometry="{StaticResource LineSeriesLegendGeometry}" />
124 142
                        </telerik:BarSeries.LegendSettings>
125 143
                    </telerik:BarSeries>
126 144
                </telerik:RadCartesianChart.Series>
......
128 146

  
129 147
            <telerik:RadLegend Grid.Column="1" Grid.Row="1" Margin="24,4,0,0" MinWidth="76" Items="{Binding LegendItems, ElementName=chart}" />
130 148
        </Grid>
131
            
132
            
133
                <!--<telerik:RadCartesianChart x:Name="chart">
134
                    <telerik:RadCartesianChart.HorizontalAxis>
135
                        <telerik:LinearAxis/>
136
                    </telerik:RadCartesianChart.HorizontalAxis>
137

  
138
                    <telerik:RadCartesianChart.VerticalAxis>
139
                        <telerik:CategoricalAxis/>
140
                    </telerik:RadCartesianChart.VerticalAxis>
141 149

  
142
                    <telerik:RadCartesianChart.Series>
143
                        <telerik:BarSeries>
150
        <TextBlock Text="FinalPDF Items" Grid.Row="2" Grid.Column="1" HorizontalAlignment="Center" Margin="0,20,0,0"/>
151
        <Grid Grid.Row="3" Grid.Column="1" Margin="20,0,0,0">
152
            <Grid.ColumnDefinitions>
153
                <ColumnDefinition Width="*" />
154
                <ColumnDefinition Width="Auto" />
155
            </Grid.ColumnDefinitions>
156
            <telerik:RadCartesianChart x:Name="char1" Palette="{StaticResource ActualTargetChartPalette}" ClipToBounds="False" Margin="0,50,0,50">
157
                <telerik:RadCartesianChart.VerticalAxis>
158
                    <telerik:CategoricalAxis IsInverse="True" 
159
                                         MajorTickStyle="{StaticResource TransparentTickStyle}" 
160
                                         LineStroke="Transparent" 
161
                                         LabelStyle="{StaticResource TextBlockCountryStyle}" />
162
                </telerik:RadCartesianChart.VerticalAxis>
163
                <telerik:RadCartesianChart.HorizontalAxis>
164
                    <telerik:LinearAxis ShowLabels="False" ElementBrush="Transparent" />
165
                </telerik:RadCartesianChart.HorizontalAxis>
166
                <telerik:RadCartesianChart.Series>
167
                    <telerik:BarSeries CategoryBinding="Project_NO" 
168
                                   ValueBinding="Count" 
169
                                   ItemsSource="{Binding FinalPDFCOUNTDashBoard}"
170
                                   CombineMode="None" 
171
                                   ShowLabels="False" 
172
                                   ClipToPlotArea="False" >
173
                        <telerik:BarSeries.PointAnimation>
174
                            <telerik:ChartMoveAnimation Delay="0:0:0.125" Duration="0:0:1.55" MoveAnimationType="Left" >
175
                                <telerik:ChartMoveAnimation.Easing>
176
                                    <BounceEase EasingMode="EaseOut" Bounces="20" Bounciness="5" />
177
                                </telerik:ChartMoveAnimation.Easing>
178
                            </telerik:ChartMoveAnimation>
179
                        </telerik:BarSeries.PointAnimation>
180
                        <telerik:BarSeries.PointTemplate>
181
                            <DataTemplate>
182
                                <Rectangle Fill="{StaticResource ActualBrush}" Margin="0 0 0 3" />
183
                            </DataTemplate>
184
                        </telerik:BarSeries.PointTemplate>
185
                        <telerik:BarSeries.LegendSettings>
186
                            <telerik:SeriesLegendSettings Title="Count" MarkerGeometry="{StaticResource SolidRectLegendGeometry}" />
187
                        </telerik:BarSeries.LegendSettings>
188
                        <telerik:BarSeries.LabelDefinitions>
189
                            <telerik:ChartSeriesLabelDefinition Binding="Count" Format="{}{0:F1}" DefaultVisualStyle="{StaticResource TextBlockCountryStyle}" Strategy="{StaticResource RightAlignedLabelStrategy}" />
190
                        </telerik:BarSeries.LabelDefinitions>
191
                    </telerik:BarSeries>
192
                    <telerik:BarSeries CategoryBinding="Project_NO" 
193
                                       ValueBinding="ExceptionCount" 
194
                                       ItemsSource="{Binding FinalPDFCOUNTDashBoard}"
195
                                       CombineMode="None"  >
196
                        <telerik:BarSeries.PointAnimation>
197
                            <telerik:ChartMoveAnimation Delay="0:0:0.125" Duration="0:0:1.55" MoveAnimationType="Left" >
198
                                <telerik:ChartMoveAnimation.Easing>
199
                                    <BounceEase EasingMode="EaseOut" Bounces="20" Bounciness="5" />
200
                                </telerik:ChartMoveAnimation.Easing>
201
                            </telerik:ChartMoveAnimation>
202
                        </telerik:BarSeries.PointAnimation>
203
                        <telerik:BarSeries.PointTemplate>
204
                            <DataTemplate>
205
                                <Rectangle Fill="{StaticResource TargetBrush}" Height="2" VerticalAlignment="Bottom" />
206
                            </DataTemplate>
207
                        </telerik:BarSeries.PointTemplate>
208
                        <telerik:BarSeries.LegendSettings>
209
                            <telerik:SeriesLegendSettings Title="ExceptionCount" MarkerGeometry="{StaticResource LineSeriesLegendGeometry}" />
210
                        </telerik:BarSeries.LegendSettings>
211
                    </telerik:BarSeries>
212
                </telerik:RadCartesianChart.Series>
213
            </telerik:RadCartesianChart>
144 214

  
145
                            <telerik:BarSeries.DataPoints>
146
                            <telerik:CategoricalDataPoint Category="rk" Value="10"/>
147
                                <telerik:CategoricalDataPoint Category="나" Value="4"/>
148
                                <telerik:CategoricalDataPoint Category="다" Value="7"/>
149
                                <telerik:CategoricalDataPoint Category="라" Value="11"/>
150
                                <telerik:CategoricalDataPoint Category="마" Value="15"/>
151
                            </telerik:BarSeries.DataPoints>
152
                        </telerik:BarSeries>
153
                    </telerik:RadCartesianChart.Series>
154
                </telerik:RadCartesianChart>
155
            </Grid>-->
215
            <telerik:RadLegend Grid.Column="1" Grid.Row="1" MinWidth="76" Items="{Binding LegendItems, ElementName=char1}" />
216
        </Grid>
156 217
    </Grid>
157 218
</UserControl>
ConvertService/ServiceBase/Markus.Service.StationController/Views/DataBaseView.xaml
123 123
            <!-- SelectedItem="{Binding SelectFilterConvert, Source=StaticResource context, Mode=TwoWay}"-->
124 124
            <telerik:RadGridView x:Name="dataGrid1"  GroupRenderMode="Flat" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"  
125 125
							 ItemsSource="{Binding FilterConvertSourceView}" 
126
                             
127 126
                             SelectionMode="Extended"
128 127
                             SelectionUnit="FullRow"
129 128
                             CanUserSelect ="True"
......
180 179
                    <!--<telerik:GridViewDataColumn Header=" ConvertPath"  
181 180
											DataMemberBinding="{Binding ConvertPath}" Width="2.5*" >
182 181
                    </telerik:GridViewDataColumn>-->
183
                    <telerik:GridViewDataColumn Header=" ConvertPath" Width="2.5*" Style="{Binding Mode=OneWay, Source={StaticResource borderedTemplate}}">
182
                    <telerik:GridViewDataColumn Header=" ConvertPath" IsReadOnly="True" Width="2.5*" Style="{Binding Mode=OneWay, Source={StaticResource borderedTemplate}}">
184 183
                        <telerik:GridViewDataColumn.CellTemplate>
185 184
                            <DataTemplate >
186 185
                                <StackPanel Orientation="Horizontal">
187
                                    <TextBox Text="{Binding ConvertPath}"/>
188
                                    <telerik:RadButton BorderThickness="0"
186
                                    <TextBox Text="{Binding ConvertPath}" Background="Transparent" BorderThickness="0" IsReadOnly="True" Foreground="Black" />
187
                                    <telerik:RadButton BorderThickness="0" 
189 188
                                                   Background="Transparent"
190 189
                                                   Command="{Binding ConvertPathFileSearchCommand, Source={StaticResource DataBaseItemsModel}}" CommandParameter="{Binding DataContext, RelativeSource={RelativeSource Self}}">
191 190
                                        <Image Source="E:\Source\MARKUS\ConvertService\ServiceBase\Markus.Service.StationController\Picture\File_Search_Icon.png" Stretch="None" />
......
195 194
                        </telerik:GridViewDataColumn.CellTemplate>
196 195
                    </telerik:GridViewDataColumn>
197 196

  
198
                    <telerik:GridViewDataColumn Header="CreateTime" 
197
                    <telerik:GridViewDataColumn Header="CreateTime" Background="Transparent"  IsReadOnly="True"
199 198
											DataMemberBinding="{Binding CreateTime, Mode=TwoWay, StringFormat=\{0:yyyy.MM.dd HH:mm:ss\}}" Width="*" />
200
                    <telerik:GridViewDataColumn Header="StartTime" 
199
                    <telerik:GridViewDataColumn Header="StartTime" Background="Transparent" IsReadOnly="True"
201 200
											DataMemberBinding="{Binding StartTime, Mode=TwoWay, StringFormat=\{0:yyyy.MM.dd HH:mm:ss\}}" Width="*" />
202
                    <telerik:GridViewDataColumn Header="EndTime" 
201
                    <telerik:GridViewDataColumn Header="EndTime" Background="Transparent"  IsReadOnly="True"
203 202
											DataMemberBinding="{Binding EndTime, Mode=TwoWay, StringFormat=\{0:yyyy.MM.dd HH:mm:ss\}}" Width="*" />
204 203
                </telerik:RadGridView.Columns>
205 204
            </telerik:RadGridView>

내보내기 Unified diff

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