프로젝트

일반

사용자정보

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

markus / ConvertService / ServiceBase / Markus.Service.StationController / Views / DataBaseView.xaml @ 5a954acc

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

1
<UserControl
2
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
4
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
5
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
6
             xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
7
             xmlns:controls="clr-namespace:Markus.Service.StationController.Controls"
8
             xmlns:VM="clr-namespace:Markus.Service.StationController.ViewModel"
9
             xmlns:Data="clr-namespace:Markus.Service.StationController.Data"
10
             xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
11
             xmlns:local="clr-namespace:Markus.Service.StationController.Views" x:Class="Markus.Service.StationController.Views.DataBaseView"
12
             mc:Ignorable="d"  Background="White" DataContext="{DynamicResource DataBaseItemsModel}"
13
        d:DesignHeight="450" d:DesignWidth="800">
14
    <UserControl.Resources>
15
        <Style TargetType="telerik:GridViewCell" x:Key="StretchCellStyle">
16
            <Setter Property="Margin" Value="0"/>
17
            <Setter Property="Padding" Value="0"/>
18
            <Setter Property="VerticalContentAlignment" Value="Stretch"/>
19
            <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
20
        </Style>
21
        <Style TargetType="{x:Type telerik:GridViewHeaderCell}">
22
            <Setter Property="HorizontalContentAlignment" Value="Center"/>
23
            <Setter Property="Background" Value="Gray"/>
24
        </Style>
25
        <Style TargetType="{x:Type telerik:GridViewCell}">
26
            <Setter Property="HorizontalContentAlignment" Value="Center"/>
27
        </Style>
28
        <Style TargetType="{x:Type controls:RowIndexColumn}">
29
            <Setter Property="TextAlignment" Value="Center"/>
30
        </Style>
31
        <VM:DataBaseItemsModel x:Key="DataBaseItemsModel"/>
32
        <DataTemplate x:Key="RowDetailsTemplate">
33
            <local:DataBaseViewInfo />
34
        </DataTemplate>
35
        <DataTemplate x:Key="DatabaseFilter">
36
            <local:DatabaseFilter />
37
        </DataTemplate>
38
    </UserControl.Resources>
39
    <!--<UserControl.DataContext>
40
        <VM:DataBaseItemsModel/>
41
    </UserControl.DataContext>-->
42
    <i:Interaction.Triggers>
43
        <i:EventTrigger  EventName="Loaded">
44
            <i:InvokeCommandAction Command="{Binding LoadedCommand}"/>
45
        </i:EventTrigger>
46
        <i:EventTrigger  EventName="Unloaded">
47
            <i:InvokeCommandAction Command="{Binding ClosingCommand}"/>
48
        </i:EventTrigger>
49
    </i:Interaction.Triggers>
50
    <Grid HorizontalAlignment="Left" ScrollViewer.HorizontalScrollBarVisibility="Auto" ScrollViewer.VerticalScrollBarVisibility="Auto">
51
        <Grid.RowDefinitions>
52
            <RowDefinition Height="Auto"/>
53
            <RowDefinition Height="*"/>
54
        </Grid.RowDefinitions>
55
        <StackPanel Margin="0,10" Orientation="Horizontal" HorizontalAlignment="Right" Grid.Row="0"  Height="20" >
56
            <TextBlock Text="Display Count : " VerticalAlignment="Center"/>
57
            <telerik:RadComboBox x:Name="ComboCount" Width="100" SelectedItem="{Binding SelectedCount, Mode=TwoWay}" Margin="0,0,10,0" SelectedValuePath="DisplayMember"
58
                  DisplayMemberPath="ValueMember" ItemsSource="{Binding SelectedCountList}" SelectedIndex="0" />
59
            <TextBlock Text="Status Type : " Margin="10,0,0,0"  VerticalAlignment="Center"/>
60
            <telerik:RadComboBox Width="100" SelectedItem="{Binding SelectedStatus, Mode=TwoWay}" SelectedIndex="4"
61
                   DisplayMemberPath="DisplayName" SelectedValuePath="Value" ItemsSource="{Binding StatusCodeList}" Height="20"/>
62
            <telerik:RadToggleButton Content="  엑셀 저장  " Margin="10,0" Height="20" Command="{Binding DataSaveFileGemBoxCommand, Mode=OneWay}"/>
63
        </StackPanel>
64
        <Grid HorizontalAlignment="Left" VerticalAlignment="Top" Grid.Row="1" ScrollViewer.HorizontalScrollBarVisibility="Auto" ScrollViewer.VerticalScrollBarVisibility="Auto" >
65
            <Grid.RowDefinitions>
66
                <RowDefinition Height="*"/>
67
                <RowDefinition Height="*" />
68
                <RowDefinition Height="Auto"/>
69
                <RowDefinition Height="Auto"/>
70
            </Grid.RowDefinitions>
71
            <telerik:RadExpander ExpandDirection="Down"  BorderThickness="0" MaxHeight="700" Grid.Row="0"
72
                  IsExpanded="True"
73
                             telerik:AnimationManager.IsAnimationEnabled="False">
74
                <telerik:RadGridView  GroupRenderMode="Flat" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"
75
                             RowDetailsTemplate="{StaticResource DatabaseFilter}"
76
                                                         AutoGenerateColumns="False" CanUserFreezeColumns="True"
77
                             ColumnWidth="*"  RowDetailsVisibilityMode="VisibleWhenSelected"
78
                             Grid.Row="1" >
79
                    <telerik:RadGridView.Columns>
80
                        <telerik:GridViewDataColumn Header="필터 검색원하시면 아래를 클릭하세요!">
81
                            <telerik:GridViewColumn.CellTemplate>
82
                                <DataTemplate>
83
                                    <TextBlock Text="Click" VerticalAlignment="Center" />
84
                                </DataTemplate>
85
                            </telerik:GridViewColumn.CellTemplate>
86
                        </telerik:GridViewDataColumn>
87
                    </telerik:RadGridView.Columns>
88
                </telerik:RadGridView>
89
            </telerik:RadExpander>
90
            
91
            <telerik:RadExpander ExpandDirection="Down"  BorderThickness="0" MaxHeight="700" Grid.Row="1"
92
                  ScrollViewer.HorizontalScrollBarVisibility="Auto" ScrollViewer.VerticalScrollBarVisibility="Auto" IsExpanded="True"
93
                             telerik:AnimationManager.IsAnimationEnabled="False">
94
                <telerik:RadExpander.Header>
95
                    <Grid>
96
                        <Grid.ColumnDefinitions>
97
                            <ColumnDefinition Width="Auto"/>
98
                            <ColumnDefinition Width="Auto"/>
99
                        </Grid.ColumnDefinitions>
100
                        <TextBlock Text="DataBase Items : "/>
101
                        <TextBlock Text="{Binding SelectedCount.ValueMember, StringFormat=\{0:d\}}" Grid.Column="1"/>
102
                    </Grid>
103
                </telerik:RadExpander.Header>
104
                <!--ItemsSource="{Binding FilterConvertSource}" -->
105
                <telerik:RadGridView x:Name="dataGrid1"  GroupRenderMode="Flat" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"
106
                                                         ItemsSource="{Binding FilterConvertSourceView}"
107
                             SelectedItem="{Binding SelectFilterConvert, Mode=TwoWay}"
108
                             RowDetailsTemplate="{StaticResource RowDetailsTemplate}"
109
                                                         AutoGenerateColumns="False" CanUserFreezeColumns="True"
110
                             ColumnWidth="*"  RowDetailsVisibilityMode="VisibleWhenSelected"
111
                             Grid.Row="1"  ScrollViewer.CanContentScroll="True" IsFilteringAllowed="True"
112
                             LeftFrozenColumnCount="6" 
113
                             RightFrozenColumnCount="0">
114
                    <telerik:RadContextMenu.ContextMenu>
115
                        <telerik:RadContextMenu x:Name= "GridContextMenu">
116
                            <telerik:RadMenuItem  Header="Convert"  Command="{Binding ConvertCommand}"/>
117
                            <telerik:RadMenuItem Header="Validation"  Command="{Binding ValidateCommand}"/>
118
                            <telerik:RadMenuItem Header="Delete"  Command="{Binding DeleteCommand}"/>
119
                        </telerik:RadContextMenu>
120
                    </telerik:RadContextMenu.ContextMenu>
121
                    <telerik:RadGridView.Columns>
122
                        <controls:RowIndexColumn Header="#" Width="30" CellStyle="{StaticResource RowNumberStyle}" />
123
                        <telerik:GridViewDataColumn Header="Convert ID "
124
                                                                                        DataMemberBinding="{Binding ConvertID}" Width="1.5*" />
125
                        <telerik:GridViewDataColumn x:Name="commend" Header="Markus " Width="0.5*"  CellStyle="{StaticResource StretchCellStyle}">
126
                            <telerik:GridViewDataColumn.CellTemplate>
127
                                <DataTemplate>
128
                                    <telerik:RadButton Content="Click" BorderThickness="0"
129
                                                   Background="Transparent"
130
                                                   Command="{Binding MarkusLinkCommand, Source={StaticResource DataBaseItemsModel}}" CommandParameter="{Binding DataContext, RelativeSource={RelativeSource Self}}"/>
131
                                </DataTemplate>
132
                            </telerik:GridViewDataColumn.CellTemplate>
133
                        </telerik:GridViewDataColumn>
134
                        <telerik:GridViewDataColumn Header="ProjectNO" 
135
                                                                                        DataMemberBinding="{Binding ProjectNumber}" Width="*" />
136
                        <telerik:GridViewDataColumn Header="UniqueKey"
137
                                                                                        DataMemberBinding="{Binding UniqueKey}" Width="*" />
138
                        <telerik:GridViewDataColumn Header="ConvertState"
139
                                                                                        DataMemberBinding="{Binding ConvertState, Mode=TwoWay}" Width="*" />
140
                        <telerik:GridViewDataColumn Header="CurrentPageNo"
141
                                                                                        DataMemberBinding="{Binding CurrentPageNo, Mode=TwoWay}" Width="*" />
142
                        <telerik:GridViewDataColumn Header="TotalPageNo"
143
                                                                                        DataMemberBinding="{Binding TotalPage, Mode=TwoWay}" Width="*"  />
144
                        <telerik:GridViewDynamicHyperlinkColumn Header="원본파일"
145
                                                        NavigateUrlFormatString=" {0}"
146
                                                                                                            NavigateUrlMemberPaths="OriginfilePath"
147
                                                                                                                Width="2*">
148
                            <telerik:GridViewDynamicHyperlinkColumn.CellTemplate>
149
                                <DataTemplate>
150
                                    <TextBlock Text="{Binding FileName}"/>
151
                                </DataTemplate>
152
                            </telerik:GridViewDynamicHyperlinkColumn.CellTemplate>
153
                        </telerik:GridViewDynamicHyperlinkColumn>
154
                        <telerik:GridViewDataColumn Header=" ConvertPath"
155
                                                                                        DataMemberBinding="{Binding ConvertPath}" Width="2.5*" />
156
                        <telerik:GridViewDataColumn Header="CreateTime" 
157
                                                                                        DataMemberBinding="{Binding CreateTime, Mode=TwoWay, StringFormat=\{0:yyyy.MM.dd HH:mm:ss\}}" Width="*" />
158
                        <telerik:GridViewDataColumn Header="StartTime" 
159
                                                                                        DataMemberBinding="{Binding StartTime, Mode=TwoWay, StringFormat=\{0:yyyy.MM.dd HH:mm:ss\}}" Width="*" />
160
                        <telerik:GridViewDataColumn Header="EndTime" 
161
                                                                                        DataMemberBinding="{Binding EndTime, Mode=TwoWay, StringFormat=\{0:yyyy.MM.dd HH:mm:ss\}}" Width="*" />
162
                    </telerik:RadGridView.Columns>
163
                </telerik:RadGridView>
164
            </telerik:RadExpander>
165
            <telerik:RadExpander Grid.Row="2" ExpandDirection="Down" BorderThickness="0" 
166
                  ScrollViewer.HorizontalScrollBarVisibility="Auto" ScrollViewer.VerticalScrollBarVisibility="Auto"
167
                             telerik:AnimationManager.IsAnimationEnabled="False" IsExpanded ="{Binding ConvertShow, Mode=TwoWay}">
168
                <telerik:RadExpander.Header>
169
                    <Grid>
170
                        <Grid.ColumnDefinitions>
171
                            <ColumnDefinition Width="Auto"/>
172
                            <ColumnDefinition Width="Auto"/>
173
                        </Grid.ColumnDefinitions>
174
                        <TextBlock Text="RealConvert Items : "/>
175
                        <TextBlock Text="{Binding RealConvertSource.Count, StringFormat=\{0:d\}}" Grid.Column="1"/>
176
                    </Grid>
177
                </telerik:RadExpander.Header>
178
                <telerik:RadGridView Name="dataGrid2" GroupRenderMode="Flat" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"
179
                                                         ItemsSource="{Binding RealConvertSource}"
180
                             SelectedItem="{Binding SelectRealConvert, Mode=TwoWay}"
181
                             RowDetailsTemplate="{StaticResource RowDetailsTemplate}"
182
                                                         AutoGenerateColumns="False" CanUserFreezeColumns="False"
183
                             ColumnWidth="*"  RowDetailsVisibilityMode="VisibleWhenSelected"
184
                             Grid.Row="1"  ScrollViewer.CanContentScroll="False" IsFilteringAllowed="True">
185
                    <telerik:RadContextMenu.ContextMenu>
186
                        <telerik:RadContextMenu>
187
                            <telerik:RadMenuItem  Header="Convert"  Command="{Binding ConvertCommand}"/>
188
                            <telerik:RadMenuItem Header="Validation"  Command="{Binding ValidateCommand}"/>
189
                            <telerik:RadMenuItem Header="Delete"  Command="{Binding DeleteCommand}"/>
190
                        </telerik:RadContextMenu>
191
                    </telerik:RadContextMenu.ContextMenu>
192
                    <telerik:RadGridView.Columns>
193
                        <controls:RowIndexColumn Header="#" Width="30" CellStyle="{StaticResource RowNumberStyle}" />
194

    
195
                        <telerik:GridViewDataColumn Header="Convert ID "
196
                                                                                        DataMemberBinding="{Binding ConvertID}" Width="1.5*" />
197

    
198
                        <telerik:GridViewDataColumn Header="Markus " Width="0.5*" CellStyle="{StaticResource StretchCellStyle}">
199
                            <telerik:GridViewDataColumn.CellTemplate>
200
                                <DataTemplate>
201
                                    <telerik:RadButton Content="Click "  BorderThickness="0" Background="Transparent"
202
                                                   Command="{Binding MarkusLinkCommand, Source={StaticResource DataBaseItemsModel}}" CommandParameter="{Binding DataContext, RelativeSource={RelativeSource Self}}"/>
203
                                </DataTemplate>
204
                            </telerik:GridViewDataColumn.CellTemplate>
205
                        </telerik:GridViewDataColumn>
206

    
207
                        <telerik:GridViewDataColumn Header="ProjectNO" 
208
                                                                                        DataMemberBinding="{Binding ProjectNumber}" Width="*" />
209
                        <telerik:GridViewDataColumn Header="UniqueKey"
210
                                                                                        DataMemberBinding="{Binding UniqueKey}" Width="*" />
211
                        <telerik:GridViewDataColumn Header="ConvertState"
212
                                                                                        DataMemberBinding="{Binding ConvertState, Mode=TwoWay}" Width="*" />
213

    
214
                        <telerik:GridViewDataColumn Header="CurrentPageNo"
215
                                                                                        DataMemberBinding="{Binding CurrentPageNo, Mode=TwoWay}" Width="*" />
216
                        <telerik:GridViewDataColumn Header="TotalPageNo"
217
                                                                                        DataMemberBinding="{Binding TotalPage, Mode=TwoWay}" Width="*" />
218
                        <telerik:GridViewDynamicHyperlinkColumn x:Name="navigation" Header="원본파일"
219
                                                        NavigateUrlFormatString="{}{0}"
220
                                                                                                            NavigateUrlMemberPaths="OriginfilePath"
221
                                                                                                                Width="2*">
222
                            <telerik:GridViewDynamicHyperlinkColumn.CellTemplate>
223
                                <DataTemplate>
224
                                    <TextBlock Text="{Binding FileName}"/>
225
                                </DataTemplate>
226
                            </telerik:GridViewDynamicHyperlinkColumn.CellTemplate>
227
                        </telerik:GridViewDynamicHyperlinkColumn>
228
                        <telerik:GridViewDataColumn Header=" ConvertPath"
229
                                                                                        DataMemberBinding="{Binding ConvertPath}" Width="2.5*" />
230
                        <telerik:GridViewDataColumn Header="CreateTime"
231
                                                                                        DataMemberBinding="{Binding CreateTime, Mode=TwoWay, StringFormat=\{0:yyyy.MM.dd HH:mm:ss\}}" Width="*" />
232
                        <telerik:GridViewDataColumn Header="StartTime"
233
                                                                                        DataMemberBinding="{Binding StartTime, Mode=TwoWay, StringFormat=\{0:yyyy.MM.dd HH:mm:ss\}}" Width="*" />
234
                        <telerik:GridViewDataColumn Header="EndTime"
235
                                                                                        DataMemberBinding="{Binding EndTime, Mode=TwoWay, StringFormat=\{0:yyyy.MM.dd HH:mm:ss\}}" Width="*" />
236
                    </telerik:RadGridView.Columns>
237
                </telerik:RadGridView>
238
            </telerik:RadExpander>
239
            <telerik:RadExpander Grid.Row="3" ExpandDirection="Down" Margin="3" BorderThickness="0"  VerticalAlignment="Stretch"
240
                  ScrollViewer.HorizontalScrollBarVisibility="Auto" ScrollViewer.VerticalScrollBarVisibility="Auto"
241
                             telerik:AnimationManager.IsAnimationEnabled="False">
242
                <telerik:RadExpander.Header>
243
                    <Grid>
244
                        <Grid.RowDefinitions>
245
                            <RowDefinition Height="11*"/>
246
                            <RowDefinition Height="5*"/>
247
                        </Grid.RowDefinitions>
248
                        <Grid.ColumnDefinitions>
249
                            <ColumnDefinition Width="Auto"/>
250
                            <ColumnDefinition Width="Auto"/>
251
                        </Grid.ColumnDefinitions>
252
                        <TextBlock Text="Alive Items : " Grid.RowSpan="2"/>
253
                        <TextBlock Text="{Binding AliveItems.Count, StringFormat=\{0:d\}}" Grid.Column="1" Grid.RowSpan="2"/>
254
                    </Grid>
255
                </telerik:RadExpander.Header>
256
                <telerik:RadGridView GroupRenderMode="Flat" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"
257
                                                         ItemsSource="{Binding AliveItems}" RowDetailsVisibilityMode="VisibleWhenSelected"
258
                                                         AutoGenerateColumns="False" CanUserFreezeColumns="False" RowDetailsTemplate="{StaticResource RowDetailsTemplate}"
259
                             ColumnWidth="*"  ScrollViewer.CanContentScroll="False" IsFilteringAllowed="True" Grid.Row="1" >
260
                    <telerik:RadGridView.Columns>
261
                        <controls:RowIndexColumn Header="#" Width="30" CellStyle="{StaticResource RowNumberStyle}" />
262

    
263
                        <telerik:GridViewDataColumn Header="Convert ID "
264
                                                                                        DataMemberBinding="{Binding ConvertID}" Width="1.5*"  />
265

    
266
                        <telerik:GridViewDataColumn Header="Markus " Width="0.5*" CellStyle="{StaticResource StretchCellStyle}">
267
                            <telerik:GridViewDataColumn.CellTemplate>
268
                                <DataTemplate>
269
                                    <telerik:RadButton Content="Click "  BorderThickness="0" Background="Transparent"
270
                                                   Command="{Binding MarkusLinkCommand, Source={StaticResource DataBaseItemsModel}}" CommandParameter="{Binding DataContext, RelativeSource={RelativeSource Self}}"/>
271
                                </DataTemplate>
272
                            </telerik:GridViewDataColumn.CellTemplate>
273
                        </telerik:GridViewDataColumn>
274

    
275
                        <telerik:GridViewDataColumn Header="ProjectNO" 
276
                                                                                        DataMemberBinding="{Binding ProjectNumber}" Width="*" />
277
                        <telerik:GridViewDataColumn Header="UniqueKey"
278
                                                                                        DataMemberBinding="{Binding UniqueKey}" Width="*" />
279
                        <telerik:GridViewDataColumn Header="ConvertState"
280
                                                                                        DataMemberBinding="{Binding ConvertState, Mode=TwoWay}" Width="*" />
281

    
282
                        <telerik:GridViewDataColumn Header="CurrentPageNo"
283
                                                                                        DataMemberBinding="{Binding CurrentPageNo, Mode=TwoWay}" Width="*" />
284
                        <telerik:GridViewDataColumn Header="TotalPageNo"
285
                                                                                        DataMemberBinding="{Binding TotalPage, Mode=TwoWay}" Width="*" />
286
                        <telerik:GridViewDynamicHyperlinkColumn  Header="원본파일"
287
                                                        NavigateUrlFormatString="{}{0}"
288
                                                                                                            NavigateUrlMemberPaths="OriginfilePath"
289
                                                                                                                Width="*">
290
                            <telerik:GridViewDynamicHyperlinkColumn.CellTemplate>
291
                                <DataTemplate>
292
                                    <TextBlock Text="{Binding FileName}"/>
293
                                </DataTemplate>
294
                            </telerik:GridViewDynamicHyperlinkColumn.CellTemplate>
295
                        </telerik:GridViewDynamicHyperlinkColumn>
296
                        <telerik:GridViewDataColumn Header=" ConvertPath"
297
                                                                                        DataMemberBinding="{Binding ConvertPath}" Width="2.5*" />
298
                        <telerik:GridViewDataColumn Header="CreateTime"
299
                                                                                        DataMemberBinding="{Binding CreateTime, Mode=TwoWay, StringFormat=\{0:yyyy.MM.dd HH:mm:ss\}}" Width="*" />
300
                        <telerik:GridViewDataColumn Header="StartTime"
301
                                                                                        DataMemberBinding="{Binding StartTime, Mode=TwoWay, StringFormat=\{0:yyyy.MM.dd HH:mm:ss\}}" Width="*" />
302
                        <telerik:GridViewDataColumn Header="EndTime"
303
                                                                                        DataMemberBinding="{Binding EndTime, Mode=TwoWay, StringFormat=\{0:yyyy.MM.dd HH:mm:ss\}}" Width="*" />
304
                    </telerik:RadGridView.Columns>
305
                </telerik:RadGridView>
306
            </telerik:RadExpander>
307
        </Grid>
308
    </Grid>
309
</UserControl>
클립보드 이미지 추가 (최대 크기: 500 MB)