You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
415 lines
32 KiB
415 lines
32 KiB
<UserControl x:Class="SchedulingSystemClient.XTGLWindow" |
|
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:SchedulingSystemClient" |
|
mc:Ignorable="d" |
|
d:DesignHeight="450" d:DesignWidth="800" Loaded="UserControl_Loaded"> |
|
<UserControl.Resources> |
|
<ControlTemplate x:Key="ExampleButton" TargetType="{x:Type Button}"> |
|
<Border Background="White" BorderThickness="0" x:Name="Border" Padding="10" Margin="5,0,0,0" HorizontalAlignment="Center" VerticalAlignment="Center"> |
|
<ContentPresenter /> |
|
</Border> |
|
<ControlTemplate.Triggers> |
|
<Trigger Property="IsEnabled" Value="False"> |
|
<Setter TargetName="Border" Property="BorderThickness" Value="0,0,0,2"/> |
|
<Setter TargetName="Border" Property="BorderBrush" Value="#315DDA"/> |
|
<Setter TargetName="Border" Property="TextBlock.Foreground" Value="#315DDA"/> |
|
</Trigger> |
|
</ControlTemplate.Triggers> |
|
</ControlTemplate> |
|
<Style x:Key="header" TargetType="DataGridColumnHeader"> |
|
<Setter Property="HorizontalContentAlignment" Value="Center"></Setter> |
|
<Setter Property="Foreground" Value="#484848"></Setter> |
|
<Setter Property="Background" Value="#E8E8E8"></Setter> |
|
<Setter Property="BorderBrush" Value="#DDDDDD"></Setter> |
|
<Setter Property="BorderThickness" Value="1"></Setter> |
|
<Setter Property="HorizontalContentAlignment" Value="Center"></Setter> |
|
<Setter Property="VerticalContentAlignment" Value="Center"></Setter> |
|
<Setter Property="FontSize" Value="20"></Setter> |
|
<!--<Setter Property="Height" Value="40"></Setter>--> |
|
<Setter Property="Padding" Value="15,10"></Setter> |
|
</Style> |
|
<Style x:Key="cell" TargetType="TextBlock"> |
|
<Setter Property="HorizontalAlignment" Value="Center"></Setter> |
|
<Setter Property="Padding" Value="50,15"></Setter> |
|
<Setter Property="Foreground" Value="#484848"></Setter> |
|
<Setter Property="FontSize" Value="16"></Setter> |
|
|
|
</Style> |
|
<Style x:Key="row" TargetType= "{x:Type DataGridRow}"> |
|
<Setter Property="BorderBrush" Value="#ECEEF4"></Setter> |
|
<Style.Triggers> |
|
<!--单行颜色--> |
|
<Trigger Property= "ItemsControl.AlternationIndex" |
|
Value= "0" > |
|
<Setter Property= "Background" Value= "#FFFFFF" /> |
|
</Trigger> |
|
<!--双行颜色--> |
|
<Trigger Property= "ItemsControl.AlternationIndex" |
|
Value= "1" > |
|
<Setter Property= "Background" Value= "#FFFFFF" /> |
|
</Trigger> |
|
<!--鼠标移入行颜色--> |
|
<Trigger Property="IsMouseOver" Value="True"> |
|
<Setter Property="Background" Value="#EDF0FA"/> |
|
</Trigger> |
|
</Style.Triggers> |
|
</Style> |
|
<!--选中行颜色--> |
|
<Style x:Key="dgc" TargetType="DataGridCell"> |
|
<Setter Property="BorderBrush" Value="#ECEEF4"></Setter> |
|
<Style.Triggers> |
|
<Trigger Property="IsSelected" Value="True"> |
|
<Setter Property="Background" Value="#EDF0FA"/> |
|
<Setter Property="BorderBrush" Value="#0000"/> |
|
</Trigger> |
|
</Style.Triggers> |
|
</Style> |
|
<Style x:Key="Dgrid" TargetType="DataGrid"> |
|
<!--内容边框颜色--> |
|
<Setter Property="HorizontalGridLinesBrush" Value="#ECEEF4"></Setter> |
|
<Setter Property="VerticalGridLinesBrush" Value="#ECEEF4"></Setter> |
|
<!--获取或设置一个值,该值指示是否自动创建列--> |
|
<Setter Property="AutoGenerateColumns" Value="False"/> |
|
<!--获取或设置一个值,该值指示用户是否可使用鼠标调整列宽--> |
|
<Setter Property="CanUserResizeColumns" Value="False"/> |
|
<!--获取或设置一个值,该值指示用户能否通过用鼠标拖动列标题来更改列的显示顺序--> |
|
<Setter Property="CanUserReorderColumns" Value="False"/> |
|
<!--获取或设置一个值,该值指示用户是否可在 DataGrid 中添加新行--> |
|
<Setter Property="CanUserAddRows" Value="False"/> |
|
<!--获取或设置一个值,该值指示用户是否可从 DataGrid 中删除行--> |
|
<Setter Property="CanUserDeleteRows" Value="False"/> |
|
<Setter Property="IsReadOnly" Value="True"/> |
|
<!--列表前面空白列--> |
|
<Setter Property="RowHeaderWidth" Value="0"/> |
|
</Style> |
|
<!--下拉框--> |
|
<ControlTemplate x:Key="CusComboBox" TargetType="{x:Type ComboBox}" > |
|
<Border BorderThickness="2" BorderBrush="#E4E4E4"> |
|
<Grid> |
|
<Grid.ColumnDefinitions> |
|
<ColumnDefinition Width="9*"></ColumnDefinition> |
|
<ColumnDefinition Width="1*"></ColumnDefinition> |
|
</Grid.ColumnDefinitions> |
|
<!--文本框--> |
|
<TextBox x:Name="myTxt" Grid.Column="0" |
|
Text="{TemplateBinding Text}" |
|
Background="White" |
|
BorderThickness="0" |
|
VerticalContentAlignment="Center" |
|
HorizontalContentAlignment="Center" |
|
FontSize="18" |
|
Foreground="Black"/> |
|
<!--下拉按钮--> |
|
<ToggleButton Grid.Column="1" Content="∨" IsChecked="{Binding Path=IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" |
|
ClickMode="Press" Background="White" BorderThickness="0"/> |
|
<Popup Name="MyPopup" |
|
IsOpen="{TemplateBinding IsDropDownOpen}" |
|
Placement="Bottom"> |
|
<Border MinWidth="{TemplateBinding ActualWidth}" |
|
MaxHeight="{TemplateBinding MaxDropDownHeight}"> |
|
<ScrollViewer MaxHeight="{TemplateBinding MaxDropDownHeight}" |
|
HorizontalScrollBarVisibility="Auto" |
|
VerticalScrollBarVisibility="Auto"> |
|
<StackPanel Background="White" |
|
IsItemsHost="True"/> |
|
</ScrollViewer> |
|
</Border> |
|
</Popup> |
|
</Grid> |
|
</Border> |
|
</ControlTemplate> |
|
|
|
</UserControl.Resources> |
|
<!--<Grid> |
|
<Grid.RowDefinitions> |
|
<RowDefinition Height="1*"></RowDefinition> |
|
<RowDefinition Height="15*"></RowDefinition> |
|
</Grid.RowDefinitions> |
|
<DockPanel Grid.Row="0" LastChildFill="False" Background="#0d2852"> |
|
<Button x:Name="rygl" Padding="5,0,5,0" FontSize="18" Click="rygl_Click" Background="White" BorderThickness="1">人员管理</Button> |
|
<Button x:Name="jsgl" Padding="5,0,5,0" FontSize="18" Click="jsgl_Click" Background="White" BorderThickness="1">角色管理</Button> |
|
</DockPanel> |
|
<Grid Grid.Row="1"> |
|
<Grid x:Name="ryglgrid"> |
|
<Grid.RowDefinitions> |
|
<RowDefinition Height="1*"></RowDefinition> |
|
<RowDefinition Height="15*"></RowDefinition> |
|
</Grid.RowDefinitions> |
|
<DockPanel Grid.Row="0" LastChildFill="False"> |
|
<Button x:Name="czmm" FontSize="16" Height="35" Width="70" DockPanel.Dock="Right" Margin="0,0,30,0" Click="czmm_Click" Content="重置密码" Background="#4964D0" FontWeight="Black" Foreground="White" VerticalContentAlignment="Center"> |
|
<Button.Template > |
|
<ControlTemplate TargetType="{x:Type Button}" > |
|
<Border BorderBrush="{TemplateBinding Control.BorderBrush}" BorderThickness="0" CornerRadius="3,3,3,3"> |
|
<Border.Background>#4964D0</Border.Background> |
|
<ContentPresenter Content="{TemplateBinding ContentControl.Content}" HorizontalAlignment="Center" VerticalAlignment="Center" ></ContentPresenter> |
|
</Border> |
|
</ControlTemplate> |
|
</Button.Template> |
|
</Button> |
|
<Button x:Name="scry" FontSize="16" Height="35" Width="70" DockPanel.Dock="Right" Margin="0,0,30,0" Click="scry_Click" Content="删 除" Background="#4964D0" FontWeight="Black" Foreground="White" VerticalContentAlignment="Center"> |
|
<Button.Template > |
|
<ControlTemplate TargetType="{x:Type Button}" > |
|
<Border BorderBrush="{TemplateBinding Control.BorderBrush}" BorderThickness="0" CornerRadius="3,3,3,3"> |
|
<Border.Background>#4964D0</Border.Background> |
|
<ContentPresenter Content="{TemplateBinding ContentControl.Content}" HorizontalAlignment="Center" VerticalAlignment="Center" ></ContentPresenter> |
|
</Border> |
|
</ControlTemplate> |
|
</Button.Template> |
|
</Button> |
|
<Button x:Name="xgry" FontSize="16" Height="35" Width="70" DockPanel.Dock="Right" Margin="0,0,30,0" Click="xgry_Click" Content="修 改" Background="#4964D0" FontWeight="Black" Foreground="White" VerticalContentAlignment="Center"> |
|
<Button.Template > |
|
<ControlTemplate TargetType="{x:Type Button}" > |
|
<Border BorderBrush="{TemplateBinding Control.BorderBrush}" BorderThickness="0" CornerRadius="3,3,3,3"> |
|
<Border.Background>#4964D0</Border.Background> |
|
<ContentPresenter Content="{TemplateBinding ContentControl.Content}" HorizontalAlignment="Center" VerticalAlignment="Center" ></ContentPresenter> |
|
</Border> |
|
</ControlTemplate> |
|
</Button.Template> |
|
</Button> |
|
|
|
<Button x:Name="xzry" FontSize="16" Height="35" Width="70" DockPanel.Dock="Right" Margin="0,0,30,0" Click="xzry_Click" Content="新 增" Background="#4964D0" FontWeight="Black" Foreground="White" VerticalContentAlignment="Center"> |
|
<Button.Template > |
|
<ControlTemplate TargetType="{x:Type Button}" > |
|
<Border BorderBrush="{TemplateBinding Control.BorderBrush}" BorderThickness="0" CornerRadius="3,3,3,3"> |
|
<Border.Background>#4964D0</Border.Background> |
|
<ContentPresenter Content="{TemplateBinding ContentControl.Content}" HorizontalAlignment="Center" VerticalAlignment="Center" ></ContentPresenter> |
|
</Border> |
|
</ControlTemplate> |
|
</Button.Template> |
|
</Button> |
|
<Button x:Name="cxry" FontSize="16" Height="35" Width="70" DockPanel.Dock="Right" Margin="0,0,30,0" Click="cxry_Click" Content="查 询" Background="#4964D0" FontWeight="Black" Foreground="White" VerticalContentAlignment="Center"> |
|
<Button.Template > |
|
<ControlTemplate TargetType="{x:Type Button}" > |
|
<Border BorderBrush="{TemplateBinding Control.BorderBrush}" BorderThickness="0" CornerRadius="3,3,3,3"> |
|
<Border.Background>#4964D0</Border.Background> |
|
<ContentPresenter Content="{TemplateBinding ContentControl.Content}" HorizontalAlignment="Center" VerticalAlignment="Center" ></ContentPresenter> |
|
</Border> |
|
</ControlTemplate> |
|
</Button.Template> |
|
</Button> |
|
</DockPanel> |
|
<DataGrid x:Name="rygldata" Grid.Row="1" CanUserAddRows="False" AutoGenerateColumns="False" FontSize="20" SelectionChanged="rygldata_SelectionChanged" Style="{StaticResource Dgrid}" RowStyle="{StaticResource row}" CellStyle="{StaticResource dgc}"> |
|
<DataGrid.Columns> |
|
<DataGridTextColumn Width="1*" HeaderStyle="{StaticResource header}" ElementStyle="{StaticResource cell}" Header="ID" Visibility="Collapsed" Binding="{Binding ID}"/> |
|
<DataGridTextColumn Width="1*" HeaderStyle="{StaticResource header}" ElementStyle="{StaticResource cell}" Header="姓名" Binding="{Binding Name}"/> |
|
<DataGridTextColumn Width="1*" HeaderStyle="{StaticResource header}" ElementStyle="{StaticResource cell}" Header="工号" Binding="{Binding GH}"/> |
|
<DataGridTextColumn Width="1*" HeaderStyle="{StaticResource header}" ElementStyle="{StaticResource cell}" Header="角色" Binding="{Binding strRole}"/> |
|
</DataGrid.Columns> |
|
</DataGrid> |
|
</Grid> |
|
<Grid x:Name="jsglgrid"> |
|
<Grid.RowDefinitions> |
|
<RowDefinition Height="1*"></RowDefinition> |
|
<RowDefinition Height="15*"></RowDefinition> |
|
</Grid.RowDefinitions> |
|
<DockPanel Grid.Row="0" LastChildFill="False"> |
|
<Button x:Name="bcjs" FontSize="16" Height="35" Width="70" DockPanel.Dock="Right" Margin="0,0,30,0" Click="bcjs_Click" Content="保 存" Background="#4964D0" FontWeight="Black" Foreground="White" VerticalContentAlignment="Center"> |
|
<Button.Template > |
|
<ControlTemplate TargetType="{x:Type Button}" > |
|
<Border BorderBrush="{TemplateBinding Control.BorderBrush}" BorderThickness="0" CornerRadius="3,3,3,3"> |
|
<Border.Background>#4964D0</Border.Background> |
|
<ContentPresenter Content="{TemplateBinding ContentControl.Content}" HorizontalAlignment="Center" VerticalAlignment="Center" ></ContentPresenter> |
|
</Border> |
|
</ControlTemplate> |
|
</Button.Template> |
|
</Button> |
|
<Button x:Name="scjs" FontSize="16" Height="35" Width="70" DockPanel.Dock="Right" Margin="0,0,30,0" Click="scjs_Click" Content="删 除" Background="#4964D0" FontWeight="Black" Foreground="White" VerticalContentAlignment="Center"> |
|
<Button.Template > |
|
<ControlTemplate TargetType="{x:Type Button}" > |
|
<Border BorderBrush="{TemplateBinding Control.BorderBrush}" BorderThickness="0" CornerRadius="3,3,3,3"> |
|
<Border.Background>#4964D0</Border.Background> |
|
<ContentPresenter Content="{TemplateBinding ContentControl.Content}" HorizontalAlignment="Center" VerticalAlignment="Center" ></ContentPresenter> |
|
</Border> |
|
</ControlTemplate> |
|
</Button.Template> |
|
</Button> |
|
<Button x:Name="xgjs" FontSize="16" Height="35" Width="70" DockPanel.Dock="Right" Margin="0,0,30,0" Click="xgjs_Click" Content="修 改" Background="#4964D0" FontWeight="Black" Foreground="White" VerticalContentAlignment="Center"> |
|
<Button.Template > |
|
<ControlTemplate TargetType="{x:Type Button}" > |
|
<Border BorderBrush="{TemplateBinding Control.BorderBrush}" BorderThickness="0" CornerRadius="3,3,3,3"> |
|
<Border.Background>#4964D0</Border.Background> |
|
<ContentPresenter Content="{TemplateBinding ContentControl.Content}" HorizontalAlignment="Center" VerticalAlignment="Center" ></ContentPresenter> |
|
</Border> |
|
</ControlTemplate> |
|
</Button.Template> |
|
</Button> |
|
|
|
<Button x:Name="xzjs" FontSize="16" Height="35" Width="70" DockPanel.Dock="Right" Margin="0,0,30,0" Click="xzjs_Click" Content="新 增" Background="#4964D0" FontWeight="Black" Foreground="White" VerticalContentAlignment="Center"> |
|
<Button.Template > |
|
<ControlTemplate TargetType="{x:Type Button}" > |
|
<Border BorderBrush="{TemplateBinding Control.BorderBrush}" BorderThickness="0" CornerRadius="3,3,3,3"> |
|
<Border.Background>#4964D0</Border.Background> |
|
<ContentPresenter Content="{TemplateBinding ContentControl.Content}" HorizontalAlignment="Center" VerticalAlignment="Center" ></ContentPresenter> |
|
</Border> |
|
</ControlTemplate> |
|
</Button.Template> |
|
</Button> |
|
<Button x:Name="cxjs" FontSize="16" Height="35" Width="70" DockPanel.Dock="Right" Margin="0,0,30,0" Click="cxjs_Click" Content="查 询" Background="#4964D0" FontWeight="Black" Foreground="White" VerticalContentAlignment="Center"> |
|
<Button.Template > |
|
<ControlTemplate TargetType="{x:Type Button}" > |
|
<Border BorderBrush="{TemplateBinding Control.BorderBrush}" BorderThickness="0" CornerRadius="3,3,3,3"> |
|
<Border.Background>#4964D0</Border.Background> |
|
<ContentPresenter Content="{TemplateBinding ContentControl.Content}" HorizontalAlignment="Center" VerticalAlignment="Center" ></ContentPresenter> |
|
</Border> |
|
</ControlTemplate> |
|
</Button.Template> |
|
</Button> |
|
</DockPanel> |
|
<Grid Grid.Row="1"> |
|
<Grid.ColumnDefinitions> |
|
<ColumnDefinition Width="1*"></ColumnDefinition> |
|
<ColumnDefinition Width="2*"></ColumnDefinition> |
|
</Grid.ColumnDefinitions> |
|
<DataGrid x:Name="jsgldata" Grid.Column="0" CanUserAddRows="False" AutoGenerateColumns="False" FontSize="20" SelectionChanged="jsgldata_SelectionChanged" Style="{StaticResource Dgrid}" RowStyle="{StaticResource row}" CellStyle="{StaticResource dgc}" MouseDoubleClick="jsgldata_MouseDoubleClick"> |
|
<DataGrid.Columns> |
|
<DataGridTextColumn HeaderStyle="{StaticResource header}" ElementStyle="{StaticResource cell}" Header="ID" Visibility="Collapsed" Binding="{Binding ID}"/> |
|
<DataGridTextColumn Width="1*" HeaderStyle="{StaticResource header}" ElementStyle="{StaticResource cell}" Header="角色" Binding="{Binding Role}"/> |
|
<DataGridTextColumn HeaderStyle="{StaticResource header}" ElementStyle="{StaticResource cell}" Header="是否可以" Visibility="Collapsed" Binding="{Binding SFKY}"/> |
|
<DataGridTextColumn Width="1*" HeaderStyle="{StaticResource header}" ElementStyle="{StaticResource cell}" Header="是否可用" Binding="{Binding strSFKY}"/> |
|
</DataGrid.Columns> |
|
</DataGrid> |
|
<DataGrid x:Name="qxfpdata" Grid.Column="1" CanUserAddRows="False" AutoGenerateColumns="False" FontSize="20" SelectionChanged="qxfpdata_SelectionChanged" Style="{StaticResource Dgrid}" RowStyle="{StaticResource row}" CellStyle="{StaticResource dgc}"> |
|
<DataGrid.Columns> |
|
<DataGridTextColumn HeaderStyle="{StaticResource header}" ElementStyle="{StaticResource cell}" Header="ID" Visibility="Collapsed" Binding="{Binding ID}"/> |
|
<DataGridTextColumn Width="1*" HeaderStyle="{StaticResource header}" ElementStyle="{StaticResource cell}" Header="功能" Binding="{Binding Name}"/> |
|
--> |
|
<!--<DataGridTextColumn Width="1*" HeaderStyle="{StaticResource header}" ElementStyle="{StaticResource cell}" Header="是否可用" Binding="{Binding GH}"/>--><!-- |
|
<DataGridTemplateColumn Width="1*" Header="是否可用" HeaderStyle="{StaticResource header}" > |
|
<DataGridTemplateColumn.CellTemplate> |
|
<DataTemplate> |
|
<CheckBox x:Name="box" HorizontalAlignment="Center" IsChecked="{Binding IsChecked}" VerticalAlignment="Center" /> |
|
</DataTemplate> |
|
</DataGridTemplateColumn.CellTemplate> |
|
</DataGridTemplateColumn> |
|
</DataGrid.Columns> |
|
</DataGrid> |
|
</Grid> |
|
|
|
</Grid> |
|
</Grid> |
|
</Grid>--> |
|
<Grid> |
|
<Grid.RowDefinitions> |
|
<RowDefinition Height="1*"></RowDefinition> |
|
<RowDefinition Height="14*"></RowDefinition> |
|
</Grid.RowDefinitions> |
|
<!--<DockPanel Grid.Row="0" LastChildFill="False" Background="#0d2852"> |
|
<Button x:Name="rygl" Padding="5,0,5,0" FontSize="18" Click="rygl_Click" Background="White" BorderThickness="1">人员管理</Button> |
|
<Button x:Name="jsgl" Padding="5,0,5,0" FontSize="18" Click="jsgl_Click" Background="White" BorderThickness="1">角色管理</Button> |
|
</DockPanel>--> |
|
<Border Grid.Row="0" BorderBrush="#DDDDDD" BorderThickness="2" Margin="10,5" > |
|
<DockPanel LastChildFill="False" Background="White"> |
|
<Button x:Name="rygl" FontSize="18" Click="rygl_Click" Template="{StaticResource ExampleButton}" Content="人员管理"></Button> |
|
<Button x:Name="jsgl" FontSize="18" Click="jsgl_Click" Template="{StaticResource ExampleButton}" Content="角色管理"></Button> |
|
<Button x:Name="bcjs" FontSize="18" Height="35" Width="60" DockPanel.Dock="Right" Margin="0,0,20,0" Click="bcjs_Click" Content="保存" Background="#558BE3" Foreground="White" VerticalContentAlignment="Center"> |
|
<Button.Template > |
|
<ControlTemplate TargetType="{x:Type Button}" > |
|
<Border BorderBrush="{TemplateBinding Control.BorderBrush}" BorderThickness="0" CornerRadius="3,3,3,3"> |
|
<Border.Background>#558BE3</Border.Background> |
|
<ContentPresenter Content="{TemplateBinding ContentControl.Content}" HorizontalAlignment="Center" VerticalAlignment="Center" ></ContentPresenter> |
|
</Border> |
|
</ControlTemplate> |
|
</Button.Template> |
|
</Button><Button x:Name="czmm" FontSize="18" Height="35" Width="90" DockPanel.Dock="Right" Margin="0,0,20,0" Click="czmm_Click" Content="重置密码" Background="#558BE3" Foreground="White" VerticalContentAlignment="Center"> |
|
<Button.Template > |
|
<ControlTemplate TargetType="{x:Type Button}" > |
|
<Border BorderBrush="{TemplateBinding Control.BorderBrush}" BorderThickness="0" CornerRadius="3,3,3,3"> |
|
<Border.Background>#558BE3</Border.Background> |
|
<ContentPresenter Content="{TemplateBinding ContentControl.Content}" HorizontalAlignment="Center" VerticalAlignment="Center" ></ContentPresenter> |
|
</Border> |
|
</ControlTemplate> |
|
</Button.Template> |
|
</Button> |
|
<Button x:Name="btn_sc" FontSize="18" Height="35" Width="70" DockPanel.Dock="Right" Margin="0,0,10,0" Click="btn_sc_Click" Content="删 除" Background="#D4495C" Foreground="White" VerticalContentAlignment="Center"> |
|
<Button.Template > |
|
<ControlTemplate TargetType="{x:Type Button}" > |
|
<Border BorderBrush="{TemplateBinding Control.BorderBrush}" BorderThickness="0" CornerRadius="3,3,3,3"> |
|
<Border.Background>#D4495C</Border.Background> |
|
<ContentPresenter Content="{TemplateBinding ContentControl.Content}" HorizontalAlignment="Center" VerticalAlignment="Center" ></ContentPresenter> |
|
</Border> |
|
</ControlTemplate> |
|
</Button.Template> |
|
</Button> |
|
<Button x:Name="btn_xg" FontSize="18" Height="35" Width="60" DockPanel.Dock="Right" Margin="0,0,20,0" Click="btn_xg_Click" Content="修 改" Background="#558BE3" Foreground="White" VerticalContentAlignment="Center"> |
|
<Button.Template > |
|
<ControlTemplate TargetType="{x:Type Button}" > |
|
<Border BorderBrush="{TemplateBinding Control.BorderBrush}" BorderThickness="0" CornerRadius="3,3,3,3"> |
|
<Border.Background>#558BE3</Border.Background> |
|
<ContentPresenter Content="{TemplateBinding ContentControl.Content}" HorizontalAlignment="Center" VerticalAlignment="Center" ></ContentPresenter> |
|
</Border> |
|
</ControlTemplate> |
|
</Button.Template> |
|
</Button> |
|
<Button x:Name="btn_xz" FontSize="18" Height="35" Width="60" DockPanel.Dock="Right" Margin="0,0,20,0" Click="btn_xz_Click" Content="新 增" Background="#558BE3" Foreground="White" VerticalContentAlignment="Center"> |
|
<Button.Template > |
|
<ControlTemplate TargetType="{x:Type Button}" > |
|
<Border BorderBrush="{TemplateBinding Control.BorderBrush}" BorderThickness="0" CornerRadius="3,3,3,3"> |
|
<Border.Background>#558BE3</Border.Background> |
|
<ContentPresenter Content="{TemplateBinding ContentControl.Content}" HorizontalAlignment="Center" VerticalAlignment="Center" ></ContentPresenter> |
|
</Border> |
|
</ControlTemplate> |
|
</Button.Template> |
|
</Button> |
|
<Button x:Name="btn_sx" FontSize="18" Height="35" Width="60" DockPanel.Dock="Right" Margin="0,0,20,0" Click="btn_sx_Click" Content="刷 新" Background="#558BE3" Foreground="White" VerticalContentAlignment="Center"> |
|
<Button.Template > |
|
<ControlTemplate TargetType="{x:Type Button}" > |
|
<Border BorderBrush="{TemplateBinding Control.BorderBrush}" BorderThickness="0" CornerRadius="3,3,3,3"> |
|
<Border.Background>#558BE3</Border.Background> |
|
<ContentPresenter Content="{TemplateBinding ContentControl.Content}" HorizontalAlignment="Center" VerticalAlignment="Center" ></ContentPresenter> |
|
</Border> |
|
</ControlTemplate> |
|
</Button.Template> |
|
</Button> |
|
</DockPanel> |
|
</Border> |
|
<Border Grid.Row="1" BorderBrush="#DDDDDD" BorderThickness="2" Margin="10,5" Padding="10"> |
|
<Grid> |
|
<Grid x:Name="ryglgrid"> |
|
<DataGrid x:Name="rygldata" Grid.Row="1" CanUserAddRows="False" AutoGenerateColumns="False" FontSize="20" SelectionChanged="rygldata_SelectionChanged" Style="{StaticResource Dgrid}" RowStyle="{StaticResource row}" CellStyle="{StaticResource dgc}"> |
|
<DataGrid.Columns> |
|
<DataGridTextColumn Width="1*" HeaderStyle="{StaticResource header}" ElementStyle="{StaticResource cell}" Header="ID" Visibility="Collapsed" Binding="{Binding ID}"/> |
|
<DataGridTextColumn Width="1*" HeaderStyle="{StaticResource header}" ElementStyle="{StaticResource cell}" Header="姓名" Binding="{Binding Name}"/> |
|
<DataGridTextColumn Width="1*" HeaderStyle="{StaticResource header}" ElementStyle="{StaticResource cell}" Header="工号" Binding="{Binding GH}"/> |
|
<DataGridTextColumn Width="1*" HeaderStyle="{StaticResource header}" ElementStyle="{StaticResource cell}" Header="角色" Binding="{Binding strRole}"/> |
|
</DataGrid.Columns> |
|
</DataGrid> |
|
</Grid> |
|
<Grid x:Name="jsglgrid"> |
|
<Grid Grid.Row="1"> |
|
<Grid.ColumnDefinitions> |
|
<ColumnDefinition Width="1*"></ColumnDefinition> |
|
<ColumnDefinition Width="2*"></ColumnDefinition> |
|
</Grid.ColumnDefinitions> |
|
<DataGrid x:Name="jsgldata" Grid.Column="0" CanUserAddRows="False" AutoGenerateColumns="False" FontSize="20" SelectionChanged="jsgldata_SelectionChanged" Style="{StaticResource Dgrid}" RowStyle="{StaticResource row}" CellStyle="{StaticResource dgc}" MouseDoubleClick="jsgldata_MouseDoubleClick"> |
|
<DataGrid.Columns> |
|
<DataGridTextColumn HeaderStyle="{StaticResource header}" ElementStyle="{StaticResource cell}" Header="ID" Visibility="Collapsed" Binding="{Binding ID}"/> |
|
<DataGridTextColumn Width="1*" HeaderStyle="{StaticResource header}" ElementStyle="{StaticResource cell}" Header="角色" Binding="{Binding Role}"/> |
|
<DataGridTextColumn HeaderStyle="{StaticResource header}" ElementStyle="{StaticResource cell}" Header="是否可以" Visibility="Collapsed" Binding="{Binding SFKY}"/> |
|
<DataGridTextColumn Width="1*" HeaderStyle="{StaticResource header}" ElementStyle="{StaticResource cell}" Header="是否可用" Binding="{Binding strSFKY}"/> |
|
</DataGrid.Columns> |
|
</DataGrid> |
|
<DataGrid x:Name="qxfpdata" Grid.Column="1" CanUserAddRows="False" AutoGenerateColumns="False" FontSize="20" SelectionChanged="qxfpdata_SelectionChanged" Style="{StaticResource Dgrid}" RowStyle="{StaticResource row}" CellStyle="{StaticResource dgc}"> |
|
<DataGrid.Columns> |
|
<DataGridTextColumn HeaderStyle="{StaticResource header}" ElementStyle="{StaticResource cell}" Header="ID" Visibility="Collapsed" Binding="{Binding ID}"/> |
|
<DataGridTextColumn Width="1*" HeaderStyle="{StaticResource header}" ElementStyle="{StaticResource cell}" Header="功能" Binding="{Binding Name}"/> |
|
<!--<DataGridTextColumn Width="1*" HeaderStyle="{StaticResource header}" ElementStyle="{StaticResource cell}" Header="是否可用" Binding="{Binding GH}"/>--> |
|
<DataGridTemplateColumn Width="1*" Header="是否可用" HeaderStyle="{StaticResource header}" > |
|
<DataGridTemplateColumn.CellTemplate> |
|
<DataTemplate> |
|
<CheckBox x:Name="box" HorizontalAlignment="Center" IsChecked="{Binding IsChecked}" VerticalAlignment="Center" /> |
|
</DataTemplate> |
|
</DataGridTemplateColumn.CellTemplate> |
|
</DataGridTemplateColumn> |
|
</DataGrid.Columns> |
|
</DataGrid> |
|
</Grid> |
|
|
|
</Grid> |
|
</Grid> |
|
</Border> |
|
|
|
</Grid> |
|
</UserControl>
|
|
|