프로젝트

일반

사용자정보

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

markus / ConvertService / ServiceBase / Markus.Service.StationController / ViewModel / DataBaseItemsModel.cs @ b119eeaa

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

1
using Markus.Message;
2
using Markus.Service.DataBase;
3
using Markus.Service.Extensions;
4
using Markus.Service.StationController.Data;
5
using Markus.Service.StationController.Behaviors;
6
using Markus.Service.StationController.Extensions;
7
using Microsoft.Win32;
8
using System;
9
using System.Collections.Generic;
10
using System.ComponentModel;
11
using System.Linq;
12
using System.Threading.Tasks;
13
using System.Web;
14
using System.Windows;
15
using Telerik.Windows.Controls;
16
using Telerik.Windows.Data;
17
using ConvertItem = Markus.Service.Interface.ConvertItem;
18
using System.Net;
19
using System.Windows.Threading;
20
using System.Diagnostics;
21
using System.Windows.Input;
22
using Markus.Mvvm.ToolKit;
23

    
24
namespace Markus.Service.StationController.ViewModel
25
{
26
    //세미
27
    public class DataBaseItemsModel : Mvvm.ToolKit.ViewModelBase
28
    {
29
        #region Constructor
30

    
31
        /// <summary>
32
        /// 실행하면 처음 들어가는 부분
33
        /// </summary>
34
        public DataBaseItemsModel()
35
        {
36
            DataSaveFileGemBoxCommand = new DelegateCommand(DataExportData);
37
            ConvertCommand = new DelegateCommand(DataConvert);
38
            DeleteCommand = new DelegateCommand(DataDelete);
39
            ValidateCommand = new DelegateCommand(DataValidate);
40
            MarkusLinkCommand = new DelegateCommand(MarkusLink);
41
        }
42

    
43
        #endregion
44

    
45
        #region Properties
46

    
47
        private System.Collections.ObjectModel.ObservableCollection<ConvertItem> _AliveItems;
48
        public System.Collections.ObjectModel.ObservableCollection<ConvertItem> AliveItems
49
        {
50
            get => _AliveItems;
51
            set
52
            {
53
                _AliveItems = value;
54
                OnPropertyChanged(() => AliveItems);
55
            }
56
        }
57

    
58
        private System.Collections.ObjectModel.ObservableCollection<ConvertItem> _FilterConvertSource;
59
        public System.Collections.ObjectModel.ObservableCollection<ConvertItem> FilterConvertSource
60
        {
61
            get => _FilterConvertSource;
62
            set
63
            {
64
                _FilterConvertSource = value;
65
                OnPropertyChanged(() => FilterConvertSource);
66
            }
67
        }
68

    
69

    
70
        private System.Collections.ObjectModel.ObservableCollection<ConvertItem> _RealConvertSource;
71
        public System.Collections.ObjectModel.ObservableCollection<ConvertItem> RealConvertSource
72
        {
73
            get => _RealConvertSource;
74
            set
75
            {
76
                _RealConvertSource = value;
77
                OnPropertyChanged(() => RealConvertSource);
78
            }
79
        }
80

    
81

    
82
        private System.Windows.Documents.FlowDocument connectionLog;
83
        public System.Windows.Documents.FlowDocument ConnectionLog
84
        {
85
            get => connectionLog;
86
            set
87
            {
88
                if (connectionLog != value)
89
                {
90
                    connectionLog = value;
91
                    OnPropertyChanged(() => ConnectionLog);
92
                }
93
            }
94
        }
95

    
96

    
97
        private Telerik.Windows.Data.EnumMemberViewModel _SelectedStatus;
98
        public Telerik.Windows.Data.EnumMemberViewModel SelectedStatus
99
        {
100
            get => _SelectedStatus;
101
            set
102
            {
103
                _SelectedStatus = value;
104
                OnPropertyChanged(() => SelectedStatus);
105
            }
106
        }
107

    
108

    
109
        private SelectedCountItem _SelectedCount;
110
        public SelectedCountItem SelectedCount
111
        {
112
            get => _SelectedCount;
113
            set
114
            {
115
                _SelectedCount = value;
116
                OnPropertyChanged(() => SelectedCount);
117
            }
118
        }
119

    
120
        List<SelectedCountItem> _SelectedCountList;
121
        public List<SelectedCountItem> SelectedCountList
122
        {
123
            get
124
            {
125
                if (_SelectedCountList == null)
126
                {
127
                    _SelectedCountList = new List<SelectedCountItem>
128
                    {
129
                        new SelectedCountItem{DisplayMember = "50",ValueMember = 50},
130
                        new SelectedCountItem{DisplayMember = "100",ValueMember = 100},
131
                        new SelectedCountItem{DisplayMember = "150",ValueMember = 150},
132
                        new SelectedCountItem{DisplayMember = "200",ValueMember = 200}
133
                    };
134
                }
135

    
136
                return _SelectedCountList;
137
            }
138
        }
139

    
140
        private ConvertItem _SelectFilterConvert;
141
        public ConvertItem SelectFilterConvert
142
        {
143
            get => _SelectFilterConvert;
144
            set
145
            {
146
                _SelectFilterConvert = value;
147
                OnPropertyChanged(() => SelectFilterConvert);
148
            }
149
        }
150

    
151
        private ConvertItem _SelectRealConvert;
152
        public ConvertItem SelectRealConvert
153
        {
154
            get => _SelectRealConvert;
155
            set
156
            {
157
                _SelectRealConvert = value;
158
                OnPropertyChanged(() => SelectRealConvert);
159
            }
160
        }
161

    
162

    
163
        private StatusTypeList _StatusType;
164
        public StatusTypeList StatusType
165
        {
166
            get => _StatusType;
167
            set
168
            {
169
                _StatusType = value;
170
                OnPropertyChanged(() => StatusType);
171
            }
172
        }
173

    
174
        private bool _IsLoading;
175
        public bool IsLoading
176
        {
177
            get => _IsLoading;
178
            set
179
            {
180
                if (_IsLoading != value)
181
                {
182
                    _IsLoading = value;
183
                    OnPropertyChanged(() => IsLoading);
184
                }
185
            }
186
        }
187

    
188
        IEnumerable<Telerik.Windows.Data.EnumMemberViewModel> _StatusCodeList;
189
        public IEnumerable<Telerik.Windows.Data.EnumMemberViewModel> StatusCodeList
190
        {
191
            get
192
            {
193
                if (_StatusCodeList == null)
194
                {
195
                    _StatusCodeList = Telerik.Windows.Data.EnumDataSource.FromType<StatusCodeType>();
196
                }
197

    
198
                return _StatusCodeList;
199
            }
200
        }
201
        #endregion
202

    
203
        #region Command
204

    
205
        public DelegateCommand ConvertCommand { get; private set; }
206
        public DelegateCommand DeleteCommand { get; private set; }
207
        public DelegateCommand ValidateCommand { get; private set; }
208
        public DelegateCommand DataSaveFileGemBoxCommand { get; private set; }
209
        public DelegateCommand MarkusLinkCommand { get; private set; }
210
        #endregion
211

    
212
        #region Main Logic
213

    
214
        /// <summary>
215
        /// 각각의 Grid row 객체들 업데이트
216
        /// </summary>
217

    
218
        private DispatcherTimer dispatcherTimer;
219
        public override void Loaded()
220
        {
221
            base.Loaded();
222

    
223
            if (!App.IsDesignMode)
224
            {
225
                dispatcherTimer = new DispatcherTimer();
226
                dispatcherTimer.Tick += new EventHandler(Timer_Tick);
227
                dispatcherTimer.Interval = new TimeSpan(0, 0, 1);
228
                dispatcherTimer.Start();
229
            }
230
        }
231

    
232
        private async void Timer_Tick(object sender, EventArgs e)
233
        {
234
            dispatcherTimer.Stop();
235

    
236
            if (IsAcitve)
237
            {
238
                await App.Current.Dispatcher.InvokeAsync(() =>
239
                {
240
                    DataSelect();
241

    
242
                    AliveDataSelect();
243
                });
244
            }
245

    
246
            await Task.Delay(5000);
247

    
248
            //System.Threading.Thread.Sleep(new TimeSpan(0,0,0,0,100));
249

    
250
            dispatcherTimer.Start();
251
        }
252

    
253
        public override void Closed()
254
        {
255
            if (dispatcherTimer != null)
256
            {
257
                dispatcherTimer.Stop();
258
            }
259

    
260
            base.Closed();
261
        }
262

    
263

    
264
        #endregion
265

    
266
        #region Function
267

    
268
        #region Data Select
269

    
270
        /// <summary>
271
        /// 상단 그리드 중앙 그리드 출력 데이터
272
        /// </summary>
273
        private void DataSelect()
274
        {
275

    
276
            if (FilterConvertSource == null)
277
            {
278
                FilterConvertSource = new System.Collections.ObjectModel.ObservableCollection<ConvertItem>();
279
            }
280

    
281
            if (RealConvertSource == null)
282
            {
283
                RealConvertSource = new System.Collections.ObjectModel.ObservableCollection<ConvertItem>();
284
            }
285

    
286
            /// combobox 에서 선택된 items
287
            if (SelectedStatus != null)
288
            {
289
                DataSelect(new[] { (StatusCodeType)(SelectedStatus.Value) }, FilterConvertSource);
290
            }
291

    
292
            /// 컨버터중인 items
293
            RealDataSelect(new[] { StatusCodeType.None, StatusCodeType.Wait, StatusCodeType.PageLoading, StatusCodeType.Saving }, RealConvertSource);
294

    
295
        }
296

    
297
        private void RealDataSelect(IEnumerable<StatusCodeType> statusCodeTypeList, System.Collections.ObjectModel.ObservableCollection<ConvertItem> collection)
298
        {
299
            try
300
            {
301
                using (Markus.Service.DataBase.ConvertDatabase database = new Markus.Service.DataBase.ConvertDatabase(App.MarkusDataBaseConnecitonString))
302
                {
303
                    var items = database.GetConvertProjects(collection)//x:database객체 y:statusCodeTypeList의값  Count()안에 predicator 조건 만족하면 count개수안에 넣음
304
                                          .Take(SelectedCount.ValueMember).ToList();//
305

    
306
                    items.ForEach(newitem =>
307
                    {
308
                        collection.UpdateWhere(changeitem =>
309
                        ConvertItemEx.ChangeValues(changeitem, newitem), x => x.ConvertID == newitem.ConvertID && x.ProjectNumber == newitem.ProjectNumber);
310
                    });
311
                }
312
            }
313
            catch (Exception ex)
314
            {
315
                MessageBox.Show(ex.ToString());
316
            }
317
        }
318

    
319
        private void DataSelect(IEnumerable<StatusCodeType> statusCodeTypeList, System.Collections.ObjectModel.ObservableCollection<ConvertItem> collection)
320
        {
321
            try
322
            {
323
                using (Markus.Service.DataBase.ConvertDatabase database = new Markus.Service.DataBase.ConvertDatabase(App.MarkusDataBaseConnecitonString))
324
                {
325

    
326
                    int _status = 0;
327
                    if (SelectedStatus != null)
328
                    {
329
                        _status = (int)SelectedStatus.Value;
330
                    }
331

    
332
                    var items = database.GetConvertProjects(_status)//x:database객체 y:statusCodeTypeList의값  Count()안에 predicator 조건 만족하면 count개수안에 넣음
333
                                          .Take(SelectedCount.ValueMember).ToList();
334

    
335
                    if (collection.Count() == 0)
336
                    {
337
                        if (statusCodeTypeList.Count() == 1)
338
                        {
339
                            items.ForEach(x => collection.Add(x));
340
                        }
341
                    }
342
                    else
343
                    {
344

    
345
                        ////세미 업데이트
346
                        items.ForEach(newitem =>
347
                        {
348
                            collection.UpdateWhere(changeitem =>
349
                            ConvertItemEx.ChangeValues(changeitem, newitem), x => x.ProjectNumber == newitem.ProjectNumber && x.ConvertID == newitem.ConvertID);
350
                        });
351

    
352

    
353
                        if (statusCodeTypeList.Count() == 1)
354
                        {
355
                            //삭제
356
                            for (int i = collection.Count() - 1; i >= 0; --i)
357
                            {
358
                                var item = collection[i];
359

    
360
                                if (items.Count(x => x.ConvertID == item.ConvertID && x.ProjectNumber == item.ProjectNumber) == 0)//디비에서 가져온 값과 마지막값부터 차례대로 비교
361
                                {//참=> 0제외한 모든 수
362
                                    collection.RemoveAt(i);
363
                                }
364
                            }
365
                        }
366

    
367
                        if (statusCodeTypeList.Count() == 1)
368
                        {
369
                            //추가 convert 후 추가됨
370
                            foreach (var item in items)
371
                            {
372
                                if (collection.Count(x => x.ConvertID == item.ConvertID && x.ProjectNumber == item.ProjectNumber) == 0)//그리드와 디비 변동 없으면 안들어감
373
                                {
374
                                    /*for (int i = 0; i < collection.Count()+1; i++)//위 그리드에서 카운드 개수 변함 없고 컨버터 끝난 후 추가할때 createtime 비교 하며 order by 순으로 추가*/
375
                                    for (int i = 0; i < 200; i++)
376
                                    {
377
                                        if (i < collection.Count() - 1)
378
                                        {
379
                                            if (DateTime.Compare(collection[i].CreateTime, item.CreateTime) < 0)
380
                                            {
381
                                                collection.Insert(i, item);
382
                                                break;
383
                                            }
384
                                        }
385
                                        else
386
                                        {
387
                                            collection.Add(item);
388
                                            break;
389
                                        }
390
                                    }
391

    
392
                                }
393

    
394
                            }
395
                        }
396

    
397
                    }
398
                }
399

    
400
            }
401
            catch (Exception ex)
402
            {
403
                MessageBox.Show(ex.ToString());
404
            }
405
        }
406

    
407
        /// <summary>
408
        /// 서비스의 실시간 컨버터 Item
409
        /// </summary>
410
        private async void AliveDataSelect()
411
        {
412
            try
413
            {
414
                List<ConvertItem> newitems = new List<ConvertItem>();
415

    
416
                foreach (var client in App.StationClientList)
417
                {
418
                    if (await SimplePingAsync(client.Endpoint.Address.ToString()))
419
                    {
420
                        try
421
                        {
422
                            List<ConvertItem> itemsToList = new List<ConvertItem>();
423
                            var items = await client.AliveConvertListAsync();
424
                            foreach (var item in items)
425
                            {
426
                                ConvertItem itemsToEach = new ConvertItem();
427
                                itemsToEach.ServiceID = item.ServiceID;
428
                                itemsToEach.ConvertID = item.ConvertID;
429
                                itemsToEach.ProjectNumber = item.ProjectNumber;
430

    
431
                                if (item.ConvertState != null)
432
                                {
433
                                    itemsToEach.ConvertState = (StatusCodeType)Enum.Parse(typeof(StatusCodeType), item.ConvertState);
434
                                }
435

    
436
                                itemsToEach.CurrentPageNo = item.CurrentPageNo;
437
                                itemsToEach.TotalPage = item.TotalPage;
438
                                itemsToEach.OriginfilePath = item.OriginfilePath;
439
                                itemsToEach.ConvertPath = item.ConvertPath;
440

    
441
                                itemsToList.Add(itemsToEach);
442
                            }
443
                            newitems.AddRange(itemsToList);
444
                            System.Diagnostics.Trace.WriteLine($"{client.Endpoint.Address} ping");
445

    
446
                            if (items.Count() == 0)
447
                            {
448
                                System.Diagnostics.Trace.WriteLine($"{client.Endpoint.Address} Alive Items is zero.");
449
                            }
450
                        }
451
                        catch (Exception ex)
452
                        {
453
                            System.Diagnostics.Trace.Fail($"{client.Endpoint.Address} {ex.Message}");
454
                        }
455
                    }
456
                    else
457
                    {
458
                        System.Diagnostics.Trace.Fail($"{client.Endpoint.Address} ping Error");
459
                    }
460
                }
461

    
462
                ItemsUpdate(newitems);
463
                await System.Windows.Application.Current.Dispatcher.InvokeAsync(() => ItemsUpdate(newitems));
464
            }
465
            catch (Exception ex)
466
            {
467
                System.Diagnostics.Debug.WriteLine(ex.ToString());
468
            }
469
        }
470

    
471
        /// <summary>
472
        /// AliveDataSelect의 Data Update
473
        /// </summary>
474
        /// <param name="newitems"></param>
475
        private void ItemsUpdate(List<ConvertItem> newitems)
476
        {
477

    
478
            foreach (var item in newitems)
479
            {
480
                item.OriginfilePath = HttpUtility.UrlDecode(item.OriginfilePath);
481
            }
482

    
483
            if (AliveItems == null)
484
            {
485
                AliveItems = new System.Collections.ObjectModel.ObservableCollection<ConvertItem>();
486

    
487
                foreach (var item in newitems)
488
                {
489
                    AliveItems.Add(item);
490
                }
491
            }
492
            else
493
            {
494
                /// 데이터 업데이트
495
                newitems.ForEach(newitem =>
496
                {
497
                    AliveItems.UpdateWhere(changeitem => ConvertItemEx.ChangeValues(changeitem, newitem), x => x.ProjectNumber == newitem.ProjectNumber && x.ConvertID == newitem.ConvertID);
498
                });
499

    
500
                // 추가
501
                foreach (var item in newitems)
502
                {
503
                    if (AliveItems.Count(x => x.ConvertID == item.ConvertID && x.ProjectNumber == item.ProjectNumber) == 0)
504
                    {
505
                        AliveItems.Add(item);
506
                    }
507
                }
508

    
509
                /// 삭제
510

    
511
                for (int i = AliveItems.Count() - 1; i > -1; --i)
512
                {
513
                    var item = AliveItems[i];
514

    
515
                    if (newitems.Count(x => x.ConvertID == item.ConvertID && x.ProjectNumber == item.ProjectNumber) == 0)
516
                    {
517
                        try
518
                        {
519
                            AliveItems.RemoveAt(i);
520
                        }
521
                        catch (Exception ex)
522
                        {
523
                            System.Diagnostics.Debug.WriteLine(ex.ToString());
524
                        }
525
                    }
526
                }
527
            }
528
        }
529

    
530

    
531
        public static async Task<bool> SimplePingAsync(string uri)
532
        {
533
            bool result = false;
534

    
535
            try
536
            {
537
                using (System.Net.Http.HttpClient Client = new System.Net.Http.HttpClient())
538
                {
539
                    Client.Timeout = new TimeSpan(0, 0, 60);
540

    
541
                    var message = await Client.GetAsync(uri);
542

    
543
                    System.Net.HttpStatusCode StatusCode = message.StatusCode;
544

    
545
                    switch (StatusCode)
546
                    {
547

    
548
                        case System.Net.HttpStatusCode.Accepted:
549
                        case System.Net.HttpStatusCode.OK:
550
                            result = true;
551
                            break;
552
                    }
553
                }
554
            }
555
            catch (Exception ex)
556
            {
557
                result = false;
558
                System.Diagnostics.Debug.WriteLine(ex.ToString());
559
            }
560

    
561
            return result;
562
        }
563

    
564
        #endregion
565

    
566
        #region Data Convert
567

    
568
        private void DataConvert(object obj)
569
        {
570
            if (SelectFilterConvert == null && SelectRealConvert == null)
571
            {
572
                MessageBox.Show("왼쪽 버튼 클릭 후 Converter 해주세요!");
573
            }
574
            else
575
            {
576
                ConvertDatabase _DataConvert = new ConvertDatabase(App.MarkusDataBaseConnecitonString);
577
                var resultRealConvert = 0;
578
                var resultFiltertConvert = 0;
579

    
580
                if (SelectRealConvert != null)
581
                {
582
                    resultRealConvert = _DataConvert.SetCleanUpItem(SelectRealConvert);
583
                }
584
                else if (SelectFilterConvert != null)
585
                {
586
                    resultFiltertConvert = _DataConvert.SetCleanUpItem(SelectFilterConvert);
587
                }
588
                System.Diagnostics.Debug.WriteLine(resultRealConvert + "  " + resultFiltertConvert);
589

    
590
                using (Markus.Service.DataBase.ConvertDatabase database = new Markus.Service.DataBase.ConvertDatabase(App.MarkusDataBaseConnecitonString))
591
                {
592
                    var items = database.GetConvertProjects(SelectFilterConvert);
593

    
594
                    foreach (var item in items)
595
                    {
596
                        RealConvertSource.Add(item);
597
                    }
598

    
599
                }
600
            }
601
        }
602

    
603
        #endregion
604

    
605
        #region Validation
606

    
607
        private void DataValidate(object obj)
608
        {
609

    
610
            bool result = false;
611

    
612
            WebRequest webRequest = WebRequest.Create(SelectFilterConvert.OriginfilePath);
613
            webRequest.Timeout = 1200; // miliseconds
614
            webRequest.Method = "HEAD";
615

    
616
            HttpWebResponse response = null;
617

    
618
            try
619
            {
620
                response = (HttpWebResponse)webRequest.GetResponse();
621
                result = true;
622
            }
623
            catch (WebException webException)
624
            {
625
                MessageBox.Show(SelectFilterConvert.FileName + " doesn't exist: " + webException.Message);
626
                result = true;
627
            }
628
            finally
629
            {
630
                if (response != null)
631
                {
632
                    response.Close();
633
                }
634
            }
635
            if (result == true)
636
            {
637
                MessageBox.Show("File exists");
638
            }
639
        }
640

    
641
        #endregion
642

    
643
        #region MarkusLink
644

    
645
        private void MarkusLink(object obj)///여기서 부터 
646
        {
647
            if (obj is ConvertItem)
648
            {
649
                if (obj != null)
650
                {
651
                    var convertitem = obj as ConvertItem;
652

    
653
                    SelectFilterConvert = convertitem;
654

    
655
                    SelectRealConvert = convertitem;
656

    
657
                    ProcessStartInfo startInfo = null;
658

    
659
                    startInfo = new ProcessStartInfo("iexplore.exe", convertitem.MarkusLink);
660

    
661
                    Process.Start(startInfo);
662
                }
663
            }
664
        }
665

    
666
        #endregion
667

    
668
        #region Data Delete
669

    
670
        private void DataDelete(object obj)
671
        {
672
            RadWindow.Alert("정말로 삭제 하시겠습니까?", this.OnClosed);
673
        }
674

    
675
        private void OnClosed(object sender, WindowClosedEventArgs e)
676
        {
677
            var result = e.DialogResult;
678
            if (result == true)
679
            {
680
                ConvertDatabase _DataConvert = new ConvertDatabase(App.MarkusDataBaseConnecitonString);
681
                var resultRealConvert = _DataConvert.RemoveItem(SelectRealConvert.ConvertID);
682
                var resultFiltertConvert = _DataConvert.RemoveItem(SelectFilterConvert.ConvertID);
683
                System.Diagnostics.Debug.WriteLine(resultRealConvert + "  " + resultFiltertConvert);
684
            }
685
        }
686

    
687

    
688
        #endregion
689

    
690
        #region Data Export
691

    
692

    
693
        /// <summary>
694
        /// 필터된 상단 그리드 엑셀로 출력
695
        /// </summary>
696

    
697
        public void DataExportData(object obj)
698
        {
699
            SaveFileDialog saveFileDialog = new SaveFileDialog();
700

    
701
            saveFileDialog.FileName = "Document"; // Default file name
702
            saveFileDialog.DefaultExt = ".txt"; // Default file extension
703
            saveFileDialog.Filter = "Csv documents (.Csv)|*.csv|Excel(2017~2019)Worksheets|*.xlsx"; // Filter files by extension
704

    
705

    
706
            if (saveFileDialog.ShowDialog() == true)
707
            {
708

    
709

    
710
                if (!string.IsNullOrWhiteSpace(saveFileDialog.FileName))
711
                {
712

    
713
                    var extension = new System.IO.FileInfo(saveFileDialog.FileName).Extension;
714

    
715
                    if (extension == ".xlsx" || extension == ".csv")
716
                    {
717

    
718
                        var headers = new List<HeaderMember>
719
                        {
720
                            new HeaderMember{HeaderName = "ServiceID", Property = "ServiceID" },
721
                            new HeaderMember{HeaderName = "ConvertID", Property = "ConvertID" },
722
                            new HeaderMember{HeaderName = "ProjectNumber", Property = "ProjectNumber" },
723
                            new HeaderMember{HeaderName = "ConvertState", Property = "ConvertState" },
724
                            new HeaderMember{HeaderName = "CurrentPageNo", Property = "CurrentPageNo" },
725
                            new HeaderMember{HeaderName = "TotalPage", Property = "TotalPage" },
726
                            new HeaderMember{HeaderName = "OriginfilePath", Property = "OriginfilePath" },
727
                            new HeaderMember{HeaderName = "ConvertPath", Property = "ConvertPath" },
728
                            new HeaderMember{HeaderName = "CreateTime", Property = "CreateTime" },
729
                            new HeaderMember{HeaderName = "Exception", Property = "Exception" },
730
                            new HeaderMember{HeaderName = "ProcessorAffinity", Property = "ProcessorAffinity" },
731
                            new HeaderMember{HeaderName = "ReConverter", Property = "ReConverter" },
732
                            new HeaderMember{HeaderName = "UniqueKey", Property = "UniqueKey" }
733
                        };
734

    
735

    
736
                        DataExport dataExport = new DataExport();
737
                        dataExport.DataExportExcel(saveFileDialog.FileName, "Hello world", FilterConvertSource, headers);
738
                        //_dataExport.DataExportExcel(saveFileDialog.FileName, saveFileDialog.FileName.ToString(),  Projectsource, headers);
739
                        //GemBoxFileSave(obj);
740
                    }
741
                }
742
            }
743
        }
744

    
745
        #endregion
746

    
747
        #endregion
748
    }
749
}
750

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