프로젝트

일반

사용자정보

개정판 78683624

ID78683624e478176eb22f87d87f662026e46835e7
상위 7b1db8cc
하위 5c9d08be

semi 이(가) 약 5년 전에 추가함

ConvertPath Icon추가 & Interface삭제

Change-Id: I9b142f056f876d6daa2e2d9f527cf03b93997078

차이점 보기:

ConvertService/ServiceBase/Markus.Service.StationController/ViewModel/FinalPDFViewModel.cs
13 13
using System.Windows;
14 14
using Telerik.Windows.Controls;
15 15
using Telerik.Windows.Data;
16
using ConvertItem = Markus.Service.Interface.ConvertItem;
16
//using ConvertItem = Markus.Service.Interface.ConvertItem;
17 17
using System.Net;
18 18
using System.Windows.Threading;
19 19
using System.Diagnostics;
......
23 23
using System.Windows.Controls;
24 24
using System.IO;
25 25
using Newtonsoft.Json;
26
using Markus.Service.Interface;
26
//using Markus.Service.Interface;
27
using static Markus.Service.StationController.Data.FinalPDF;
27 28

  
28 29
namespace Markus.Service.StationController.ViewModel
29 30
{
......
45 46
            RemoveCreateTimeFilterCommand = new DelegateCommand(RemoveCreateTimeFilter);
46 47
            ResetCommand = new DelegateCommand(Reset);
47 48
            ConverAddCommand = new DelegateCommand(ConverAdd);
49
            ConvertPathFileSearchCommand = new DelegateCommand(ConvertPathFileSearch);
48 50
        }
49 51

  
50 52
        #endregion
51 53

  
52 54
        #region Properties
53 55

  
54
        private System.Collections.ObjectModel.ObservableCollection<ConvertItem> _FilterSearch;
55
        public System.Collections.ObjectModel.ObservableCollection<ConvertItem> FilterSearch
56
        private System.Collections.ObjectModel.ObservableCollection<FinalPDF> _FilterSearch;
57
        public System.Collections.ObjectModel.ObservableCollection<FinalPDF> FilterSearch
56 58
        {
57 59
            get
58 60
            {
59 61
                if (_FilterSearch == null)
60 62
                {
61
                    _FilterSearch = new System.Collections.ObjectModel.ObservableCollection<ConvertItem>
63
                    _FilterSearch = new System.Collections.ObjectModel.ObservableCollection<FinalPDF>
62 64
                            {
63
                                new ConvertItem{ProjectNumber = "Filter Search"}
65
                                new FinalPDF{ProjectNumber = "Filter Search"}
64 66
                            };
65 67
                }
66 68

  
......
68 70
            }
69 71
        }
70 72

  
71
        private System.Collections.ObjectModel.ObservableCollection<ConvertItem> _AliveItems;
72
        public System.Collections.ObjectModel.ObservableCollection<ConvertItem> AliveItems
73
        private System.Collections.ObjectModel.ObservableCollection<FinalPDF> _AliveItems;
74
        public System.Collections.ObjectModel.ObservableCollection<FinalPDF> AliveItems
73 75
        {
74 76
            get => _AliveItems;
75 77
            set
......
88 90
            }
89 91
        }
90 92

  
91
        private System.Collections.ObjectModel.ObservableCollection<ConvertItem> _FilterConvertSource;
92
        public System.Collections.ObjectModel.ObservableCollection<ConvertItem> FilterConvertSource
93
        private System.Collections.ObjectModel.ObservableCollection<FinalPDF> _FilterConvertSource;
94
        public System.Collections.ObjectModel.ObservableCollection<FinalPDF> FilterConvertSource
93 95
        {
94 96
            get
95 97
            {
96 98
                if (_FilterConvertSource == null)
97 99
                {
98
                    _FilterConvertSource = new System.Collections.ObjectModel.ObservableCollection<ConvertItem>();
100
                    _FilterConvertSource = new System.Collections.ObjectModel.ObservableCollection<FinalPDF>();
99 101
                }
100 102
                return _FilterConvertSource;
101 103
            }
......
107 109
        }
108 110

  
109 111

  
110
        private System.Collections.ObjectModel.ObservableCollection<ConvertItem> _RealConvertSource;
111
        public System.Collections.ObjectModel.ObservableCollection<ConvertItem> RealConvertSource
112
        private System.Collections.ObjectModel.ObservableCollection<FinalPDF> _RealConvertSource;
113
        public System.Collections.ObjectModel.ObservableCollection<FinalPDF> RealConvertSource
112 114
        {
113 115
            get => _RealConvertSource;
114 116
            set
......
177 179
            }
178 180
        }
179 181

  
180
        private ConvertItem _SelectFilterConvert;
181
        public ConvertItem SelectFilterConvert
182
        private FinalPDF _SelectFilterConvert;
183
        public FinalPDF SelectFilterConvert
182 184
        {
183 185
            get => _SelectFilterConvert;
184 186
            set
......
188 190
            }
189 191
        }
190 192

  
191
        private ConvertItem _SelectRealConvert;
192
        public ConvertItem SelectRealConvert
193
        private FinalPDF _SelectRealConvert;
194
        public FinalPDF SelectRealConvert
193 195
        {
194 196
            get => _SelectRealConvert;
195 197
            set
......
200 202
        }
201 203

  
202 204

  
203
        private ConvertItem _SelectAliveConvert;
204
        public ConvertItem SelectAliveConvert
205
        private FinalPDF _SelectAliveConvert;
206
        public FinalPDF SelectAliveConvert
205 207
        {
206 208
            get => _SelectAliveConvert;
207 209
            set
......
569 571
        public DelegateCommand DataFilterCommand { get; private set; }
570 572
        public DelegateCommand ResetCommand { get; private set; }
571 573
        public DelegateCommand ConverAddCommand { get; private set; }
574
        public DelegateCommand ConvertPathFileSearchCommand { get; private set; }
572 575

  
573 576
        #endregion
574 577

  
......
638 641

  
639 642
            if (FilterConvertSource == null)
640 643
            {
641
                FilterConvertSource = new System.Collections.ObjectModel.ObservableCollection<ConvertItem>();
644
                FilterConvertSource = new System.Collections.ObjectModel.ObservableCollection<FinalPDF>();
642 645
            }
643 646

  
644 647
            if (RealConvertSource == null)
645 648
            {
646
                RealConvertSource = new System.Collections.ObjectModel.ObservableCollection<ConvertItem>();
649
                RealConvertSource = new System.Collections.ObjectModel.ObservableCollection<FinalPDF>();
647 650
            }
648 651

  
649 652
            /// combobox 에서 선택된 items
......
657 660

  
658 661
        }
659 662

  
660
        private void RealDataSelect(IEnumerable<StatusCodeType> statusCodeTypeList, System.Collections.ObjectModel.ObservableCollection<ConvertItem> collection)
663
        private void RealDataSelect(IEnumerable<StatusCodeType> statusCodeTypeList, System.Collections.ObjectModel.ObservableCollection<FinalPDF> collection)
661 664
        {
662 665
            try
663 666
            {
664 667
                using (markusEntities entities = new markusEntities(App.MarkusDataBaseConnecitonString))
665 668
                {
666
                    List<ConvertItem> Listitems = new List<ConvertItem>();
669
                    List<FinalPDF> Listitems = new List<FinalPDF>();
667 670

  
668 671
                    foreach (var coll in collection)
669 672
                    {
......
674 677
                        {
675 678
                            var MarkusLink = "kcom://" + CreateMarkusParam(coll.ConvertID, coll.DocumentID, "doftech");
676 679

  
677
                            ConvertItem AddItem = new ConvertItem(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, x.REVISION, x.CURRENT_PAGE,
678
                                x.TOTAL_PAGE, x.EXCEPTION, x.GROUP_NO, x.CREATE_DATETIME, x.START_DATETIME, x.END_DATETIME, x.ORIGINAL_FILE, x.CONVERT_PATH, MarkusLink, 0);
680
                            FinalPDF AddItem = 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, x.REVISION, x.CURRENT_PAGE,
681
                                x.TOTAL_PAGE, x.EXCEPTION, x.GROUP_NO, x.CREATE_DATETIME, x.START_DATETIME, x.END_DATETIME, x.ORIGINAL_FILE, x.CONVERT_PATH, MarkusLink);
679 682
                            Listitems.Add(AddItem);
680 683

  
681 684
                        }
......
697 700
            }
698 701
        }
699 702

  
700
        private void DataSelect(IEnumerable<StatusCodeType> statusCodeTypeList, System.Collections.ObjectModel.ObservableCollection<ConvertItem> collection)
703
        private void DataSelect(IEnumerable<StatusCodeType> statusCodeTypeList, System.Collections.ObjectModel.ObservableCollection<FinalPDF> collection)
701 704
        {
702 705
            try
703 706
            {
......
713 716
                    var items = entities.SELECT_FINAL_PDF_ITEM(null, null, null, null, null, null, null, null, _status, SelectedCount.ValueMember, null, null, null, null, null,
714 717
                        null, null, null, null).ToList();
715 718

  
716
                    List<ConvertItem> Listitems = new List<ConvertItem>();
719
                    List<FinalPDF> Listitems = new List<FinalPDF>();
717 720

  
718 721
                    foreach (var x in items)
719 722
                    {
720 723
                        var MarkusLink = "kcom://" + CreateMarkusParam(x.ID, x.DOCUMENT_ID, "doftech");
721 724

  
722
                        ConvertItem AddItem = new ConvertItem(x.ID, x.PROJECT_NO, _status, x.DOCUMENT_ID, x.MARKUPINFO_ID, x.DOCINFO_ID, x.DOCUMENT_NAME, x.DOCUMENT_NO, x.CREATE_USER_ID,
725
                        FinalPDF AddItem = new FinalPDF(x.ID, x.PROJECT_NO, _status, x.DOCUMENT_ID, x.MARKUPINFO_ID, x.DOCINFO_ID, x.DOCUMENT_NAME, x.DOCUMENT_NO, x.CREATE_USER_ID,
723 726
                            x.REVISION, x.CURRENT_PAGE, x.TOTAL_PAGE, x.EXCEPTION, x.GROUP_NO, x.CREATE_DATETIME, x.START_DATETIME, x.END_DATETIME
724
                         , x.ORIGINAL_FILE, x.CONVERT_PATH, MarkusLink, 0);
727
                         , x.ORIGINAL_FILE, x.CONVERT_PATH, MarkusLink);
725 728

  
726 729
                        Listitems.Add(AddItem);
727 730
                    }
......
802 805
            }
803 806
        }
804 807

  
805
        private void DataSearch(IEnumerable<StatusCodeType> statusCodeTypeList, System.Collections.ObjectModel.ObservableCollection<ConvertItem> collection)
808
        private void DataSearch(IEnumerable<StatusCodeType> statusCodeTypeList, System.Collections.ObjectModel.ObservableCollection<FinalPDF> collection)
806 809
        {
807 810
            try
808 811
            {
......
829 832
                        CreateUser_IDFilter, _status, SelectedCount.ValueMember, GROUP_NOFilter, REVISIONFilter, Start_CreateTime, Finish_CreateTime, null, null, null, null, Document_URLFilter).ToList();
830 833

  
831 834

  
832
                    List<ConvertItem> Listitems = new List<ConvertItem>();
835
                    List<FinalPDF> Listitems = new List<FinalPDF>();
833 836

  
834 837
                    foreach (var x in items)
835 838
                    {
836 839
                        var MarkusLink = "kcom://" + CreateMarkusParam(x.ID, x.DOCUMENT_ID, "doftech");
837 840

  
838
                        ConvertItem AddItem = new ConvertItem(x.ID, x.PROJECT_NO, _status, x.DOCUMENT_ID, x.MARKUPINFO_ID, x.DOCINFO_ID, x.DOCUMENT_NAME, x.DOCUMENT_NO, x.CREATE_USER_ID,
841
                        FinalPDF AddItem = new FinalPDF(x.ID, x.PROJECT_NO, _status, x.DOCUMENT_ID, x.MARKUPINFO_ID, x.DOCINFO_ID, x.DOCUMENT_NAME, x.DOCUMENT_NO, x.CREATE_USER_ID,
839 842
                            x.REVISION, x.CURRENT_PAGE, x.TOTAL_PAGE, x.EXCEPTION, x.GROUP_NO, x.CREATE_DATETIME, x.START_DATETIME, x.END_DATETIME
840
                         , x.ORIGINAL_FILE, x.CONVERT_PATH, MarkusLink, 0);
843
                         , x.ORIGINAL_FILE, x.CONVERT_PATH, MarkusLink);
841 844
                        Listitems.Add(AddItem);
842 845
                        //이거 없으면 collection.Insert(i, item); 할때 문제 생김
843 846
                    }
......
925 928
        {
926 929
            try
927 930
            {
928
                List<ConvertItem> newitems = new List<ConvertItem>();
931
                List<FinalPDF> newitems = new List<FinalPDF>();
929 932
                foreach (var client in App.StationClientList)
930 933
                {
931 934
                    if (await SimplePingAsync(client.Endpoint.Address.ToString()))
932 935
                    {
933 936
                        try
934 937
                        {
935
                            List<ConvertItem> itemsToList = new List<ConvertItem>();
938
                            List<FinalPDF> itemsToList = new List<FinalPDF>();
936 939
                            var items = await client.AliveConvertListAsync();
937 940
                            string result = "";
938 941

  
939 942
                            foreach (var item in items)
940 943
                            {
941
                                ConvertItem itemsToEach = new ConvertItem();
944
                                FinalPDF itemsToEach = new FinalPDF();
942 945
                                itemsToEach.ConvertID = item.ConvertID;
943 946
                                itemsToEach.ProjectNumber = item.ProjectNumber;
944 947

  
......
1011 1014
        /// AliveDataSelect의 Data Update
1012 1015
        /// </summary>
1013 1016
        /// <param name = "newitems" ></ param >
1014
        private void ItemsUpdate(List<ConvertItem> newitems)
1017
        private void ItemsUpdate(List<FinalPDF> newitems)
1015 1018
        {
1016 1019

  
1017 1020
            foreach (var item in newitems)
......
1021 1024

  
1022 1025
            if (AliveItems == null)
1023 1026
            {
1024
                AliveItems = new System.Collections.ObjectModel.ObservableCollection<ConvertItem>();
1027
                AliveItems = new System.Collections.ObjectModel.ObservableCollection<FinalPDF>();
1025 1028

  
1026 1029
                foreach (var item in newitems)
1027 1030
                {
......
1141 1144
                    {
1142 1145
                        var MarkusLink = "kcom://" + CreateMarkusParam(x.ID, x.DOCUMENT_ID, "doftech");
1143 1146

  
1144
                        ConvertItem AddItem = new ConvertItem(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,
1147
                        FinalPDF AddItem = 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,
1145 1148
                            x.REVISION, x.CURRENT_PAGE, x.TOTAL_PAGE, x.EXCEPTION, x.GROUP_NO, x.CREATE_DATETIME, x.START_DATETIME, x.END_DATETIME
1146
                         , x.ORIGINAL_FILE, x.CONVERT_PATH, MarkusLink, 0);
1149
                         , x.ORIGINAL_FILE, x.CONVERT_PATH, MarkusLink);
1147 1150

  
1148 1151
                        RealConvertSource.Add(AddItem);
1149 1152

  
......
1159 1162
        }
1160 1163

  
1161 1164

  
1162
        public int SetCleanUpItem(ConvertItem _ConvertItem)
1165
        public int SetCleanUpItem(FinalPDF _ConvertItem)
1163 1166
        {
1164 1167
            using (markusEntities entities = new markusEntities(App.MarkusDataBaseConnecitonString))
1165 1168
            {
......
1307 1310

  
1308 1311
        private void MarkusLink(object obj)///여기서 부터 
1309 1312
        {
1310
            if (obj is ConvertItem)
1313
            if (obj is FinalPDF)
1311 1314
            {
1312 1315
                if (obj != null)
1313 1316
                {
1314
                    var convertitem = obj as ConvertItem;
1317
                    var convertitem = obj as FinalPDF;
1315 1318

  
1316 1319
                    SelectFilterConvert = convertitem;
1317 1320

  
......
1478 1481

  
1479 1482
        #endregion
1480 1483

  
1484

  
1485
        #region ConvertPathFileSearch
1486

  
1487
        /// <summary>
1488
        ///  ConvertPath 파일 탐색기로 열리는 아이콘
1489
        /// </summary>
1490

  
1491
        public void ConvertPathFileSearch(object obj)
1492
        {
1493
            if (obj is FinalPDF)
1494
            {
1495
                if (obj != null)
1496
                {
1497
                    var convertitem = obj as DataConvert;
1498

  
1499
                    SaveFileDialog saveFileDialog = new SaveFileDialog();
1500

  
1501
                    saveFileDialog.FileName = "Document"; // Default file name
1502
                    saveFileDialog.DefaultExt = ".txt"; // Default file extension
1503
                    saveFileDialog.Filter = "Csv documents (.Csv)|*.csv|Excel(2017~2019)Worksheets|*.xlsx"; // Filter files by extension
1504

  
1505

  
1506
                    if (saveFileDialog.ShowDialog() == true)
1507
                    {
1508
                    }
1509
                }
1510
            }
1511
        }
1512

  
1513
        #endregion
1514

  
1515

  
1481 1516
        #endregion
1482 1517
    }
1483 1518
}

내보내기 Unified diff

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