<localView:BeWoView x:Class="BeWo.View.Detail.Report.QueryView" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid" xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core" xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors" xmlns:localView="clr-namespace:BeWo.View" Height="Auto" Width="Auto" HorizontalAlignment="Stretch" xmlns:uc="clr-namespace:BeWo.Controls;assembly=BeWo.Controls"
                    xmlns:dxb="http://schemas.devexpress.com/winfx/2008/xaml/bars" VerticalAlignment="Stretch" Focusable="True">
	<Grid>

		<GroupBox Header="Berichte" Style="{StaticResource ObjectEditGroupBox}">

			<Grid>
				<Grid.RowDefinitions>
					<RowDefinition Height="Auto" />
					<RowDefinition Height="Auto" />
					<RowDefinition Height="Auto" />
					<RowDefinition Height="*" />
				</Grid.RowDefinitions>
				<StackPanel Orientation="Horizontal">
					<Label VerticalAlignment="Center" Content="Abfrage" Width="100" />
					<uc:NullItemComboBox DisplayMemberPath="Title" SelectionChanged="combo_query_SelectionChanged" Height="23" Margin="3" x:Name="combo_query" NullText="Bitte wählen..." MinWidth="250" Width="Auto" />
				</StackPanel>
				<StackPanel x:Name="paramterPanel" Grid.Row="1" Orientation="Vertical"></StackPanel>
				<Button HorizontalAlignment="Left" Grid.Row="2" x:Name="btnExecuteQuery" Click="btnExecuteQuery_Click" Width="80" Margin="0,3,0,3" >Ausführen</Button>
                
                <TextBlock Grid.Row="2" x:Name="textblock_link_pdfexport_direct" VerticalAlignment="Center" Margin="3,3,0,3" FontSize="14" Visibility="Hidden">
                    <Hyperlink x:Name="linkPdfExport_direct" TargetName="_NewWindow" Foreground="#FF2B508B" RequestNavigate="linkPdfExport_direct_RequestNavigate">
                        <Run Text="Bericht öffnen" />
                    </Hyperlink>
                </TextBlock>

                
				    <dxg:GridControl AutoPopulateColumns="True" VerticalAlignment="Stretch" Visibility="Collapsed" Grid.Row="3" HorizontalAlignment="Stretch" x:Name="datagrid_result"  >

					    <dxg:GridControl.View>
						    <dxg:TableView AllowEditing="False" ShowGroupPanel="False" ShowGroupedColumns="False" ShowTotalSummary="True" NavigationStyle="Cell" Margin="3,22,3,3" IsColumnMenuEnabled="False" IsGroupPanelMenuEnabled="False" IsTotalSummaryMenuEnabled="False" IsRowCellMenuEnabled="False" />
					    </dxg:GridControl.View>
                        <dxg:GridControl.TotalSummary>
                            <dxg:GridSummaryItem SummaryType="Count" x:Name="summaryItem" />
                        </dxg:GridControl.TotalSummary>
				    </dxg:GridControl>
                
				<Grid Grid.Row="3" HorizontalAlignment="Stretch" VerticalAlignment="Top" Margin="5,5,5,0">
					<Grid.ColumnDefinitions>
						<ColumnDefinition Width="*" />
						<ColumnDefinition Width="Auto" />
						<ColumnDefinition Width="Auto" />
					</Grid.ColumnDefinitions>
					<TextBlock Grid.Column="1" x:Name="textblock_link_pdfexport" VerticalAlignment="Center" Margin="5 0" HorizontalAlignment="Left" FontSize="14">
						<Hyperlink x:Name="linkPdfExport" TargetName="_NewWindow" Foreground="{StaticResource GridPrintMenuLightBrush}" RequestNavigate="linkPdfExport_RequestNavigate">
							<Run Text="Drucken" />
						</Hyperlink>
					</TextBlock>
					<TextBlock Grid.Column="2" x:Name="textblock_link" VerticalAlignment="Center" Margin="5 0" HorizontalAlignment="Left" FontSize="14">
						<Hyperlink x:Name="linkExcelExport" TargetName="newWindow" Foreground="{StaticResource GridPrintMenuLightBrush}" RequestNavigate="linkExcelExport_RequestNavigate">Excel Export</Hyperlink>
					</TextBlock>

				</Grid>

			</Grid>
		</GroupBox>
	</Grid>
</localView:BeWoView>