WinUser.xaml
4.78 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
<Window
x:Class="HHECS.View.UserOperation.WinUser"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:HHECS.View.UserOperation"
xmlns:control="clr-namespace:HHECS.Model.Controls;assembly=HHWCS.Model"
mc:Ignorable="d"
Title="用户管理" Height="450" Width="800">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="50"></RowDefinition>
<RowDefinition Height="50"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
</Grid.RowDefinitions>
<Border Grid.Row="0" CornerRadius="10" Background="AliceBlue">
<WrapPanel>
<StackPanel Orientation="Horizontal" Margin="10,0,0,0">
<TextBlock>用户名:</TextBlock>
<TextBox Name="TxtUserName" Width="80">
<TextBox.Resources>
<Style TargetType="{x:Type Border}">
<Setter Property="CornerRadius" Value="5"></Setter>
</Style>
</TextBox.Resources>
</TextBox>
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="10,0,0,0">
<TextBlock>编码:</TextBlock>
<TextBox Name="TxtUserCode" Width="80">
<TextBox.Resources>
<Style TargetType="{x:Type Border}">
<Setter Property="CornerRadius" Value="5"></Setter>
</Style>
</TextBox.Resources>
</TextBox>
</StackPanel>
</WrapPanel>
</Border>
<StackPanel x:Name="SPBtns" Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Right">
<Button x:Name="BtnQuery" Click="BtnQuery_Click" Tag="user:query">查询</Button>
<Button x:Name="BtnNew" Click="BtnNew_Click" Tag="user:add">新增</Button>
<Button x:Name="BtnEdit" Click="BtnEdit_Click" Tag="user:edit">编辑</Button>
<Button x:Name="BtnEnable" Click="BtnEnable_Click" Tag="user:enable">启用</Button>
<Button x:Name="BtnDisable" Click="BtnDisable_Click" Tag="user:disable">禁用</Button>
</StackPanel>
<Border Grid.Row="2">
<DockPanel>
<control:DataPager x:Name="page" DockPanel.Dock="Bottom" PageIndex="{Binding PageIndex}" PageSize="{Binding PageSize}" TotalCount="{Binding TotalCount}"
PageChanged="page_PageChanged" ></control:DataPager>
<DataGrid x:Name="DatagridMain" AlternationCount="2">
<DataGrid.Columns>
<DataGridTextColumn Header="Id" Binding="{Binding Id}"/>
<DataGridTextColumn Header="编码" Binding="{Binding UserCode}"/>
<DataGridTextColumn Header="用户名" Binding="{Binding UserName}"/>
<DataGridTextColumn Header="部门" Binding="{Binding Partment}"/>
<DataGridTextColumn Header="地址" Binding="{Binding Address}"/>
<DataGridTextColumn Header="电话" Binding="{Binding Phone}"/>
<DataGridTextColumn Header="备注" Binding="{Binding Remark}"/>
<DataGridCheckBoxColumn Header="禁用" Binding="{Binding Disable}"/>
<DataGridTextColumn Header="创建时间" Binding="{Binding Created}"/>
<DataGridTextColumn Header="创建人" Binding="{Binding CreatedBy}"/>
<DataGridTextColumn Header="更新时间" Binding="{Binding Updated}"/>
<DataGridTextColumn Header="更新人" Binding="{Binding UpdatedBy}"/>
</DataGrid.Columns>
<DataGrid.RowStyle>
<Style TargetType="{x:Type DataGridRow}">
<Style.Triggers>
<Trigger Property="ItemsControl.AlternationIndex" Value="0">
<Setter Property="Background" Value="#ccffcc" />
</Trigger>
<Trigger Property="ItemsControl.AlternationIndex" Value="1">
<Setter Property="Background" Value="#FFF2F2F2" />
</Trigger>
</Style.Triggers>
</Style>
</DataGrid.RowStyle>
</DataGrid>
</DockPanel>
</Border>
</Grid>
</Window>