개정판 2f07b70a
chart bar 하는 중
Change-Id: Iba0e8eceec980c21c4a4495f4e6c9fb4dfcc4759
ConvertService/ServiceBase/Markus.Service.StationController/ViewModel/DataBaseItemsModel.cs | ||
---|---|---|
23 | 23 |
using System.IO; |
24 | 24 |
using Newtonsoft.Json; |
25 | 25 |
//using Markus.Service.Interface; |
26 |
using static Markus.Service.StationController.Data.DataConvert;
|
|
26 |
using static Markus.Service.StationController.Data.ConvertPDF;
|
|
27 | 27 |
|
28 | 28 |
namespace Markus.Service.StationController.ViewModel |
29 | 29 |
{ |
... | ... | |
53 | 53 |
|
54 | 54 |
#region Properties |
55 | 55 |
|
56 |
private System.Collections.ObjectModel.ObservableCollection<DataConvert> _FilterSearch;
|
|
57 |
public System.Collections.ObjectModel.ObservableCollection<DataConvert> FilterSearch
|
|
56 |
private System.Collections.ObjectModel.ObservableCollection<ConvertPDF> _FilterSearch;
|
|
57 |
public System.Collections.ObjectModel.ObservableCollection<ConvertPDF> FilterSearch
|
|
58 | 58 |
{ |
59 | 59 |
get |
60 | 60 |
{ |
61 | 61 |
if (_FilterSearch == null) |
62 | 62 |
{ |
63 |
_FilterSearch = new System.Collections.ObjectModel.ObservableCollection<DataConvert>
|
|
63 |
_FilterSearch = new System.Collections.ObjectModel.ObservableCollection<ConvertPDF>
|
|
64 | 64 |
{ |
65 |
new DataConvert{ProjectNumber = "Filter Search"}
|
|
65 |
new ConvertPDF{ProjectNumber = "Filter Search"}
|
|
66 | 66 |
}; |
67 | 67 |
} |
68 | 68 |
|
... | ... | |
70 | 70 |
} |
71 | 71 |
} |
72 | 72 |
|
73 |
private System.Collections.ObjectModel.ObservableCollection<DataConvert> _AliveItems;
|
|
74 |
public System.Collections.ObjectModel.ObservableCollection<DataConvert> AliveItems
|
|
73 |
private System.Collections.ObjectModel.ObservableCollection<ConvertPDF> _AliveItems;
|
|
74 |
public System.Collections.ObjectModel.ObservableCollection<ConvertPDF> AliveItems
|
|
75 | 75 |
{ |
76 | 76 |
get => _AliveItems; |
77 | 77 |
set |
... | ... | |
90 | 90 |
} |
91 | 91 |
} |
92 | 92 |
|
93 |
private System.Collections.ObjectModel.ObservableCollection<DataConvert> _FilterConvertSource;
|
|
94 |
public System.Collections.ObjectModel.ObservableCollection<DataConvert> FilterConvertSource
|
|
93 |
private System.Collections.ObjectModel.ObservableCollection<ConvertPDF> _FilterConvertSource;
|
|
94 |
public System.Collections.ObjectModel.ObservableCollection<ConvertPDF> FilterConvertSource
|
|
95 | 95 |
{ |
96 | 96 |
get |
97 | 97 |
{ |
98 | 98 |
if (_FilterConvertSource == null) |
99 | 99 |
{ |
100 |
_FilterConvertSource = new System.Collections.ObjectModel.ObservableCollection<DataConvert>();
|
|
100 |
_FilterConvertSource = new System.Collections.ObjectModel.ObservableCollection<ConvertPDF>();
|
|
101 | 101 |
} |
102 | 102 |
return _FilterConvertSource; |
103 | 103 |
} |
... | ... | |
109 | 109 |
} |
110 | 110 |
|
111 | 111 |
|
112 |
private System.Collections.ObjectModel.ObservableCollection<DataConvert> _RealConvertSource;
|
|
113 |
public System.Collections.ObjectModel.ObservableCollection<DataConvert> RealConvertSource
|
|
112 |
private System.Collections.ObjectModel.ObservableCollection<ConvertPDF> _RealConvertSource;
|
|
113 |
public System.Collections.ObjectModel.ObservableCollection<ConvertPDF> RealConvertSource
|
|
114 | 114 |
{ |
115 | 115 |
get => _RealConvertSource; |
116 | 116 |
set |
... | ... | |
179 | 179 |
} |
180 | 180 |
} |
181 | 181 |
|
182 |
private DataConvert _SelectFilterConvert;
|
|
183 |
public DataConvert SelectFilterConvert
|
|
182 |
private ConvertPDF _SelectFilterConvert;
|
|
183 |
public ConvertPDF SelectFilterConvert
|
|
184 | 184 |
{ |
185 | 185 |
get => _SelectFilterConvert; |
186 | 186 |
set |
... | ... | |
190 | 190 |
} |
191 | 191 |
} |
192 | 192 |
|
193 |
private DataConvert _SelectRealConvert;
|
|
194 |
public DataConvert SelectRealConvert
|
|
193 |
private ConvertPDF _SelectRealConvert;
|
|
194 |
public ConvertPDF SelectRealConvert
|
|
195 | 195 |
{ |
196 | 196 |
get => _SelectRealConvert; |
197 | 197 |
set |
... | ... | |
202 | 202 |
} |
203 | 203 |
|
204 | 204 |
|
205 |
private DataConvert _SelectAliveConvert;
|
|
206 |
public DataConvert SelectAliveConvert
|
|
205 |
private ConvertPDF _SelectAliveConvert;
|
|
206 |
public ConvertPDF SelectAliveConvert
|
|
207 | 207 |
{ |
208 | 208 |
get => _SelectAliveConvert; |
209 | 209 |
set |
... | ... | |
563 | 563 |
|
564 | 564 |
if (FilterConvertSource == null) |
565 | 565 |
{ |
566 |
FilterConvertSource = new System.Collections.ObjectModel.ObservableCollection<DataConvert>();
|
|
566 |
FilterConvertSource = new System.Collections.ObjectModel.ObservableCollection<ConvertPDF>();
|
|
567 | 567 |
} |
568 | 568 |
|
569 | 569 |
if (RealConvertSource == null) |
570 | 570 |
{ |
571 |
RealConvertSource = new System.Collections.ObjectModel.ObservableCollection<DataConvert>();
|
|
571 |
RealConvertSource = new System.Collections.ObjectModel.ObservableCollection<ConvertPDF>();
|
|
572 | 572 |
} |
573 | 573 |
|
574 | 574 |
/// combobox 에서 선택된 items |
... | ... | |
582 | 582 |
|
583 | 583 |
} |
584 | 584 |
|
585 |
private void RealDataSelect(IEnumerable<StatusCodeType> statusCodeTypeList, System.Collections.ObjectModel.ObservableCollection<DataConvert> collection)
|
|
585 |
private void RealDataSelect(IEnumerable<StatusCodeType> statusCodeTypeList, System.Collections.ObjectModel.ObservableCollection<ConvertPDF> collection)
|
|
586 | 586 |
{ |
587 | 587 |
try |
588 | 588 |
{ |
589 | 589 |
using (markusEntities entities = new markusEntities(App.MarkusDataBaseConnecitonString)) |
590 | 590 |
{ |
591 |
List<DataConvert> Listitems = new List<DataConvert>();
|
|
591 |
List<ConvertPDF> Listitems = new List<ConvertPDF>();
|
|
592 | 592 |
|
593 | 593 |
foreach (var coll in collection) |
594 | 594 |
{ |
... | ... | |
598 | 598 |
{ |
599 | 599 |
var MarkusLink = "kcom://" + CreateMarkusParam(x.PROJECT_NO, x.DOCUMENT_ID, "doftech"); |
600 | 600 |
|
601 |
DataConvert AddItem = new DataConvert(x.SERVICE_ID, x.ID, x.PROJECT_NO, x.STATUS, x.DOCUMENT_ID, x.DOCUMENT_NAME, x.DOCUMENT_NO, x.DOCUMENT_URL, x.REVISION, x.CURRENT_PAGE,
|
|
601 |
ConvertPDF AddItem = new ConvertPDF(x.SERVICE_ID, x.ID, x.PROJECT_NO, x.STATUS, x.DOCUMENT_ID, x.DOCUMENT_NAME, x.DOCUMENT_NO, x.DOCUMENT_URL, x.REVISION, x.CURRENT_PAGE,
|
|
602 | 602 |
x.TOTAL_PAGE, x.EXCEPTION, x.GROUP_NO, x.CREATE_DATETIME, x.START_DATETIME, x.END_DATETIME, x.DOCUMENT_URL, x.CONVERT_PATH, MarkusLink, x.RECONVERTER); |
603 | 603 |
Listitems.Add(AddItem); |
604 | 604 |
|
... | ... | |
619 | 619 |
} |
620 | 620 |
} |
621 | 621 |
|
622 |
private void DataSelect(IEnumerable<StatusCodeType> statusCodeTypeList, System.Collections.ObjectModel.ObservableCollection<DataConvert> collection)
|
|
622 |
private void DataSelect(IEnumerable<StatusCodeType> statusCodeTypeList, System.Collections.ObjectModel.ObservableCollection<ConvertPDF> collection)
|
|
623 | 623 |
{ |
624 | 624 |
try |
625 | 625 |
{ |
... | ... | |
635 | 635 |
var items = entities.SELECT_CONVERT_ITEM(null, null, null, _status, SelectedCount.ValueMember, null, null, null, |
636 | 636 |
null, null, null, null, null, null, null, null, null, null).ToList(); |
637 | 637 |
|
638 |
List<DataConvert> Listitems = new List<DataConvert>();
|
|
638 |
List<ConvertPDF> Listitems = new List<ConvertPDF>();
|
|
639 | 639 |
|
640 | 640 |
foreach (var x in items) |
641 | 641 |
{ |
642 | 642 |
var MarkusLink = "kcom://" + CreateMarkusParam(x.PROJECT_NO, x.DOCUMENT_ID, "doftech"); |
643 | 643 |
|
644 |
DataConvert AddItem = new DataConvert(x.SERVICE_ID, x.ID, x.PROJECT_NO, _status, x.DOCUMENT_ID, x.DOCUMENT_NAME, x.DOCUMENT_NO, x.DOCUMENT_URL, x.REVISION, x.CURRENT_PAGE,
|
|
644 |
ConvertPDF AddItem = new ConvertPDF(x.SERVICE_ID, x.ID, x.PROJECT_NO, x.STATUS, x.DOCUMENT_ID, x.DOCUMENT_NAME, x.DOCUMENT_NO, x.DOCUMENT_URL, x.REVISION, x.CURRENT_PAGE,
|
|
645 | 645 |
x.TOTAL_PAGE, x.EXCEPTION, x.GROUP_NO, x.CREATE_DATETIME, x.START_DATETIME, x.END_DATETIME, x.DOCUMENT_URL, x.CONVERT_PATH, MarkusLink, x.RECONVERTER); |
646 | 646 |
Listitems.Add(AddItem); |
647 | 647 |
|
... | ... | |
719 | 719 |
} |
720 | 720 |
} |
721 | 721 |
|
722 |
private void DataSearch(IEnumerable<StatusCodeType> statusCodeTypeList, System.Collections.ObjectModel.ObservableCollection<DataConvert> collection)
|
|
722 |
private void DataSearch(IEnumerable<StatusCodeType> statusCodeTypeList, System.Collections.ObjectModel.ObservableCollection<ConvertPDF> collection)
|
|
723 | 723 |
{ |
724 | 724 |
try |
725 | 725 |
{ |
... | ... | |
746 | 746 |
var items = entities.SELECT_CONVERT_ITEM(null, ProjectNumberFilter, UniqueKeyFilter, _status, SelectedCount.ValueMember, Start_CreateTime, Finish_CreateTime, null, |
747 | 747 |
null, null, null, GroupNOFilter, Document_NameFilter, Docuemnt_NOFilter, RevisionFilter, Service_IDFilter, ReconverterFilter, DOCUMENT_URLFilter).ToList(); |
748 | 748 |
|
749 |
List<DataConvert> Listitems = new List<DataConvert>();
|
|
749 |
List<ConvertPDF> Listitems = new List<ConvertPDF>();
|
|
750 | 750 |
|
751 | 751 |
foreach (var x in items) |
752 | 752 |
{ |
753 | 753 |
var MarkusLink = "kcom://" + CreateMarkusParam(x.PROJECT_NO, x.DOCUMENT_ID, "doftech"); |
754 | 754 |
|
755 |
DataConvert AddItem = new DataConvert(x.SERVICE_ID, x.ID, x.PROJECT_NO, x.STATUS, x.DOCUMENT_ID, x.DOCUMENT_NAME, x.DOCUMENT_NO, x.DOCUMENT_URL, x.REVISION, x.CURRENT_PAGE,
|
|
755 |
ConvertPDF AddItem = new ConvertPDF(x.SERVICE_ID, x.ID, x.PROJECT_NO, x.STATUS, x.DOCUMENT_ID, x.DOCUMENT_NAME, x.DOCUMENT_NO, x.DOCUMENT_URL, x.REVISION, x.CURRENT_PAGE,
|
|
756 | 756 |
x.TOTAL_PAGE, x.EXCEPTION, x.GROUP_NO, x.CREATE_DATETIME, x.START_DATETIME, x.END_DATETIME, x.DOCUMENT_URL, x.CONVERT_PATH, MarkusLink, x.RECONVERTER); |
757 | 757 |
Listitems.Add(AddItem); |
758 | 758 |
|
... | ... | |
841 | 841 |
{ |
842 | 842 |
try |
843 | 843 |
{ |
844 |
List<DataConvert> newitems = new List<DataConvert>();
|
|
844 |
List<ConvertPDF> newitems = new List<ConvertPDF>();
|
|
845 | 845 |
foreach (var client in App.StationClientList) |
846 | 846 |
{ |
847 | 847 |
if (await SimplePingAsync(client.Endpoint.Address.ToString())) |
848 | 848 |
{ |
849 | 849 |
try |
850 | 850 |
{ |
851 |
List<DataConvert> itemsToList = new List<DataConvert>();
|
|
851 |
List<ConvertPDF> itemsToList = new List<ConvertPDF>();
|
|
852 | 852 |
var items = await client.AliveConvertListAsync(); |
853 | 853 |
string result = ""; |
854 | 854 |
|
855 | 855 |
foreach (var item in items) |
856 | 856 |
{ |
857 |
DataConvert itemsToEach = new DataConvert();
|
|
857 |
ConvertPDF itemsToEach = new ConvertPDF();
|
|
858 | 858 |
itemsToEach.ServiceID = item.ServiceID; |
859 | 859 |
itemsToEach.ConvertID = item.ConvertID; |
860 | 860 |
itemsToEach.ProjectNumber = item.ProjectNumber; |
... | ... | |
928 | 928 |
/// AliveDataSelect의 Data Update |
929 | 929 |
/// </summary> |
930 | 930 |
/// <param name="newitems"></param> |
931 |
private void ItemsUpdate(List<DataConvert> newitems)
|
|
931 |
private void ItemsUpdate(List<ConvertPDF> newitems)
|
|
932 | 932 |
{ |
933 | 933 |
|
934 | 934 |
foreach (var item in newitems) |
... | ... | |
938 | 938 |
|
939 | 939 |
if (AliveItems == null) |
940 | 940 |
{ |
941 |
AliveItems = new System.Collections.ObjectModel.ObservableCollection<DataConvert>();
|
|
941 |
AliveItems = new System.Collections.ObjectModel.ObservableCollection<ConvertPDF>();
|
|
942 | 942 |
|
943 | 943 |
foreach (var item in newitems) |
944 | 944 |
{ |
... | ... | |
1052 | 1052 |
{ |
1053 | 1053 |
var MarkusLink = "kcom://" + CreateMarkusParam(x.PROJECT_NO, x.DOCUMENT_ID, "doftech"); |
1054 | 1054 |
|
1055 |
DataConvert AddItem = new DataConvert(x.SERVICE_ID, x.ID, x.PROJECT_NO, x.STATUS, x.DOCUMENT_ID, x.DOCUMENT_NAME, x.DOCUMENT_NO, x.DOCUMENT_URL, x.REVISION, x.CURRENT_PAGE, x.TOTAL_PAGE, x.EXCEPTION, x.GROUP_NO, x.CREATE_DATETIME, x.START_DATETIME, x.END_DATETIME
|
|
1055 |
ConvertPDF AddItem = new ConvertPDF(x.SERVICE_ID, x.ID, x.PROJECT_NO, x.STATUS, x.DOCUMENT_ID, x.DOCUMENT_NAME, x.DOCUMENT_NO, x.DOCUMENT_URL, x.REVISION, x.CURRENT_PAGE, x.TOTAL_PAGE, x.EXCEPTION, x.GROUP_NO, x.CREATE_DATETIME, x.START_DATETIME, x.END_DATETIME
|
|
1056 | 1056 |
, x.DOCUMENT_URL, x.CONVERT_PATH, MarkusLink, x.RECONVERTER); |
1057 | 1057 |
|
1058 | 1058 |
RealConvertSource.Add(AddItem); |
... | ... | |
1068 | 1068 |
} |
1069 | 1069 |
|
1070 | 1070 |
|
1071 |
public int SetCleanUpItem(DataConvert _ConvertItem)
|
|
1071 |
public int SetCleanUpItem(ConvertPDF _ConvertItem)
|
|
1072 | 1072 |
{ |
1073 | 1073 |
using (markusEntities entities = new markusEntities(App.MarkusDataBaseConnecitonString)) |
1074 | 1074 |
{ |
... | ... | |
1170 | 1170 |
|
1171 | 1171 |
private void MarkusLink(object obj)///여기서 부터 |
1172 | 1172 |
{ |
1173 |
if (obj is DataConvert)
|
|
1173 |
if (obj is ConvertPDF)
|
|
1174 | 1174 |
{ |
1175 | 1175 |
if (obj != null) |
1176 | 1176 |
{ |
1177 |
var convertitem = obj as DataConvert;
|
|
1177 |
var convertitem = obj as ConvertPDF;
|
|
1178 | 1178 |
|
1179 | 1179 |
SelectFilterConvert = convertitem; |
1180 | 1180 |
|
... | ... | |
1343 | 1343 |
|
1344 | 1344 |
public void ConvertPathFileSearch(object obj) |
1345 | 1345 |
{ |
1346 |
if (obj is DataConvert)
|
|
1346 |
if (obj is ConvertPDF)
|
|
1347 | 1347 |
{ |
1348 | 1348 |
if (obj != null) |
1349 | 1349 |
{ |
1350 |
var convertitem = obj as DataConvert;
|
|
1350 |
var convertitem = obj as ConvertPDF;
|
|
1351 | 1351 |
|
1352 |
SaveFileDialog saveFileDialog = new SaveFileDialog();
|
|
1352 |
string filePath = "@" + convertitem.ConvertPath;
|
|
1353 | 1353 |
|
1354 |
saveFileDialog.FileName = "Document"; // Default file name |
|
1355 |
saveFileDialog.DefaultExt = ".txt"; // Default file extension |
|
1356 |
saveFileDialog.Filter = "Csv documents (.Csv)|*.csv|Excel(2017~2019)Worksheets|*.xlsx"; // Filter files by extension |
|
1357 |
|
|
1358 |
|
|
1359 |
if (saveFileDialog.ShowDialog() == true) |
|
1360 |
{ |
|
1361 |
} |
|
1354 |
System.Diagnostics.Process.Start(filePath); |
|
1362 | 1355 |
} |
1363 | 1356 |
} |
1364 | 1357 |
} |
내보내기 Unified diff