123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220 |
- <UserControl x:Class="PRSDesktop.AssignmentView"
- 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:syncfusion="http://schemas.syncfusion.com/wpf"
- mc:Ignorable="d"
- d:DesignHeight="450" d:DesignWidth="800" Background="White">
- <UserControl.Resources>
- <Style TargetType="syncfusion:HeaderTitleBarView">
- <Setter Property="Height" Value="00" />
- </Style>
- <Style TargetType="syncfusion:ScheduleDaysHeaderViewItemsControl">
- <Setter Property="Height" Value="0" />
- </Style>
- <Style TargetType="syncfusion:ScheduleDaysHeaderViewControl">
- <Setter Property="Height" Value="30" />
- <Setter Property="Background" Value="#FF9EDA11" />
- </Style>
- <Style TargetType="syncfusion:DayViewItemHeader">
- <Setter Property="Height" Value="30" />
- <Setter Property="Background" Value="#FF9EDA11" />
- </Style>
- </UserControl.Resources>
- <Grid x:Name="grid">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="200" />
- <ColumnDefinition Width="*" />
- <ColumnDefinition Width="0" x:Name="TeamColumn" />
- </Grid.ColumnDefinitions>
- <Grid.RowDefinitions>
- <RowDefinition Height="Auto" x:Name="DateRow" />
- <RowDefinition Height="*" />
- <RowDefinition Height="Auto" />
- </Grid.RowDefinitions>
- <Border Grid.Row="0" Grid.Column="0" BorderBrush="Silver" BorderThickness="0.75,0.75,0,0.75"
- Background="WhiteSmoke" CornerRadius="0,0,0,0" Margin="0,0,0,2" Padding="2">
- <DockPanel x:Name="ViewDock">
- <Label DockPanel.Dock="Left" Content="View:" VerticalContentAlignment="Center" Margin="0,0,5,0" />
- <ComboBox DockPanel.Dock="Left" x:Name="View" SelectionChanged="View_SelectionChanged"
- VerticalAlignment="Center" SelectedIndex="-1" Margin="0">
- <ComboBoxItem Content="Daily" />
- <ComboBoxItem Content="Weekly" />
- </ComboBox>
- </DockPanel>
- </Border>
- <Border x:Name="DateBorder" Grid.Row="0" Grid.Column="1" BorderBrush="Silver"
- BorderThickness="0,0.75,0.75,0.75" Background="WhiteSmoke" CornerRadius="0,0,0,0" Margin="0,0,0,2"
- Padding="2">
- <DockPanel>
- <Button x:Name="ShowEmployees" DockPanel.Dock="Right" Content="<" Width="20" Margin="0,2,2,2"
- Visibility="Visible" Click="ShowEmployees_Click" Height="22" />
- <StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
- <Button x:Name="PrevMonth" BorderThickness="0" Background="Transparent" Click="PrevMonth_Click" />
- <Button x:Name="PrevDay" BorderThickness="0" Background="Transparent" Click="PrevDay_Click" />
- <TextBox x:Name="CurrentDate" Width="250" Text="ddd, dd MMMM yyyy"
- HorizontalContentAlignment="Center" Background="Transparent"
- VerticalContentAlignment="Center" MouseDoubleClick="CurrentDate_MouseDoubleClick"
- Margin="2" />
- <Button x:Name="NextDay" BorderThickness="0" Background="Transparent" Click="NextDay_Click" />
- <Button x:Name="NextMonth" BorderThickness="0" Background="Transparent" Click="NextMonth_Click" />
- </StackPanel>
- </DockPanel>
- </Border>
- <Border Grid.Row="0" Grid.Column="2" BorderBrush="Silver" BorderThickness="0,0.75,0.75,0.75"
- Background="WhiteSmoke" CornerRadius="0,0,0,0" Margin="0,0,0,2" Padding="2">
- <DockPanel>
- <Label DockPanel.Dock="Left" Content="Team:" VerticalContentAlignment="Center" Margin="0,0,5,0" />
- <Button x:Name="HideEmployees" DockPanel.Dock="Right" Content=">" Width="20" Margin="2,2,0,2"
- Click="HideEmployees_Click" Height="22" />
- <ComboBox DockPanel.Dock="Left" x:Name="Teams" DisplayMemberPath="Value" SelectedValuePath="Key"
- SelectionChanged="Teams_SelectionChanged" VerticalAlignment="Center" />
- </DockPanel>
- </Border>
- <Border Grid.Row="1" Grid.Column="0" Grid.RowSpan="2" Grid.ColumnSpan="2" BorderBrush="Silver"
- BorderThickness="1" Background="WhiteSmoke" Margin="0,0,0,0" Padding="0">
-
- <syncfusion:SfSchedule
- Name="Bookings"
- DayHeaderOrder="OrderByDate"
- HeaderDateFormat="dd MMM yyyy"
- ShowNonWorkingHours="True"
- NonWorkingHourBrush="Gainsboro"
- IsHighLightWorkingHours="True"
- ShowAllDay="False"
- AllowEditing="True"
- AllowResize="False"
- AllowDeleting="False"
- AllowAddNewAppointment="True"
- AllowAppointmentEditing="True"
- SizeChanged="Bookings_SizeChanged"
- AppointmentEndDragging="Schedule_AppointmentEndDragging"
- AppointmentEndResizing="Schedule_AppointmentEndResizing"
- AppointmentEditorOpening="Schedule_AppointmentEditorOpening"
- AppointmentStartDragging="Schedule_AppointmentStartDragging"
- AllowDrop="True"
- Drop="Bookings_Drop"
- ScheduleType="Day"
- Background="White"
- HeaderBackground="White"
- CellSelectionBrush="LightBlue"
- MinWidth="200"
- PreviewMouseLeftButtonUp="Bookings_MouseLeftButtonUp"
- PreviewMouseRightButtonUp="Bookings_MouseRightButtonUp">
-
- <syncfusion:SfSchedule.ContextMenu>
- <ContextMenu>
- <MenuItem x:Name="CreateAssignment" Header="Create Assignment" Click="CreateAssignment_Click" />
- <MenuItem x:Name="EditAssignment" Header="Edit Assignment" Click="EditAssignment_Click" />
- <Separator x:Name="Separator1" />
- <!--<MenuItem x:Name="EditRequisition" Header="Edit Requisition" Click="EditRequisition_Click"/>-->
- <MenuItem x:Name="EditLeaveRequest" Header="Edit Leave Request" Click="EditLeaveRequest_Click" />
- <MenuItem x:Name="CreateTimeSheet" Header="Create TimeSheet" Click="CreateTimeSheet_Click" />
- <MenuItem x:Name="EditTimeSheet" Header="Create TimeSheet" Click="EditTimeSheet_Click" />
- <MenuItem x:Name="DeleteTimeSheet" Header="Delete TimeSheet" Click="DeleteTimeSheet_Click" />
- <Separator x:Name="Separator2" />
- <MenuItem x:Name="DeleteAssignment" Header="Delete Assignment" Click="DeleteAssignment_Click" />
-
- <Separator x:Name="Separator3" />
- <MenuItem x:Name="ZoomIn" Header="Zoom In" Click="ZoomIn_Click" />
- <MenuItem x:Name="ZoomOut" Header="Zoom Out" Click="ZoomOut_Click" />
- <MenuItem x:Name="ZoomReset" Header="Reset Zoom" Click="ZoomReset_Click" />
-
- </ContextMenu>
- </syncfusion:SfSchedule.ContextMenu>
- <syncfusion:SfSchedule.AppointmentTemplate>
- <DataTemplate>
- <Border BorderBrush="Gray" BorderThickness="0.75" CornerRadius="3"
- Background="{Binding AppointmentBackground}"
- PreviewMouseLeftButtonUp="Bookings_MouseLeftButtonUp"
- PreviewMouseRightButtonUp="Bookings_MouseRightButtonUp"
- Tag="{Binding}"
- >
-
- <Grid Margin="4,2,0,2">
-
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="*" />
- </Grid.ColumnDefinitions>
-
- <Grid.RowDefinitions>
- <RowDefinition Height="Auto" />
- <RowDefinition Height="*" />
- </Grid.RowDefinitions>
-
- <DockPanel Grid.Row="0" Grid.Column="0" Height="20">
- <TextBlock Text="{Binding Number}" Foreground="{Binding AppointmentForeground}"
- DockPanel.Dock="Left" VerticalAlignment="Center" FontWeight="DemiBold" />
- <TextBlock Text="{Binding JobNumber}" DockPanel.Dock="Left"
- Foreground="{Binding AppointmentForeground}" VerticalAlignment="Center"
- FontWeight="DemiBold" Margin="2,0,0,0" />
- <Image Source="{Binding Locked}" DockPanel.Dock="Right" VerticalAlignment="Center"
- MaxWidth="20" MaxHeight="20" />
- <Image Source="{Binding Completed}" DockPanel.Dock="Right"
- VerticalAlignment="Center" MaxWidth="20" MaxHeight="20" />
- <Image Source="{Binding TimeSheet}" DockPanel.Dock="Right"
- VerticalAlignment="Center" MaxWidth="20" MaxHeight="20" />
- <Image Source="{Binding HasDelivery}" DockPanel.Dock="Right"
- VerticalAlignment="Center" MaxWidth="20" MaxHeight="20" />
- <TextBlock Text="{Binding Subject}" Foreground="{Binding AppointmentForeground}"
- DockPanel.Dock="Left" VerticalAlignment="Center" FontWeight="DemiBold"
- Margin="2,0,0,0" />
- </DockPanel>
-
- <TextBlock Grid.Row="1" Grid.Column="0" HorizontalAlignment="Left"
- Text="{Binding Notes}" TextWrapping="Wrap"
- Foreground="{Binding AppointmentForeground}" />
- </Grid>
- </Border>
- </DataTemplate>
-
- </syncfusion:SfSchedule.AppointmentTemplate>
- </syncfusion:SfSchedule>
-
- </Border>
- <syncfusion:CheckListBox Grid.Row="1" Grid.Column="2" Margin="2,0,0,0" x:Name="SelectedEmployees"
- DisplayMemberPath="Value" SelectedValuePath="Key" IsCheckOnFirstClick="True"
- SelectionChanged="SelectedEmployees_SelectionChanged" BorderBrush="Silver"
- BorderThickness="1" Background="LightYellow" />
- <Border Grid.Row="2" Grid.Column="2" BorderBrush="Silver" BorderThickness="1" Background="WhiteSmoke"
- Margin="2,2,0,0" Padding="3">
- <Grid Margin="2">
- <Grid.RowDefinitions>
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- </Grid.RowDefinitions>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="69*" />
- <ColumnDefinition Width="89*" />
- <ColumnDefinition Width="Auto" />
- </Grid.ColumnDefinitions>
- <Label Content="Start Time" Grid.Row="0" Grid.Column="0" />
- <syncfusion:TimeSpanEdit Grid.Row="0" Grid.Column="1" x:Name="StartTime"
- ValueChanged="DisplayTime_ValueChanged" TextAlignment="Center"
- MinValue="00:00" MaxValue="1:00:00:00" Format="hh:mm" Margin="2" />
- <Label x:Name="StartAMPM" Grid.Row="0" Grid.Column="2" Content="AM" />
- <Label Content="Finish Time" Grid.Row="3" />
- <syncfusion:TimeSpanEdit x:Name="EndTime" ValueChanged="DisplayTime_ValueChanged" Grid.Row="3"
- Grid.Column="1" TextAlignment="Center" MinValue="00:00" MaxValue="1:00:00:00"
- Format="hh:mm" Margin="2" />
- <Label x:Name="EndAMPM" Content="PM" Grid.Row="3" Grid.Column="2" />
- </Grid>
- </Border>
- </Grid>
- </UserControl>
|