개정판 19d6b221
Exception is not null 콤보박스 & Excel Export수정
Change-Id: I72953fb153aca7869b88110667986238f5c8b431
ConvertService/ServiceBase/Markus.Service.StationController/Markus.Service.StationController.csproj | ||
---|---|---|
202 | 202 |
<Compile Include="Extensions\VisualTreeHelper.cs" /> |
203 | 203 |
<Compile Include="ViewModel\ConvertExcelDialogViewModel.cs" /> |
204 | 204 |
<Compile Include="ViewModel\DashBoardViewModel.cs" /> |
205 |
<Compile Include="ViewModel\FinalPDFExcelDialogViewModel.cs" /> |
|
205 | 206 |
<Compile Include="ViewModel\FinalPDFViewModel.cs" /> |
206 | 207 |
<Compile Include="ViewModel\FinalPDFAddDialogViewModel.cs" /> |
207 | 208 |
<Compile Include="ViewModel\ConvertAddDialogViewModel.cs" /> |
... | ... | |
225 | 226 |
<Compile Include="Views\FinalPDFAddDialog.xaml.cs"> |
226 | 227 |
<DependentUpon>FinalPDFAddDialog.xaml</DependentUpon> |
227 | 228 |
</Compile> |
229 |
<Compile Include="Views\FinalPDFExcelDialog.xaml.cs"> |
|
230 |
<DependentUpon>FinalPDFExcelDialog.xaml</DependentUpon> |
|
231 |
</Compile> |
|
228 | 232 |
<Compile Include="Views\FinalPDFViewInfo.xaml.cs"> |
229 | 233 |
<DependentUpon>FinalPDFViewInfo.xaml</DependentUpon> |
230 | 234 |
</Compile> |
... | ... | |
287 | 291 |
<Generator>MSBuild:Compile</Generator> |
288 | 292 |
<SubType>Designer</SubType> |
289 | 293 |
</Page> |
294 |
<Page Include="Views\FinalPDFExcelDialog.xaml"> |
|
295 |
<SubType>Designer</SubType> |
|
296 |
<Generator>MSBuild:Compile</Generator> |
|
297 |
</Page> |
|
290 | 298 |
<Page Include="Views\FinalPDFViewInfo.xaml"> |
291 | 299 |
<SubType>Designer</SubType> |
292 | 300 |
<Generator>MSBuild:Compile</Generator> |
ConvertService/ServiceBase/Markus.Service.StationController/ViewModel/ConvertExcelDialogViewModel.cs | ||
---|---|---|
46 | 46 |
new CheckBoxItem { IsChecked=true, Name="ReConverter"}, |
47 | 47 |
new CheckBoxItem { IsChecked=true, Name="Revision"}, |
48 | 48 |
new CheckBoxItem { IsChecked=true, Name="UniqueKey"}, |
49 |
new CheckBoxItem { IsChecked=true, Name="Group_NO"}, |
|
50 |
new CheckBoxItem { IsChecked=true, Name="Document_NO"}, |
|
51 |
new CheckBoxItem { IsChecked=true, Name="Document_Name"} |
|
49 |
new CheckBoxItem { IsChecked=true, Name="GroupNo"}, |
|
50 |
new CheckBoxItem { IsChecked=true, Name="DocumentNo"}, |
|
51 |
new CheckBoxItem { IsChecked=true, Name="DocumentName"}, |
|
52 |
new CheckBoxItem { IsChecked=true, Name="DocumnetURL"}, |
|
53 |
new CheckBoxItem { IsChecked=true, Name="MarkusLink"} |
|
52 | 54 |
}; |
53 | 55 |
} |
54 | 56 |
|
ConvertService/ServiceBase/Markus.Service.StationController/ViewModel/DataBaseItemsModel.cs | ||
---|---|---|
1344 | 1344 |
|
1345 | 1345 |
Views.ConvertExcelDialog convertExcelDialog = new Views.ConvertExcelDialog(); |
1346 | 1346 |
|
1347 |
convertExcelDialog.Owner = Application.Current.MainWindow; |
|
1347 | 1348 |
convertExcelDialog.WindowStartupLocation = WindowStartupLocation.CenterOwner; |
1348 | 1349 |
|
1349 | 1350 |
convertExcelDialog.ShowDialog(); |
ConvertService/ServiceBase/Markus.Service.StationController/ViewModel/FinalPDFExcelDialogViewModel.cs | ||
---|---|---|
35 | 35 |
{ |
36 | 36 |
ItemsSource = new ObservableCollection<CheckBoxItem> |
37 | 37 |
{ |
38 |
//new CheckBoxItem { IsChecked=true, Name="ServiceID"}, |
|
39 |
//new CheckBoxItem { IsChecked=true, Name="ConvertID"}, |
|
40 |
//new CheckBoxItem { IsChecked=true, Name="ProjectNumber"}, |
|
41 |
//new CheckBoxItem { IsChecked=true, Name="ConvertState"}, |
|
42 |
//new CheckBoxItem { IsChecked=true, Name="CurrentPageNo"}, |
|
43 |
//new CheckBoxItem { IsChecked=true, Name="TotalPage"}, |
|
44 |
//new CheckBoxItem { IsChecked=true, Name="OriginfilePath"}, |
|
45 |
//new CheckBoxItem { IsChecked=true, Name="ConvertPath"}, |
|
46 |
//new CheckBoxItem { IsChecked=true, Name="CreateTime"}, |
|
47 |
//new CheckBoxItem { IsChecked=true, Name="StartTime"}, |
|
48 |
//new CheckBoxItem { IsChecked=true, Name="EndTime"}, |
|
49 |
//new CheckBoxItem { IsChecked=true, Name="Exception"}, |
|
50 |
//new CheckBoxItem { IsChecked=true, Name="ReConverter"}, |
|
51 |
//new CheckBoxItem { IsChecked=true, Name="Revision"}, |
|
52 |
//new CheckBoxItem { IsChecked=true, Name="UniqueKey"}, |
|
53 |
//new CheckBoxItem { IsChecked=true, Name="Group_NO"}, |
|
54 |
//new CheckBoxItem { IsChecked=true, Name="Document_NO"}, |
|
55 |
//new CheckBoxItem { IsChecked=true, Name="Document_Name"} |
|
38 |
new CheckBoxItem { IsChecked=true, Name="ConvertID"}, |
|
39 |
new CheckBoxItem { IsChecked=true, Name="ProjectNumber"}, |
|
40 |
new CheckBoxItem { IsChecked=true, Name="ConvertState"}, |
|
41 |
new CheckBoxItem { IsChecked=true, Name="CurrentPageNo"}, |
|
42 |
new CheckBoxItem { IsChecked=true, Name="TotalPage"}, |
|
43 |
new CheckBoxItem { IsChecked=true, Name="OriginfilePath"}, |
|
44 |
new CheckBoxItem { IsChecked=true, Name="ConvertPath"}, |
|
45 |
new CheckBoxItem { IsChecked=true, Name="CreateTime"}, |
|
46 |
new CheckBoxItem { IsChecked=true, Name="StartTime"}, |
|
47 |
new CheckBoxItem { IsChecked=true, Name="EndTime"}, |
|
48 |
new CheckBoxItem { IsChecked=true, Name="Exception"}, |
|
49 |
new CheckBoxItem { IsChecked=true, Name="Revision"}, |
|
50 |
new CheckBoxItem { IsChecked=true, Name="GroupNo"}, |
|
51 |
new CheckBoxItem { IsChecked=true, Name="DocumentNo"}, |
|
52 |
new CheckBoxItem { IsChecked=true, Name="DocumentID"}, |
|
53 |
new CheckBoxItem { IsChecked=true, Name="DocumentName"}, |
|
54 |
new CheckBoxItem { IsChecked=true, Name="MarkupInfo_ID"}, |
|
55 |
new CheckBoxItem { IsChecked=true, Name="DocInfo_ID"}, |
|
56 |
new CheckBoxItem { IsChecked=true, Name="Create_User_ID"}, |
|
57 |
new CheckBoxItem { IsChecked=true, Name="MarkusLink"} |
|
56 | 58 |
}; |
57 | 59 |
} |
58 | 60 |
|
... | ... | |
64 | 66 |
OnPropertyChanged(() => ExcelSource); |
65 | 67 |
} |
66 | 68 |
} |
67 |
private System.Collections.ObjectModel.ObservableCollection<ConvertPDF> _ExcelSource;
|
|
68 |
public System.Collections.ObjectModel.ObservableCollection<ConvertPDF> ExcelSource
|
|
69 |
private System.Collections.ObjectModel.ObservableCollection<FinalPDF> _ExcelSource;
|
|
70 |
public System.Collections.ObjectModel.ObservableCollection<FinalPDF> ExcelSource
|
|
69 | 71 |
{ |
70 | 72 |
get |
71 | 73 |
{ |
72 | 74 |
if (_ExcelSource == null) |
73 | 75 |
{ |
74 |
_ExcelSource = new System.Collections.ObjectModel.ObservableCollection<ConvertPDF>();
|
|
75 |
_ExcelSource = DataBaseItemsModel.Return_FilterConvertSource();
|
|
76 |
_ExcelSource = new System.Collections.ObjectModel.ObservableCollection<FinalPDF>();
|
|
77 |
_ExcelSource = FinalPDFViewModel.Return_FilterConvertSource();
|
|
76 | 78 |
} |
77 | 79 |
return _ExcelSource; |
78 | 80 |
} |
... | ... | |
147 | 149 |
} |
148 | 150 |
|
149 | 151 |
DataExport dataExport = new DataExport(); |
150 |
dataExport.DataExportExcel(saveFileDialog.FileName, "Convert PDF", ExcelSource, headers);
|
|
152 |
dataExport.DataExportExcel(saveFileDialog.FileName, "Final PDF", ExcelSource, headers);
|
|
151 | 153 |
} |
152 | 154 |
} |
153 | 155 |
} |
ConvertService/ServiceBase/Markus.Service.StationController/ViewModel/FinalPDFViewModel.cs | ||
---|---|---|
56 | 56 |
|
57 | 57 |
DataService.DataServiceClient WcfClient = new DataService.DataServiceClient(); |
58 | 58 |
|
59 |
|
|
60 |
private static System.Collections.ObjectModel.ObservableCollection<FinalPDF> _ConvertSource; |
|
61 |
public static System.Collections.ObjectModel.ObservableCollection<FinalPDF> ConvertSource |
|
62 |
{ |
|
63 |
get |
|
64 |
{ |
|
65 |
if (_ConvertSource == null) |
|
66 |
{ |
|
67 |
_ConvertSource = new System.Collections.ObjectModel.ObservableCollection<FinalPDF>(); |
|
68 |
} |
|
69 |
return _ConvertSource; |
|
70 |
} |
|
71 |
set |
|
72 |
{ |
|
73 |
_ConvertSource = value; |
|
74 |
} |
|
75 |
} |
|
76 |
|
|
59 | 77 |
public ObservableCollection<ProjectName> _ProjectNames; |
60 | 78 |
public ObservableCollection<ProjectName> ProjectNames |
61 | 79 |
{ |
... | ... | |
606 | 624 |
OnPropertyChanged(() => ExcptionCheck); |
607 | 625 |
} |
608 | 626 |
} |
627 |
|
|
609 | 628 |
#endregion |
610 | 629 |
|
611 | 630 |
#region Command |
... | ... | |
705 | 724 |
|
706 | 725 |
#region Function |
707 | 726 |
|
727 |
#region Return_FilterConvertSource |
|
728 |
|
|
729 |
public static void Return_FilterConvertSource(ObservableCollection<FinalPDF> convertPDFs) |
|
730 |
{ |
|
731 |
ConvertSource = new ObservableCollection<FinalPDF>(); |
|
732 |
ConvertSource = convertPDFs; |
|
733 |
} |
|
734 |
|
|
735 |
public static ObservableCollection<FinalPDF> Return_FilterConvertSource() |
|
736 |
{ |
|
737 |
return ConvertSource; |
|
738 |
} |
|
739 |
|
|
740 |
|
|
741 |
#endregion |
|
742 |
|
|
743 |
|
|
708 | 744 |
#region Data Select |
709 | 745 |
|
710 | 746 |
/// <summary> |
... | ... | |
738 | 774 |
{ |
739 | 775 |
try |
740 | 776 |
{ |
741 |
IEnumerable<FinalPDF> Listitems = null;
|
|
777 |
IEnumerable<FinalPDF> Listitems = Enumerable.Empty<FinalPDF>();
|
|
742 | 778 |
|
743 | 779 |
foreach (var coll in collection) |
744 | 780 |
{ |
745 |
Listitems = from x in await WcfClient.GET_SELECT_FINAL_PDF_ITEMAsync(coll.ConvertID, coll.ProjectNumber, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null)
|
|
781 |
Listitems = from x in await WcfClient.GET_SELECT_FINAL_PDF_ITEMAsync(coll.ConvertID, coll.ProjectNumber, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null) |
|
746 | 782 |
let MarkusLink = "kcom://" + CreateMarkusParam(x.PROJECT_NO, x.DOCUMENT_ID, "doftech") |
747 | 783 |
select new FinalPDF(x.ID, x.PROJECT_NO, x.STATUS, x.DOCUMENT_ID, x.MARKUPINFO_ID, x.DOCINFO_ID, x.DOCUMENT_NAME, x.DOCUMENT_NO, x.CREATE_USER_ID, x.REVISION, x.CURRENT_PAGE, |
748 | 784 |
x.TOTAL_PAGE, x.EXCEPTION, x.GROUP_NO, x.CREATE_DATETIME, x.START_DATETIME, x.END_DATETIME, x.ORIGINAL_FILE, x.CONVERT_PATH, MarkusLink); |
785 |
|
|
749 | 786 |
} |
750 | 787 |
|
751 | 788 |
foreach (var Listitem in Listitems) |
... | ... | |
1379 | 1416 |
|
1380 | 1417 |
public void DataExportData(object obj) |
1381 | 1418 |
{ |
1382 |
SaveFileDialog saveFileDialog = new SaveFileDialog(); |
|
1383 |
|
|
1384 |
saveFileDialog.FileName = "Document"; // Default file name |
|
1385 |
saveFileDialog.DefaultExt = ".txt"; // Default file extension |
|
1386 |
saveFileDialog.Filter = "Csv documents (.Csv)|*.csv|Excel(2017~2019)Worksheets|*.xlsx"; // Filter files by extension |
|
1387 |
|
|
1419 |
dispatcherTimer.Tick -= new EventHandler(Timer_Tick); |
|
1388 | 1420 |
|
1389 |
if (saveFileDialog.ShowDialog() == true) |
|
1390 |
{ |
|
1421 |
Return_FilterConvertSource(FilterConvertSource); |
|
1391 | 1422 |
|
1423 |
Views.FinalPDFExcelDialog finalPDFExcelDialog = new Views.FinalPDFExcelDialog(); |
|
1392 | 1424 |
|
1393 |
if (!string.IsNullOrWhiteSpace(saveFileDialog.FileName))
|
|
1394 |
{
|
|
1425 |
finalPDFExcelDialog.Owner = Application.Current.MainWindow;
|
|
1426 |
finalPDFExcelDialog.WindowStartupLocation = WindowStartupLocation.CenterOwner;
|
|
1395 | 1427 |
|
1396 |
var extension = new System.IO.FileInfo(saveFileDialog.FileName).Extension;
|
|
1428 |
finalPDFExcelDialog.ShowDialog();
|
|
1397 | 1429 |
|
1398 |
if (extension == ".xlsx" || extension == ".csv") |
|
1399 |
{ |
|
1400 | 1430 |
|
1401 |
var headers = new List<HeaderMember> |
|
1402 |
{ |
|
1403 |
new HeaderMember{HeaderName = "ServiceID", Property = "ServiceID" }, |
|
1404 |
new HeaderMember{HeaderName = "ConvertID", Property = "ConvertID" }, |
|
1405 |
new HeaderMember{HeaderName = "ProjectNumber", Property = "ProjectNumber" }, |
|
1406 |
new HeaderMember{HeaderName = "ConvertState", Property = "ConvertState" }, |
|
1407 |
new HeaderMember{HeaderName = "CurrentPageNo", Property = "CurrentPageNo" }, |
|
1408 |
new HeaderMember{HeaderName = "TotalPage", Property = "TotalPage" }, |
|
1409 |
new HeaderMember{HeaderName = "OriginfilePath", Property = "OriginfilePath" }, |
|
1410 |
new HeaderMember{HeaderName = "ConvertPath", Property = "ConvertPath" }, |
|
1411 |
new HeaderMember{HeaderName = "CreateTime", Property = "CreateTime" }, |
|
1412 |
new HeaderMember{HeaderName = "Exception", Property = "Exception" }, |
|
1413 |
new HeaderMember{HeaderName = "ProcessorAffinity", Property = "ProcessorAffinity" }, |
|
1414 |
new HeaderMember{HeaderName = "ReConverter", Property = "ReConverter" }, |
|
1415 |
new HeaderMember{HeaderName = "UniqueKey", Property = "UniqueKey" } |
|
1416 |
}; |
|
1417 |
|
|
1418 |
|
|
1419 |
DataExport dataExport = new DataExport(); |
|
1420 |
dataExport.DataExportExcel(saveFileDialog.FileName, "Hello world", FilterConvertSource, headers); |
|
1421 |
//_dataExport.DataExportExcel(saveFileDialog.FileName, saveFileDialog.FileName.ToString(), Projectsource, headers); |
|
1422 |
//GemBoxFileSave(obj); |
|
1423 |
} |
|
1424 |
} |
|
1425 |
} |
|
1431 |
dispatcherTimer.Tick += new EventHandler(Timer_Tick); |
|
1426 | 1432 |
} |
1427 | 1433 |
|
1428 | 1434 |
#endregion |
ConvertService/ServiceBase/Markus.Service.StationController/Views/ConvertExcelDialog.xaml | ||
---|---|---|
7 | 7 |
xmlns:local="clr-namespace:Markus.Service.StationController.Views" |
8 | 8 |
xmlns:VM="clr-namespace:Markus.Service.StationController.ViewModel" |
9 | 9 |
Header="Convert Items Excel Export" Background="White" |
10 |
mc:Ignorable="d" Height="300" Width="500" telerik:StyleManager.Theme="VisualStudio2013">
|
|
10 |
mc:Ignorable="d" Height="404" Width="349" telerik:StyleManager.Theme="VisualStudio2013">
|
|
11 | 11 |
<telerik:RadWindow.DataContext> |
12 | 12 |
<VM:ConvertExcelDialogViewModel/> |
13 | 13 |
</telerik:RadWindow.DataContext> |
14 | 14 |
<Grid> |
15 | 15 |
<Grid.ColumnDefinitions> |
16 |
<ColumnDefinition Width="2*"/>
|
|
17 |
<ColumnDefinition Width="*"/>
|
|
16 |
<ColumnDefinition /> |
|
17 |
<ColumnDefinition/> |
|
18 | 18 |
</Grid.ColumnDefinitions> |
19 |
<telerik:RadListBox Grid.Column="0" ItemsSource="{Binding ItemsSource}" SelectionMode="Multiple" Height="200" Width="200" HorizontalContentAlignment="Left" HorizontalAlignment="Center" |
|
20 |
BorderThickness="0" Background="White"> |
|
19 |
<telerik:RadListBox Grid.Column="0" ItemsSource="{Binding ItemsSource}" IsEnabled="True" HorizontalContentAlignment="Left" HorizontalAlignment="Center" Background="White"> |
|
21 | 20 |
<telerik:RadListBox.ItemTemplate> |
22 | 21 |
<DataTemplate> |
23 | 22 |
<StackPanel Orientation="Horizontal"> |
... | ... | |
28 | 27 |
</telerik:RadListBox.ItemTemplate> |
29 | 28 |
</telerik:RadListBox> |
30 | 29 |
|
31 |
<StackPanel HorizontalAlignment="Left" Grid.Column="1">
|
|
30 |
<StackPanel HorizontalAlignment="Center" Grid.Column="1" >
|
|
32 | 31 |
<telerik:RadButton Content=" 전체 선택" Margin="0,50,0,10" Command="{Binding ALL_SelectedCommand , Mode=TwoWay}" /> |
33 | 32 |
|
34 | 33 |
<telerik:RadButton Content=" 전체 해제" Margin="0,0,0,10" Command="{Binding ALL_DeletedCommand , Mode=TwoWay}" /> |
ConvertService/ServiceBase/Markus.Service.StationController/Views/FinalPDFExcelDialog.xaml | ||
---|---|---|
4 | 4 |
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" |
5 | 5 |
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
6 | 6 |
xmlns:local="clr-namespace:Markus.Service.StationController.Views" |
7 |
mc:Ignorable="d" |
|
8 |
Height="300" Width="500" telerik:StyleManager.Theme="VisualStudio2013"> |
|
7 |
xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" |
|
8 |
xmlns:VM="clr-namespace:Markus.Service.StationController.ViewModel" |
|
9 |
mc:Ignorable="d" Header="FinalPDF Items Excel Export" Background="White" |
|
10 |
Height="344" Width="369" telerik:StyleManager.Theme="VisualStudio2013"> |
|
11 |
<telerik:RadWindow.DataContext> |
|
12 |
<VM:FinalPDFExcelDialogViewModel/> |
|
13 |
</telerik:RadWindow.DataContext> |
|
9 | 14 |
<Grid> |
10 |
|
|
15 |
<Grid.ColumnDefinitions> |
|
16 |
<ColumnDefinition /> |
|
17 |
<ColumnDefinition/> |
|
18 |
</Grid.ColumnDefinitions> |
|
19 |
<telerik:RadListBox Grid.Column="0" ItemsSource="{Binding ItemsSource}" IsEnabled="True" HorizontalContentAlignment="Left" HorizontalAlignment="Center" Background="White"> |
|
20 |
<telerik:RadListBox.ItemTemplate> |
|
21 |
<DataTemplate> |
|
22 |
<StackPanel Orientation="Horizontal"> |
|
23 |
<CheckBox IsChecked="{Binding IsChecked, Mode=TwoWay}" /> |
|
24 |
<TextBlock Text="{Binding Name}" /> |
|
25 |
</StackPanel> |
|
26 |
</DataTemplate> |
|
27 |
</telerik:RadListBox.ItemTemplate> |
|
28 |
</telerik:RadListBox> |
|
29 |
|
|
30 |
<StackPanel HorizontalAlignment="Center" Grid.Column="1" > |
|
31 |
<telerik:RadButton Content=" 전체 선택" Margin="0,50,0,10" Command="{Binding ALL_SelectedCommand , Mode=TwoWay}" /> |
|
32 |
|
|
33 |
<telerik:RadButton Content=" 전체 해제" Margin="0,0,0,10" Command="{Binding ALL_DeletedCommand , Mode=TwoWay}" /> |
|
34 |
<telerik:RadButton Content=" 저 장" Command="{Binding SaveCommand , Mode=TwoWay}" /> |
|
35 |
<telerik:RadButton Content=" 닫 기" Margin="0,80,0,0" VerticalAlignment="Center" IsCancel="True" /> |
|
36 |
</StackPanel> |
|
11 | 37 |
</Grid> |
12 | 38 |
</telerik:RadWindow> |
내보내기 Unified diff