<Page x:Class="MWS.Domain.View.SystemManage.UserManagePage"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
      xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
      xmlns:local="clr-namespace:MWS.Domain.View.SystemManage" xmlns:md="http://materialdesigninxaml.net/winfx/xaml/themes" xmlns:ControlHelper="clr-namespace:MWS.Domain.Common.ControlHelper"
      mc:Ignorable="d" 
      d:DesignHeight="935" d:DesignWidth="1721"
      Title="UserManagePage" Background="#F3F7FA" Loaded="Page_Loaded">

    <Grid>
        <DockPanel   Height="110" VerticalAlignment="Top" Grid.ColumnSpan="2">
            <StackPanel DockPanel.Dock="Left" Orientation="Horizontal" Margin="21,20,12,20" >
                <TextBlock Text="用户名" VerticalAlignment="Center" Margin="0,0,10,0" />
                <TextBox x:Name="tbkeyword"  Style="{StaticResource DefaultTextBoxStyle}" BorderBrush="#CCCCCC" Height="36" Width="200" Padding="9"  md:HintAssist.Hint="检索关键字" />
            </StackPanel>

            <!--<StackPanel Orientation="Horizontal" Margin="12,20">
                <TextBlock Text="班组" VerticalAlignment="Center" Margin="0,0,10,0" />
                <ComboBox x:Name="team"  Style="{StaticResource DefaultComboBoxStyle}"  ItemsSource="{Binding}"
                          md:HintAssist.Hint="全部"   Height="36"   Width="160" >

                </ComboBox>
            </StackPanel>-->
            <StackPanel Orientation="Horizontal"  DockPanel.Dock="Right" HorizontalAlignment="Right">
               
                <Button x:Name="search"  Height="36" Margin="10,20,20,20" Background="#2DA6EC" BorderThickness="0" md:ButtonAssist.CornerRadius="5" Click="search_Click">
                    <TextBlock>
                 <md:PackIcon Kind="Crosshairs" Width="20" Height="20" Margin="0,2"/>
                <Label Content="查询" FontSize="14" Foreground="#FFFFFF" />
                    </TextBlock>
                </Button>
                <Button x:Name="btAddUser"  Height="36" Margin="10,20,20,20" Background="#2DA6EC" BorderThickness="0" md:ButtonAssist.CornerRadius="5" Click="btAddUser_Click">
                    <TextBlock>
                 <md:PackIcon Kind="Add" Width="20" Height="20" Margin="0,2"/>
                <Label Content="添加" FontSize="14" Foreground="#FFFFFF" />
                    </TextBlock>
                </Button>
                <Button x:Name="btEditUser"  Height="36" Margin="10,20,20,20" Background="#2DA6EC" BorderThickness="0" md:ButtonAssist.CornerRadius="5" Click="btEditUser_Click">
                    <TextBlock>
                 <md:PackIcon Kind="Edit" Width="20" Height="20" Margin="0,2"/>
                <Label Content="编辑" FontSize="14" Foreground="#FFFFFF" />
                    </TextBlock>
                </Button>
                <Button x:Name="btDeleteUser"  Height="36" Margin="10,20,20,20" Background="#2DA6EC" BorderThickness="0" md:ButtonAssist.CornerRadius="5" Click="btDeleteUser_Click">
                    <TextBlock>
                 <md:PackIcon Kind="Delete" Width="20" Height="20" Margin="0,2"/>
                <Label Content="删除" FontSize="14" Foreground="#FFFFFF" />
                    </TextBlock>
                </Button>
            </StackPanel>
        </DockPanel>
        <md:Card Height="807" md:ShadowAssist.ShadowDepth="Depth1" Background="#FFFFFF" Margin="21,110,21,0">
            <StackPanel Orientation="Vertical">
                <StackPanel Height="727">
                    <DataGrid x:Name="dglist" ItemsSource="{Binding}" Background="Transparent" SelectionMode="Single"  Style="{StaticResource DefaultDataGridStyle}"  ColumnHeaderStyle="{StaticResource DefaultDataGridColumnHeaderStyle}">
                        <DataGrid.Columns>
                            <DataGridTextColumn Header="编号" Width="Auto" Binding="{Binding Id}" Visibility="Hidden"/>
                            <DataGridTextColumn Header="用户名" Width="1*" Binding="{Binding Account}"/>
                            <DataGridTextColumn Header="用户真实姓名" Width="1*" Binding="{Binding UserName}"/>
                            <!--<DataGridTextColumn Header="创建时间" Width="1*" Binding="{Binding CreationTime}"/>-->
                            <DataGridTextColumn Header="添加时间" Width="1*" Binding="{Binding Path=CreationTime,StringFormat='yyyy年MM月dd日 HH:mm:ss'}" />
                        </DataGrid.Columns>
                    </DataGrid>
                    <!--<ListView Margin="20" ItemContainerStyle="{StaticResource NonSelectableListViewContainerStyle}" Name="lstUser" ItemsSource="{Binding}" ScrollViewer.HorizontalScrollBarVisibility="Disabled">
                        <ListView.View>
                            <GridView ColumnHeaderContainerStyle="{StaticResource DefaultGridViewColumnHeader}">
                                <GridViewColumn Width="500" Header="用户名" DisplayMemberBinding="{Binding Path=Account}">
                                </GridViewColumn>
                                <GridViewColumn Header="用户真实姓名" Width="500" DisplayMemberBinding="{Binding Path=UserName}"/>
                                --><!--<GridViewColumn Header="是否锁定" Width="400" DisplayMemberBinding="{Binding Path=DeviceId}"/>--><!--
                                <GridViewColumn Header="创建时间" Width="650" DisplayMemberBinding="{Binding Path=CreationTime}"/>
                            </GridView>
                        </ListView.View>
                    </ListView>-->
                </StackPanel>

                <StackPanel  VerticalAlignment="Center" Height="80">
                    <ControlHelper:Pagination PageDataCount="16" Height="80" x:Name="pagination" />
                </StackPanel>

            </StackPanel>
        </md:Card>
    </Grid>
</Page>
