AttendancePanel.xaml 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. <UserControl x:Class="PRSDesktop.AttendancePanel"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:Kanban="clr-namespace:Syncfusion.UI.Xaml.Kanban;assembly=Syncfusion.SfKanban.WPF"
  7. mc:Ignorable="d"
  8. d:DesignHeight="450" d:DesignWidth="800">
  9. <Grid>
  10. <Grid.ColumnDefinitions>
  11. <ColumnDefinition Width="*" />
  12. </Grid.ColumnDefinitions>
  13. <Grid.RowDefinitions>
  14. <RowDefinition Height="Auto" />
  15. <RowDefinition Height="*" />
  16. </Grid.RowDefinitions>
  17. <Border Grid.Column="0" Grid.Row="0" CornerRadius="5,5,0,0" Margin="0,0,0,2" BorderBrush="Gray"
  18. BorderThickness="0.75" Background="WhiteSmoke" Padding="5">
  19. <DockPanel>
  20. <Button x:Name="ShowAll" DockPanel.Dock="Left" Margin="5,0,0,0" Padding="10,0" Content="Show All"
  21. Click="ShowAll_Click" />
  22. <Label DockPanel.Dock="Left" Content="Search" Margin="5,0,0,0" />
  23. <Button x:Name="Export" DockPanel.Dock="Right" Margin="5,0,0,0" Padding="10,0" Content="Export"
  24. Click="Export_Click" />
  25. <TextBox x:Name="Search" DockPanel.Dock="Left" Text="" VerticalContentAlignment="Center"
  26. KeyUp="Search_KeyUp" />
  27. </DockPanel>
  28. </Border>
  29. <Kanban:SfKanban x:Name="Kanban" Grid.Column="0" Grid.Row="1" BorderBrush="Gray" BorderThickness="0.75"
  30. Margin="0">
  31. <Kanban:SfKanban.CardTemplate>
  32. <DataTemplate>
  33. <Border BorderBrush="Black" BorderThickness="0.75" CornerRadius="3" Background="{Binding ColorKey}"
  34. Margin="0,2,0,0" Tag="{Binding}">
  35. <Grid Margin="4">
  36. <Grid.ColumnDefinitions>
  37. <ColumnDefinition Width="Auto" />
  38. <ColumnDefinition Width="Auto" />
  39. <ColumnDefinition Width="*" />
  40. <ColumnDefinition Width="Auto" />
  41. </Grid.ColumnDefinitions>
  42. <Grid.RowDefinitions>
  43. <RowDefinition Height="20" />
  44. <RowDefinition Height="20" />
  45. <RowDefinition Height="20" />
  46. </Grid.RowDefinitions>
  47. <!--<CheckBox VerticalAlignment="Top" Grid.Row="0" Grid.Column="0" IsChecked="{Binding Path=Checked}" Tag="{Binding}" Checked="CheckBox_Checked" Unchecked="CheckBox_Checked"/>-->
  48. <Border Width="50" Height="50" CornerRadius="25" Margin="2,0,10,0" Grid.Column="0"
  49. Grid.Row="0" Grid.RowSpan="3" BorderBrush="Black" BorderThickness="0.75"
  50. VerticalAlignment="Center">
  51. <Border.Background>
  52. <ImageBrush ImageSource="{Binding Path=Image}" Stretch="UniformToFill" />
  53. </Border.Background>
  54. </Border>
  55. <TextBlock Grid.Row="0" Grid.Column="1" Grid.ColumnSpan="2" Text="{Binding Path=Name}"
  56. FontWeight="Bold" FontSize="12" HorizontalAlignment="Left"
  57. VerticalAlignment="Center" Foreground="{Binding TextColor}" />
  58. <TextBlock Grid.Row="0" Grid.Column="3" Text="{Binding Path=Revision}" FontWeight="Bold"
  59. FontSize="12" HorizontalAlignment="Right" VerticalAlignment="Center"
  60. Foreground="{Binding TextColor}" />
  61. <TextBlock Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="3" Text="{Binding Path=Address}"
  62. FontStyle="Italic" FontSize="12" HorizontalAlignment="Left"
  63. VerticalAlignment="Center" Foreground="{Binding TextColor}" />
  64. <TextBlock Grid.Row="2" Grid.Column="1" FontStyle="Italic" FontSize="12"
  65. HorizontalAlignment="Left" VerticalAlignment="Center"
  66. Foreground="{Binding TextColor}">
  67. <Run Text="In: " /><Run Text="{Binding Path=Clockin}" />
  68. </TextBlock>
  69. <TextBlock Grid.Row="2" Grid.Column="2" Text="{Binding Path=Type}" FontSize="12"
  70. HorizontalAlignment="Center" VerticalAlignment="Center"
  71. Foreground="{Binding TextColor}" />
  72. <TextBlock Grid.Row="2" Grid.Column="3" FontStyle="Italic" FontSize="12"
  73. HorizontalAlignment="Right" VerticalAlignment="Center"
  74. Foreground="{Binding TextColor}">
  75. <Run Text="Out: " /><Run Text="{Binding Path=Clockout}" />
  76. </TextBlock>
  77. </Grid>
  78. <Border.ContextMenu>
  79. <ContextMenu x:Name="AttendanceMenu" Opened="AttendanceMenu_Opened" Tag="{Binding}">
  80. <MenuItem x:Name="SickLeave" Header="Mark Employee As Sick" Click="SickLeave_Click"
  81. Tag="{Binding}" />
  82. <Separator />
  83. <MenuItem x:Name="ClockOnOff" Header="Clock Employee On" Click="ClockOnOff_Click"
  84. Tag="{Binding}" />
  85. <Separator />
  86. <MenuItem x:Name="AddNote" Header="Add Note" Click="AddNote_Click"
  87. Tag="{Binding}" />
  88. <MenuItem x:Name="EditNotes" Header="Edit Notes" Click="EditNotes_Click"
  89. Tag="{Binding}" />
  90. <Separator />
  91. <MenuItem x:Name="ShowOnInOut" Header="Show On In/Out Board" Click="ShowOnInOut_Click"
  92. Tag="{Binding}" />
  93. <MenuItem x:Name="RemoveFromInOut" Header="Remove From In/Out Board"
  94. Click="RemoveFromInOut_Click" Tag="{Binding}" />
  95. </ContextMenu>
  96. </Border.ContextMenu>
  97. </Border>
  98. </DataTemplate>
  99. </Kanban:SfKanban.CardTemplate>
  100. </Kanban:SfKanban>
  101. </Grid>
  102. </UserControl>