Änderungen am Vertretungsmodul

This commit is contained in:
Lyndon
2019-09-27 15:55:01 +02:00
parent 1e5579a338
commit 101b563bd5
66 changed files with 2487 additions and 1380 deletions

View File

@@ -634,6 +634,7 @@
<Compile Include="Converter\ReactivationRight2VisibilityConverter.cs" />
<Compile Include="Converter\Rights2DefaultBooleanConverter.cs" />
<Compile Include="Converter\StringLengthVisibilityConverter.cs" />
<Compile Include="Converter\StringLengthVisibilityMultiConverter.cs" />
<Compile Include="Core\AutoLockUI.cs" />
<Compile Include="Core\BeWoUtils.cs" />
<Compile Include="Core\BeWoWebClient.cs">
@@ -665,6 +666,7 @@
<Compile Include="SchulbegleitenderDienst\SchulbegleitenderDienstEmployeeView.xaml.cs">
<DependentUpon>SchulbegleitenderDienstEmployeeView.xaml</DependentUpon>
</Compile>
<Compile Include="SchulbegleitenderDienst\SBDUtils\SBDUtils.cs" />
<Compile Include="SchulbegleitenderDienst\VertretenderKlientSearchView.xaml.cs">
<DependentUpon>VertretenderKlientSearchView.xaml</DependentUpon>
</Compile>

View File

@@ -0,0 +1,23 @@
using System;
using System.Globalization;
using System.Linq;
using System.Windows;
using System.Windows.Data;
namespace BeWo.Converter
{
public class StringLengthVisibilityMultiConverter : IMultiValueConverter
{
public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture)
{
if(values == null || values.Length < 2 || values.Any(a => string.IsNullOrWhiteSpace(a?.ToString())))
{
return Visibility.Collapsed;
}
return Visibility.Visible;
}
public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture) => throw new NotImplementedException();
}
}

View File

@@ -2,10 +2,9 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
Background="Transparent" Height="130" Width="350" WindowStartupLocation="CenterScreen" WindowStyle="None">
Background="Transparent" WindowStartupLocation="CenterScreen" WindowStyle="None" SizeToContent="WidthAndHeight" AllowsTransparency="True">
<GroupBox Header="Zeitraum auswählen" x:Name="rootGroupBox" Style="{DynamicResource MainContentGroupBoxWithoutMaximizeBtnStyle}" Background="Transparent" MouseLeftButtonDown="RootGroupBox_OnMouseLeftButtonDown">
<Grid Background="White">
<Grid Background="White">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
@@ -20,17 +19,15 @@
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Label Content="Von: " Grid.Row="0" Grid.Column="0" Margin="10,10,2,2" Height="23"/>
<Label Content="Bis: " Grid.Row="0" Grid.Column="2" Margin="10,10,2,2" Height="23"/>
<Label Content="Von: " Grid.Row="0" Grid.Column="0" Margin="10,10,2,2" Height="23"/>
<Label Content="Bis: " Grid.Row="0" Grid.Column="2" Margin="10,10,2,2" Height="23"/>
<dxe:DateEdit Grid.Row="0" Grid.Column="1" Width="125" x:Name="DateVon" Margin="2,10,2,2" Height="23" HorizontalAlignment="Left"/>
<dxe:DateEdit Grid.Row="0" Grid.Column="3" Width="125" x:Name="DateBis" Margin="2,10,10,2" Height="23" HorizontalAlignment="Left"/>
<StackPanel Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="4" Orientation="Horizontal" HorizontalAlignment="Right" >
<Button Content="Übernehmen" Click="RaisEvent_OnClick" HorizontalAlignment="Right" Margin="2,10,2,2" Height="23" />
<Button Content="Schließen" Click="ButtonBase_OnClick" HorizontalAlignment="Right" Margin="2,10,10,2" Height="23" />
<StackPanel Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="4" Orientation="Horizontal" HorizontalAlignment="Right">
<Button Content="Übernehmen" Click="RaisEvent_OnClick" HorizontalAlignment="Right" Margin="2,10,2,2" Height="23" />
<Button Content="Schließen" Click="ButtonBase_OnClick" HorizontalAlignment="Right" Margin="2,10,10,2" Height="23" />
</StackPanel>
</Grid>
</GroupBox>
</Window>

View File

@@ -1,6 +1,7 @@
using System;
using System.Windows;
using System.Windows.Input;
using System.Windows.Interop;
namespace BeWo.SchulbegleitenderDienst
{
@@ -25,6 +26,8 @@ namespace BeWo.SchulbegleitenderDienst
private void RootGroupBox_OnMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
e.Handled = true;
DragMove();
}

View File

@@ -0,0 +1,71 @@
using System;
using System.Collections.Generic;
using BS.Shared;
using BS.Shared.Extensions;
namespace BeWo.SchulbegleitenderDienst.SBDUtils
{
public static class SBDUtils
{
public static SubstitutionListObject GetListType(List<TagesansichtVM> viewModels)
{
var unwantedSubstitutionList = new List<TagesansichtVM>();
var employeeSubstitutionList = new List<TagesansichtVM>();
var customerSubstitutionList = new List<TagesansichtVM>();
foreach (var viewModel in viewModels)
{
if(viewModel.VertretungsStatus != VertretungsStatus.KlientKrank)
{
var substitutionStartingDayCountCondition = false;
if (viewModel.Customer != null)
{
var substitutionNeededDate = DateTime.Now.AddDays(-1 * viewModel.Customer.SubstitutionStartingDayCount);
if (viewModel.Absencetime?.Start.HasValue ?? false)
{
substitutionStartingDayCountCondition = viewModel.Customer.SubstitutionNeed != SubstitutionNeed.NoSubstitutionWanted && substitutionNeededDate < viewModel.Absencetime.Start && viewModel.Customer.SubstitutionStartingDayCount > 0;
}
}
if (substitutionStartingDayCountCondition || viewModel.Vertretung?.VertretenderMitarbeiterOid != null || viewModel.Customer != null && viewModel.Customer.SubstitutionNeed == SubstitutionNeed.NoSubstitutionWanted)
{
unwantedSubstitutionList.AddIfNotIn(viewModel);
}
else
{
employeeSubstitutionList.AddIfNotIn(viewModel);
}
}
else
{
if(viewModel.Customer.SubstitutionNeed == SubstitutionNeed.SubstitutionNeeded || viewModel.Customer.SubstitutionNeed == SubstitutionNeed.SubstitutionWanted)
{
customerSubstitutionList.Add(viewModel);
}
else
{
unwantedSubstitutionList.Add(viewModel);
}
}
}
return new SubstitutionListObject(employeeSubstitutionList, customerSubstitutionList, unwantedSubstitutionList);
}
}
public struct SubstitutionListObject
{
public List<TagesansichtVM> AbsentEmployeesList { get; set; }
public List<TagesansichtVM> AbsentCustomersList { get; set; }
public List<TagesansichtVM> SubstitutionUnwantedList { get; set; }
public SubstitutionListObject(List<TagesansichtVM> absentEmployees, List<TagesansichtVM> absentCustomers, List<TagesansichtVM> substitutionUnwanted)
{
AbsentEmployeesList = absentEmployees;
AbsentCustomersList = absentCustomers;
SubstitutionUnwantedList = substitutionUnwanted;
}
}
}

View File

@@ -2,144 +2,125 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:localView="clr-namespace:BeWo.View"
xmlns:localViewModel="clr-namespace:BeWo.ViewModel"
xmlns:uc="clr-namespace:BeWo.Controls;assembly=BeWo.Controls"
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
Height="Auto" Width="Auto" HorizontalAlignment="Stretch"
xmlns:diagnostics="clr-namespace:System.Diagnostics;assembly=WindowsBase"
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
xmlns:dxmvvm="http://schemas.devexpress.com/winfx/2008/xaml/mvvm"
xmlns:markup="clr-namespace:BeWo.MultiLanguage.Markup"
xmlns:core="clr-namespace:BS.Shared.Core;assembly=BS.Shared"
VerticalAlignment="Stretch" Focusable="True">
<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<GroupBox Grid.ColumnSpan="1" Padding="5" Style="{StaticResource ObjectEditGroupBox}" Header="Schulbegleitender Dienst">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Label Content="{markup:Translate CustomerPflege}" Margin="3" Grid.Row="0" Grid.Column="0" />
<CheckBox Margin="3" Grid.Row="0" Grid.Column="1" HorizontalAlignment="Right" VerticalAlignment="Center" IsChecked="{Binding Path=Pflege, UpdateSourceTrigger=PropertyChanged}"/>
<Label Content="{markup:Translate CustomerToilettengang}" Margin="3" Grid.Row="1" Grid.Column="0" />
<CheckBox Margin="3" Grid.Row="1" Grid.Column="1" HorizontalAlignment="Right" VerticalAlignment="Center" IsChecked="{Binding Path=Toilettengang, UpdateSourceTrigger=PropertyChanged}"/>
<Label Content="{markup:Translate CustomerAggressivität}" Margin="3" Grid.Row="2" Grid.Column="0" />
<CheckBox Margin="3" Grid.Row="2" Grid.Column="1" HorizontalAlignment="Right" VerticalAlignment="Center" IsChecked="{Binding Path=Aggressiv, UpdateSourceTrigger=PropertyChanged}"/>
<Label Content="{markup:Translate CustomerHygienebelehrung}" Margin="3" Grid.Row="3" Grid.Column="0" />
<CheckBox Margin="3" Grid.Row="3" Grid.Column="1" HorizontalAlignment="Right" VerticalAlignment="Center" IsChecked="{Binding Path=Hygienebelehrung, UpdateSourceTrigger=PropertyChanged}"/>
<Label Content="{markup:Translate CustomerSchutzstufe}" Margin="3" Grid.Row="4" Grid.Column="0" />
<TextBox Grid.Row="4" Grid.Column="1" Margin="3" Height="23" Text="{Binding Path=Schutzstufe, UpdateSourceTrigger=PropertyChanged}" />
</Grid>
</GroupBox>
<GroupBox Header="Vertretungs-Einstellungen" Style="{StaticResource ObjectEditGroupBox}" Grid.Column="0" Grid.ColumnSpan="1" Grid.Row="1" Visibility="Visible" x:Name="VertretungsEinstellungen" Margin="0,10,0,0">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Label Content="Vertretung gewünscht?" Margin="3" Grid.Row="0" Grid.Column="0" />
<CheckBox x:Name="Vertretungswunsch" Margin="3" Grid.Row="0" Grid.Column="1" HorizontalAlignment="Right" VerticalAlignment="Center" IsChecked="{Binding Path=VertretungGewuenscht, UpdateSourceTrigger=PropertyChanged}"/>
<Label Content="Ab welchem Tag?" Margin="3" Grid.Row="1" Grid.Column="0" />
<dxe:SpinEdit x:Name="AbWelchenTagCBox" IsFloatValue="False" Increment="1" MinValue="0" Height="23" Margin="3" Grid.Row="1"
Grid.Column="1" AllowNullInput="True" Width="50" HorizontalAlignment="Right" VerticalContentAlignment="Center" EditValue="{Binding Path=AbWelchemKrankheitsTag, UpdateSourceTrigger=PropertyChanged, Converter={StaticResource Int2DecimalConverter}}" />
<Label Content="Vertretung dringend erforderlich?" Margin="3" Grid.Row="2" Grid.Column="0" />
<CheckBox x:Name="VertretungErforderlich" Margin="3" Grid.Row="2" Grid.Column="1" HorizontalAlignment="Right" VerticalAlignment="Center" IsChecked="{Binding Path=VertretungDringendErforderlich, UpdateSourceTrigger=PropertyChanged}" />
</Grid>
</GroupBox>
<GroupBox Header="Wunschkriterien" Grid.Column="0" Grid.ColumnSpan="1" Grid.Row="2" Style="{StaticResource ObjectEditGroupBox}" Margin="0,10,0,0">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<GroupBox Grid.ColumnSpan="1" Padding="5" Style="{StaticResource ObjectEditGroupBox}" Header="Schulbegleitender Dienst">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Label Content="{markup:Translate CustomerPflege}" Margin="3" Grid.Row="0" Grid.Column="0" />
<CheckBox Margin="3" Grid.Row="0" Grid.Column="1" HorizontalAlignment="Right" VerticalAlignment="Center" IsChecked="{Binding Path=Pflege, UpdateSourceTrigger=PropertyChanged}"/>
<Label Content="{markup:Translate CustomerToilettengang}" Margin="3" Grid.Row="1" Grid.Column="0" />
<CheckBox Margin="3" Grid.Row="1" Grid.Column="1" HorizontalAlignment="Right" VerticalAlignment="Center" IsChecked="{Binding Path=Toilettengang, UpdateSourceTrigger=PropertyChanged}"/>
<Label Content="{markup:Translate CustomerAggressivität}" Margin="3" Grid.Row="2" Grid.Column="0" />
<CheckBox Margin="3" Grid.Row="2" Grid.Column="1" HorizontalAlignment="Right" VerticalAlignment="Center" IsChecked="{Binding Path=Aggressiv, UpdateSourceTrigger=PropertyChanged}"/>
<Label Content="{markup:Translate CustomerHygienebelehrung}" Margin="3" Grid.Row="3" Grid.Column="0" />
<CheckBox Margin="3" Grid.Row="3" Grid.Column="1" HorizontalAlignment="Right" VerticalAlignment="Center" IsChecked="{Binding Path=Hygienebelehrung, UpdateSourceTrigger=PropertyChanged}"/>
<Label Content="{markup:Translate CustomerSchutzstufe}" Margin="3" Grid.Row="4" Grid.Column="0" />
<TextBox Grid.Row="4" Grid.Column="1" Margin="3" Height="23" Text="{Binding Path=Schutzstufe, UpdateSourceTrigger=PropertyChanged}" />
</Grid>
</GroupBox>
<GroupBox Header="Vertretungs-Einstellungen" Style="{StaticResource ObjectEditGroupBox}" Grid.Column="0" Grid.Row="1" Visibility="Visible" x:Name="VertretungsEinstellungen" Margin="0,10,0,0">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<dxe:ComboBoxEdit Margin="3" MinHeight="150" Width="300" x:Name="ComboWunschAnzeige" TextWrapping="Wrap" VerticalContentAlignment="Top" ImmediatePopup="True"
IncrementalFiltering="True" Grid.Row="0" Grid.RowSpan="2" Grid.Column="0" Grid.ColumnSpan="2" IsKeyboardFocusWithinChanged="ComboWunschAnzeige_OnIsKeyboardFocusWithinChanged" >
<dxe:ComboBoxEdit.StyleSettings>
<dxe:TokenComboBoxStyleSettings NewTokenPosition="Far" EnableTokenWrapping="True" />
</dxe:ComboBoxEdit.StyleSettings>
<dxmvvm:Interaction.Behaviors>
<dxe:TokenEditorBehavior x:Name="tokenEditorBehavior" TokensChanged="TokenEditorWunschBehavior_OnTokensChanged"/>
</dxmvvm:Interaction.Behaviors>
</dxe:ComboBoxEdit>
<Label Grid.Column="0" Grid.Row="0" Margin="3" Content="Vertretungsnotwendigkeit" />
<dxe:ComboBoxEdit ItemsSource="{x:Static core:EnumTranslations.SubstitutionNeedTranslations}" Grid.Row="0" Grid.Column="1" Margin="3"
EditValue="{Binding Path=SubstitutionNeed, UpdateSourceTrigger=PropertyChanged}"
DisplayMember="Value" ValueMember="Key" IsTextEditable="False" x:Name="SubstitutionNeedComboBox"
SelectedIndexChanged="SubstitutionNeedComboBox_OnSelectedIndexChanged"/>
<Label Content="Ab welchem Tag?" Margin="3" Grid.Row="1" Grid.Column="0" x:Name="AbWelchemTagLabel" />
<dxe:SpinEdit x:Name="AbWelchemTagCBox" IsFloatValue="False" Increment="1" MinValue="0" Height="23" Margin="3" Grid.Row="1"
Grid.Column="1" AllowNullInput="True" Width="50" HorizontalAlignment="Right" VerticalContentAlignment="Center"
EditValue="{Binding Path=AbWelchemKrankheitsTag, UpdateSourceTrigger=PropertyChanged, Converter={StaticResource Int2DecimalConverter}}" />
</Grid>
</GroupBox>
<GroupBox Header="Wunschkriterien" Grid.Column="0" Grid.Row="2" Style="{StaticResource ObjectEditGroupBox}" Margin="0,10,0,0">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<dxe:ComboBoxEdit Margin="3" MinHeight="150" Width="300" x:Name="ComboWunschAnzeige" TextWrapping="Wrap" VerticalContentAlignment="Top" ImmediatePopup="True"
IncrementalFiltering="True" Grid.Row="0" Grid.RowSpan="2" Grid.Column="0" Grid.ColumnSpan="2" IsKeyboardFocusWithinChanged="ComboWunschAnzeige_OnIsKeyboardFocusWithinChanged" >
<dxe:ComboBoxEdit.StyleSettings>
<dxe:TokenComboBoxStyleSettings NewTokenPosition="Far" EnableTokenWrapping="True" />
</dxe:ComboBoxEdit.StyleSettings>
<dxmvvm:Interaction.Behaviors>
<dxe:TokenEditorBehavior x:Name="tokenEditorBehavior" TokensChanged="TokenEditorWunschBehavior_OnTokensChanged"/>
</dxmvvm:Interaction.Behaviors>
</dxe:ComboBoxEdit>
</Grid>
</GroupBox>
<GroupBox Header="Ausschlusskriterien" Grid.Column="1" Grid.Row="2" Style="{StaticResource ObjectEditGroupBox}" Margin="0,10,0,0">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<dxe:ComboBoxEdit Margin="3" MinHeight="150" Width="300" x:Name="ComboAusschlussAnzeige" TextWrapping="Wrap" VerticalContentAlignment="Top" ImmediatePopup="True"
IncrementalFiltering="True" Grid.Row="0" Grid.RowSpan="2" Grid.Column="0" Grid.ColumnSpan="2" IsKeyboardFocusWithinChanged="ComboAusschlussAnzeige_OnIsKeyboardFocusWithinChanged" >
<dxe:ComboBoxEdit.StyleSettings>
<dxe:TokenComboBoxStyleSettings NewTokenPosition="Far" EnableTokenWrapping="True" />
</dxe:ComboBoxEdit.StyleSettings>
<dxmvvm:Interaction.Behaviors>
<dxe:TokenEditorBehavior x:Name="tokenEditorAusschlussBehavior" TokensChanged="TokenEditorAusschlussBehavior_OnTokensChanged"/>
</dxmvvm:Interaction.Behaviors>
</dxe:ComboBoxEdit>
</Grid>
</GroupBox>
</Grid>
</GroupBox>
<GroupBox Header="Ausschlusskriterien" Grid.Column="1" Grid.ColumnSpan="1" Grid.Row="2" Style="{StaticResource ObjectEditGroupBox}" Margin="0,10,0,0">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<dxe:ComboBoxEdit Margin="3" MinHeight="150" Width="300" x:Name="ComboAusschlussAnzeige" TextWrapping="Wrap" VerticalContentAlignment="Top" ImmediatePopup="True"
IncrementalFiltering="True" Grid.Row="0" Grid.RowSpan="2" Grid.Column="0" Grid.ColumnSpan="2" IsKeyboardFocusWithinChanged="ComboAusschlussAnzeige_OnIsKeyboardFocusWithinChanged" >
<dxe:ComboBoxEdit.StyleSettings>
<dxe:TokenComboBoxStyleSettings NewTokenPosition="Far" EnableTokenWrapping="True" />
</dxe:ComboBoxEdit.StyleSettings>
<dxmvvm:Interaction.Behaviors>
<dxe:TokenEditorBehavior x:Name="tokenEditorAusschlussBehavior" TokensChanged="TokenEditorAusschlussBehavior_OnTokensChanged"/>
</dxmvvm:Interaction.Behaviors>
</dxe:ComboBoxEdit>
</Grid>
</GroupBox>
</Grid>
</ScrollViewer>
</ScrollViewer>
</localView:BeWoView>

View File

@@ -1,47 +1,22 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text.RegularExpressions;
using System.Collections.Generic;
using System.Windows;
using System.Windows.Controls.Primitives;
using System.Windows.Documents;
using System.Windows.Forms;
using System.Windows.Forms.VisualStyles;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Navigation;
using System.Windows.Threading;
using BeWo.Core;
using BeWo.Core.Service;
using BeWo.ViewModel;
using BeWo.ServiceProxy;
using BeWo.View.Detail;
using BS.Shared.DataContracts;
using BS.Shared.Extensions;
using BS.Shared;
using BS.Shared.Core;
using BS.Shared.DataContracts.Compact;
using DevExpress.Xpf.Editors;
using Microsoft.Win32;
using CheckBox = System.Windows.Controls.CheckBox;
using KeyEventArgs = System.Windows.Input.KeyEventArgs;
using MessageBox = System.Windows.MessageBox;
namespace BeWo.SchulbegleitenderDienst
{
public partial class SchulbegleitenderDienstCustomerView
{
//private CustomerVM _ViewModel;
private List<CompactTokenDC> tokenlist = new List<CompactTokenDC>();
readonly Dictionary<string, CompactTokenDC> verfuegbarerWunschToken = new Dictionary<string, CompactTokenDC>();
readonly Dictionary<string, CompactTokenDC> verfuegbarerAusschlussToken = new Dictionary<string, CompactTokenDC>();
Dictionary<string, CompactTokenDC> verfuegbarerWunschToken = new Dictionary<string, CompactTokenDC>();
Dictionary<string, CompactTokenDC> verfuegbarerAusschlussToken = new Dictionary<string, CompactTokenDC>();
private CustomerVM viewModel = null;
private CustomerVM _ViewModel;
public SchulbegleitenderDienstCustomerView(CustomerVM customer)
{
@@ -50,23 +25,19 @@ namespace BeWo.SchulbegleitenderDienst
ViewModel = customer;
GetAllTokenItems();
}
public CustomerVM ViewModel
{
get { return viewModel; }
get => _ViewModel;
set
{
viewModel = value;
this.DataContext = value;
_ViewModel = value;
DataContext = value;
}
}
private void GetAllTokenItems()
private void GetAllTokenItems()
{
tokenlist.Clear();
@@ -151,7 +122,6 @@ namespace BeWo.SchulbegleitenderDienst
}
private void TokenEditorWunschBehavior_OnTokensChanged(object sender, TokensChangedEventArgs e)
{
var x = e.AddedTokens;
@@ -184,7 +154,6 @@ namespace BeWo.SchulbegleitenderDienst
}
}
private void ComboWunschAnzeige_OnIsKeyboardFocusWithinChanged(object sender, DependencyPropertyChangedEventArgs e)
{
if (ComboWunschAnzeige.IsKeyboardFocusWithin)
@@ -197,5 +166,15 @@ namespace BeWo.SchulbegleitenderDienst
ComboAusschlussAnzeige.IsPopupOpen = true;
}
private void SubstitutionNeedComboBox_OnSelectedIndexChanged(object sender, RoutedEventArgs e)
{
var comboBoxEdit = (ComboBoxEdit) sender;
if(comboBoxEdit.SelectedItem is KeyValuePair<SubstitutionNeed, string> keyValuePair)
{
AbWelchemTagCBox.Visibility = keyValuePair.Key == SubstitutionNeed.SubstitutionWanted || keyValuePair.Key == SubstitutionNeed.SubstitutionNeeded ? Visibility.Visible : Visibility.Collapsed;
AbWelchemTagLabel.Visibility = keyValuePair.Key == SubstitutionNeed.SubstitutionWanted || keyValuePair.Key == SubstitutionNeed.SubstitutionNeeded ? Visibility.Visible : Visibility.Collapsed;
}
}
}
}

View File

@@ -4,6 +4,7 @@ using System.Linq;
using BeWo.ServiceProxy;
using BS.Shared.DataContracts;
using BS.Shared.DataContracts.Compact;
using BS.Shared.Extensions;
namespace BeWo.SchulbegleitenderDienst
{
@@ -17,43 +18,45 @@ namespace BeWo.SchulbegleitenderDienst
{
var tagesansichtVM = new TagesansichtVM
{
Absencetime = vertretungsItem.Absencetime,
VertretungsStatus = vertretungsItem.VertretungsStatus,
Employee = vertretungsItem.Employee,
Customer = vertretungsItem.Customer,
Schule = vertretungsItem.Schule,
Arbeitszeiten = vertretungsItem.Arbeitszeiten,
Bemerkung = vertretungsItem.Bemerkung,
Vertretung = vertretungsItem.Vertretung,
Datum = vertretungsItem.Datum,
Vertreter = vertretungsItem.Vertreter,
Krankheitsmeldung = vertretungsItem.Krankheitsmeldung,
Krankheitszeitraum = vertretungsItem.Krankheitszeitraum,
MitarbeiterStatusColor = vertretungsItem.MitarbeiterStatusColor,
KlientStatusColor = vertretungsItem.KlientStatusColor,
WochenansichtBemerkung = vertretungsItem.WochenansichtBemerkung,
Dringlichkeit = vertretungsItem.Dringlichkeit,
DringlichkeitColor = vertretungsItem.DringlichkeitColor,
Teamleitung = vertretungsItem.Teamleitung,
Pflege = vertretungsItem.Pflege,
Toilettengang = vertretungsItem.Toilettengang,
Aggressiv = vertretungsItem.Aggressiv,
Geschlecht = vertretungsItem.Geschlecht,
MitarbeiterEinsatzBei = vertretungsItem.MitarbeiterEinsatzBei,
CustomerContactInformation = vertretungsItem.CustomerContactInformation,
EmployeeContactInformation = vertretungsItem.EmployeeContactInformation,
Schools = vertretungsItem.Schools,
LastSubstitutions = vertretungsItem.LastSubstitutions,
CustomerPflege = vertretungsItem.CustomerPflege,
CustomerSchutzstufe = vertretungsItem.CustomerSchutzstufe,
CustomerHygienebelehrung = vertretungsItem.CustomerHygienebelehrung,
CustomerAggressivitaet = vertretungsItem.CustomerAggressivitaet,
CustomerToilettengang = vertretungsItem.CustomerToilettengang,
EmployeeAggressivitaet = vertretungsItem.EmployeeAggressivitaet,
EmployeeToilettengang = vertretungsItem.EmployeeToilettengang,
EmployeeSchutzstufe = vertretungsItem.EmployeeSchutzstufe,
EmployeeHygienebelehrung = vertretungsItem.EmployeeHygienebelehrung,
EmployeePflege = vertretungsItem.EmployeePflege
Absencetime = vertretungsItem.Absencetime,
Aggressiv = vertretungsItem.Aggressiv,
Arbeitszeiten = vertretungsItem.Arbeitszeiten,
Bemerkung = vertretungsItem.Bemerkung,
Customer = vertretungsItem.Customer,
CustomerAggressivitaet = vertretungsItem.CustomerAggressivitaet,
CustomerContactInformation = vertretungsItem.CustomerContactInformation,
CustomerHygienebelehrung = vertretungsItem.CustomerHygienebelehrung,
CustomerPflege = vertretungsItem.CustomerPflege,
CustomerSchutzstufe = vertretungsItem.CustomerSchutzstufe,
CustomerToilettengang = vertretungsItem.CustomerToilettengang,
Datum = vertretungsItem.Datum,
Dringlichkeit = vertretungsItem.Dringlichkeit,
DringlichkeitColor = vertretungsItem.DringlichkeitColor,
Employee = vertretungsItem.Employee,
EmployeeAggressivitaet = vertretungsItem.EmployeeAggressivitaet,
EmployeeContactInformation = vertretungsItem.EmployeeContactInformation,
EmployeeHygienebelehrung = vertretungsItem.EmployeeHygienebelehrung,
EmployeePflege = vertretungsItem.EmployeePflege,
EmployeeSchutzstufe = vertretungsItem.EmployeeSchutzstufe,
EmployeeToilettengang = vertretungsItem.EmployeeToilettengang,
Geschlecht = vertretungsItem.Geschlecht,
KlientStatusColor = vertretungsItem.KlientStatusColor,
Krankheitsmeldung = vertretungsItem.Krankheitsmeldung,
Krankheitszeitraum = vertretungsItem.Krankheitszeitraum,
LastSubstitutions = vertretungsItem.LastSubstitutions,
MitarbeiterEinsatzBei = vertretungsItem.MitarbeiterEinsatzBei,
MitarbeiterStatusColor = vertretungsItem.MitarbeiterStatusColor,
Pflege = vertretungsItem.Pflege,
Schools = vertretungsItem.Schools,
Schule = vertretungsItem.Schule,
Teamleitung = vertretungsItem.Teamleitung,
Toilettengang = vertretungsItem.Toilettengang,
Vertreter = vertretungsItem.Vertreter,
Vertretung = vertretungsItem.Vertretung,
VertretungsStatus = vertretungsItem.VertretungsStatus,
WochenansichtBemerkung = vertretungsItem.WochenansichtBemerkung,
VertreterInfoString = vertretungsItem.VertreterInfoString,
EmployeeAddressString = vertretungsItem.EmployeeAddressString
};
if (vertretungsItem.Arbeitszeiten != null && vertretungsItem.Arbeitszeiten.Any())
@@ -113,15 +116,58 @@ namespace BeWo.SchulbegleitenderDienst
}
}
public void DeleteKrankmeldung(TagesansichtVM viewModel)
public void DeleteKrankmeldung(TagesansichtVM viewModel, bool? shouldDeleteWholeAbsenceTime, DateTime selectedDate)
{
if (viewModel.Absencetime?.AbsenceTimeOid != null && viewModel.Absencetime.AbsenceTimeVersion.HasValue)
if(shouldDeleteWholeAbsenceTime == null)
{
var oid2Version = new Dictionary<long, long> {{viewModel.Absencetime.AbsenceTimeOid.Value, viewModel.Absencetime.AbsenceTimeVersion.Value}};
return;
}
ServiceFacade.DoOperationsServiceSync(s => s.DeactivateAbsenceTime(oid2Version));
var absenceTime = viewModel.Absencetime;
DeleteVertretung(viewModel);
if (absenceTime?.AbsenceTimeOid != null && absenceTime.AbsenceTimeVersion.HasValue)
{
var oid2Version = new Dictionary<long, long> {{ absenceTime.AbsenceTimeOid.Value, absenceTime.AbsenceTimeVersion.Value}};
if(shouldDeleteWholeAbsenceTime.Value)
{
ServiceFacade.DoOperationsServiceSync(s => s.DeactivateAbsenceTime(oid2Version));
DeleteVertretung(viewModel);
}
else if(absenceTime.Start.HasValue && absenceTime.End.HasValue && selectedDate.InBetween(absenceTime.Start.Value, absenceTime.End.Value, false))
{
var secondAbsenceTime = new AbsenceTimeDC
{
Start = selectedDate.AddDays(1),
End = absenceTime.End,
CustomerOid = absenceTime.CustomerOid,
EmployeeOid = absenceTime.EmployeeOid,
KrankheitsMeldung = absenceTime.KrankheitsMeldung,
Notice = absenceTime.Notice,
Reason = absenceTime.Reason
};
absenceTime.End = selectedDate.AddDays(-1);
if(secondAbsenceTime.CustomerOid.HasValue)
{
ServiceFacade.DoOperationsServiceSync(s => s.InsertNewCustomerAbsenceTime(secondAbsenceTime.CustomerOid.Value, secondAbsenceTime));
}
else if(secondAbsenceTime.EmployeeOid.HasValue)
{
ServiceFacade.DoOperationsServiceSync(s => s.InsertNewEmployeeAbsenceTime(secondAbsenceTime.EmployeeOid.Value, secondAbsenceTime));
}
if(viewModel.Vertretung != null)
{
ServiceFacade.DoOperationsServiceSync(s => s.UpdateVertretungAndAbsenceTime(viewModel.Vertretung, absenceTime));
}
else
{
ServiceFacade.DoOperationsServiceSync(s => s.UpdateAbsenceTime(absenceTime));
}
}
}
}
@@ -170,10 +216,10 @@ namespace BeWo.SchulbegleitenderDienst
var absenceTime = new AbsenceTimeDC
{
AbsenceTimeOid = viewModel.Absencetime.AbsenceTimeOid,
Start = viewModel.StartDate,
End = viewModel.EndDate,
Reason = viewModel.Absencetime.Reason,
AbsenceTimeOid = viewModel.Absencetime.AbsenceTimeOid,
Start = viewModel.StartDate,
End = viewModel.EndDate,
Reason = viewModel.Absencetime.Reason,
KrankheitsMeldung = viewModel.Absencetime.KrankheitsMeldung
};

View File

@@ -69,42 +69,42 @@ namespace BeWo.SchulbegleitenderDienst
{
get
{
var zeitraum = "";
var zeitraum = string.Empty;
if (Vertretung != null)
{
if (Vertretung.VertretungsZeitraumVon.Date != Vertretung.VertretungsZeitraumBis.Date)
{
if (Vertretung.VertretungsZeitraumVon.Hour == 0 &&
if (Vertretung.VertretungsZeitraumVon.Hour == 0 &&
Vertretung.VertretungsZeitraumVon.Minute == 0 &&
Vertretung.VertretungsZeitraumBis.Hour == 0 &&
Vertretung.VertretungsZeitraumBis.Hour == 0 &&
Vertretung.VertretungsZeitraumBis.Minute == 0)
{
zeitraum =
Vertretung.VertretungsZeitraumVon.Date.ToString("dd.MM.yyyy") + " - " +
Vertretung.VertretungsZeitraumBis.Date.ToString("dd.MM.yyyy");
Vertretung.VertretungsZeitraumVon.ToString("dd.MM.yyyy") + " - " +
Vertretung.VertretungsZeitraumBis.ToString("dd.MM.yyyy");
}
else
{
zeitraum =
Vertretung.VertretungsZeitraumVon.Date.ToString("dd.MM.yyyy HH:mm") + " - " +
Vertretung.VertretungsZeitraumBis.Date.ToString("dd.MM.yyyy HH:mm");
Vertretung.VertretungsZeitraumVon.ToString("dd.MM.yyyy HH:mm") + " - " +
Vertretung.VertretungsZeitraumBis.ToString("dd.MM.yyyy HH:mm");
}
}
else
{
if (Vertretung.VertretungsZeitraumVon.Hour == 0 &&
if (Vertretung.VertretungsZeitraumVon.Hour == 0 &&
Vertretung.VertretungsZeitraumVon.Minute == 0 &&
Vertretung.VertretungsZeitraumBis.Hour == 0 &&
Vertretung.VertretungsZeitraumBis.Hour == 0 &&
Vertretung.VertretungsZeitraumBis.Minute == 0)
{
zeitraum = Vertretung.VertretungsZeitraumVon.Date.ToString("dd.MM.yyyy");
zeitraum = Vertretung.VertretungsZeitraumVon.ToString("dd.MM.yyyy");
}
else
{
zeitraum =
Vertretung.VertretungsZeitraumVon.Date.ToString("dd.MM.yyyy HH:mm") + " - " +
Vertretung.VertretungsZeitraumBis.Date.ToString("HH:mm");
Vertretung.VertretungsZeitraumVon.ToString("dd.MM.yyyy HH:mm") + " - " +
Vertretung.VertretungsZeitraumBis.ToString("HH:mm");
}
}
}
@@ -198,7 +198,7 @@ namespace BeWo.SchulbegleitenderDienst
}
// Vertretung gewünscht [ab x. Tag]
if (Customer.IsSubstitutionWanted)
if (Customer.SubstitutionNeed == SubstitutionNeed.SubstitutionWanted)
{
if(result.Length > 0)
{
@@ -265,5 +265,7 @@ namespace BeWo.SchulbegleitenderDienst
return result;
}
}
public new string VertreterInfoString { get; set; }
}
}

View File

@@ -1260,7 +1260,7 @@ namespace BeWo.SchulbegleitenderDienst
{
if (MessageBox.Show("Möchten Sie die Abwesenheit wirklich löschen?", "Abwesenheit löschen", MessageBoxButton.YesNo, MessageBoxImage.Question) == MessageBoxResult.Yes)
{
_tagesVertretung.DeleteKrankmeldung((TagesansichtVM)GridDataControlTagesansichtMitarbeiter.SelectedItem);
_tagesVertretung.DeleteKrankmeldung((TagesansichtVM)GridDataControlTagesansichtMitarbeiter.SelectedItem, null, Datepicker.DateTime.Date);
LadeTagesansicht(Datepicker.DateTime.Date);
}

View File

@@ -22,6 +22,7 @@
</Style>
<localConv:SubstitutionBrushConverter x:Key="SubstitutionBrushConverter" />
<converter:StringLengthVisibilityConverter x:Key="StringLengthVisibilityConverter" />
<converter:StringLengthVisibilityMultiConverter x:Key="StringLengthVisibilityMultiConverter" />
<DataTemplate x:Key="WeekViewEmployeeCellTemplate">
<StackPanel>
@@ -324,7 +325,7 @@
</dxg:GridColumn>
<dxg:GridColumn FieldName="Bemerkung" Header="Bemerkung" ReadOnly="False">
<dxg:GridColumn.EditSettings>
<dxe:TextEditSettings TextWrapping="Wrap" AcceptsReturn="True" />
<dxe:MemoEditSettings TextWrapping="NoWrap" AcceptsReturn="True" MaxLength="1024" MemoTextWrapping="NoWrap" MemoAcceptsReturn="True" ShowIcon="False" />
</dxg:GridColumn.EditSettings>
</dxg:GridColumn>
<dxg:GridColumn FieldName="Geschlecht" Header="m/w" ReadOnly="True" Width="30" HorizontalHeaderContentAlignment="Center">
@@ -355,9 +356,11 @@
<dxg:GridColumn FieldName="Teamleitung" Header="Teamleitung" ReadOnly="True" />
<dxg:GridColumn FieldName="Absencetime.KrankheitsMeldung" Header="Meldung vom" ReadOnly="True" />
<dxg:GridColumn FieldName="Krankheitszeitraum" ReadOnly="True" Header="Abwesenheit von - bis">
<dxg:GridColumn.EditSettings>
<dxe:ComboBoxEditSettings DefaultButtonClick="KrankmeldungsZeitraumBearbeitungsView"/>
</dxg:GridColumn.EditSettings>
<dxg:GridColumn.CellTemplate>
<DataTemplate>
<dxe:ComboBoxEdit x:Name="PART_Editor" DefaultButtonClick="KrankmeldungsZeitraumBearbeitungsView" Tag="{Binding RowData.Row}" />
</DataTemplate>
</dxg:GridColumn.CellTemplate>
</dxg:GridColumn>
<dxg:GridColumn FieldName="Absencetime.Reason.Description" Header="Abwesenheitskategorie">
<dxg:GridColumn.EditSettings>
@@ -378,6 +381,10 @@
<StackPanel>
<TextBlock FontWeight="Bold" Text="{Binding Path=Row.Customer}" />
<Separator Visibility="{Binding Path=Row.SchoolString, Converter={StaticResource StringLengthVisibilityConverter}}" />
<TextBlock FontWeight="Bold" Text="Schule:" Visibility="{Binding Path=Row.SchoolString, Converter={StaticResource StringLengthVisibilityConverter}}" />
<TextBlock Text="{Binding Row.SchoolString}" Visibility="{Binding Path=Text, Converter={StaticResource StringLengthVisibilityConverter}, RelativeSource={RelativeSource Self}}" />
<Separator Visibility="{Binding Path=Row.Customer.AddressString, Converter={StaticResource StringLengthVisibilityConverter}}" />
<TextBlock FontWeight="Bold" Text="Wohnort:" Visibility="{Binding Path=Row.Customer.AddressString, Converter={StaticResource StringLengthVisibilityConverter}}" />
<TextBlock Text="{Binding Row.Customer.AddressString}" />
@@ -464,15 +471,17 @@
</dxg:GridColumn>
<dxg:GridColumn FieldName="Bemerkung" Header="Bemerkung">
<dxg:GridColumn.EditSettings>
<dxe:TextEditSettings TextWrapping="Wrap" AcceptsReturn="True" />
<dxe:MemoEditSettings TextWrapping="NoWrap" MemoTextWrapping="NoWrap" MemoAcceptsReturn="True" ShowIcon="False" AcceptsReturn="True" MaxLength="1024" />
</dxg:GridColumn.EditSettings>
</dxg:GridColumn>
<dxg:GridColumn FieldName="Teamleitung" Header="Teamleitung" ReadOnly="True" />
<dxg:GridColumn FieldName="Absencetime.KrankheitsMeldung" Header="Meldung vom" ReadOnly="True" />
<dxg:GridColumn FieldName="Krankheitszeitraum" ReadOnly="True" Header="Abwesenheit von - bis">
<dxg:GridColumn.EditSettings>
<dxe:ComboBoxEditSettings DefaultButtonClick="KrankmeldungsZeitraumBearbeitungsView"/>
</dxg:GridColumn.EditSettings>
<dxg:GridColumn.CellTemplate>
<DataTemplate>
<dxe:ComboBoxEdit x:Name="PART_Editor" DefaultButtonClick="KrankmeldungsZeitraumBearbeitungsView" Tag="{Binding RowData.Row}" />
</DataTemplate>
</dxg:GridColumn.CellTemplate>
</dxg:GridColumn>
<dxg:GridColumn FieldName="Vertretungszeitraum" Header="Vertretung von - bis" ReadOnly="True" />
<dxg:GridColumn FieldName="Absencetime.Reason.Description" Header="Abwesenheitskategorie">
@@ -482,7 +491,7 @@
</dxg:GridColumn>
</dxg:GridControl.Columns>
<dxg:GridControl.View>
<dxg:TableView AllowPerPixelScrolling="True" ShowTotalSummary="False" AutoWidth="False" AllowBestFit="True" CellValueChanged="AbsentCustomersDayViewGridControl_OnCellValueChanged" ShowGroupPanel="False" ShowGridMenu="GridDataControlTagesansichtKlient_OnShowGridMenu">
<dxg:TableView AllowPerPixelScrolling="True" ShowTotalSummary="False" AutoWidth="True" BestFitMode="AllRows" AllowBestFit="True" CellValueChanged="AbsentCustomersDayViewGridControl_OnCellValueChanged" ShowGroupPanel="False" ShowGridMenu="GridDataControlTagesansichtKlient_OnShowGridMenu">
<dxg:TableView.RowStyle>
<Style TargetType="dxg:RowControl">
<Setter Property="ToolTipService.ShowDuration" Value="{x:Static sys:Int32.MaxValue}" />
@@ -492,9 +501,17 @@
<ContentControl.ContentTemplate>
<DataTemplate>
<StackPanel>
<TextBlock FontWeight="Bold" Text="{Binding Path=Row.Employee}" />
<TextBlock FontWeight="Bold" Text="{Binding Path=Row.Employee}" Visibility="{Binding Path=Text, Converter={StaticResource StringLengthVisibilityConverter}, RelativeSource={RelativeSource Self}}" />
<Separator >
<Separator.Visibility>
<MultiBinding Converter="{StaticResource StringLengthVisibilityMultiConverter}">
<Binding Path="Row.SchoolString" />
<Binding Path="Row.Employee" />
</MultiBinding>
</Separator.Visibility>
</Separator>
<Separator Visibility="{Binding Path=Row.SchoolString, Converter={StaticResource StringLengthVisibilityConverter}}" />
<TextBlock FontWeight="Bold" Text="Schule:" Visibility="{Binding Path=Row.SchoolString, Converter={StaticResource StringLengthVisibilityConverter}}" />
<TextBlock Text="{Binding Row.SchoolString}" Visibility="{Binding Path=Text, Converter={StaticResource StringLengthVisibilityConverter}, RelativeSource={RelativeSource Self}}" />
@@ -509,6 +526,10 @@
<Separator Visibility="{Binding Path=Row.SchulbegleitenderDienstString, Converter={StaticResource StringLengthVisibilityConverter}}" />
<TextBlock FontWeight="Bold" Text="Schulbegleitender Dienst:" Visibility="{Binding Path=Row.SchulbegleitenderDienstString, Converter={StaticResource StringLengthVisibilityConverter}}" />
<TextBlock Text="{Binding Row.SchulbegleitenderDienstString}" Visibility="{Binding Path=Text, Converter={StaticResource StringLengthVisibilityConverter}, RelativeSource={RelativeSource Self}}" />
<Separator Visibility="{Binding Row.EmployeeAddressString, Converter={StaticResource StringLengthVisibilityConverter}}" />
<TextBlock FontWeight="Bold" Text="Mitarbeiter/in:" Visibility="{Binding Row.EmployeeAddressString, Converter={StaticResource StringLengthVisibilityConverter}}" />
<TextBlock Text="{Binding Row.EmployeeAddressString}" Visibility="{Binding Path=Text, Converter={StaticResource StringLengthVisibilityConverter}, RelativeSource={RelativeSource Self}}" />
</StackPanel>
</DataTemplate>
</ContentControl.ContentTemplate>
@@ -579,16 +600,18 @@
</dxg:GridColumn>
<dxg:GridColumn FieldName="Bemerkung" Header="Bemerkung">
<dxg:GridColumn.EditSettings>
<dxe:TextEditSettings TextWrapping="Wrap" AcceptsReturn="True" />
<dxe:MemoEditSettings TextWrapping="NoWrap" AcceptsReturn="True" MaxLength="1024" MemoTextWrapping="NoWrap" MemoAcceptsReturn="True" ShowIcon="False" />
</dxg:GridColumn.EditSettings>
</dxg:GridColumn>
<dxg:GridColumn FieldName="Teamleitung" Header="Teamleitung" ReadOnly="True" />
<dxg:GridColumn FieldName="Vertretungszeitraum" Header="Vertretung von - bis" ReadOnly="True" />
<dxg:GridColumn FieldName="Absencetime.KrankheitsMeldung" Header="Meldung vom" ReadOnly="True"/>
<dxg:GridColumn FieldName="Krankheitszeitraum" ReadOnly="True" Header="Abwesenheit von - bis">
<dxg:GridColumn.EditSettings>
<dxe:ComboBoxEditSettings DefaultButtonClick="KrankmeldungsZeitraumBearbeitungsView"/>
</dxg:GridColumn.EditSettings>
<dxg:GridColumn.CellTemplate>
<DataTemplate>
<dxe:ComboBoxEdit x:Name="PART_Editor" DefaultButtonClick="KrankmeldungsZeitraumBearbeitungsView" Tag="{Binding RowData.Row}" />
</DataTemplate>
</dxg:GridColumn.CellTemplate>
</dxg:GridColumn>
<dxg:GridColumn FieldName="Absencetime.Reason.Description" Header="Abwesenheitskategorie">
<dxg:GridColumn.EditSettings>
@@ -597,7 +620,7 @@
</dxg:GridColumn>
</dxg:GridControl.Columns>
<dxg:GridControl.View>
<dxg:TableView AllowPerPixelScrolling="True" ShowTotalSummary="False" AutoWidth="False" AllowBestFit="True" ShowGroupPanel="False" ShowGridMenu="GridControlTagesansichtNoSubstitutionWanted_OnShowGridMenu" CellValueChanged="GridControlSubUnwanted_OnCellValueChanged">
<dxg:TableView AllowPerPixelScrolling="True" ShowTotalSummary="False" AutoWidth="True" AllowBestFit="True" BestFitMode="AllRows" ShowGroupPanel="False" ShowGridMenu="GridControlTagesansichtNoSubstitutionWanted_OnShowGridMenu" CellValueChanged="GridControlSubUnwanted_OnCellValueChanged">
<dxg:TableView.RowStyle>
<Style TargetType="dxg:RowControl">
<Setter Property="ToolTipService.ToolTip">
@@ -616,10 +639,11 @@
<TextBlock FontWeight="Bold" Text="Kontakt:" Visibility="{Binding Path=Row.CustomerContactInformationString, Converter={StaticResource StringLengthVisibilityConverter}}" />
<TextBlock Text="{Binding Row.CustomerContactInformationString}" Visibility="{Binding Path=Text, Converter={StaticResource StringLengthVisibilityConverter}, RelativeSource={RelativeSource Self}}" />
<!-- TODO: Was wird hier angezeigt? -->
<Separator Visibility="{Binding Path=Row.SchulbegleitenderDienstString, Converter={StaticResource StringLengthVisibilityConverter}}" />
<TextBlock FontWeight="Bold" Text="Schulbegleitender Dienst:" Visibility="{Binding Path=Row.SchulbegleitenderDienstString, Converter={StaticResource StringLengthVisibilityConverter}}" />
<TextBlock Text="{Binding Row.SchulbegleitenderDienstString}" Visibility="{Binding Path=Text, Converter={StaticResource StringLengthVisibilityConverter}, RelativeSource={RelativeSource Self}}" />
<!-- TODO Vertreteradresse anzeigen -->
</StackPanel>
</DataTemplate>
</ContentControl.ContentTemplate>
@@ -694,7 +718,11 @@
</dxg:GridColumn.CellStyle>
</dxg:GridColumn>
<dxg:GridColumn FieldName="Teamleitung" Header="Teamleitung" ReadOnly="True" />
<dxg:GridColumn FieldName="Bemerkung" />
<dxg:GridColumn FieldName="Bemerkung">
<dxg:GridColumn.EditSettings>
<dxe:MemoEditSettings TextWrapping="NoWrap" AcceptsReturn="True" MaxLength="1024" MemoTextWrapping="NoWrap" MemoAcceptsReturn="True" ShowIcon="False" />
</dxg:GridColumn.EditSettings>
</dxg:GridColumn>
<dxg:GridColumn FieldName="ItemMo.Vertreter" Header="Montag" Width="100" ReadOnly="True" AllowEditing="False" CellToolTipTemplate="{StaticResource WeekViewEmployeeCellTemplate}">
<dxg:GridColumn.DisplayTemplate>
<ControlTemplate>
@@ -779,7 +807,6 @@
</Style.Triggers>
</Style>
</dxg:GridColumn.CellStyle>
</dxg:GridColumn>
<dxg:GridColumn FieldName="ItemMi.Vertreter" Header="Mittwoch" ReadOnly="True" AllowEditing="False" CellToolTipTemplate="{StaticResource WeekViewEmployeeCellTemplate}">
<dxg:GridColumn.DisplayTemplate>
@@ -907,42 +934,37 @@
</dxg:GridColumn>
</dxg:GridControl.Columns>
<dxg:GridControl.View>
<dxg:TableView AllowPerPixelScrolling="True" ShowTotalSummary="False" AutoWidth="True" AllowBestFit="True" ShowGroupPanel="False" CellValueChanged="AbsentEmployeesWeekViewDataGrid_OnCellValueChanged">
<!--<dxg:TableView.RowStyle>
<Style TargetType="dxg:RowControl">
<Setter Property="ToolTipService.ShowDuration" Value="{x:Static sys:Int32.MaxValue}" />
<Setter Property="ToolTipService.ToolTip">
<Setter.Value>
<ContentControl Content="{Binding}">
<ContentControl.ContentTemplate>
<DataTemplate>
<StackPanel>
<TextBlock FontWeight="Bold" Text="{Binding Path=Row.Employee}" />
<dxg:TableView AllowPerPixelScrolling="True" ShowTotalSummary="False" AutoWidth="True" AllowBestFit="True" BestFitMode="AllRows" ShowGroupPanel="False" CellValueChanged="AbsentEmployeesWeekViewDataGrid_OnCellValueChanged">
<dxg:TableView.RowStyle>
<Style TargetType="dxg:RowControl">
<Setter Property="ToolTipService.ShowDuration" Value="{x:Static sys:Int32.MaxValue}" />
<Setter Property="ToolTipService.ToolTip">
<Setter.Value>
<ContentControl Content="{Binding}">
<ContentControl.ContentTemplate>
<DataTemplate>
<StackPanel>
<TextBlock FontWeight="Bold" Text="{Binding Path=Row.Customer}" />
<Separator Visibility="{Binding Path=Row.SchoolString, Converter={StaticResource StringLengthVisibilityConverter}}" />
<TextBlock FontWeight="Bold" Text="Schule:" Visibility="{Binding Path=Row.SchoolString, Converter={StaticResource StringLengthVisibilityConverter}}" />
<TextBlock Text="{Binding Row.SchoolString}" Visibility="{Binding Path=Text, Converter={StaticResource StringLengthVisibilityConverter}, RelativeSource={RelativeSource Self}}" />
<Separator Visibility="{Binding Path=Row.Customer.AddressString, Converter={StaticResource StringLengthVisibilityConverter}}" />
<TextBlock FontWeight="Bold" Text="Wohnort:" Visibility="{Binding Path=Row.Customer.AddressString, Converter={StaticResource StringLengthVisibilityConverter}}" />
<TextBlock Text="{Binding Row.Customer.AddressString}" />
<Separator Visibility="{Binding Row.EmployeeContactInformationString, Converter={StaticResource StringLengthVisibilityConverter}}" />
<TextBlock FontWeight="Bold" Text="Kontakt:" Visibility="{Binding Path=Row.EmployeeContactInformationString, Converter={StaticResource StringLengthVisibilityConverter}}" />
<TextBlock Text="{Binding Row.EmployeeContactInformationString}" Visibility="{Binding Path=Text, Converter={StaticResource StringLengthVisibilityConverter}, RelativeSource={RelativeSource Self}}" />
<Separator Visibility="{Binding Path=Row.CustomerContactInformationString, Converter={StaticResource StringLengthVisibilityConverter}}" />
<TextBlock FontWeight="Bold" Text="Kontakt:" Visibility="{Binding Path=Row.CustomerContactInformationString, Converter={StaticResource StringLengthVisibilityConverter}}" />
<TextBlock Text="{Binding Row.CustomerContactInformationString}" Visibility="{Binding Path=Text, Converter={StaticResource StringLengthVisibilityConverter}, RelativeSource={RelativeSource Self}}" />
<Separator Visibility="{Binding Path=Row.LastSubstitutionsString, Converter={StaticResource StringLengthVisibilityConverter}}" />
<TextBlock FontWeight="Bold" Text="Letzte Vertretungen" Visibility="{Binding Path=Row.LastSubstitutionsString, Converter={StaticResource StringLengthVisibilityConverter}}" />
<TextBlock Text="{Binding Row.LastSubstitutionsString}" Visibility="{Binding Path=Text, Converter={StaticResource StringLengthVisibilityConverter}, RelativeSource={RelativeSource Self}}" />
--><!-- TODO: Was kommt hier in den Text? --><!--
<Separator Visibility="{Binding Path=Row.SchulbegleitenderDienstString, Converter={StaticResource StringLengthVisibilityConverter}}" />
<TextBlock FontWeight="Bold" Text="Schulbegleitender Dienst:" Visibility="{Binding Path=Row.SchulbegleitenderDienstString, Converter={StaticResource StringLengthVisibilityConverter}}" />
<TextBlock Text="{Binding Row.SchulbegleitenderDienstString}" Visibility="{Binding Path=Text, Converter={StaticResource StringLengthVisibilityConverter}, RelativeSource={RelativeSource Self}}" />
</StackPanel>
</DataTemplate>
</ContentControl.ContentTemplate>
</ContentControl>
</Setter.Value>
</Setter>
</Style>
</dxg:TableView.RowStyle>-->
<Separator Visibility="{Binding Path=Row.SchulbegleitenderDienstString, Converter={StaticResource StringLengthVisibilityConverter}}" />
<TextBlock FontWeight="Bold" Text="Schulbegleitender Dienst:" Visibility="{Binding Path=Row.SchulbegleitenderDienstString, Converter={StaticResource StringLengthVisibilityConverter}}" />
<TextBlock Text="{Binding Row.SchulbegleitenderDienstString}" Visibility="{Binding Path=Text, Converter={StaticResource StringLengthVisibilityConverter}, RelativeSource={RelativeSource Self}}" />
</StackPanel>
</DataTemplate>
</ContentControl.ContentTemplate>
</ContentControl>
</Setter.Value>
</Setter>
</Style>
</dxg:TableView.RowStyle>
</dxg:TableView>
</dxg:GridControl.View>
</dxg:GridControl>
@@ -1169,7 +1191,11 @@
</DataTemplate>
</dxg:GridColumn.CellTemplate>
</dxg:GridColumn>
<dxg:GridColumn Header="Bemerkung" FieldName="Bemerkung" ReadOnly="True" />
<dxg:GridColumn FieldName="Bemerkung">
<dxg:GridColumn.EditSettings>
<dxe:MemoEditSettings TextWrapping="NoWrap" AcceptsReturn="True" MaxLength="1024" MemoTextWrapping="NoWrap" MemoAcceptsReturn="True" ShowIcon="False" />
</dxg:GridColumn.EditSettings>
</dxg:GridColumn>
<dxg:GridColumn FieldName="Teamleitung" Header="Teamleitung" ReadOnly="True" />
<dxg:GridColumn Header="Meldung vom" ReadOnly="True" />
<dxg:GridColumn Header="Abwesenheitskategorie" />

View File

@@ -2,7 +2,6 @@
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Globalization;
using System.Linq;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
@@ -78,45 +77,15 @@ namespace BeWo.SchulbegleitenderDienst
_AbwesendeMitarbeiter.Clear();
_SubstitutionUnwanteDayViewList.Clear();
foreach (var item in vertretungsItems)
{
var tagesansichtVM = _Tagesvertretung.ErstelleTagesansichtVM(item);
var all = new List<TagesansichtVM>();
if (tagesansichtVM.VertretungsStatus == VertretungsStatus.KlientKrank)
{
if(tagesansichtVM.Customer.IsSubstitutionWanted)
{
_AbwesendeKlienten.AddIfNotIn(tagesansichtVM);
}
else
{
_SubstitutionUnwanteDayViewList.AddIfNotIn(tagesansichtVM);
}
}
else
{
var substitutionStartingDayCountCondition = false;
vertretungsItems.ForEach(item => all.Add(_Tagesvertretung.ErstelleTagesansichtVM(item)));
if(tagesansichtVM.Customer != null)
{
var substitutionNeededDate = DateTime.Now.AddDays(-1 * tagesansichtVM.Customer.SubstitutionStartingDayCount);
var lists = SBDUtils.SBDUtils.GetListType(all);
if(tagesansichtVM.Absencetime?.Start.HasValue ?? false)
{
substitutionStartingDayCountCondition = substitutionNeededDate < tagesansichtVM.Absencetime.Start;
}
}
if(tagesansichtVM.Vertretung?.VertretenderMitarbeiterOid != null || substitutionStartingDayCountCondition)
{
_SubstitutionUnwanteDayViewList.AddIfNotIn(tagesansichtVM);
}
else
{
_AbwesendeMitarbeiter.AddIfNotIn(tagesansichtVM);
}
}
}
_AbwesendeKlienten.AddRangeIfElementsNotIn(lists.AbsentCustomersList);
_AbwesendeMitarbeiter.AddRangeIfElementsNotIn(lists.AbsentEmployeesList);
_SubstitutionUnwanteDayViewList.AddRangeIfElementsNotIn(lists.SubstitutionUnwantedList);
});
});
}
@@ -140,30 +109,57 @@ namespace BeWo.SchulbegleitenderDienst
});
}
private void GetWochenDienstFromItems(DateTime time, List<TagesansichtVM> items)
private void GetWochenDienstFromItems(DateTime time, IEnumerable<TagesansichtVM> items)
{
_ItemsWochenMitarbeiter.Clear();
_ItemsWochenKlienten.Clear();
_SubstitutionUnwantedWeekViewList.Clear();
var itemsMitarbeiter = _Wochenvertretung.GetWochenAnsichtFromItems(time, items.Where(i => i.VertretungsStatus != VertretungsStatus.KlientKrank).ToList());
var itemsKlienten = _Wochenvertretung.GetWochenAnsichtFromItems(time, items.Where(i => i.VertretungsStatus == VertretungsStatus.KlientKrank && i.Customer.IsSubstitutionWanted).ToList());
var subsitutionUnwantedItems = _Wochenvertretung.GetWochenAnsichtFromItems(time, items.Where(i => i.VertretungsStatus == VertretungsStatus.KlientKrank && (!i.Customer.IsSubstitutionWanted || i.Vertretung?.EmployeeOid != null)).ToList());
var employeeList = new List<TagesansichtVM>();
var customerList = new List<TagesansichtVM>();
var unwantedList = new List<TagesansichtVM>();
foreach (var item in itemsMitarbeiter)
foreach(var item in items)
{
_ItemsWochenMitarbeiter.AddIfNotIn(item);
if(item.VertretungsStatus == VertretungsStatus.KlientKrank)
{
if(item.Customer.IsSubstitutionWanted)
{
customerList.Add(item);
}
else
{
unwantedList.Add(item);
}
}
else
{
var substitutionStartingDayCountCondition = false;
if (item.Customer != null)
{
var substitutionNeededDate = DateTime.Now.AddDays(-1 * item.Customer.SubstitutionStartingDayCount);
if (item.Absencetime?.Start.HasValue ?? false)
{
substitutionStartingDayCountCondition = substitutionNeededDate < item.Absencetime.Start;
}
}
if(item.Vertretung?.VertretenderMitarbeiterOid != null || substitutionStartingDayCountCondition)
{
unwantedList.Add(item);
}
else
{
employeeList.Add(item);
}
}
}
foreach (var item in itemsKlienten)
{
_ItemsWochenKlienten.AddIfNotIn(item);
}
foreach(var item in subsitutionUnwantedItems)
{
_SubstitutionUnwantedWeekViewList.AddIfNotIn(item);
}
_ItemsWochenMitarbeiter.AddRangeIfElementsNotIn(_Wochenvertretung.GetWochenAnsichtFromItems(time, employeeList));
_ItemsWochenKlienten.AddRangeIfElementsNotIn(_Wochenvertretung.GetWochenAnsichtFromItems(time, customerList));
_SubstitutionUnwantedWeekViewList.AddRangeIfElementsNotIn(_Wochenvertretung.GetWochenAnsichtFromItems(time, unwantedList));
}
private void MVDatepickerVon_OnEditValueChanged(object sender, EditValueChangedEventArgs e)
@@ -326,7 +322,7 @@ namespace BeWo.SchulbegleitenderDienst
{
popup_newMitarbeiterVertretung.IsOpen = false;
SaveEmployeeInVertretung();
SaveEmployeeAbsenceTime();
ClearAllMitarbeiterValues();
@@ -355,7 +351,7 @@ namespace BeWo.SchulbegleitenderDienst
//MVDatepicker_UhrzeitBis.Text = "";
}
private void SaveEmployeeInVertretung()
private void SaveEmployeeAbsenceTime()
{
var absenceTime = new AbsenceTimeDC();
@@ -396,7 +392,7 @@ namespace BeWo.SchulbegleitenderDienst
absenceTime.Notice = MitarbeiterNotice.Text;
absenceTime.KrankheitsMeldung = KrankMeldungMitarbeiterDatepicker.DateTime.Date;
ServiceFacade.DoOperationsServiceAsync(s1 => s1.CheckForOverlappingAbsenceTimes(absenceTime.Start.Value, absenceTime.End.Value, _CurrentEmployee.EmployeeOid, absenceTime.CustomerOid), isOverlapping =>
ServiceFacade.DoOperationsServiceAsync(s1 => s1.CheckForOverlappingAbsenceTimes(absenceTime.Start.Value, absenceTime.End.Value, _CurrentEmployee.EmployeeOid, null), isOverlapping =>
{
this.Dispatch(() =>
{
@@ -532,7 +528,7 @@ namespace BeWo.SchulbegleitenderDienst
{
popup_newKlientVertretung.IsOpen = false;
SaveKlientInVertretung();
SaveCustomerAbsenceTime();
ClearAllKlientValues();
@@ -556,7 +552,7 @@ namespace BeWo.SchulbegleitenderDienst
KlientNotice.Text = string.Empty;
}
private void SaveKlientInVertretung()
private void SaveCustomerAbsenceTime()
{
var absenceTime = new AbsenceTimeDC();
@@ -601,7 +597,7 @@ namespace BeWo.SchulbegleitenderDienst
absenceTime.Notice = KlientNotice.Text;
absenceTime.KrankheitsMeldung = KrankMeldungKlientDatepicker.DateTime.Date;
ServiceFacade.DoOperationsServiceAsync(s1 => s1.CheckForOverlappingAbsenceTimes(absenceTime.Start.Value, absenceTime.End.Value, _CurrentEmployee?.EmployeeOid, _CurrentCustomer.CustomerOid), isOverlapping =>
ServiceFacade.DoOperationsServiceAsync(s1 => s1.CheckForOverlappingAbsenceTimes(absenceTime.Start.Value, absenceTime.End.Value, null, _CurrentCustomer.CustomerOid), isOverlapping =>
{
this.Dispatch(() =>
{
@@ -625,6 +621,9 @@ namespace BeWo.SchulbegleitenderDienst
private void Reload()
{
_CurrentEmployee = null;
_CurrentCustomer = null;
if (IsInTagesansicht)
{
LadeTagesansicht(Datepicker.DateTime);
@@ -674,14 +673,30 @@ namespace BeWo.SchulbegleitenderDienst
var url = $"{BeWoApp.SiteOfOrigin}/ReportView.aspx?type={ReportTypes.SBDCharacteristics}&customerOid={selectedTagesansichtVM.Customer.CustomerOid}";
var tempToken = string.Empty;
ServiceFacade.DoDownloadServiceSync(s => tempToken = s.CreateTemporaryToken(url, true));
var addChar = (url.Contains("?")) ? "&" : "?";
url = $"{url}{addChar}token={tempToken}";
//var tempToken = string.Empty;
url = BeWoWpfUtils.GetHTMLEncodedURL(url);
ServiceFacade.DoDownloadServiceAsync(s => s.CreateTemporaryToken(url, true), delegate(string tempToken)
{
this.Dispatch(
() =>
{
var addChar = url.Contains("?") ? "&" : "?";
url = $"{url}{addChar}token={tempToken}";
BeWoUtils.NavigateToReportUri(url, "Steckbrief");
url = BeWoWpfUtils.GetHTMLEncodedURL(url);
BeWoUtils.NavigateToReportUri(url, "Steckbrief");
}
);
});
//ServiceFacade.DoDownloadServiceSync(s => tempToken = s.CreateTemporaryToken(url, true));
//var addChar = url.Contains("?") ? "&" : "?";
//url = $"{url}{addChar}token={tempToken}";
//url = BeWoWpfUtils.GetHTMLEncodedURL(url);
//BeWoUtils.NavigateToReportUri(url, "Steckbrief");
}
}
@@ -696,7 +711,9 @@ namespace BeWo.SchulbegleitenderDienst
{
if (MessageBox.Show("Möchten Sie die Abwesenheit wirklich löschen?", "Abwesenheit löschen", MessageBoxButton.YesNo, MessageBoxImage.Question) == MessageBoxResult.Yes)
{
_Tagesvertretung.DeleteKrankmeldung((TagesansichtVM)GridDataControlTagesansichtMitarbeiter.SelectedItem);
var selectedViewModel = (TagesansichtVM)GridDataControlTagesansichtMitarbeiter.SelectedItem;
_Tagesvertretung.DeleteKrankmeldung(selectedViewModel, ShowDeletionMessageBox(selectedViewModel.Absencetime), Datepicker.DateTime.Date);
LadeTagesansicht(Datepicker.DateTime.Date);
}
@@ -706,15 +723,43 @@ namespace BeWo.SchulbegleitenderDienst
{
if (MessageBox.Show("Möchten Sie die Abwesenheit wirklich löschen?", "Abwesenheit löschen", MessageBoxButton.YesNo, MessageBoxImage.Question) == MessageBoxResult.Yes)
{
_Tagesvertretung.DeleteKrankmeldung((TagesansichtVM)GridDataControlTagesansichtKlient.SelectedItem);
var selectedViewModel = (TagesansichtVM) GridDataControlTagesansichtKlient.SelectedItem;
_Tagesvertretung.DeleteKrankmeldung(selectedViewModel, ShowDeletionMessageBox(selectedViewModel.Absencetime), Datepicker.DateTime.Date);
LadeTagesansicht(Datepicker.DateTime.Date);
}
}
private static bool? ShowDeletionMessageBox(AbsenceTimeDC absenceTime)
{
if(absenceTime.Start != null && absenceTime.End != null && absenceTime.Start.Value.Date == absenceTime.End.Value.Date)
{
return true;
}
var messageBoxResult = MessageBox.Show("Möchten Sie die gesamte Abwesenheit löschen?", "Abwesenheit löschen", MessageBoxButton.YesNoCancel, MessageBoxImage.Question);
if(messageBoxResult == MessageBoxResult.Yes)
{
return true;
}
if(messageBoxResult == MessageBoxResult.No)
{
return false;
}
return null;
}
private void KrankmeldungsZeitraumBearbeitungsView(object sender, RoutedEventArgs e)
{
_Tagesvertretung.KrankMeldeZeitraumBearbeiten((TagesansichtVM)GridDataControlTagesansichtMitarbeiter.SelectedItem);
// TODO: Kann auch aus "Kein Vertretungsbedarf" stammen!
var comboBoxEdit = (ComboBoxEdit) sender;
var selectedTagesansichtVM = (TagesansichtVM) comboBoxEdit.Tag;
_Tagesvertretung.KrankMeldeZeitraumBearbeiten(selectedTagesansichtVM);
LadeTagesansicht(Datepicker.DateTime);
}
@@ -767,7 +812,6 @@ namespace BeWo.SchulbegleitenderDienst
{
ScrollViewerTagesansicht.Visibility = Visibility.Visible;
WochenansichtsContainerGrid.Visibility = Visibility.Collapsed;
//GridMitarbeiterEinsatz.Visibility = Visibility.Collapsed;
TagesAnzeige();
}
@@ -1038,9 +1082,12 @@ namespace BeWo.SchulbegleitenderDienst
var barButtonItem = (BarButtonItem) sender;
var selectedTagesansichtVM = (TagesansichtVM) barButtonItem.Tag;
_Tagesvertretung.DeleteKrankmeldung(selectedTagesansichtVM);
if(MessageBox.Show("Möchten Sie die Abwesenheit wirklich löschen?", "Abwesenheit löschen", MessageBoxButton.YesNo, MessageBoxImage.Question) == MessageBoxResult.Yes)
{
_Tagesvertretung.DeleteKrankmeldung(selectedTagesansichtVM, ShowDeletionMessageBox(selectedTagesansichtVM.Absencetime), Datepicker.DateTime.Date);
LadeTagesansicht(Datepicker.DateTime);
LadeTagesansicht(Datepicker.DateTime);
}
}
private void GridControlSubUnwanted_OnCellValueChanged(object sender, CellValueChangedEventArgs e)

View File

@@ -5,8 +5,10 @@
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
xmlns:dxmvvm="http://schemas.devexpress.com/winfx/2008/xaml/mvvm"
xmlns:dxgt="http://schemas.devexpress.com/winfx/2008/xaml/grid/themekeys"
Title="Vertretung auswählen" Height="650" Width="800" MinHeight="450" WindowStartupLocation="CenterScreen"
ResizeMode="CanResizeWithGrip" WindowStyle="None" Background="Transparent" >
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d"
Title="Vertretung auswählen" SizeToContent="WidthAndHeight" AllowsTransparency="True" WindowStartupLocation="CenterScreen"
ResizeMode="CanResizeWithGrip" WindowStyle="None" Background="Transparent" d:DataContext="{d:DesignData VertretungsSearchView}">
<Window.Resources>
<dxmvvm:NumericToVisibilityConverter x:Key="NumericToVisibilityConverter" Inverse="True" />
<ControlTemplate x:Key="{dxgt:TableViewThemeKey ResourceKey=DataPresenterTemplate, ThemeName=Office2010Black}" TargetType="{x:Type dxg:DataPresenter}">
@@ -32,9 +34,9 @@
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid Grid.Row="0" Margin="3,3,3,0">
<Grid Grid.Row="0" Margin="3,3,3,0" HorizontalAlignment="Stretch">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
@@ -50,13 +52,15 @@
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Label Grid.Row="0" Grid.Column="0" Content="Klient/in:" Margin="3" FontWeight="Bold"/>
<Label x:Name="lblCustomerName" Grid.Row="0" Grid.Column="1" Content="Christian Bäurle" Margin="3"/>
<Label x:Name="lblCustomerStreet" Grid.Row="1" Grid.Column="1" Content="Hochstadenstr. 1-3" Margin="3"/>
<Label x:Name="lblCustomerCity" Grid.Row="2" Grid.Column="1" Content="50674 Köln" Margin="3"/>
<Label x:Name="lblCustomerName" Content="{Binding Path=CustomerName, UpdateSourceTrigger=PropertyChanged}" Grid.Row="0" Grid.Column="1" Margin="3,3,3,0" />
<Label x:Name="lblCustomerStreet" Content="{Binding Path=CustomerStreet, UpdateSourceTrigger=PropertyChanged}" Grid.Row="1" Grid.Column="1" Margin="3,0,3,0"/>
<Label x:Name="lblCustomerCity" Content="{Binding Path=CustomerCity, UpdateSourceTrigger=PropertyChanged}" Grid.Row="2" Grid.Column="1" Margin="3,0,3,0"/>
<Label Grid.Row="0" Grid.Column="2" Content="Schule:" Margin="10,3,3,3" FontWeight="Bold"/>
<Label x:Name="lblSchoolName" Grid.Row="0" Grid.Column="3" Content="KAS" Margin="3"/>
<Label x:Name="lblSchoolStreet" Grid.Row="1" Grid.Column="3" Content="Teststrstrstradtadrt at . 1-3" Margin="3"/>
<Label x:Name="lblSchoolCity" Grid.Row="2" Grid.Column="3" Content="50968 Köln" Margin="3"/>
<Label x:Name="lblSchoolName" Grid.Row="0" Grid.Column="3" Margin="3,3,3,0"/>
<Label x:Name="lblSchoolStreet" Grid.Row="1" Grid.Column="3" Margin="3,0,3,0"/>
<Label x:Name="lblSchoolCity" Grid.Row="2" Grid.Column="3" Margin="3,0,3,0"/>
<Label Grid.Row="0" Grid.Column="4" Content="Klient Wunschkriterien" Margin="10,3,3,3" FontWeight="Bold"/>
<dxg:LookUpEdit Grid.Row="1" Grid.Column="4" Grid.RowSpan="3" Margin="10,3,3,3" x:Name="TokenBoxWunschAnzeige" ValidateOnTextInput="True" ValidateOnEnterKeyPressed="True" TextWrapping="Wrap" IsReadOnly="True"
MinHeight="50" Width="200" PopupHeight="500" PopupWidth="750" PopupMinHeight="100" PopupMinWidth="100" IsPopupAutoWidth="False" >
@@ -64,6 +68,7 @@
<dxg:TokenLookUpEditStyleSettings EnableTokenWrapping="True"/>
</dxg:LookUpEdit.StyleSettings>
</dxg:LookUpEdit>
<Label Grid.Row="0" Grid.Column="5" Content="Klient Ausschlusskriterien" Margin="3" FontWeight="Bold"/>
<dxg:LookUpEdit Grid.Row="1" Grid.Column="5" Grid.RowSpan="3" Margin="3" x:Name="TokenBoxAusschlussAnzeige" ValidateOnTextInput="True" ValidateOnEnterKeyPressed="True" TextWrapping="Wrap" IsReadOnly="True"
MinHeight="50" Width="200" PopupHeight="500" PopupWidth="750" PopupMinHeight="100" PopupMinWidth="100" IsPopupAutoWidth="False" >
@@ -91,20 +96,8 @@
</Grid.RowDefinitions>
<Label Grid.Row="0" Grid.Column="0" Content="Vertretung ab" Margin="3"/>
<Label Grid.Row="1" Grid.Column="0" Content="Vertretung bis" Margin="3" />
<Label Grid.Row="0" Grid.Column="3" Content="Uhrzeit von" Margin="3" x:Name="KVLabelUhrzeitVon" />
<Label Grid.Row="1" Grid.Column="3" Content="Uhrzeit bis" Margin="3" x:Name="KVLabelUhrzeitBis" />
<dxe:DateEdit x:Name="KVDatepickerVon" MaskType="DateTimeAdvancingCaret" AllowNullInput="False" Grid.Column="1" Grid.Row="0" Margin="3" Height="23" Width="125" EditValueChanged="KVDatepickerVon_OnEditValueChanged"/>
<dxe:DateEdit x:Name="KVDatepickerBis" MaskType="DateTimeAdvancingCaret" AllowNullInput="False" Grid.Column="1" Grid.Row="1" Margin="3" Height="23" Width="125" EditValueChanged="KVDatepickerBis_OnEditValueChanged" />
<dxe:TextEdit Grid.Column="4" Grid.Row="0" MaskType="RegEx" Mask="(0?\d|1\d|2[0-3]):[0-5]\d" ShowError="False" MaskShowPlaceHolders="True" x:Name="KVDatepicker_UhrzeitVon"
MaskUseAsDisplayFormat="True" InvalidValueBehavior="AllowLeaveEditor"
Height="23" Visibility="Visible" Width="75"
Margin="3,3,3,3"/>
<dxe:TextEdit Grid.Column="4" Grid.Row="1" MaskType="RegEx" Mask="(0?\d|1\d|2[0-3]):[0-5]\d" ShowError="False" MaskShowPlaceHolders="True" x:Name="KVDatepicker_UhrzeitBis"
MaskUseAsDisplayFormat="True" InvalidValueBehavior="AllowLeaveEditor" Width="75"
Height="23" Visibility="Visible"
Margin="3,3,3,3"/>
<CheckBox Grid.Column="2" Grid.Row="0" Margin="3,3,3,3" Content="ganztägig" Unchecked="KVCheckBox_OnUnchecked" Checked="KVCheckBox_OnChecked"
HorizontalAlignment="Left" VerticalAlignment="Center" x:Name="KVCheckBox" />
<dxe:DateEdit x:Name="KVDatepickerVon" EditValue="{Binding Path=SubstitutionStart, UpdateSourceTrigger=PropertyChanged}" MaskType="DateTimeAdvancingCaret" AllowNullInput="False" Grid.Column="1" Grid.Row="0" Margin="3" Height="23" Width="125" />
<dxe:DateEdit x:Name="KVDatepickerBis" EditValue="{Binding Path=SubstitutionEnd, UpdateSourceTrigger=PropertyChanged}" MaskType="DateTimeAdvancingCaret" AllowNullInput="False" Grid.Column="1" Grid.Row="1" Margin="3" Height="23" Width="125" />
<Label x:Name="lblZuletztVertreten" Grid.Row="0" Grid.Column="5" Margin="3" Content="Letzte Vertretung" />
<ListBox Grid.Row="0" Grid.Column="6" Width="200" Grid.RowSpan="2" Margin="3" x:Name="ListBoxLetzteVertreter" LostFocus="LetzteVertreter_OnLostFocus" SelectionChanged="LetzteVertreter_OnSelectionChanged" />
</Grid>
@@ -134,18 +127,18 @@
</WrapPanel>
</Grid>
</GroupBox>
<dxg:GridControl x:Name="GridControlPossibleVertreter" Grid.Row="3" Grid.Column="0" Margin="3,3,3,3" Visibility="Visible">
<dxg:GridControl x:Name="GridControlPossibleVertreter" Grid.Row="3" Grid.Column="0" Margin="3,3,3,3" Visibility="Visible" Height="200">
<dxg:GridControl.Columns>
<dxg:GridColumn FieldName="Nachname" Width="125" ReadOnly="True" Header="Nachname" SortOrder="Ascending" />
<dxg:GridColumn FieldName="Vorname" Width="125" ReadOnly="True" Header="Vorname"/>
<dxg:GridColumn FieldName="Arbeitszeit" MinWidth="60" ReadOnly="True" Header="Arbeitzeit"/>
<dxg:GridColumn FieldName="Postleitzahl" Width="75" ReadOnly="True" Header="Postleitzahl" />
<dxg:GridColumn FieldName="Strasse" Width="100" ReadOnly="True" Header="Strasse" />
<dxg:GridColumn FieldName="Stadt" Width="75" ReadOnly="True" Header="Stadt" />
<dxg:GridColumn FieldName="Geschlecht" Width="75" ReadOnly="True" Header="Geschlecht" />
<dxg:GridColumn FieldName="Nachname" ReadOnly="True" Header="Nachname" SortOrder="Ascending" />
<dxg:GridColumn FieldName="Vorname" ReadOnly="True" Header="Vorname"/>
<dxg:GridColumn FieldName="Arbeitszeit" ReadOnly="True" Header="Arbeitszeit"/>
<dxg:GridColumn FieldName="Postleitzahl" ReadOnly="True" Header="Postleitzahl" />
<dxg:GridColumn FieldName="Strasse" ReadOnly="True" Header="Strasse" />
<dxg:GridColumn FieldName="Stadt" ReadOnly="True" Header="Stadt" />
<dxg:GridColumn FieldName="Geschlecht" ReadOnly="True" Header="Geschlecht" />
</dxg:GridControl.Columns>
<dxg:GridControl.View>
<dxg:TableView AllowPerPixelScrolling="True" ShowTotalSummary="False" ShowGroupPanel="False" RowDoubleClick="TableView_OnRowDoubleClick" />
<dxg:TableView AllowPerPixelScrolling="True" BestFitMode="AllRows" AllowBestFit="True" ShowTotalSummary="False" ShowGroupPanel="False" RowDoubleClick="TableView_OnRowDoubleClick" />
</dxg:GridControl.View>
</dxg:GridControl>
<StackPanel Grid.Row="4" Grid.Column="0" Margin="3" >

View File

@@ -6,17 +6,17 @@ using BS.Shared.Extensions;
using System.Windows.Controls;
using System.Collections.Generic;
using System.ComponentModel;
using System.Globalization;
using System.Linq;
using System.Runtime.CompilerServices;
using BeWo.Annotations;
using BS.Shared;
using BS.Shared.DataContracts.Compact;
using DevExpress.Xpf.Editors;
using DevExpress.Xpf.Grid;
using MessageBox = System.Windows.MessageBox;
namespace BeWo.SchulbegleitenderDienst
{
public partial class VertretungsSearchView
public partial class VertretungsSearchView : INotifyPropertyChanged
{
public event EventHandler<VertretungSelectedEventArgs> RaiseCustomEvent;
@@ -30,15 +30,97 @@ namespace BeWo.SchulbegleitenderDienst
private readonly Dictionary<string, CompactTokenDC> _VerfuegbareWunschkriterien = new Dictionary<string, CompactTokenDC>();
private readonly Dictionary<string, CompactTokenDC> _VerfuegbareAusschlusskriterien = new Dictionary<string, CompactTokenDC>();
private readonly TagesansichtVM _Tagesansicht;
private TagesansichtVM _Tagesansicht;
public TagesansichtVM Tagesansicht
{
get => _Tagesansicht;
set
{
if(!Equals(_Tagesansicht, value))
{
_Tagesansicht = value;
OnPropertyChanged(nameof(Tagesansicht));
}
}
}
public string CustomerName
{
get
{
if(_Tagesansicht?.Customer != null)
{
return _Tagesansicht.Customer.Name ?? string.Empty;
}
return string.Empty;
}
}
public string CustomerStreet
{
get
{
if(_Tagesansicht?.Customer != null)
{
return _Tagesansicht.Customer.Street ?? string.Empty;
}
return string.Empty;
}
}
public string CustomerCity => _Tagesansicht?.Customer != null ? $"{_Tagesansicht.Customer.PostalCode ?? string.Empty} {_Tagesansicht.Customer.Town ?? string.Empty}" : string.Empty;
private readonly WochenansichtVM _Wochenansicht;
private DateTime _SubstitutionStart;
public DateTime SubstitutionStart
{
get => _SubstitutionStart;
set
{
if(!Equals(_SubstitutionStart, value))
{
_SubstitutionStart = value;
OnPropertyChanged(nameof(SubstitutionStart));
if(_SubstitutionStart > _SubstitutionEnd)
{
SubstitutionEnd = _SubstitutionStart;
}
}
}
}
private DateTime _SubstitutionEnd;
public DateTime SubstitutionEnd
{
get => _SubstitutionEnd;
set
{
if(!Equals(_SubstitutionEnd, value))
{
_SubstitutionEnd = value;
OnPropertyChanged(nameof(SubstitutionEnd));
if(_SubstitutionEnd < _SubstitutionStart)
{
SubstitutionStart = _SubstitutionEnd;
}
}
}
}
public VertretungsSearchView(DateTime currentDate, CompactCustomerDC customer, TagesansichtVM tagesansicht, WochenansichtVM wochenansicht, CompactEmployeeDC employee)
{
InitializeComponent();
_Tagesansicht = tagesansicht;
DataContext = this;
Tagesansicht = tagesansicht;
_Wochenansicht = wochenansicht;
_Customer = customer;
_Employee = employee;
@@ -50,8 +132,6 @@ namespace BeWo.SchulbegleitenderDienst
SetCustomerInfos();
KVCheckBox.IsChecked = true;
Loaded += VertretungsSearchView_Loaded;
CommandBindings.Add(new CommandBinding(ApplicationCommands.Close, (s, e) => { Close(); }));
@@ -96,9 +176,9 @@ namespace BeWo.SchulbegleitenderDienst
end = _Tagesansicht.Vertretung.VertretungsZeitraumBis;
}
KVDatepickerVon.EditValue = start;
SubstitutionStart = start.Value;
KVDatepickerBis.EditValue = end;
SubstitutionEnd = end.Value;
}
private void RootGroupBox_OnMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
@@ -158,20 +238,21 @@ namespace BeWo.SchulbegleitenderDienst
dateTime = _Tagesansicht.Datum;
}
var employeeList = ServiceFacade.DoEmployeeServiceSync(s => s.GetAllActiveVertreterEmployeesCompact(customerOid, dateTime)).ToList();
ServiceFacade.DoEmployeeServiceAsync(s => s.GetAllActiveVertreterEmployeesCompact(customerOid, dateTime), r => this.Dispatch(delegate
{
GridControlPossibleVertreter.Visibility = Visibility.Hidden;
((TableView)GridControlPossibleVertreter.View).VerticalScrollbarVisibility = ScrollBarVisibility.Disabled;
GridControlPossibleVertreter.Visibility = Visibility.Hidden;
((TableView) GridControlPossibleVertreter.View).VerticalScrollbarVisibility = ScrollBarVisibility.Disabled;
var list = CreateSuchergebnisListe(r);
var list = CreateSuchergebnisListe(employeeList);
_dataListEmployee = list;
_dataListEmployee = list;
GridControlPossibleVertreter.ItemsSource = list;
GridControlPossibleVertreter.Visibility = Visibility.Visible;
((TableView)GridControlPossibleVertreter.View).VerticalScrollbarVisibility = ScrollBarVisibility.Auto;
GridControlPossibleVertreter.ItemsSource = list;
GridControlPossibleVertreter.Visibility = Visibility.Visible;
((TableView) GridControlPossibleVertreter.View).VerticalScrollbarVisibility = ScrollBarVisibility.Auto;
_CurrentData = _dataListEmployee;
_CurrentData = _dataListEmployee;
}), true);
}
private List<SearchViewDaten> CreateSuchergebnisListe(IEnumerable<CompactVertreterEmployeeDC> employeeList)
@@ -216,50 +297,6 @@ namespace BeWo.SchulbegleitenderDienst
Close();
}
private void KVCheckBox_OnUnchecked(object sender, RoutedEventArgs e)
{
KVDatepicker_UhrzeitBis.Text = string.Empty;
KVDatepicker_UhrzeitBis.Visibility = Visibility.Visible;
KVLabelUhrzeitVon.Visibility = Visibility.Visible;
KVDatepicker_UhrzeitVon.Text = string.Empty;
KVDatepicker_UhrzeitVon.Visibility = Visibility.Visible;
KVLabelUhrzeitBis.Visibility = Visibility.Visible;
}
private void KVCheckBox_OnChecked(object sender, RoutedEventArgs e)
{
KVDatepicker_UhrzeitBis.Visibility = Visibility.Hidden;
KVLabelUhrzeitVon.Visibility = Visibility.Hidden;
KVDatepicker_UhrzeitVon.Visibility = Visibility.Hidden;
KVLabelUhrzeitBis.Visibility = Visibility.Hidden;
}
private void KVDatepickerVon_OnEditValueChanged(object sender, EditValueChangedEventArgs e)
{
var dateEdit = (DateEdit) sender;
var date = dateEdit.DateTime;
if (date > KVDatepickerBis.DateTime)
{
KVDatepickerBis.EditValue = date;
}
}
private void KVDatepickerBis_OnEditValueChanged(object sender, EditValueChangedEventArgs e)
{
var dateEdit = (DateEdit) sender;
var date = dateEdit.DateTime;
if (date < KVDatepickerVon.DateTime)
{
KVDatepickerVon.EditValue = date;
}
}
public void GetAllTokensAndSetAll()
{
if (_Customer != null)
@@ -667,18 +704,15 @@ namespace BeWo.SchulbegleitenderDienst
private void LetzteVertreter_OnSelectionChanged(object sender, SelectionChangedEventArgs e)
{
var selectedItem = ListBoxLetzteVertreter.SelectedItem as SearchViewDaten;
if (selectedItem != null)
if (ListBoxLetzteVertreter.SelectedItem is SearchViewDaten selectedItem)
{
var items = (BindingList<SearchViewDaten>) GridControlPossibleVertreter.ItemsSource;
var items = new BindingList<SearchViewDaten>((List<SearchViewDaten>) GridControlPossibleVertreter.ItemsSource);
foreach (var item in items)
{
if (item.Vorname == selectedItem.Vorname && item.Nachname == selectedItem.Nachname)
{
GridControlPossibleVertreter.SelectedItem = item;
//GridControlPossibleVertreter.setf = item;
GridControlPossibleVertreter.View.ScrollIntoView(GridControlPossibleVertreter.View.FocusedRowHandle);
}
@@ -700,58 +734,17 @@ namespace BeWo.SchulbegleitenderDienst
{
var vertreter = item.EmployeeDC.CompactEmployee;
var start = KVDatepickerVon.DateTime;
var ende = KVDatepickerBis.DateTime;
RaiseCustomEvent?.Invoke(this, new VertretungSelectedEventArgs(vertreter, _SubstitutionStart, _SubstitutionEnd, _Tagesansicht, _Wochenansicht));
if (KVCheckBox.IsChecked != null && KVCheckBox.IsChecked.Value)
{
RaiseCustomEvent?.Invoke(this, new VertretungSelectedEventArgs(vertreter, start, ende, _Tagesansicht, _Wochenansicht));
Close();
}
Close();
}
else if (!KVDatepickerVon.Text.Equals("") && !KVDatepickerBis.Text.Equals("") && !KVDatepicker_UhrzeitVon.Text.Equals("") && !KVDatepicker_UhrzeitBis.Text.Equals(""))
{
var von = KVDatepicker_UhrzeitVon.Text;
var bis = KVDatepicker_UhrzeitBis.Text;
public event PropertyChangedEventHandler PropertyChanged;
if (von.Length < 5)
{
von = "0" + von;
}
if (bis.Length < 5)
{
bis = "0" + bis;
}
var dateVon = DateTime.ParseExact(von, "HH:mm", CultureInfo.CurrentCulture);
var dateBis = DateTime.ParseExact(bis, "HH:mm", CultureInfo.CurrentCulture);
if (dateVon > dateBis)
{
MessageBox.Show("Die Startzeit darf nicht größer sein als die Endzeit.");
}
else
{
var xVon = start.MergeDatesByDate(dateVon);
var xBis = ende.MergeDatesByDate(dateBis);
RaiseCustomEvent?.Invoke(this, new VertretungSelectedEventArgs(vertreter, xVon, xBis, _Tagesansicht, _Wochenansicht));
Close();
}
}
else
{
if ((KVDatepicker_UhrzeitVon.Text.Equals("") || KVDatepicker_UhrzeitBis.Text.Equals("")) && !KVCheckBox.IsChecked.Value)
{
MessageBox.Show("Bitte geben Sie eine Start- und Endzeit an.");
}
else
{
MessageBox.Show("Bitte geben Sie ein Start und ein Enddatum an.");
}
}
[NotifyPropertyChangedInvocator]
protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null)
{
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
}
}

View File

@@ -21,7 +21,7 @@ namespace BeWo.SchulbegleitenderDienst.ViewModel
{
get
{
if (Utils.IsAnyNull(Stundensaetze, Feiertage))
if (BS.Shared.Core.Utils.IsAnyNull(Stundensaetze, Feiertage))
{
return false;
}
@@ -43,9 +43,9 @@ namespace BeWo.SchulbegleitenderDienst.ViewModel
public FeiertagListVM Feiertage
{
get { return _Feiertage; }
get => _Feiertage;
set
set
{
_Feiertage = value;
FirePropertyChanged(PropertyName_Feiertage);

View File

@@ -190,5 +190,9 @@ namespace BeWo.SchulbegleitenderDienst.ViewModel
public string CustomerSchutzstufe { get; set; }
public string EmployeeSchutzstufe { get; set; }
public string VertreterInfoString { get; set; }
public string EmployeeAddressString { get; set; }
}
}

View File

@@ -187,6 +187,10 @@ namespace BeWo.ServiceProxy
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IEmployeeService/GetAllCompactEmployeesBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
System.Collections.Generic.List<BS.Shared.DataContracts.Compact.CompactEmployeeDC> GetAllCompactEmployees();
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IEmployeeService/LoadTeamsRelatedCustomerOids", ReplyAction="http://tempuri.org/IEmployeeService/LoadTeamsRelatedCustomerOidsResponse")]
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IEmployeeService/LoadTeamsRelatedCustomerOidsBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
System.Collections.Generic.List<long> LoadTeamsRelatedCustomerOids(long employeeOid);
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IEmployeeService/ArchiveEmployee", ReplyAction="http://tempuri.org/IEmployeeService/ArchiveEmployeeResponse")]
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IEmployeeService/ArchiveEmployeeBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
void ArchiveEmployee(long pOid, long pVersion);
@@ -609,6 +613,11 @@ namespace BeWo.ServiceProxy
return base.Channel.GetAllCompactEmployees();
}
public System.Collections.Generic.List<long> LoadTeamsRelatedCustomerOids(long employeeOid)
{
return base.Channel.LoadTeamsRelatedCustomerOids(employeeOid);
}
public void ArchiveEmployee(long pOid, long pVersion)
{
base.Channel.ArchiveEmployee(pOid, pVersion);
@@ -1065,6 +1074,390 @@ namespace BeWo.ServiceProxy
"lt", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
System.Collections.Generic.List<BS.Shared.DataContracts.ContactDC> LoadContactInformationForCustomer(long customerOid);
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/ICustomerService/ConvertToNewSubstitutionType", ReplyAction="http://tempuri.org/ICustomerService/ConvertToNewSubstitutionTypeResponse")]
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/ICustomerService/ConvertToNewSubstitutionTypeBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BeWo.ServiceProxy.BeWoFault))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BeWo.ServiceProxy.BeWoFaultType))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Compact.CompactOrganisationDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Compact.CompactCustomerDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Compact.CompactEmployeeDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.Compact.CompactEmployeeDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Compact.CompactTeamDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.Compact.CompactTeamDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.Compact.CompactCustomerDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.Compact.CompactSupportConceptDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Compact.CompactSupportConceptDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.Compact.CompactCostBearerDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Compact.CompactCostBearerDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.Compact.CompactGroupOfPeopleDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Compact.CompactGroupOfPeopleDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.Compact.CompactVertreterEmployeeDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Compact.CompactVertreterEmployeeDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Compact.CompactTokenDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<byte[]>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<string>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.Dictionary<long, string>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<long>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.Dictionary<long, BS.Shared.ValueListEntryType>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.Dictionary<long, long>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.ActivationTypeId))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.ValueListEntryType))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.ContactType))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.FamilyStatus))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.CostRatePeriodType))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.Sex))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.PersonType))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.ControlType))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.SubstitutionNeed))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.AppointmentDayOfWeek))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.ScopeTypeId))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.GroupTypeId))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.CostBearer2SupportConceptStatus))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.TokenTyp))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.EmployeeDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.PersonDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.ValueListEntryDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.ContactDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.ContactDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.Organisation2PersonDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Organisation2PersonDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.CostRatePeriodDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.CostRatePeriodDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.VarFieldDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.VarFieldDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.AbsenceTimeDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.AbsenceTimeDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.AbsenceReasonDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.ArbeitszeitDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.ArbeitszeitDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.ArbeitszeitEintragDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.ArbeitszeitEintragDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.ContractDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.ContractDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.EmploymentTypeDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.ValueListEntryDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.OvertimeDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.OvertimeDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.AuszahlungsartDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.CustomerEmployeeRelationDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.CustomerEmployeeRelationDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.ChatBewoMessageSyncDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.AssessmentSheetCategoryDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.AssessmentSheetCategoryDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.AssessmentSheetValueDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.AssessmentSheetValueDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.AssessmentSheetEntryDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.AssessmentSheetEntryDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.NewsItemDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.NewsItemDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.EmploymentTypeDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.EmployeeDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.TeamDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.GroupOfPeopleDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.GroupOfPeopleDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.AuszahlungsartDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.EmployeeAPPCodeDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.EmployeeAPPCodeDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.EmployeeTokenRelationDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.EmployeeTokenRelationDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.CustomerPersonRelationDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.CustomerPersonRelationDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.SupportConceptCostBearerRelDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.SupportConceptCostBearerRelDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.SupportConceptApprovalPeriodDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.SupportConceptApprovalPeriodDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.BudgetDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.ServiceCategoryDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.SupportConceptApprovalPeriodEmployeeRelDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.SupportConceptApprovalPeriodEmployeeRelDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.CustomerDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.CustomerDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.CustomerCostBearerRelationDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.CustomerCostBearerRelationDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.CustomerOrganisationRelationDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.CustomerOrganisationRelationDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.MedikamentenverordnungslisteDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.MedikamentenverordnungslisteDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.MedikamentenverordnungDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.MedikamentenverordnungDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.DarreichungsformDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.DepotRhythmusDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.MedArtDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.PlacementDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.PlacementDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.CustomerTeamRelationDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.CustomerTeamRelationDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.SupportConceptDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.SupportConceptDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.UserDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.ResetPasswordInfoDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.ResetPasswordInfoDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.SettingsDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.SettingsDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.UserGroupDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.UserGroupDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.ServiceAccountingDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.ServiceAccountingDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.ServiceDescriptionDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.PersonDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.OrganisationDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.OrganisationDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.OrganisationPersonRelationDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.OrganisationPersonRelationDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.AppointmentDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.AppointmentDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.AppointmentCategoryDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.MedArtDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.DarreichungsformDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.DepotRhythmusDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.WohnheimbuchungDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.WohnheimbuchungDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.Wohnheimbuchung2Costbearer2SupportConceptRelationDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Wohnheimbuchung2Costbearer2SupportConceptRelationDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.WohnheimbuchungEmployeeRelationDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.WohnheimbuchungEmployeeRelationDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.ServiceRecordDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.ServiceRecordDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.MedRecordDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.MedRecordDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.ChatMessageDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.ChatMessageDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.CustomerAPPCodeDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.CustomerAPPCodeDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.CustomerTokenRelationDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.CustomerTokenRelationDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.TimeSheetStatusItemDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.TimeSheetStatusItemDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.MailDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.MailDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.FileAttachmentDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.FileAttachmentDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.QuittierungsCheckViewListItemsDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.QuittierungsCheckViewListItemsDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.QuittierungsCheckDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.AbsenceReasonDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.WohnheimDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.WohnheimCustomerRelationDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.WohnheimCustomerRelationDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.WohnheimEmployeeRelationDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.WohnheimEmployeeRelationDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.AppointmentCategoryDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Compact.CompactPersonDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.Compact.CompactOrganisationDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.Compact.CompactPersonDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.Compact.CompactWohnheimDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Compact.CompactWohnheimDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.SupportConceptApprovalInterval))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.Bewilligungsart))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.SystemEntryID))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.AccountingIntervalType))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.AccountingvisibilityType))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.Behinderungsart>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.Behinderungsart))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.Merkzeichen>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.Merkzeichen))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.Pflegegrad))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.SettingsType))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.UserRightType>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.UserRightType))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.ServiceUnit))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.ZeiterfassungsDauer))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.ServiceRecordFormate))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.ServiceRecordTypeId))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.FileAttachmentType))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.TableID))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.Priority))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.Status))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<object>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.UserValidationResult))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.SupportPinDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.SupportPinDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.Compact.CompactUserDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Compact.CompactUserDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(byte[]))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.BeWoFolderDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.BeWoFolderDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.ValueListEntryType>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.RssFeed))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.RssItem>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.RssItem))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.QueryDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.QueryParamDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.QueryParamDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.QueryParameterType))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.Core.DateTimeSpan))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<System.Collections.Generic.List<string>>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.ResourceBookingFrequencyType))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.ParticipationAnswer))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.BookingSequenceDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.BookingSequenceDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.ResourceBookingDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.ResourceBookingDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.ResourceDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.ResourceDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.ResourceAppointmentDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.ResourceAppointmentDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.SchedulerAppointmentDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.SchedulerAppointmentDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.Employee2SchedulerAppointmentDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Employee2SchedulerAppointmentDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.Dictionary<BS.Shared.DataContracts.ValueListEntryDC, System.Collections.Generic.List<BS.Shared.DataContracts.ResourceDC>>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.Compact.CompactTokenDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.MessageType))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.HomeViewPanelType))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.ServiceRecordValidationResult))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.ServiceRecordValidationResult>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.UiElementType))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.Auszahlungsintervall))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.Zahlungstyp))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.VertretungsStatus))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.SchulbegleitenderZugehoerigkeitsTyp))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.StatementType))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.TextbausteinDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.TextbausteinDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.SbdConfigDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.FeiertagDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.FeiertagDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.SignatureDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.BudgetDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.FlexibleReportFilterDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.ServiceDescriptionDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.FlexibleReportResultDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.FlexibleReportDummyDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.FlexibleReportDummyDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.FlexibleReportEntryDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.FlexibleReportEntryDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.FlexibleReportLayoutDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.FlexibleReportLayoutDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.HomeViewPanelDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.HomeViewPanelDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.ReportTemplateDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.ReportTemplateDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.ReportTypes))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.AdditionalServiceBookingDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.AdditionalServiceBookingDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.AdditionalServiceRegionDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.AdditionalServiceDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.SupportConceptStatisticsDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.SupportConceptPeriodStatisticsDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.SupportConceptPeriodStatisticsDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.ServiceRecordValidationResultDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.ServiceRecordValidationResultDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.AdditionalServiceDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.AdditionalServiceRegionDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.LicenseInfoDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.GroupDurationDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.BeWoMobilBrowserInfoDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.UiElementDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.UiElementDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.TextModuleDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.TextModuleDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.BargeldkassenDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.BargeldkassenDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.BargeldtransaktionDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.BargeldtransaktionDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.NotizenKategorieDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.NotizenKategorieDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.NotizenEintragDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.NotizenEintragDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.VertretungDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.VertretungsItemDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.VertretungsItemDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.VertretungDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.TokenDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.VertretungsListeMitarbeiterItemsDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.VertretungsListeMitarbeiterItemsDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.VertretungsKlientAccountingsListeItemsDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.AccountingTransactionDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.AccountingTransactionDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.InvoiceDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.InvoiceDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.Settlement2DC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Settlement2DC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.InvoiceItemDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.InvoiceItemDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.ServiceCategoryDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.CustomerInfoDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.SupportConcetInfoDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.SupportConcetInfoDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.MandatorDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.ServiceRecordGroupDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.SupportConceptTreeNodeDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.SupportConceptTreeNodeDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.NodeType))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.SupportConceptTreeNodeDetailInfoDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.FLSAnalysisDataReportDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.FLSAnalysisDataGroupDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.FLSAnalysisDataGroupDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.FLSAnalysisDataDetailDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.FLSAnalysisDataDetailDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.ServiceRecordFLSOverviewDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.ServiceRecordFLSOverviewDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.ServiceRecordStatisticsInfoDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.ServiceRecordPeriodStatisticsInfoDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.ServiceRecordPeriodStatisticsInfoDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.ServiceRecordHistoryDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.ServiceRecordHistoryDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.AdditionalServiceGroupOfPeopleRelationDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.AdditionalServiceGroupOfPeopleRelationDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.AdditionalServiceGroupOfPeopleDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.AdditionalServiceGroupOfPeopleDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.Dictionary<string, string>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.Dictionary<BS.Shared.UserRightType, bool>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.Dictionary<long, bool>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.Dictionary<BS.Shared.DataContracts.ServiceRecordDC, System.Collections.Generic.List<BS.Shared.ServiceRecordValidationResult>>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.Dictionary<System.DateTime, BS.Shared.DataContracts.Compact.CompactCustomerDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.Dictionary<BS.Shared.DataContracts.Compact.CompactCustomerDC, System.Collections.Generic.List<BS.Shared.DataContracts.AccountingTransactionDC>>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.Dictionary<string, BS.Shared.DataContracts.Compact.CompactTokenDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.Dictionary<BS.Shared.DataContracts.Compact.CompactCustomerDC, bool>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Reports.AuslastungAnalysisRootDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.Reports.AuslastungAnalysisEmployeeDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Reports.AuslastungAnalysisEmployeeDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.Reports.AuslastungAnalysisSupportConceptDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Reports.AuslastungAnalysisSupportConceptDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.Reports.AuslastungAnalysisRootDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Reports.AccountingReportDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.Reports.AccountingReportRowDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Reports.AccountingReportRowDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.AccountingAnalysisDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.AccountingAnalysisDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.FLSAnalysisRootDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.FLSAnalysisRootDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.FLSAnalysisGroupDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.FLSAnalysisGroupDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.SupportConceptFLSOverviewDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.SupportConceptFLSOverviewDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.FLSAnalysisConfigDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.LoginDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.LoginDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.FinanceOverviewItemDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.FinanceOverviewItemDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.SupportConceptOverviewDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.SupportConceptOverviewDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.TaskDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.TaskDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.AnnualReportDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.AnnualReportDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.AnnualReportDataDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.AnnualReportDataDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.FLSReportType))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.InvoiceBaseDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.InvoiceBaseDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.ServiceInvoiceDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.ServiceInvoiceDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.ServiceInvoicePeriodDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.ServiceInvoicePeriodDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.InvoiceNumberDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.InvoiceType))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.IO.MemoryStream))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.IO.Stream))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<System.DateTime>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.Dictionary<BS.Shared.DataContracts.Compact.CompactEmployeeDC, decimal>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.MarshalByRefObject))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.QueryType))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.QueryDC>))]
object ConvertToNewSubstitutionType();
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/ICustomerService/GetAllActiveCustomers", ReplyAction="http://tempuri.org/ICustomerService/GetAllActiveCustomersResponse")]
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/ICustomerService/GetAllActiveCustomersBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
System.Collections.Generic.List<BS.Shared.DataContracts.CustomerDC> GetAllActiveCustomers();
@@ -1863,6 +2256,11 @@ namespace BeWo.ServiceProxy
return base.Channel.LoadContactInformationForCustomer(customerOid);
}
public object ConvertToNewSubstitutionType()
{
return base.Channel.ConvertToNewSubstitutionType();
}
public System.Collections.Generic.List<BS.Shared.DataContracts.CustomerDC> GetAllActiveCustomers()
{
return base.Channel.GetAllActiveCustomers();

View File

@@ -352,7 +352,7 @@
<GroupBox Header="Foto" Margin="8 8 0 0" Style="{StaticResource ObjectEditGroupBox}" Grid.Column="0" >
<Grid>
<dxe:ImageEdit MinWidth="250" MaxWidth="300" Height="250" x:Name="Img" Stretch="Uniform" HorizontalAlignment="Center" RenderOptions.BitmapScalingMode="HighQuality" MouseDoubleClick="Img_OnMouseDoubleClick"/>
<dxe:ImageEdit Background="Transparent" MinWidth="250" MaxWidth="250" Height="250" x:Name="Img" Stretch="Uniform" HorizontalAlignment="Center" RenderOptions.BitmapScalingMode="HighQuality" MouseDoubleClick="Img_OnMouseDoubleClick"/>
</Grid>
</GroupBox>

View File

@@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Globalization;
using System.Linq;
using System.ServiceModel;
@@ -53,7 +54,7 @@ namespace BeWo.View.Detail
public partial class CustomerView
{
private Dictionary<int, SystemEntryID> _AssessmentSheetCategory2SystemEntryID;
private BindingList<KeyValuePair<string, string>> _ChoosenDiagnosis;
private BindingList<KeyValuePair<string, string>> _ChosenDiagnosis;
private StringBuilder _LogText;
private OrganisationView _OrganisationModalPopUp;
@@ -261,7 +262,7 @@ namespace BeWo.View.Detail
internal CustomerVM ViewModel
{
get { return _ViewModel; }
get => _ViewModel;
set
{
@@ -274,27 +275,31 @@ namespace BeWo.View.Detail
tb_diag10.Visibility = Visibility.Collapsed;
}
Log(String.Format("ViewModel gesetzt. DataContext={0}", root.DataContext));
Log($"ViewModel gesetzt. DataContext={root.DataContext}");
if (_ViewModel != null && ShouldLog)
{
_ViewModel.EnableLogging(true, _LogText);
}
if (tabitem_schuldienst.Content != null)
if (tabroot.SelectedContent != null)
{
var view = tabitem_schuldienst.Content as StundenplanView;
if (view != null)
if (tabroot.SelectedContent is StundenplanView view)
{
view.ViewModel = value;
view.ViewModel = value.Arbeitszeiten;
view.RefreshView();
}
} else if(tabitem_stundenplan.Content != null && tabitem_stundenplan.Content is StundenplanView stundenplanView)
{
stundenplanView.ViewModel = value.Arbeitszeiten;
stundenplanView.RefreshView();
}
_saveInProgress = false;
}
}
public CustomerVM PublicViewModel { get { return _ViewModel; } }
public CustomerVM PublicViewModel => _ViewModel;
public static bool ShouldLog
{
@@ -339,9 +344,9 @@ namespace BeWo.View.Detail
_PersonModalPopUp.SaveData();
}
}
else if (_OrganisationModalPopUp != null)
else
{
_OrganisationModalPopUp.SaveData();
_OrganisationModalPopUp?.SaveData();
}
}
@@ -354,11 +359,10 @@ namespace BeWo.View.Detail
{
if (IsDirty)
{
MessageBoxResult lResult = this.ShowSaveQuestion();
var lResult = ShowSaveQuestion();
if (lResult == MessageBoxResult.Cancel)
{
this.Focus();
Focus();
return false;
}
@@ -369,20 +373,17 @@ namespace BeWo.View.Detail
if (!string.IsNullOrEmpty(message))
{
MessageBox.Show(message, "Änderungen speichern", MessageBoxButton.OK,
MessageBoxImage.Exclamation);
MessageBox.Show(message, "Änderungen speichern", MessageBoxButton.OK, MessageBoxImage.Exclamation);
return false;
}
this.SaveData();
SaveData();
}
}
return true;
}
protected override void Save()
{
if (!_saveInProgress)
@@ -417,8 +418,6 @@ namespace BeWo.View.Detail
{
ServiceFacade.DoCustomerServiceAsync(s => s.UpdateCustomer(cdc), AfterSave);
}
}
catch (FaultException<BeWoFault>)
{
@@ -476,66 +475,54 @@ namespace BeWo.View.Detail
var c = (gb.Content as Grid).FindFirstVisualChild<GridControl>();
_PossibleDiagnosis = new BindingList<KeyValuePair<string, string>>(new List<KeyValuePair<string, string>>(BeWoApp.ICD10Diagnosis));
_ChoosenDiagnosis = new BindingList<KeyValuePair<string, string>>();
_ChosenDiagnosis = new BindingList<KeyValuePair<string, string>>();
var ch = new List<KeyValuePair<string, string>>();
foreach (var code in ViewModel.ICD10Codes)
{
if (BeWoApp.ICD10Diagnosis.ContainsKey(code))
{
ch.Add(new KeyValuePair<string, string>(code, BeWoApp.ICD10Diagnosis[code]));
}
else
{
ch.Add(new KeyValuePair<string, string>(code, ""));
}
ch.Add(BeWoApp.ICD10Diagnosis.ContainsKey(code) ? new KeyValuePair<string, string>(code, BeWoApp.ICD10Diagnosis[code]) : new KeyValuePair<string, string>(code, string.Empty));
}
_ChoosenDiagnosis.AddRange(ch);
_ChosenDiagnosis.AddRange(ch);
_PossibleDiagnosis.RemoveRange(ch);
grid_choosenDiagnosis.ItemsSource = _ChoosenDiagnosis;
grid_choosenDiagnosis.ItemsSource = _ChosenDiagnosis;
c.ItemsSource = _PossibleDiagnosis;
}
private void AfterSave(long oid)
{
if(oid > 0)
this.Dispatch(delegate
{
Cache.GetInstance().ClearSupportConceptTree();
Cache.GetInstance().ClearCustomers();
if(BeWoApp.LoggedOnUser == null)
if (oid > 0)
{
return;
Cache.GetInstance().ClearSupportConceptTree();
Cache.GetInstance().ClearCustomers();
if (BeWoApp.LoggedOnUser == null)
{
return;
}
BeWoApp.MainControl.ResetView(UIContext.Customer);
ReloadViewModel(oid);
if (DoOwnChatSync && BeWoApp.AppSettings.IsChatAllowed)
{
BeWoUtils.OwnChatSynchronisationVeranlassen();
}
}
BeWoApp.MainControl.ResetView(UIContext.Customer);
ReloadViewModel(oid);
if(DoOwnChatSync && BeWoApp.AppSettings.IsChatAllowed)
{
BeWoUtils.OwnChatSynchronisationVeranlassen();
}
}
});
}
private void ReloadViewModel(long pCustomerOID)
{
// reload to update version information and oid
VMFactory.CreateCustomerVMAsync(pCustomerOID, cb => this.Dispatch(delegate {
ViewModel = cb;
if (tabitem_schuldienst.Content != null)
{
var view = tabitem_schuldienst.Content as SchulbegleitenderDienstCustomerView;
if (view != null)
{
view.ViewModel = cb;
}
}
UpdateUris();
}));
@@ -880,8 +867,8 @@ namespace BeWo.View.Detail
private void button_removeDiagnosis_Click(object sender, RoutedEventArgs e)
{
var item = _ChoosenDiagnosis.First(i => i.Key.Equals(((Control)sender).Tag));
_ChoosenDiagnosis.Remove(item);
var item = _ChosenDiagnosis.First(i => i.Key.Equals(((Control)sender).Tag));
_ChosenDiagnosis.Remove(item);
ViewModel.ICD10Codes.Remove(item.Key);
_PossibleDiagnosis.Add(item);
_PossibleDiagnosis.Sort((x, y) => x.Key.CompareTo(y.Key));
@@ -933,7 +920,7 @@ namespace BeWo.View.Detail
{
var item = (KeyValuePair<string, string>)grid.GetRow(rowHandle);
_PossibleDiagnosis.Remove(item);
_ChoosenDiagnosis.Add(item);
_ChosenDiagnosis.Add(item);
ViewModel.ICD10Codes.Add(item.Key);
MainControl.CloseCurrentPopUp();
}
@@ -1733,7 +1720,7 @@ namespace BeWo.View.Detail
{
if (tabitem_stundenplan.Content == null)
{
tabitem_stundenplan.Content = new StundenplanView(ViewModel, Translator.Translate("CustomerStundenplan"));
tabitem_stundenplan.Content = new StundenplanView(ViewModel.Arbeitszeiten, Translator.Translate("CustomerStundenplan"));
}
}

View File

@@ -89,12 +89,12 @@ namespace BeWo.View.Detail
{
_ViewModel = value;
DataContext = value;
if (tabitem_schuldienst.Content != null)
{
var view = tabitem_schuldienst.Content as StundenplanView;
if (view != null)
if (tabitem_schuldienst.Content is StundenplanView view)
{
view.ViewModel = value;
view.ViewModel = value.Arbeitszeiten;
view.RefreshView();
}
}
@@ -288,7 +288,7 @@ namespace BeWo.View.Detail
{
if (tabitem_schuldienst.Content == null)
{
tabitem_schuldienst.Content = new StundenplanView(ViewModel, Translator.Translate("OrganisationStundenplan"));
tabitem_schuldienst.Content = new StundenplanView(ViewModel.Arbeitszeiten, Translator.Translate("OrganisationStundenplan"));
}
}

View File

@@ -1,4 +1,5 @@
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Windows;
@@ -181,7 +182,10 @@ namespace BeWo.View.Navigation
private void OnLoaded(object sender, RoutedEventArgs e)
{
ReloadData(false);
ServiceFacade.DoCustomerServiceAsync(s => s.ConvertToNewSubstitutionType(), n => this.Dispatch(delegate
{
ReloadData(false);
}));
}
private void UpdateCustomFilter()
@@ -306,10 +310,11 @@ namespace BeWo.View.Navigation
ServiceFacade.DoCustomerServiceAsync(
s => s.GetAllCustomersCompact(BeWoApp.LoggedOnUser.Employee.EmployeeOid),
r => this.Dispatch(delegate
{
objectList = r;
mainNavigationView.ShowSearchResult(objectList);
}));
{
objectList = r;
mainNavigationView.ShowSearchResult(objectList);
}));
ServiceFacade.DoCustomerServiceAsync(s => s.GetLastOpenedCustomers(),
r =>

View File

@@ -2,271 +2,225 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:localView="clr-namespace:BeWo.View"
xmlns:localViewModel="clr-namespace:BeWo.ViewModel"
xmlns:controls1="clr-namespace:BeWo.Controls;assembly=BeWo.Controls"
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
Height="Auto" Width="Auto" HorizontalAlignment="Stretch"
xmlns:diagnostics="clr-namespace:System.Diagnostics;assembly=WindowsBase"
xmlns:controls="clr-namespace:BeWo.View.Controls"
xmlns:validation="clr-namespace:BeWo.Validation"
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
xmlns:core="clr-namespace:BS.Shared.Core;assembly=BS.Shared"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
xmlns:shared="clr-namespace:BS.Shared;assembly=BS.Shared"
xmlns:search="clr-namespace:BeWo.View.Search"
xmlns:markup="clr-namespace:BeWo.MultiLanguage.Markup"
VerticalAlignment="Stretch" Focusable="True">
<localView:BeWoView.Resources>
<ObjectDataProvider MethodName="GetValues"
ObjectType="{x:Type sys:Enum}"
x:Key="AppointmentDayOfWeeks">
<ObjectDataProvider.MethodParameters>
<x:Type TypeName="shared:AppointmentDayOfWeek" />
</ObjectDataProvider.MethodParameters>
</ObjectDataProvider>
</localView:BeWoView.Resources>
<Grid>
<Grid>
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d"
VerticalAlignment="Stretch" Focusable="True" d:DataContext="{d:DesignData ArbeitszeitVM}">
<localView:BeWoView.Resources>
<ObjectDataProvider MethodName="GetValues" ObjectType="{x:Type sys:Enum}" x:Key="AppointmentDayOfWeeks">
<ObjectDataProvider.MethodParameters>
<x:Type TypeName="shared:AppointmentDayOfWeek" />
</ObjectDataProvider.MethodParameters>
</ObjectDataProvider>
</localView:BeWoView.Resources>
<Grid>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<GroupBox x:Name="GroupHeader" Grid.ColumnSpan="2" Padding="5" Style="{StaticResource ObjectEditGroupBox}">
<Grid>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<StackPanel Orientation="Vertical" Grid.RowSpan="2">
<Button Content="{markup:Translate Neuen Zeitraum hinzufügen}" Margin="3" HorizontalAlignment="Left" IsEnabled="True" Click="ButtonOpenAndAddArbeitszeitClick" />
<TabControl x:Name="tabcontrol_Arbeitszeit" Margin="5" ItemsSource="{Binding Arbeitszeiten.VMList}">
<TabControl.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal">
<Label Content="{Binding ArbeitszeitString}" />
<Button
VerticalAlignment="Center" Height="20" Visibility="{Binding IsSelected, RelativeSource={RelativeSource AncestorType={x:Type TabItem}}, Converter={StaticResource BoolVisibilityConverter}}"
Click="btn_deleteArbeitszeit_Click" Name="btn_deleteContract"
ToolTip="{markup:Translate Plan löschen}"
Style="{DynamicResource CloseButtonStyle}" Margin="0" />
</StackPanel>
</DataTemplate>
</TabControl.ItemTemplate>
<Button Content="{markup:Translate Neuen Zeitraum hinzufügen}" Margin="3" HorizontalAlignment="Left" IsEnabled="True" Click="ButtonOpenAndAddArbeitszeitClick" />
<TabControl x:Name="tabcontrol_Arbeitszeit" Margin="5" ItemsSource="{Binding VMList, UpdateSourceTrigger=PropertyChanged}">
<TabControl.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal">
<Label Content="{Binding ArbeitszeitString}" />
<Button VerticalAlignment="Center" Height="20" Visibility="{Binding IsSelected, RelativeSource={RelativeSource AncestorType={x:Type TabItem}}, Converter={StaticResource BoolVisibilityConverter}}"
Click="btn_deleteArbeitszeit_Click" Name="btn_deleteContract" ToolTip="{markup:Translate Plan löschen}" Style="{DynamicResource CloseButtonStyle}" Margin="0" />
</StackPanel>
</DataTemplate>
</TabControl.ItemTemplate>
<TabControl.ContentTemplate>
<DataTemplate>
<ScrollViewer HorizontalScrollBarVisibility="Auto"
VerticalScrollBarVisibility="Auto">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<GroupBox Margin="5" Style="{DynamicResource ObjectEditGroupBox}">
<GroupBox.Header>
<DataTemplate>
<ScrollViewer HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="23" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<TextBlock Text="Details" Margin="0 1" Grid.Row="1" Name="Details"
VerticalAlignment="Bottom"
TextElement.FontSize="16"
TextElement.Foreground="{StaticResource TabItemHotTextBrush}"
TextElement.FontFamily="Microsoft Sans Serif"
/>
<Grid Margin="0" Grid.Row="0" Grid.ColumnSpan="2">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<GroupBox Margin="5" Style="{DynamicResource ObjectEditGroupBox}" x:Name="ArbeitszeiteintragsContainer">
<GroupBox.Header>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="23" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<TextBlock Text="Details" Margin="0 1" Grid.Row="1" Name="Details" VerticalAlignment="Bottom" TextElement.FontSize="16" TextElement.Foreground="{StaticResource TabItemHotTextBrush}" TextElement.FontFamily="Microsoft Sans Serif" />
<Grid Margin="0" Grid.Row="0" Grid.ColumnSpan="2" Grid.Column="0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Label Grid.Column="0" Grid.Row="0" Margin="0,3,3,3" VerticalAlignment="Center" >Gültig von</Label>
<Label Grid.Column="2" Grid.Row="0" Margin="3" VerticalAlignment="Center">Gültig bis</Label>
<Label Grid.Column="0" Grid.Row="0" Margin="0,3,3,3" VerticalAlignment="Center">Gültig von</Label>
<Label Grid.Column="2" Grid.Row="0" Margin="3" VerticalAlignment="Center">Gültig bis</Label>
<dxe:DateEdit MaskType="DateTimeAdvancingCaret" AllowNullInput="True" Grid.Column="1" Grid.Row="0" Margin="3" Width="125" Height="23" EditValue="{Binding Path=GueltigVon, UpdateSourceTrigger=PropertyChanged}"/>
<dxe:DateEdit MaskType="DateTimeAdvancingCaret" AllowNullInput="True" Grid.Column="3" Grid.Row="0" Margin="3" Width="125" Height="23" EditValue="{Binding Path=GueltigBis, UpdateSourceTrigger=PropertyChanged}"/>
<dxe:DateEdit MaskType="DateTimeAdvancingCaret" AllowNullInput="True" Grid.Column="1" Grid.Row="0" Margin="3" Width="125" Height="23" EditValue="{Binding Path=GueltigVon, UpdateSourceTrigger=PropertyChanged}" />
<dxe:DateEdit MaskType="DateTimeAdvancingCaret" AllowNullInput="True" Grid.Column="3" Grid.Row="0" Margin="3" Width="125" Height="23" EditValue="{Binding Path=GueltigBis, UpdateSourceTrigger=PropertyChanged}" />
<Button Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" Content="{markup:Translate Neuen Eintrag hinzufügen}" HorizontalAlignment="Left" Click="AddArbeitszeitToView_Click" Height="23" Margin="0,10,0,0" />
<controls:PopupNonTopmost Name="popup_newArbeitszeitEintrag" Placement="MousePoint" StaysOpen="True">
<Border Background="White" Padding="3" BorderThickness="1" BorderBrush="Gray">
<GroupBox Name="groupbox_newArbeistzeit" Header="Neuen Eintrag hinzufügen" Style="{DynamicResource ObjectEditGroupBox}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Label Grid.Column="0" Grid.Row="0" Margin="3" VerticalAlignment="Center">Tag</Label>
<Label Grid.Column="0" Grid.Row="1" Margin="3" VerticalAlignment="Center" Content="{markup:Translate Mitarbeiter/in}"/>
<Label Grid.Column="0" Grid.Row="2" Margin="3" VerticalAlignment="Center">Uhrzeit von</Label>
<Label Grid.Column="0" Grid.Row="3" Margin="3" VerticalAlignment="Center">Uhrzeit bis</Label>
<Label Grid.Column="0" Grid.Row="4" Margin="3" VerticalAlignment="Top">Bemerkungen</Label>
<controls1:PopUpEdit Cursor="Arrow"
IsReadOnly="True"
x:Name="popupedit_MitarbeiterSearch" Grid.Column="1" Margin="3" Height="23"
Grid.Row="1" DeleteButtonVisibility="Collapsed"
PopUpClick="Popupedit_MitarbeiterSearch_OnPopUpClick" />
<dxe:ComboBoxEdit Grid.Column="1" Grid.Row="0" VerticalContentAlignment="Center" Margin="3" Height="23" ItemsSource="{Binding Source={StaticResource AppointmentDayOfWeeks}}"
EditValue="{validation:ValidationBinding Path=ArbeitszeitEintraege.NewVM.Tag, UpdateSourceTrigger=PropertyChanged}"
Name="Tag" IsTextEditable="False"/>
<dxe:TextEdit Grid.Column="1" Grid.Row="2" MaskType="RegEx" Mask="(0?\d|1\d|2[0-3]):[0-5]\d" ShowError="False" MaskShowPlaceHolders="True" Name="UhrzeitVon"
MaskUseAsDisplayFormat="True" InvalidValueBehavior="AllowLeaveEditor"
EditValue="{validation:ValidationBinding Path=ArbeitszeitEintraege.NewVM.UhrzeitVon, UpdateSourceTrigger=PropertyChanged}"
Height="23"
Margin="3,3,3,3"/>
<dxe:TextEdit Grid.Column="1" Grid.Row="3" MaskType="RegEx" Mask="(0?\d|1\d|2[0-3]):[0-5]\d" ShowError="False" MaskShowPlaceHolders="True" Name="UhrzeitBis"
MaskUseAsDisplayFormat="True" InvalidValueBehavior="AllowLeaveEditor"
EditValue="{validation:ValidationBinding Path=ArbeitszeitEintraege.NewVM.UhrzeitBis, UpdateSourceTrigger=PropertyChanged}"
Height="23"
Margin="3,3,3,3"/>
<dxe:TextEdit Grid.Column="1" Grid.Row="4" Grid.RowSpan="2" Name="Notiz" Margin="3,3,3,3" TextWrapping="Wrap" AcceptsReturn="True" Width="250" Height="125" VerticalContentAlignment="Top" VerticalScrollBarVisibility="Auto"
EditValue="{validation:ValidationBinding Path=ArbeitszeitEintraege.NewVM.Notice, UpdateSourceTrigger=PropertyChanged}"/>
<StackPanel Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="6" Orientation="Horizontal" HorizontalAlignment="Right">
<Button Click="PopupNewArbeitszeit_Click" Content="Hinzufügen" Height="25"
FontWeight="Normal" Margin="3" VerticalAlignment="Center" HorizontalAlignment="Right" />
<Button HorizontalAlignment="Right" VerticalAlignment="Center" Height="25"
Margin="3" Content="Abbrechen" Click="PopupArbeitszeitClose_Click" />
</StackPanel>
<Button Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" Content="{markup:Translate Neuen Eintrag hinzufügen}" HorizontalAlignment="Left" Click="AddArbeitszeitToView_Click" Height="23" Margin="0,10,0,0"/>
</Grid>
</GroupBox>
</Border>
</controls:PopupNonTopmost>
</Grid>
</Grid>
</GroupBox.Header>
<dxg:GridControl Name="grid_Arbeitszeiten" Tag="{Binding}" ItemsSource="{Binding Path=ArbeitszeitEintraege.VMList, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}" CustomColumnSort="GridControl_OnCustomColumnSort">
<dxg:GridControl.Columns>
<dxg:GridColumn FieldName="x" Header="">
<dxg:GridColumn.CellTemplate>
<DataTemplate>
<Button Content="r" FontFamily="Webdings" Click="RemoveArbeitszeit_OnClick" Width="18" Height="18" VerticalAlignment="Center" />
</DataTemplate>
</dxg:GridColumn.CellTemplate>
</dxg:GridColumn>
<controls:PopupNonTopmost Name="popup_newArbeitszeitEintrag" Placement="MousePoint" StaysOpen="True" >
<Border Background="White" Padding="3" BorderThickness="1" BorderBrush="Gray">
<GroupBox Name="groupbox_newArbeistzeit" Header="Neuen Eintrag hinzufügen" Style="{DynamicResource ObjectEditGroupBox}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<dxg:GridColumn Header="Tag" FieldName="Tag" SortOrder="Ascending" SortMode="Custom">
<dxg:GridColumn.EditSettings>
<dxe:ComboBoxEditSettings ItemsSource="{Binding Source={StaticResource AppointmentDayOfWeeks}}" />
</dxg:GridColumn.EditSettings>
</dxg:GridColumn>
<Label Grid.Column="0" Grid.Row="0" Margin="3" VerticalAlignment="Center">Tag</Label>
<Label Grid.Column="0" Grid.Row="1" Margin="3" VerticalAlignment="Center" Content="{markup:Translate Mitarbeiter/in}"/>
<Label Grid.Column="0" Grid.Row="2" Margin="3" VerticalAlignment="Center">Uhrzeit von</Label>
<Label Grid.Column="0" Grid.Row="3" Margin="3" VerticalAlignment="Center">Uhrzeit bis</Label>
<Label Grid.Column="0" Grid.Row="4" Margin="3" VerticalAlignment="Top">Bemerkungen</Label>
<dxg:GridColumn Header="Uhrzeit von" FieldName="UhrzeitVon" >
<dxg:GridColumn.EditSettings>
<dxe:TextEditSettings MaskType="RegEx" Mask="(0?\d|1\d|2[0-3]):[0-5]\d" MaskShowPlaceHolders="True" MaskUseAsDisplayFormat="True" />
</dxg:GridColumn.EditSettings>
</dxg:GridColumn>
<controls1:PopUpEdit Cursor="Arrow"
IsReadOnly="True"
x:Name="popupedit_MitarbeiterSearch" Grid.Column="1" Margin="3" Height="23"
Grid.Row="1" DeleteButtonVisibility="Collapsed"
PopUpClick="Popupedit_MitarbeiterSearch_OnPopUpClick" />
<dxe:ComboBoxEdit Grid.Column="1" Grid.Row="0" VerticalContentAlignment="Center" Margin="3" Height="23" ItemsSource="{Binding Source={StaticResource AppointmentDayOfWeeks}}"
EditValue="{validation:ValidationBinding Path=ArbeitszeitEintraege.NewVM.Tag, UpdateSourceTrigger=PropertyChanged}"
Name="Tag" IsTextEditable="False"/>
<dxe:TextEdit Grid.Column="1" Grid.Row="2" MaskType="RegEx" Mask="(0?\d|1\d|2[0-3]):[0-5]\d" ShowError="False" MaskShowPlaceHolders="True" Name="UhrzeitVon"
MaskUseAsDisplayFormat="True" InvalidValueBehavior="AllowLeaveEditor"
EditValue="{validation:ValidationBinding Path=ArbeitszeitEintraege.NewVM.UhrzeitVon, UpdateSourceTrigger=PropertyChanged}"
Height="23"
Margin="3,3,3,3"/>
<dxe:TextEdit Grid.Column="1" Grid.Row="3" MaskType="RegEx" Mask="(0?\d|1\d|2[0-3]):[0-5]\d" ShowError="False" MaskShowPlaceHolders="True" Name="UhrzeitBis"
MaskUseAsDisplayFormat="True" InvalidValueBehavior="AllowLeaveEditor"
EditValue="{validation:ValidationBinding Path=ArbeitszeitEintraege.NewVM.UhrzeitBis, UpdateSourceTrigger=PropertyChanged}"
Height="23"
Margin="3,3,3,3"/>
<dxe:TextEdit Grid.Column="1" Grid.Row="4" Grid.RowSpan="2" Name="Notiz" Margin="3,3,3,3" TextWrapping="Wrap" AcceptsReturn="True" Width="250" Height="125" VerticalContentAlignment="Top" VerticalScrollBarVisibility="Auto"
EditValue="{validation:ValidationBinding Path=ArbeitszeitEintraege.NewVM.Notice, UpdateSourceTrigger=PropertyChanged}"/>
<StackPanel Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="6" Orientation="Horizontal" HorizontalAlignment="Right">
<Button Click="PopupNewArbeitszeit_Click" Content="Hinzufügen" Height="25"
FontWeight="Normal" Margin="3" VerticalAlignment="Center" HorizontalAlignment="Right" />
<Button HorizontalAlignment="Right" VerticalAlignment="Center" Height="25"
Margin="3" Content="Abbrechen" Click="PopupArbeitszeitClose_Click" />
</StackPanel>
</Grid>
</GroupBox>
</Border>
</controls:PopupNonTopmost>
</Grid>
<dxg:GridColumn Header="Uhrzeit bis" FieldName="UhrzeitBis">
<dxg:GridColumn.EditSettings>
<dxe:TextEditSettings MaskType="RegEx" Mask="(0?\d|1\d|2[0-3]):[0-5]\d" MaskShowPlaceHolders="True" MaskUseAsDisplayFormat="True" />
</dxg:GridColumn.EditSettings>
</dxg:GridColumn>
<dxg:GridColumn Header="{markup:Translate Mitarbeiter/in}" FieldName="Employee" ReadOnly="True">
<dxg:GridColumn.EditTemplate>
<ControlTemplate>
<controls1:PopUpEdit Cursor="Arrow" IsReadOnly="True" x:Name="popupedit_MitarbeiterColumn" Margin="3" Height="23" DeleteButtonVisibility="Visible"
Text="{Binding RowData.Row.Employee, Mode=OneWay}" DeleteClick="Popupedit_MitarbeiterColumn_OnDeleteClick" PopUpClick="Popupedit_MitarbeiterColumn_OnPopUpClick" />
</ControlTemplate>
</dxg:GridColumn.EditTemplate>
</dxg:GridColumn>
<dxg:GridColumn Header="Bemerkungen" FieldName="Notice" />
</dxg:GridControl.Columns>
<dxg:GridControl.View>
<dxg:TableView NavigationStyle="Cell" Margin="2,2,2,2" AllowBestFit="True" BestFitMode="AllRows" AutoWidth="True" ShowGroupPanel="False" ShowGroupedColumns="False" ShowTotalSummary="False" HorizontalContentAlignment="Left" ShowingEditor="GridViewBase_OnShowingEditor" />
</dxg:GridControl.View>
</dxg:GridControl>
</GroupBox>
</Grid>
</GroupBox.Header>
<dxg:GridControl Name="grid_Arbeitszeiten" Tag="{Binding}" MaxWidth="{Binding ElementName=BlubbTest, Path=ActualWidth}" DataSource="{Binding Path=ArbeitszeitEintraege.VMList, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}" CustomColumnSort="GridControl_OnCustomColumnSort" >
<dxg:GridControl.Columns>
<dxg:GridColumn FieldName="x" Header="" Width="25" FixedWidth="True" >
<dxg:GridColumn.CellTemplate>
<DataTemplate>
<Button Content="r" FontFamily="Webdings" Click="RemoveArbeitszeit_OnClick" Width="18" Height="18" VerticalAlignment="Center" />
</DataTemplate>
</dxg:GridColumn.CellTemplate>
</dxg:GridColumn>
<dxg:GridColumn Header="Tag" FixedWidth="True" Width="100" FieldName="Tag" SortOrder="Ascending" SortMode="Custom">
<dxg:GridColumn.EditSettings>
<dxe:ComboBoxEditSettings ItemsSource="{Binding Source={StaticResource AppointmentDayOfWeeks}}" />
</dxg:GridColumn.EditSettings>
</dxg:GridColumn>
<dxg:GridColumn Header="Uhrzeit von" FixedWidth="True" Width="250" FieldName="UhrzeitVon" >
<dxg:GridColumn.EditSettings>
<dxe:TextEditSettings MaskType="RegEx" Mask="(0?\d|1\d|2[0-3]):[0-5]\d" MaskShowPlaceHolders="True" MaskUseAsDisplayFormat="True"/>
</dxg:GridColumn.EditSettings>
</dxg:GridColumn>
<dxg:GridColumn Header="Uhrzeit bis" FixedWidth="True" Width="250" FieldName="UhrzeitBis">
<dxg:GridColumn.EditSettings>
<dxe:TextEditSettings MaskType="RegEx" Mask="(0?\d|1\d|2[0-3]):[0-5]\d" MaskShowPlaceHolders="True" MaskUseAsDisplayFormat="True"/>
</dxg:GridColumn.EditSettings>
</dxg:GridColumn>
<dxg:GridColumn Header="{markup:Translate Mitarbeiter/in}" FixedWidth="True" Width="220" FieldName="Employee" ReadOnly="True" >
<dxg:GridColumn.EditTemplate>
<ControlTemplate>
<controls1:PopUpEdit Cursor="Arrow"
IsReadOnly="True"
x:Name="popupedit_MitarbeiterColumn" Margin="3" Height="23"
DeleteButtonVisibility="Visible"
Text="{Binding RowData.Row.Employee, Mode=OneWay}"
DeleteClick="Popupedit_MitarbeiterColumn_OnDeleteClick"
PopUpClick="Popupedit_MitarbeiterColumn_OnPopUpClick" />
</ControlTemplate>
</dxg:GridColumn.EditTemplate>
</dxg:GridColumn>
<dxg:GridColumn Header="Bemerkungen" FixedWidth="True" Width="500" FieldName="Notice"/>
</dxg:GridControl.Columns>
<dxg:GridControl.View>
<dxg:TableView NavigationStyle="Cell" Margin="2,2,2,2" AutoWidth="True" ShowGroupPanel="False" ShowGroupedColumns="False" ShowTotalSummary="False" HorizontalContentAlignment="Left" ShowingEditor="GridViewBase_OnShowingEditor"/>
</dxg:GridControl.View>
</dxg:GridControl>
</GroupBox>
</Grid>
</ScrollViewer>
</DataTemplate>
</ScrollViewer>
</DataTemplate>
</TabControl.ContentTemplate>
</TabControl>
</TabControl>
</StackPanel>
</Grid>
</GroupBox>
</Grid>
<Popup Margin="10" x:Name="popup_Mitarbeiter" StaysOpen="False" Placement="MousePoint" Width="370" Height="250"
Closed="popup_Closed" Opened="popup_Opened">
<search:EmployeeSearchView ItemSelected="EmployeeSearchView_ItemSelected" x:Name="MitarbeiterSearchView" />
</Popup>
<Popup Margin="10" x:Name="popup_MitarbeiterColumn" StaysOpen="False" Placement="MousePoint" Width="370" Height="250"
Closed="popup_Closed" Opened="popup_Opened">
<search:EmployeeSearchView ItemSelected="EmployeeSearchViewColumn_ItemSelected" x:Name="MitarbeiterSearchViewColumn" />
</Popup>
</Grid>
</Grid>
<Popup Margin="10" x:Name="popup_Mitarbeiter" StaysOpen="False" Placement="MousePoint" Width="370" Height="250" Closed="popup_Closed" Opened="popup_Opened">
<search:EmployeeSearchView ItemSelected="EmployeeSearchView_ItemSelected" x:Name="MitarbeiterSearchView" />
</Popup>
<Popup Margin="10" x:Name="popup_MitarbeiterColumn" StaysOpen="False" Placement="MousePoint" Width="370" Height="250" Closed="popup_Closed" Opened="popup_Opened">
<search:EmployeeSearchView ItemSelected="EmployeeSearchViewColumn_ItemSelected" x:Name="MitarbeiterSearchViewColumn" />
</Popup>
</Grid>
</localView:BeWoView>

View File

@@ -1,33 +1,15 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.IO;
using System.Linq;
using System.Linq;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Controls.Primitives;
using System.Windows.Documents;
using System.Windows.Forms.VisualStyles;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Navigation;
using System.Windows.Threading;
using BeWo.Controls;
using BeWo.Core;
using BeWo.ViewModel;
using BeWo.ServiceProxy;
using BeWo.Validation;
using BeWo.View.Controls;
using BeWo.View.Search;
using BeWo.ViewModel.ListViewModel;
using BS.Shared.DataContracts;
using BS.Shared.Extensions;
using BS.Shared;
using BS.Shared.Core;
using BS.Shared.DataContracts.Compact;
using DevExpress.Xpf.Editors;
using DevExpress.Xpf.Grid;
using Microsoft.Win32;
namespace BeWo.View
{
@@ -38,14 +20,10 @@ namespace BeWo.View
public partial class StundenplanView
{
private IArbeitszeitenVM _ViewModel;
private ArbeitszeitListVM _ViewModel;
private CompactEmployeeDC _lastSeletedEmployee;
//private CompactEmployeeDC _lastSeletedEmployee;
public StundenplanView(IArbeitszeitenVM vm, String title)
public StundenplanView(ArbeitszeitListVM vm, string title)
{
InitializeComponent();
@@ -59,14 +37,12 @@ namespace BeWo.View
}
};
ViewModel = vm;
}
public IArbeitszeitenVM ViewModel
public ArbeitszeitListVM ViewModel
{
get { return _ViewModel; }
get => _ViewModel;
set
{
@@ -77,24 +53,22 @@ namespace BeWo.View
public void RefreshView()
{
DataContext = null; // Sonst refresht die GUI nach den Save nicht richtig
DataContext = null;
DataContext = _ViewModel;
//if (_ViewModel != null && _ViewModel.Arbeitszeiten != null)
//{
// tabcontrol_Arbeitszeit.ItemsSource = _ViewModel.Arbeitszeiten.VMList;
//}
if (tabcontrol_Arbeitszeit.Items.Count > 0)
{
tabcontrol_Arbeitszeit.SelectedIndex = tabcontrol_Arbeitszeit.Items.Count - 1;
}
}
private void ButtonOpenAndAddArbeitszeitClick(object sender, RoutedEventArgs e)
{
ViewModel.Arbeitszeiten.AddNewVMToList();
ViewModel.AddNewVMToList();
tabcontrol_Arbeitszeit.SelectedIndex = tabcontrol_Arbeitszeit.Items.Count - 1;
}
private void PopupNewArbeitszeit_Click(object sender, RoutedEventArgs e)
{
var vali = tabcontrol_Arbeitszeit.GetAllChildren().OfType<PopupNonTopmost>();
@@ -105,9 +79,7 @@ namespace BeWo.View
{
var tab = tabcontrol_Arbeitszeit.Items.GetItemAt(tabcontrol_Arbeitszeit.SelectedIndex);
var avm = tab as ArbeitszeitVM;
if (avm != null)
if (tab is ArbeitszeitVM avm)
{
if (_lastSeletedEmployee != null)
{
@@ -115,9 +87,10 @@ namespace BeWo.View
_lastSeletedEmployee = null;
}
if (letztesPopUpEdit != null)
{
letztesPopUpEdit.Text = "";
letztesPopUpEdit.Text = string.Empty;
}
avm.ArbeitszeitEintraege.AddNewVMToList();
@@ -131,7 +104,7 @@ namespace BeWo.View
{
var arbeitszeit = tabcontrol_Arbeitszeit.SelectedItem as ArbeitszeitVM;
ViewModel.Arbeitszeiten.VMList.Remove(arbeitszeit);
ViewModel.VMList.Remove(arbeitszeit);
}
@@ -159,27 +132,31 @@ namespace BeWo.View
var grid_ArbeitszeitEintrag = popup.First(x => x.Name.Equals("grid_Arbeitszeiten"));
var cv = grid_ArbeitszeitEintrag.GetCurrentValue<ArbeitszeitEintragVM>().CommitToDataContract();
var listenOid = cv.ArbeitszeitEintragOid;
if (listenOid == null)
return;
var selectedArbeitszeitEintrag = grid_ArbeitszeitEintrag.GetCurrentValue<ArbeitszeitEintragVM>();
var selectedDataContract = selectedArbeitszeitEintrag.CommitToDataContract();
var listenOid = selectedDataContract.ArbeitszeitEintragOid;
var selectedTabItem = tabcontrol_Arbeitszeit.Items.GetItemAt(tabcontrol_Arbeitszeit.SelectedIndex);
var viewModel = (ArbeitszeitVM) selectedTabItem;
var eintrag2Delete = grid_ArbeitszeitEintrag.GetCurrentValue<ArbeitszeitEintragVM>();
var antwort = MessageBox.Show("Sind Sie sicher, dass Sie den Arbeitszeit Eintrag löschen wollen?", "Löschen", MessageBoxButton.OKCancel, MessageBoxImage.Question);
if (antwort.Equals(MessageBoxResult.Cancel))
return;
ServiceFacade.DoEmployeeServiceSync(a => a.DeleteArbeitszeitEintrag(listenOid.Value));
var tab = tabcontrol_Arbeitszeit.Items.GetItemAt(tabcontrol_Arbeitszeit.SelectedIndex);
var avm = tab as ArbeitszeitVM;
if (avm != null)
{
avm.ArbeitszeitEintraege.VMList.Remove(grid_ArbeitszeitEintrag.GetCurrentValue<ArbeitszeitEintragVM>());
return;
}
if (listenOid.HasValue)
{
ServiceFacade.DoEmployeeServiceSync(a => a.DeleteArbeitszeitEintrag(listenOid.Value));
return;
}
viewModel.ArbeitszeitEintraege.VMList.Remove(eintrag2Delete);
grid_ArbeitszeitEintrag.RefreshData();
}
@@ -192,7 +169,7 @@ namespace BeWo.View
}
private PopUpEdit letztesPopUpEdit = null;
private PopUpEdit letztesPopUpEdit;
private ArbeitszeitEintragVM _lastSeletedEintrag;
private void Popupedit_MitarbeiterSearch_OnPopUpClick(object sender, RoutedEventArgs e)
@@ -217,7 +194,7 @@ namespace BeWo.View
_lastSeletedEmployee = e.Data;
if (letztesPopUpEdit != null)
{
letztesPopUpEdit.Text = String.Format("{0} {1}", _lastSeletedEmployee.FirstName, _lastSeletedEmployee.LastName);
letztesPopUpEdit.Text = $"{_lastSeletedEmployee.FirstName} {_lastSeletedEmployee.LastName}";
letztesPopUpEdit.Focus();
}
}
@@ -226,11 +203,8 @@ namespace BeWo.View
{
popup_MitarbeiterColumn.IsOpen = false;
_lastSeletedEintrag.Employee = e.Data;
if (letztesPopUpEdit != null)
{
//letztesPopUpEdit.Text = String.Format("{0} {1}", _lastSeletedEmployee.FirstName, _lastSeletedEmployee.LastName);
letztesPopUpEdit.Focus();
}
//letztesPopUpEdit.Text = String.Format("{0} {1}", _lastSeletedEmployee.FirstName, _lastSeletedEmployee.LastName);
letztesPopUpEdit?.Focus();
}
private void GridViewBase_OnShowingEditor(object sender, ShowingEditorEventArgs e)
@@ -244,5 +218,4 @@ namespace BeWo.View
_lastSeletedEintrag.Employee = null;
}
}
}

View File

@@ -1,11 +1,7 @@
using BS.Shared;
using BS.Shared.DataContracts;
using System;
using System.Collections.Generic;
using BeWo.ServiceProxy;
using BeWo.Validation;
using BS.Shared.DataContracts.Compact;
using BS.Shared.Extensions;
namespace BeWo.ViewModel
{
@@ -33,39 +29,26 @@ namespace BeWo.ViewModel
private string _Notice;
private string _Klient;
private CompactCustomerDC _CompactCustomer;
private CompactEmployeeDC _CompactEmployee;
public ArbeitszeitEintragVM()
public ArbeitszeitEintragVM(ArbeitszeitEintragDC pDC) : base(pDC, pDC.ArbeitszeitEintragOid == null)
{
}
public ArbeitszeitEintragVM(ArbeitszeitEintragDC pDC)
: base(pDC, pDC.ArbeitszeitEintragOid == null)
{
}
public override bool IsDirty
{
get { return base.IsDirty; }
}
[Validation(ValidationRule = ValidationRules.NotNullOrStringEmpty)]
public string UhrzeitVon
{
get { return this._UhrzeitVon; }
get => _UhrzeitVon;
set
{
if (this.AreDifferent(this._UhrzeitVon, value))
if(AreDifferent(_UhrzeitVon, value))
{
this._UhrzeitVon = value;
this.StoreDirtyInformation(this.AreDifferent(this.DataContract.UhrzeitVon, value), PropertyName_UhrzeitVon);
this.FirePropertyChanged(PropertyName_UhrzeitVon);
_UhrzeitVon = value;
StoreDirtyInformation(AreDifferent(DataContract.UhrzeitVon, value), PropertyName_UhrzeitVon);
FirePropertyChanged(PropertyName_UhrzeitVon);
}
}
}
@@ -73,15 +56,15 @@ namespace BeWo.ViewModel
[Validation(ValidationRule = ValidationRules.NotNullOrStringEmpty)]
public string UhrzeitBis
{
get { return this._UhrzeitBis; }
get => _UhrzeitBis;
set
{
if (this.AreDifferent(this._UhrzeitBis, value))
if(AreDifferent(_UhrzeitBis, value))
{
this._UhrzeitBis = value;
this.StoreDirtyInformation(this.AreDifferent(this.DataContract.UhrzeitBis, value), PropertyName_UhrzeitBis);
this.FirePropertyChanged(PropertyName_UhrzeitBis);
_UhrzeitBis = value;
StoreDirtyInformation(AreDifferent(DataContract.UhrzeitBis, value), PropertyName_UhrzeitBis);
FirePropertyChanged(PropertyName_UhrzeitBis);
}
}
}
@@ -89,22 +72,22 @@ namespace BeWo.ViewModel
public AppointmentDayOfWeek Tag
{
get { return this._Tag; }
get => _Tag;
set
{
if (this.AreDifferent(this._Tag, value))
if(AreDifferent(_Tag, value))
{
this._Tag = value;
this.StoreDirtyInformation(this.AreDifferent(this.DataContract.Tag, value), PropertyName_Tag);
this.FirePropertyChanged(PropertyName_Tag);
_Tag = value;
StoreDirtyInformation(AreDifferent(DataContract.Tag, value), PropertyName_Tag);
FirePropertyChanged(PropertyName_Tag);
}
}
}
public string Notice
{
get { return _Notice; }
get => _Notice;
set
{
@@ -118,53 +101,37 @@ namespace BeWo.ViewModel
}
}
public string Klient
{
get { return _Klient; }
set
{
if (AreDifferent(_Klient, value))
{
_Notice = value;
//StoreDirtyInformation(AreDifferent(DataContract.Klient, value), PropertyName_Klient);
FirePropertyChanged(PropertyName_Klient);
}
}
}
public string Klient => _CompactCustomer?.FullName;
public CompactCustomerDC CompactCustomer
{
get { return _CompactCustomer; }
get => _CompactCustomer;
set
{
if (AreDifferent(_CompactCustomer, value))
{
_CompactCustomer = value;
StoreDirtyInformation(AreDifferent(DataContract.CustomerOid, value.CustomerOid),
PropertyName_CompactCustomer);
FirePropertyChanged(PropertyName_CompactCustomer);
this._Klient = value.FullName;
FirePropertyChanged(PropertyName_Klient);
StoreDirtyInformation(AreDifferent(DataContract.CustomerOid, value.CustomerOid), PropertyName_CompactCustomer);
FirePropertyChanged(nameof(CompactCustomer));
FirePropertyChanged(nameof(Klient));
}
}
}
public CompactEmployeeDC Employee
{
get { return _CompactEmployee; }
get => _CompactEmployee;
set
{
if (AreDifferent(_CompactEmployee, value))
{
_CompactEmployee = value;
StoreDirtyInformation(AreDifferent(DataContract.Employee, value),
PropertyName_CompactEmployee);
StoreDirtyInformation(AreDifferent(DataContract.Employee, value), PropertyName_CompactEmployee);
FirePropertyChanged(PropertyName_CompactEmployee);
}
}
}
@@ -172,25 +139,12 @@ namespace BeWo.ViewModel
protected override void InitByDataContract(ArbeitszeitEintragDC pDataContract)
{
this._Tag = pDataContract.Tag;
this._UhrzeitVon = pDataContract.UhrzeitVon;
this._UhrzeitBis = pDataContract.UhrzeitBis;
this._Notice = pDataContract.Notice;
this._CompactEmployee = pDataContract.Employee;
if (pDataContract.CustomerOid != null)
{
var kli = ServiceFacade.DoCustomerServiceSync(r => r.GetAllActiveCompactCustomers());
foreach (var customer in kli)
{
if (customer.CustomerOid == pDataContract.CustomerOid.Value)
{
this._Klient = customer.FullName;
this._CompactCustomer = customer;
}
}
}
_Tag = pDataContract.Tag;
_UhrzeitVon = pDataContract.UhrzeitVon;
_UhrzeitBis = pDataContract.UhrzeitBis;
_Notice = pDataContract.Notice;
_CompactEmployee = pDataContract.Employee;
_CompactCustomer = pDataContract.Customer;
}
protected override ArbeitszeitEintragDC MapToDataContract(ArbeitszeitEintragDC pDataContract, bool doCommit)
@@ -200,8 +154,12 @@ namespace BeWo.ViewModel
pDataContract.Tag = _Tag;
pDataContract.Notice = _Notice;
pDataContract.Employee = _CompactEmployee;
pDataContract.Customer = _CompactCustomer;
if(_CompactCustomer != null)
{
pDataContract.CustomerOid = _CompactCustomer.CustomerOid;
}
return pDataContract;
}

View File

@@ -1,9 +1,6 @@
using BS.Shared;
using BS.Shared.DataContracts;
using System;
using System.Collections.Generic;
using BeWo.ServiceProxy;
using BeWo.Validation;
using BeWo.ViewModel.ListViewModel;
using BS.Shared.DataContracts.Compact;
@@ -25,6 +22,8 @@ namespace BeWo.ViewModel
public static string PropertyName_Klient = "Klient";
private CompactCustomerDC _Customer;
private DateTime? _GueltigVon;
private DateTime? _GueltigBis;
@@ -33,68 +32,70 @@ namespace BeWo.ViewModel
private ArbeitszeitEintragListVM _ArbeitszeitEintraege;
private string _Klient;
public ArbeitszeitVM(ArbeitszeitDC pDC)
: base(pDC, pDC.ArbeitszeitOid == null)
public ArbeitszeitVM(ArbeitszeitDC pDC) : base(pDC, pDC.ArbeitszeitOid == null)
{
}
public override bool IsDirty
{
get
{
return base.IsDirty || (_ArbeitszeitEintraege != null && _ArbeitszeitEintraege.IsDirty);
}
}
public override bool IsDirty => base.IsDirty || ArbeitszeitEintraege != null && ArbeitszeitEintraege.IsDirty;
public DateTime? GueltigVon
public CompactCustomerDC Customer
{
get { return this._GueltigVon; }
get => _Customer;
set
{
if (this.AreDifferent(this._GueltigVon, value))
if(AreDifferent(_Customer, value))
{
this._GueltigVon = value;
this.StoreDirtyInformation(this.AreDifferent(this.DataContract.GueltigVon, value), PropertyName_GueltigVon);
this.FirePropertyChanged(PropertyName_GueltigVon);
this.FirePropertyChanged(PropertyName_ArbeitszeitString);
_Customer = value;
StoreDirtyInformation(AreDifferent(DataContract.Customer, value), nameof(Customer));
FirePropertyChanged(nameof(Customer));
}
}
}
public DateTime? GueltigBis
public DateTime? GueltigVon
{
get { return this._GueltigBis; }
get => _GueltigVon;
set
{
if (this.AreDifferent(this._GueltigBis, value))
if(AreDifferent(_GueltigVon, value))
{
this._GueltigBis = value;
this.StoreDirtyInformation(this.AreDifferent(this.DataContract.GueltigBis, value), PropertyName_GueltigBis);
this.FirePropertyChanged(PropertyName_GueltigBis);
this.FirePropertyChanged(PropertyName_ArbeitszeitString);
_GueltigVon = value;
StoreDirtyInformation(AreDifferent(DataContract.GueltigVon, value), nameof(GueltigVon));
FirePropertyChanged(nameof(GueltigVon));
FirePropertyChanged(nameof(ArbeitszeitString));
}
}
}
public DateTime? GueltigBis
{
get => _GueltigBis;
set
{
if(AreDifferent(_GueltigBis, value))
{
_GueltigBis = value;
StoreDirtyInformation(AreDifferent(DataContract.GueltigBis, value), nameof(GueltigBis));
FirePropertyChanged(nameof(GueltigBis));
FirePropertyChanged(nameof(ArbeitszeitString));
}
}
}
public string Notice
{
get { return _Notice; }
get => _Notice;
set
{
if (AreDifferent(_Notice, value))
if(AreDifferent(_Notice, value))
{
_Notice = value;
StoreDirtyInformation(AreDifferent(DataContract.Notice, value), PropertyName_Notice);
FirePropertyChanged(PropertyName_Notice);
StoreDirtyInformation(AreDifferent(DataContract.Notice, value), nameof(Notice));
FirePropertyChanged(nameof(Notice));
}
}
}
@@ -103,56 +104,54 @@ namespace BeWo.ViewModel
{
get
{
String text = "Zeitraum: ";
if (this._GueltigVon.HasValue)
var text = "Zeitraum: ";
if(_GueltigVon.HasValue)
{
text = String.Format("{0:dd.MM.yyyy}", this._GueltigVon);
text = $"{_GueltigVon:dd.MM.yyyy}";
if (this._GueltigBis.HasValue)
if(_GueltigBis.HasValue)
{
text += String.Format(" - {0:dd.MM.yyyy}", this._GueltigBis);
text += $" - {_GueltigBis:dd.MM.yyyy}";
}
}
else
{
if (this._GueltigBis.HasValue)
if(_GueltigBis.HasValue)
{
text = String.Format("bis {0:dd.MM.yyyy}", this._GueltigBis);
text = $"bis {_GueltigBis:dd.MM.yyyy}";
}
}
if (String.IsNullOrEmpty(text))
if(string.IsNullOrEmpty(text))
{
//if (this.IsNew)
text = "<Neuer Zeitraum>";
text = "<Neuer Zeitraum>";
//else
// text = "Arbeitszeitplanung";
}
return text;
}
set { }
}
public ArbeitszeitEintragListVM ArbeitszeitEintraege
{
get { return _ArbeitszeitEintraege; }
get => _ArbeitszeitEintraege;
set
{
_ArbeitszeitEintraege = value;
FirePropertyChanged(PropertyName_ArbeitszeitEintragListeVM);
FirePropertyChanged(nameof(ArbeitszeitEintraege));
}
}
protected override void InitByDataContract(ArbeitszeitDC pDataContract)
{
this._GueltigBis = pDataContract.GueltigBis;
this._GueltigVon = pDataContract.GueltigVon;
this._Notice = pDataContract.Notice;
_GueltigBis = pDataContract.GueltigBis;
_GueltigVon = pDataContract.GueltigVon;
_Notice = pDataContract.Notice;
_Customer = pDataContract.Customer;
ArbeitszeitEintraege = VMFactory.CreateArbeitszeitEintragListVm(pDataContract.Eintraege ?? (pDataContract.Eintraege = new List<ArbeitszeitEintragDC>()));
}
protected override ArbeitszeitDC MapToDataContract(ArbeitszeitDC pDataContract, bool doCommit)
@@ -160,8 +159,9 @@ namespace BeWo.ViewModel
pDataContract.GueltigVon = _GueltigVon;
pDataContract.GueltigBis = _GueltigBis;
pDataContract.Notice = _Notice;
pDataContract.Customer = _Customer;
pDataContract.Eintraege = _ArbeitszeitEintraege.CopyToDCList(doCommit);
pDataContract.Eintraege = ArbeitszeitEintraege.CopyToDCList(doCommit);
return pDataContract;
}

View File

@@ -201,7 +201,7 @@ namespace BeWo.ViewModel
private bool _Hygienebelehrung;
private String _Schutzstufe;
private ActivationTypeId _ActivationType;
private ArbeitszeitListVM _ArbeitszeitListe;
private ArbeitszeitListVM _Arbeitszeiten;
private ValueListEntryDC _Nationalitaet;
private ObservableSortCollection<ValueListEntryDC> _Nationalitaeten;
@@ -212,21 +212,20 @@ namespace BeWo.ViewModel
private ObservableSortCollection<ValueListEntryDC> _RoleInFamilys;
private ObservableSortCollection<ValueListEntryDC> _EintragKategorien;
private SubstitutionNeed _SubstitutionNeed;
public CustomerVM(CustomerDC pDataContract, IEnumerable<ValueListEntryDC> pValueList, List<AssessmentSheetCategoryDC> pPossibleASCs,
List<AssessmentSheetValueDC> pPossibleASVs, List<MedArtDC> pPossibleMedArten)
: base(pDataContract, pDataContract.CustomerOid == null)
public CustomerVM(CustomerDC pDataContract, IEnumerable<ValueListEntryDC> pValueList, List<AssessmentSheetCategoryDC> pPossibleASCs, List<AssessmentSheetValueDC> pPossibleASVs, List<MedArtDC> pPossibleMedArten) : base(pDataContract, pDataContract.CustomerOid == null)
{
var possibleDisabilities = pValueList.Where(vle => vle.Type == ValueListEntryType.DisabilityType);
var possibleCustomerCareTypes = pValueList.Where(vle => vle.Type == ValueListEntryType.CustomerCareType);
var possibleTerminationReasons = pValueList.Where(vle => vle.Type == ValueListEntryType.TerminationReasonType);
var possiblePlacementObjectives = pValueList.Where(vle => vle.Type == ValueListEntryType.PlacementObjectiveType);
var possibleNationalitaeten = pValueList.Where(vle => vle.Type == ValueListEntryType.Nationality);
var possibleAufenthaltsStatuse = pValueList.Where(vle => vle.Type == ValueListEntryType.Aufenthaltsstatus);
var possibleFamilyStatuse = pValueList.Where(vle => vle.Type == ValueListEntryType.RoleInFamily);
var possibleEintragKategorien = pValueList.Where(vle => vle.Type == ValueListEntryType.NotizenKategorieCustomer);
var possibleNationalitaeten = pValueList.Where(vle => vle.Type == ValueListEntryType.Nationality);
var possibleAufenthaltsStatuse = pValueList.Where(vle => vle.Type == ValueListEntryType.Aufenthaltsstatus);
var possibleFamilyStatuse = pValueList.Where(vle => vle.Type == ValueListEntryType.RoleInFamily);
var possibleEintragKategorien = pValueList.Where(vle => vle.Type == ValueListEntryType.NotizenKategorieCustomer);
_PossibleDisabilities = pDataContract.Disabilities != null
_PossibleDisabilities = pDataContract.Disabilities != null
? new ObservableSortCollection<ValueListEntryDC>(possibleDisabilities.Except(pDataContract.Disabilities), Comparer.ValueListEntryDCComparer)
: new ObservableSortCollection<ValueListEntryDC>(possibleDisabilities, Comparer.ValueListEntryDCComparer);
@@ -234,11 +233,9 @@ namespace BeWo.ViewModel
_TerminationReasons = new ObservableSortCollection<ValueListEntryDC>(possibleTerminationReasons, Comparer.ValueListEntryDCComparer);
_PlacementObjectives = new ObservableSortCollection<ValueListEntryDC>(possiblePlacementObjectives, Comparer.ValueListEntryDCComparer);
_Nationalitaeten = new ObservableSortCollection<ValueListEntryDC>(possibleNationalitaeten,Comparer.ValueListEntryDCComparer);
_AufenthaltsStatuse = new ObservableSortCollection<ValueListEntryDC>(possibleAufenthaltsStatuse, Comparer.ValueListEntryDCComparer);
_RoleInFamilys = new ObservableSortCollection<ValueListEntryDC>(possibleFamilyStatuse,Comparer.ValueListEntryDCComparer);
_EintragKategorien = new ObservableSortCollection<ValueListEntryDC>(possibleEintragKategorien, Comparer.ValueListEntryDCComparer);
Arbeitszeiten = new ArbeitszeitListVM(DataContract.Arbeitszeiten);
_AufenthaltsStatuse = new ObservableSortCollection<ValueListEntryDC>(possibleAufenthaltsStatuse, Comparer.ValueListEntryDCComparer);
_RoleInFamilys = new ObservableSortCollection<ValueListEntryDC>(possibleFamilyStatuse,Comparer.ValueListEntryDCComparer);
_EintragKategorien = new ObservableSortCollection<ValueListEntryDC>(possibleEintragKategorien, Comparer.ValueListEntryDCComparer);
_MedArten = new BindingList<MedArtDC>(pPossibleMedArten);
@@ -265,19 +262,37 @@ namespace BeWo.ViewModel
{
_IndividualAssessmentSheetCategories = new AssessmentSheetCategoryListVM(new List<AssessmentSheetCategoryDC>(), pPossibleASVs);
}
Arbeitszeiten = new ArbeitszeitListVM(DataContract.Arbeitszeiten);
}
public ArbeitszeitListVM Arbeitszeiten
{
get { return _ArbeitszeitListe; }
get => _Arbeitszeiten;
set
set
{
_ArbeitszeitListe = value;
_Arbeitszeiten = value;
FirePropertyChanged(PropertyName_Arbeitszeiten);
}
}
public SubstitutionNeed SubstitutionNeed
{
get => _SubstitutionNeed;
set
{
if(AreDifferent(_SubstitutionNeed, value))
{
_SubstitutionNeed = value;
StoreDirtyInformation(AreDifferent(DataContract.SubstitutionNeed, value), nameof(SubstitutionNeed));
FirePropertyChanged(nameof(SubstitutionNeed));
}
}
}
//Wird noch benötigt
//public BargeldverwaltungsVM Bargeldverwaltung
//{
@@ -293,9 +308,9 @@ namespace BeWo.ViewModel
public AbsenceTimeListVM AbsenceTimes
{
get { return _AbsenceTimes; }
get => _AbsenceTimes;
set
set
{
_AbsenceTimes = value;
FirePropertyChanged(PropertyName_AbsenceTimes);
@@ -799,7 +814,7 @@ namespace BeWo.ViewModel
{
get
{
if (Utils.IsAnyNull(EmployeeRelations, TeamRelations, _EnvironmentPersons, _EnvironmentPersonsWithFamily ,_EnvironmentOrganisations, _AbsenceTimes, CostBearers, _PlacementList, _VarFields, _IndividualAssessmentSheetCategories))
if (Utils.IsAnyNull(EmployeeRelations, TeamRelations, _EnvironmentPersons, _EnvironmentPersonsWithFamily ,_EnvironmentOrganisations, _AbsenceTimes, CostBearers, _PlacementList, _VarFields, _IndividualAssessmentSheetCategories, _Arbeitszeiten))
{
return false;
}
@@ -807,7 +822,7 @@ namespace BeWo.ViewModel
return base.IsDirty || TeamRelations.IsDirty || EmployeeRelations.IsDirty || _EnvironmentPersons.IsDirty ||
_EnvironmentOrganisations.IsDirty || _AbsenceTimes.IsDirty || _VarFields.IsDirty ||
CostBearers.IsDirty || _IndividualAssessmentSheetCategories.IsDirty ||
_PlacementList.IsDirty || _MedVerordnungslisten.IsDirty || _EnvironmentPersonsWithFamily.IsDirty || (_ArbeitszeitListe != null && _ArbeitszeitListe.IsDirty);
_PlacementList.IsDirty || _MedVerordnungslisten.IsDirty || _EnvironmentPersonsWithFamily.IsDirty || _Arbeitszeiten.IsDirty;
}
}
@@ -1411,7 +1426,6 @@ namespace BeWo.ViewModel
}
}
public ObservableSortCollection<ValueListEntryDC> Nationalitaeten
{
get
@@ -1438,7 +1452,6 @@ namespace BeWo.ViewModel
}
}
public ObservableSortCollection<ValueListEntryDC> AufenthaltsStatuse
{
get
@@ -1452,7 +1465,6 @@ namespace BeWo.ViewModel
}
}
public ObservableCollection<Behinderungsart> BehinderungsartenListe
{
get { return _BehinderungsartenListe ?? (_BehinderungsartenListe = new ObservableCollection<Behinderungsart>()); }
@@ -1596,7 +1608,7 @@ namespace BeWo.ViewModel
}
}
public String Schutzstufe
public string Schutzstufe
{
get { return _Schutzstufe; }
@@ -1631,9 +1643,9 @@ namespace BeWo.ViewModel
public MedikamentenverordnungslisteListVM MedVerordnungslisten
{
get { return _MedVerordnungslisten; }
get => _MedVerordnungslisten;
set
set
{
if (AreDifferent(_MedVerordnungslisten, value))
{
@@ -1706,38 +1718,39 @@ namespace BeWo.ViewModel
protected override void InitByDataContract(CustomerDC pDataContract)
{
if (!IsNew)
{
_DateOfBirth = pDataContract.DateOfBirth;
_FirstName = pDataContract.FirstName;
_FamilyStatus = pDataContract.FamilyStatus;
_LastName = pDataContract.LastName;
_PostalCode = pDataContract.PostalCode;
_Profession = pDataContract.Profession;
_Street = pDataContract.Street;
_AddressLine1 = pDataContract.AddressLine1;
_DistanceInMeter = pDataContract.DistanceInMeter;
_Town = pDataContract.Town;
_InvoiceAddressLine1 = pDataContract.InvoiceAddressLine1;
_InvoiceAddressLine2 = pDataContract.InvoiceAddressLine2;
_InvoiceAddressPostalCode = pDataContract.InvoiceAddressPostalCode;
_InvoiceAddressStreet = pDataContract.InvoiceAddressStreet;
_InvoiceAddressTown = pDataContract.InvoiceAddressTown;
_Medication = pDataContract.Medication;
_Environment = pDataContract.Environment;
_Diagnosis = pDataContract.Diagnosis;
_Notice = pDataContract.Notice;
_ICD10Diagnosis = pDataContract.ICD10Diagnosis;
_Childs = pDataContract.Childs;
_EquityContribution = pDataContract.EquityContribution;
_ReferenceNumber = pDataContract.ReferenceNumber;
_Kindesmutter = pDataContract.Kindesmutter;
_Kindesvater = pDataContract.Kindesvater;
_Geschwister = pDataContract.Geschwister;
_Vormund = pDataContract.Vormund;
_CustomerAlias = pDataContract.CustomerAlias;
_Pflegegrad = pDataContract.Pflegegrad;
_Nationalitaet = pDataContract.Nationalitaet;
_AufenthaltsStatus = pDataContract.AufenthaltsStatus;
{
_SubstitutionNeed = pDataContract.SubstitutionNeed;
_DateOfBirth = pDataContract.DateOfBirth;
_FirstName = pDataContract.FirstName;
_FamilyStatus = pDataContract.FamilyStatus;
_LastName = pDataContract.LastName;
_PostalCode = pDataContract.PostalCode;
_Profession = pDataContract.Profession;
_Street = pDataContract.Street;
_AddressLine1 = pDataContract.AddressLine1;
_DistanceInMeter = pDataContract.DistanceInMeter;
_Town = pDataContract.Town;
_InvoiceAddressLine1 = pDataContract.InvoiceAddressLine1;
_InvoiceAddressLine2 = pDataContract.InvoiceAddressLine2;
_InvoiceAddressPostalCode = pDataContract.InvoiceAddressPostalCode;
_InvoiceAddressStreet = pDataContract.InvoiceAddressStreet;
_InvoiceAddressTown = pDataContract.InvoiceAddressTown;
_Medication = pDataContract.Medication;
_Environment = pDataContract.Environment;
_Diagnosis = pDataContract.Diagnosis;
_Notice = pDataContract.Notice;
_ICD10Diagnosis = pDataContract.ICD10Diagnosis;
_Childs = pDataContract.Childs;
_EquityContribution = pDataContract.EquityContribution;
_ReferenceNumber = pDataContract.ReferenceNumber;
_Kindesmutter = pDataContract.Kindesmutter;
_Kindesvater = pDataContract.Kindesvater;
_Geschwister = pDataContract.Geschwister;
_Vormund = pDataContract.Vormund;
_CustomerAlias = pDataContract.CustomerAlias;
_Pflegegrad = pDataContract.Pflegegrad;
_Nationalitaet = pDataContract.Nationalitaet;
_AufenthaltsStatus = pDataContract.AufenthaltsStatus;
_VertretungGewuenscht = pDataContract.VertretungGewuenscht;
_AbWelchemKrankheitsTag = pDataContract.AbWelchemKrankheitsTag;
_VertretungDringendErforderlich = pDataContract.VertretungDringendErforderlich;
@@ -1825,7 +1838,6 @@ namespace BeWo.ViewModel
}
}
Disabilities.CollectionChanged += (s, e) => StoreDirtyInformation(!_Disabilities.ContainsSameItemsAs(pDataContract.Disabilities), PropertyName_Disabilities);
CustomerCareTypes.CollectionChanged += (s, e) => StoreDirtyInformation(!_CustomerCareTypes.ContainsSameItemsAs(pDataContract.CustomerCareTypes), PropertyName_CustomerCareTypes);
@@ -1833,8 +1845,8 @@ namespace BeWo.ViewModel
TeamRelations = new CustomerTeamRelationListVM(pDataContract.RelatedTeams ?? (pDataContract.RelatedTeams = new List<CustomerTeamRelationDC>()));
List<CustomerPersonRelationDC> dcListFamily = new List<CustomerPersonRelationDC>();
List<CustomerPersonRelationDC> dcListUmfeld = new List<CustomerPersonRelationDC>();
var dcListFamily = new List<CustomerPersonRelationDC>();
var dcListUmfeld = new List<CustomerPersonRelationDC>();
if (pDataContract.EnvironmentPersons != null)
{
@@ -1850,6 +1862,7 @@ namespace BeWo.ViewModel
}
}
}
EnvironmentPersons = VMFactory.CreateCustomerEnvironmentPersonRelListVM(dcListUmfeld, ValueListEntryType.EnvironmentPersonType);
EnvironmentPersonsWithFamily = VMFactory.CreateCustomerEnvironmentPersonRelListVM(dcListFamily, ValueListEntryType.RoleInFamily);
@@ -1862,91 +1875,89 @@ namespace BeWo.ViewModel
_PlacementList = new PlacementListVM(pDataContract.PlacementList);
_VarFields = new VarFieldListVM(pDataContract.CustomerVarFields);
ICD10Codes = pDataContract.ICD10DiagnosisCodes == null ? new BindingList<String>() : new BindingList<String>(pDataContract.ICD10DiagnosisCodes);
ICD10Codes = pDataContract.ICD10DiagnosisCodes == null ? new BindingList<string>() : new BindingList<string>(pDataContract.ICD10DiagnosisCodes);
ICD10Codes.ListChanged += (s, e) => StoreDirtyInformation(true, "ICD10Codes");
MedVerordnungslisten = VMFactory.CreateMedikementenverordnungslisteListVM(pDataContract.Medikamentenverordnungslisten);
}
protected override CustomerDC MapToDataContract(CustomerDC pDataContract, bool doCommit)
{
pDataContract.DateOfBirth = _DateOfBirth;
pDataContract.FirstName = _FirstName;
pDataContract.FamilyStatus = _FamilyStatus;
pDataContract.LastName = _LastName;
pDataContract.PostalCode = _PostalCode;
pDataContract.Profession = _Profession;
pDataContract.Street = _Street;
pDataContract.AddressLine1 = _AddressLine1;
pDataContract.Town = _Town;
pDataContract.DistanceInMeter = _DistanceInMeter;
pDataContract.InvoiceAddressLine1 = _InvoiceAddressLine1;
pDataContract.InvoiceAddressLine2 = _InvoiceAddressLine2;
pDataContract.InvoiceAddressStreet = _InvoiceAddressStreet;
pDataContract.InvoiceAddressTown = _InvoiceAddressTown;
pDataContract.InvoiceAddressPostalCode = _InvoiceAddressPostalCode;
pDataContract.Jugendamt = _Jugendamt;
pDataContract.Ansprechpartner = _Ansprechpartner;
pDataContract.Kindesmutter = _Kindesmutter;
pDataContract.Kindesvater = _Kindesvater;
pDataContract.Geschwister = _Geschwister;
pDataContract.Vormund = _Vormund;
pDataContract.Diagnosis = _Diagnosis;
pDataContract.Notice = _Notice;
pDataContract.ICD10Diagnosis = _ICD10Diagnosis;
pDataContract.Childs = _Childs;
pDataContract.EquityContribution = _EquityContribution;
pDataContract.ReferenceNumber = _ReferenceNumber;
pDataContract.Disabilities = _Disabilities.ToList();
pDataContract.CustomerCareTypes = _CustomerCareTypes.ToList();
pDataContract.ActivationType = _ActivationType;
pDataContract.IsMigrant = _IsMigrant;
pDataContract.AusstVersAmt = _AusstVersAmt;
pDataContract.AusweisGueltigVon = _AusweisGueltigVon;
pDataContract.AusweisGueltigBis = _AusweisGueltigBis;
pDataContract.AusweisUnbefristetGueltig = _AusweisUnbefristetGueltig;
pDataContract.BeiblattGueltigBis = _BeiblattGueltigBis;
pDataContract.GradDerBehinderung = _GradDerBehinderung;
pDataContract.Nationalitaet = _Nationalitaet;
pDataContract.AufenthaltsStatus = _AufenthaltsStatus;
pDataContract.VertretungGewuenscht = _VertretungGewuenscht;
pDataContract.AbWelchemKrankheitsTag = _AbWelchemKrankheitsTag;
pDataContract.VertretungDringendErforderlich = _VertretungDringendErforderlich;
pDataContract.DateOfBirth = _DateOfBirth;
pDataContract.FirstName = _FirstName;
pDataContract.FamilyStatus = _FamilyStatus;
pDataContract.LastName = _LastName;
pDataContract.PostalCode = _PostalCode;
pDataContract.Profession = _Profession;
pDataContract.Street = _Street;
pDataContract.AddressLine1 = _AddressLine1;
pDataContract.Town = _Town;
pDataContract.DistanceInMeter = _DistanceInMeter;
pDataContract.InvoiceAddressLine1 = _InvoiceAddressLine1;
pDataContract.InvoiceAddressLine2 = _InvoiceAddressLine2;
pDataContract.InvoiceAddressStreet = _InvoiceAddressStreet;
pDataContract.InvoiceAddressTown = _InvoiceAddressTown;
pDataContract.InvoiceAddressPostalCode = _InvoiceAddressPostalCode;
pDataContract.Jugendamt = _Jugendamt;
pDataContract.Ansprechpartner = _Ansprechpartner;
pDataContract.Kindesmutter = _Kindesmutter;
pDataContract.Kindesvater = _Kindesvater;
pDataContract.Geschwister = _Geschwister;
pDataContract.Vormund = _Vormund;
pDataContract.Diagnosis = _Diagnosis;
pDataContract.Notice = _Notice;
pDataContract.ICD10Diagnosis = _ICD10Diagnosis;
pDataContract.Childs = _Childs;
pDataContract.EquityContribution = _EquityContribution;
pDataContract.ReferenceNumber = _ReferenceNumber;
pDataContract.Disabilities = _Disabilities.ToList();
pDataContract.CustomerCareTypes = _CustomerCareTypes.ToList();
pDataContract.ActivationType = _ActivationType;
pDataContract.IsMigrant = _IsMigrant;
pDataContract.AusstVersAmt = _AusstVersAmt;
pDataContract.AusweisGueltigVon = _AusweisGueltigVon;
pDataContract.AusweisGueltigBis = _AusweisGueltigBis;
pDataContract.AusweisUnbefristetGueltig = _AusweisUnbefristetGueltig;
pDataContract.BeiblattGueltigBis = _BeiblattGueltigBis;
pDataContract.GradDerBehinderung = _GradDerBehinderung;
pDataContract.Nationalitaet = _Nationalitaet;
pDataContract.AufenthaltsStatus = _AufenthaltsStatus;
pDataContract.VertretungGewuenscht = _VertretungGewuenscht;
pDataContract.AbWelchemKrankheitsTag = _AbWelchemKrankheitsTag;
pDataContract.VertretungDringendErforderlich = _VertretungDringendErforderlich;
pDataContract.Pflege = _Pflege;
pDataContract.Toilettengang = _Toilettengang;
pDataContract.Aggressiv = _Aggressiv;
pDataContract.Schutzstufe = _Schutzstufe;
pDataContract.Hygienebelehrung = _Hygienebelehrung;
pDataContract.Migrationshintergrund = _Migrationshintergrund;
pDataContract.SubstitutionNeed = _SubstitutionNeed;
if (_MerkzeichenListe != null)
{
pDataContract.MerkzeichenListe = _MerkzeichenListe.ToList();
}
if (_BehinderungsartenListe != null)
{
pDataContract.BehinderungsartenListe = _BehinderungsartenListe.ToList();
}
pDataContract.CustomerAlias = _CustomerAlias;
pDataContract.Pflegegrad = _Pflegegrad;
pDataContract.Images?.Clear();
if (pDataContract.Images != null)
{
pDataContract.Images.Clear();
}
if (_CustomerImage != null)
if (_CustomerImage != null)
{
if (pDataContract.Images == null)
{
pDataContract.Images = new List<byte[]>();
}
pDataContract.Images.Add(_CustomerImage);
}
CommitContact(_MobilePhone, ContactType.business_MobilePhone);
CommitContact(_Phone, ContactType.business_Phone);
CommitContact(_Fax, ContactType.business_Fax);
@@ -1975,7 +1986,8 @@ namespace BeWo.ViewModel
{
pDataContract.EnvironmentPersons.Add(vm.CommitToDataContract());
}
//pDataContract.EnvironmentPersons = _EnvironmentPersons.CopyToDCList(doCommit);
//pDataContract.EnvironmentPersons = _EnvironmentPersons.CopyToDCList(doCommit);
pDataContract.EnvironmentOrganisations = _EnvironmentOrganisations.CopyToDCList(doCommit);
pDataContract.AbsenceTimes = _AbsenceTimes.CopyToDCList(doCommit);
pDataContract.CostBearers = _CostBearers.CopyToDCList(doCommit);
@@ -2013,24 +2025,25 @@ namespace BeWo.ViewModel
pDataContract.AssessmentSheetCategoryDCs.Add(dc);
}
if (_ArbeitszeitListe != null)
{
pDataContract.Arbeitszeiten = _ArbeitszeitListe.CopyToDCList(doCommit);
}
if(_Arbeitszeiten != null)
{
pDataContract.Arbeitszeiten = _Arbeitszeiten.CopyToDCList(doCommit);
}
return pDataContract;
}
private void CommitContact(String pValue, ContactType pContactType)
private void CommitContact(string pValue, ContactType pContactType)
{
var lOldContactDCs = DataContract.ContactInformations != null ? DataContract.ContactInformations.ToList() : new List<ContactDC>();
var lContactDC = lOldContactDCs.SingleOrDefault(con => con.ContactType == pContactType);
if (String.IsNullOrEmpty(pValue) && lContactDC != null)
if (string.IsNullOrEmpty(pValue) && lContactDC != null)
{
lOldContactDCs.Remove(lContactDC);
}
else if (!String.IsNullOrEmpty(pValue))
else if (!string.IsNullOrEmpty(pValue))
{
if (lContactDC == null)
{
@@ -2038,6 +2051,7 @@ namespace BeWo.ViewModel
{
ContactType = pContactType
};
lOldContactDCs.Add(lContactDC);
}
@@ -2047,7 +2061,7 @@ namespace BeWo.ViewModel
DataContract.ContactInformations = lOldContactDCs;
}
private void Log(String log)
private void Log(string log)
{
if (_EnableLogging && _Log != null)
{

View File

@@ -17,9 +17,9 @@ namespace BeWo.ViewModel.ListViewModel
public List<AbsenceReasonDC> PossibleReasons
{
get { return _PossibleReasons; }
get => _PossibleReasons;
set
set
{
if (AreDifferent(_PossibleReasons, value))
{

View File

@@ -6,10 +6,8 @@ namespace BeWo.ViewModel.ListViewModel
{
public class ArbeitszeitEintragListVM : AbstractDCListMapperVM<ArbeitszeitEintragDC, ArbeitszeitEintragVM>
{
public ArbeitszeitEintragListVM(IEnumerable<ArbeitszeitEintragDC> pList)
: base(pList)
{
public ArbeitszeitEintragListVM(IEnumerable<ArbeitszeitEintragDC> pList) : base(pList)
{
}
}
}

View File

@@ -6,14 +6,13 @@ namespace BeWo.ViewModel.ListViewModel
{
public class ArbeitszeitListVM : AbstractDCListMapperVM<ArbeitszeitDC, ArbeitszeitVM>
{
public ArbeitszeitListVM(List<ArbeitszeitDC> pDCs)
: base(pDCs)
public ArbeitszeitListVM(IEnumerable<ArbeitszeitDC> pDCs) : base(pDCs)
{
}
protected override ArbeitszeitVM CreateVM(ArbeitszeitDC pDC)
{
ArbeitszeitVM vm = base.CreateVM(pDC);
var vm = base.CreateVM(pDC);
return vm;
}

View File

@@ -8,16 +8,11 @@ namespace BeWo.ViewModel.ListViewModel
{
public static string PropertyName_PossibleRoles = "PossibleRoles";
private readonly List<ValueListEntryDC> _PossibleRoles;
public CustomerEmployeeRelationListVM(IEnumerable<CustomerEmployeeRelationDC> pDCs, List<ValueListEntryDC> pPossibleRoles) : base(pDCs)
{
_PossibleRoles = pPossibleRoles;
PossibleRoles = pPossibleRoles;
}
public List<ValueListEntryDC> PossibleRoles
{
get { return _PossibleRoles; }
}
public List<ValueListEntryDC> PossibleRoles { get; }
}
}

View File

@@ -292,7 +292,7 @@
<VisualStudio>
<FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
<WebProjectProperties>
<UseIIS>False</UseIIS>
<UseIIS>True</UseIIS>
<AutoAssignPort>False</AutoAssignPort>
<DevelopmentServerPort>8808</DevelopmentServerPort>
<DevelopmentServerVPath>/</DevelopmentServerVPath>

View File

@@ -109,6 +109,12 @@ namespace BeWoPlanerMobil.Controllers
}
var myRelatedCustomers = Model.Employee == null ? new List<CustomerEmployeeRelationDC>() : Model.Employee.RelatedCustomers;
var relatedCustomerOids = myRelatedCustomers.Select(employee2customer => employee2customer.Customer.CustomerOid).ToList();
if(Model.Employee?.EmployeeOid != null)
{
relatedCustomerOids.AddRangeIfElementsNotIn(EmployeeService.LoadTeamsRelatedCustomerOids(Model.Employee.EmployeeOid.Value));
}
if (MobileSessionFacade.CheckForUserRight(UserRightType.ServiceRecord_AllowCreationForOtherEmployees))
{
@@ -129,14 +135,14 @@ namespace BeWoPlanerMobil.Controllers
}
else
{
Model.SupportConcepts = CustomerService.GetAllActiveSupportConceptsByCustomers(myRelatedCustomers.Select(c => c.Customer.CustomerOid));
Model.SupportConcepts = CustomerService.GetAllActiveSupportConceptsByCustomers(relatedCustomerOids);
}
if(!Model.ShowExpiredSupportConcepts)
{
Model.SupportConcepts = Model.SupportConcepts.Where(w =>
Model.SupportConcepts = Model.SupportConcepts.Where(supportConcept =>
{
var endDate = MainModel.GetEndDateOfSupportConcept(w);
var endDate = MainModel.GetEndDateOfSupportConcept(supportConcept);
return endDate == null || endDate.Value >= DateTime.Now;
}).ToList();

View File

@@ -30,7 +30,8 @@ function loadAppointments(newtoday) {
appointmentList.empty();
$.each(kalenderRec, function(index, termin) {
$.each(kalenderRec, function (index, termin) {
console.log(termin);
var description = termin.Description;
var startD = termin.StartDate;
var endD = termin.EndDate;

View File

@@ -1,6 +1,7 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
@@ -3008,10 +3009,8 @@ namespace BeWo.Data.Access
{
var c = CreateCriteria<AbsenceTime>();
var employeeRestriction = Restrictions.Eq(nameof(AbsenceTime.EmployeeOid), employeeOid);
var customerRestriction = Restrictions.Eq(nameof(AbsenceTime.CustomerOid), customerOid);
var peopleRestriction = employeeOid != null ? Restrictions.Eq(nameof(AbsenceTime.EmployeeOid), employeeOid) : Restrictions.Eq(nameof(AbsenceTime.CustomerOid), customerOid);
var peopleRestriction = Restrictions.Or(employeeRestriction, customerRestriction);
var timeRestriction = CreateBetweenDateTimesCriterion(startDate, endDate, nameof(AbsenceTime.Start), nameof(AbsenceTime.End));
c.Add(peopleRestriction).Add(timeRestriction);
@@ -3031,5 +3030,108 @@ namespace BeWo.Data.Access
return criteria.List<Vertretung>();
}
public Dictionary<Customer, List<ArbeitszeitEintrag>> GetAssistanceTimesForEmployee(long employeeOid, DateTime start, DateTime end)
{
// Arbeitszeit -> keine EmployeeOid, nur in den Arbeitszeiteinträgen
var criteria = CreateCriteria<Arbeitszeit>();
var detachedCriteria = DetachedCriteria.For<ArbeitszeitEintrag>().Add(Restrictions.Eq(nameof(ArbeitszeitEintrag.Employee) + ".Oid", employeeOid)).SetProjection(Projections.Property(nameof(ArbeitszeitEintrag.ArbeitszeitOid)));
var subquery = Subqueries.PropertyIn(nameof(BeWoEntityBase.Oid), detachedCriteria);
criteria.Add(subquery);
criteria.Add(CreateArbeitszeitenTimeRestictions(start, end));
var assistanceTimes = criteria.List<Arbeitszeit>();
var result = new Dictionary<Customer, List<ArbeitszeitEintrag>>();
foreach(var assistanceTimeEntry in assistanceTimes)
{
if(assistanceTimeEntry.Customer != null)
{
result.AddOrUpdateValueInDictionary(assistanceTimeEntry.Customer, assistanceTimeEntry.ArbeitszeitEintraege.ToList());
}
}
return result;
}
private ICriterion CreateArbeitszeitenTimeRestictions(DateTime start, DateTime end)
{
// GueltigVon und GueltigBis sind null
var gueltigVonAndGueltigBisAreNull = Restrictions.And(Restrictions.IsNull(nameof(Arbeitszeit.GueltigVon)), Restrictions.IsNull(nameof(Arbeitszeit.GueltigBis)));
// GueltigVon ist null, GueltigBis ist nicht null
var gueltigVonIsNullAndGueltigBisIsGtStart = Restrictions.And(Restrictions.And(Restrictions.IsNull(nameof(Arbeitszeit.GueltigVon)), Restrictions.Gt(nameof(Arbeitszeit.GueltigBis), start)), Restrictions.And(Restrictions.IsNull(nameof(Arbeitszeit.GueltigVon)), Restrictions.Ge(nameof(Arbeitszeit.GueltigBis), start)));
// GueltigVon ist nicht null, GueltigBis ist null
var gueltigBisIsNullAndGueltigVonIsLtEnd = Restrictions.And(Restrictions.IsNotNull(nameof(Arbeitszeit.GueltigVon)), Restrictions.And(Restrictions.IsNull(nameof(Arbeitszeit.GueltigBis)), Restrictions.Gt(nameof(Arbeitszeit.GueltigVon), end)));
var and1 = Restrictions.And(Restrictions.IsNotNull(nameof(Arbeitszeit.GueltigVon)), Restrictions.IsNotNull(nameof(Arbeitszeit.GueltigBis)));
var and3 = Restrictions.And(Restrictions.Le(nameof(Arbeitszeit.GueltigVon), start), Restrictions.Ge(nameof(Arbeitszeit.GueltigBis), start));
var and4 = Restrictions.And(Restrictions.Le(nameof(Arbeitszeit.GueltigVon), end), Restrictions.Gt(nameof(Arbeitszeit.GueltigBis), end));
var and5 = Restrictions.And(Restrictions.Ge(nameof(Arbeitszeit.GueltigVon), start), Restrictions.Le(nameof(Arbeitszeit.GueltigBis), end));
var or1 = Restrictions.Or(and4, and5);
var or2 = Restrictions.Or(and3, or1);
// GueltigVon und GueltigBis sind nicht null
var gueltigVonAndGueltigBisAreNotNull = Restrictions.And(and1, or2);
return Restrictions.Or(gueltigVonAndGueltigBisAreNull, Restrictions.Or(Restrictions.Or(gueltigVonIsNullAndGueltigBisIsGtStart, gueltigBisIsNullAndGueltigVonIsLtEnd), gueltigVonAndGueltigBisAreNotNull));
}
public IList<Customer> GetCustomersWithSubstitutionNeedUnset()
{
var c = CreateCriteria<Customer>();
c.Add(Restrictions.IsNull(nameof(Customer.SubstitutionNeed)));
return c.List<Customer>();
}
public List<long> FindTeamRelatedCustomerOids(long employeeOid)
{
var result = new List<long>();
var teams = CreateCriteriaIsActive<Team>()
.Add(Restrictions.IsNotNull(nameof(BeWoEntityBase.Oid)))
.CreateCriteria(nameof(Team.MemberList), JoinType.InnerJoin)
.Add(Restrictions.Eq(nameof(BeWoEntityBase.Oid), employeeOid))
.List<Team>();
var members = new List<Employee>();
foreach(var team in teams)
{
members.AddRangeIfElementsNotIn(team.MemberList);
}
foreach(var member in members)
{
foreach(var employee2customer in member.Employee2CustomerList)
{
if(employee2customer.CustomerOid.HasValue)
{
result.AddIfNotIn(employee2customer.CustomerOid.Value);
}
}
}
return result;
}
public List<Customer> FindCustomersForAbsenceTimesByStartAndEnd(DateTime intervalStart, DateTime intervalEnd)
{
var criteria = CreateCriteriaIsActive<Customer>();
// Arbeitszeiten im gewählten Intervall holen und dann die einträge nach customeroid durchsuchen
// TODO: implementieren
return criteria.List<Customer>().ToList();
}
}
}

View File

@@ -54,10 +54,10 @@ namespace BeWo.Data
{
#if DEBUG
//TODO: wieder einkommentieren!
//var hierarchy = (Hierarchy)LogManager.GetRepository();
//var logger = (Logger)hierarchy.GetLogger("NHibernate.SQL");
//logger.AddAppender(new TraceAppender { Layout = new SimpleLayout() });
//hierarchy.Configured = true;
var hierarchy = (Hierarchy)LogManager.GetRepository();
var logger = (Logger)hierarchy.GetLogger("NHibernate.SQL");
logger.AddAppender(new TraceAppender { Layout = new SimpleLayout() });
hierarchy.Configured = true;
#endif
var baseDirectory = AppDomain.CurrentDomain.BaseDirectory;

View File

@@ -1,6 +1,6 @@
using BS.Shared;
using System;
using System;
using System.Collections.Generic;
using BS.Shared;
namespace BeWo.Data.Entities
{
@@ -14,16 +14,21 @@ namespace BeWo.Data.Entities
public static string PropertyName_ArbeitsZeiteintragListe = "ArbeitszeitEintraege";
public Arbeitszeit()
{
_Tid = TableID.Arbeitszeit;
}
private DateTime? _GueltigVon;
private DateTime? _GueltigBis;
private long? _EmployeeOid;
private Customer _Customer;
private IList<ArbeitszeitEintrag> _ArbeitszeitEintraege;
public virtual DateTime? GueltigVon
{
get
@@ -56,19 +61,15 @@ namespace BeWo.Data.Entities
}
}
public virtual long? EmployeeOid
{
get
{
return this._EmployeeOid;
}
get => _EmployeeOid;
set
{
if (this.AreDifferent(this._EmployeeOid, value))
if(AreDifferent(_EmployeeOid, value))
{
this._EmployeeOid = value;
_EmployeeOid = value;
}
}
}
@@ -85,5 +86,17 @@ namespace BeWo.Data.Entities
}
}
public virtual Customer Customer
{
get => _Customer;
set
{
if(AreDifferent(_Customer, value))
{
_Customer = value;
}
}
}
}
}

View File

@@ -1,5 +1,4 @@
using BS.Shared;
using System;
namespace BeWo.Data.Entities
{
@@ -15,6 +14,11 @@ namespace BeWo.Data.Entities
public static string PropertyName_Klient = "Klient";
public ArbeitszeitEintrag()
{
_Tid = TableID.ArbeitszeitEintrag;
}
private string _UhrzeitVon;
private string _UhrzeitBis;
@@ -108,5 +112,7 @@ namespace BeWo.Data.Entities
}
public virtual Employee Employee { get; set; }
public virtual Customer Customer { get; set; }
}
}

View File

@@ -3,7 +3,6 @@ using System.Collections.Generic;
using BS.Shared;
using BS.Shared.Core;
using BS.Shared.DataContracts;
namespace BeWo.Data.Entities
{
@@ -57,7 +56,6 @@ namespace BeWo.Data.Entities
public static string PropertyName_VertretungDringendErforderlich = "VertretungGewuenscht";
public static string PropertyName_Arbeitszeit = "Arbeitszeit";
private Auszahlungsintervall _Auszahlungsintervall;
private IList<AbsenceTime> _AbsenceTimes;
private Person _Ansprechpartner;
private IList<AssessmentSheetCategory> _AssessmentSheetCategoryList;
@@ -103,6 +101,7 @@ namespace BeWo.Data.Entities
private int _AbWelchemKrankheitsTag;
private bool _VertretungDringendErforderlich;
private IList<Arbeitszeit> _Arbeitszeit;
private SubstitutionNeed _SubstitutionNeed;
public Customer()
{
@@ -136,7 +135,6 @@ namespace BeWo.Data.Entities
}
}
public virtual IList<AssessmentSheetCategory> AssessmentSheetCategoryList
{
get { return _AssessmentSheetCategoryList ?? (_AssessmentSheetCategoryList = new List<AssessmentSheetCategory>()); }
@@ -519,11 +517,12 @@ namespace BeWo.Data.Entities
public virtual Dictionary<DateTimeSpan, decimal> GetAbsencesTimesNotBillableWholeWeeks()
{
var lResult = new Dictionary<DateTimeSpan, decimal>();
IList<AbsenceTime> times = AbsenceTimes;
foreach (AbsenceTime at in times)
var times = AbsenceTimes;
foreach (var at in times)
{
IEnumerable<DateTimeSpan> weeks = at.AbsenceSpan.GetWholeWeeks();
foreach (DateTimeSpan span in weeks)
var weeks = at.AbsenceSpan.GetWholeWeeks();
foreach (var span in weeks)
{
if (at.AbsenceReason.BillableMinutes.HasValue && at.AbsenceReason.BillableMinutes.Value > 0 && !lResult.ContainsKey(span))
{
@@ -532,7 +531,6 @@ namespace BeWo.Data.Entities
}
}
return lResult;
}
@@ -692,6 +690,19 @@ namespace BeWo.Data.Entities
}
}
public virtual SubstitutionNeed SubstitutionNeed
{
get => _SubstitutionNeed;
set
{
if(AreDifferent(_SubstitutionNeed, value))
{
_SubstitutionNeed = value;
}
}
}
public virtual IList<Arbeitszeit> Arbeitszeiten
{
get { return _Arbeitszeit ?? (_Arbeitszeit = new List<Arbeitszeit>()); }
@@ -709,7 +720,7 @@ namespace BeWo.Data.Entities
public virtual bool Toilettengang { get; set; }
public virtual bool Aggressiv { get; set; }
public virtual bool Hygienebelehrung { get; set; }
public virtual String Schutzstufe { get; set; }
public virtual string Schutzstufe { get; set; }
public virtual string TeamSimpleString
{

View File

@@ -1,30 +1,27 @@
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2">
<class name="BeWo.Data.Entities.Arbeitszeit,BeWo.Data" table="arbeitszeit">
<class name="BeWo.Data.Entities.Arbeitszeit, BeWo.Data" table="arbeitszeit">
<id name="Oid" column ="Oid" unsaved-value="null">
<generator class="identity" />
</id>
<version type="Int64" column="Version" name="Version" />
<property name="EmployeeOid" column="EmployeeOid" />
<property name="InsTs" />
<property name="InsUser" />
<property name="EmployeeOid" column="EmployeeOid" />
<property name="InsTs" />
<property name="InsUser" />
<property column="Tid" type="BS.Shared.TableID, BS.Shared" name="_Tid" access="field" />
<property name="UdpUser" />
<property name="UdpUser" />
<property name="IsActive" type="BS.Shared.ActivationTypeId, BS.Shared" />
<property name="SystemEntryID" type="BS.Shared.SystemEntryID, BS.Shared" />
<property name="Notice" column="Notice" length="1024" />
<property name="GueltigVon" column="GueltigVon" />
<property name="GueltigBis" column="GueltigBis" />
<property name="GueltigVon" column="GueltigVon" />
<property name="GueltigBis" column="GueltigBis" />
<many-to-one name="Customer" column="CustomerOid" class="BeWo.Data.Entities.Customer, BeWo.Data" cascade="none" fetch="join" />
<bag name="ArbeitszeitEintraege" table="ArbeitszeitEintrag" generic="true" cascade="all-delete-orphan">
<key column="ArbeitszeitOid" />
<one-to-many class="BeWo.Data.Entities.ArbeitszeitEintrag, BeWo.Data" />
</bag>
</class>
</hibernate-mapping>

View File

@@ -7,23 +7,19 @@
</id>
<version type="Int64" column="Version" name="Version" />
<property name="ArbeitszeitOid" column="ArbeitszeitOid" />
<property name="InsTs" />
<property name="InsUser" />
<property name="ArbeitszeitOid" column="ArbeitszeitOid" />
<property name="InsTs" />
<property name="InsUser" />
<property column="Tid" type="BS.Shared.TableID, BS.Shared" name="_Tid" access="field" />
<property name="UdpUser" />
<property name="UdpUser" />
<property name="IsActive" type="BS.Shared.ActivationTypeId, BS.Shared" />
<property name="SystemEntryID" type="BS.Shared.SystemEntryID, BS.Shared" />
<property name="Notice" column="Notice" length="1024" />
<property name="Tag" column="Tag" />
<property name="UhrzeitVon" column="UhrzeitVon" />
<property name="UhrzeitBis" column="UhrzeitBis" />
<property name="CustomerOid" column="CustomerOid" />
<property name="Notice" column="Notice" length="1024" />
<property name="Tag" column="Tag" />
<property name="UhrzeitVon" column="UhrzeitVon" />
<property name="UhrzeitBis" column="UhrzeitBis" />
<many-to-one name="Customer" column="CustomerOid" class="BeWo.Data.Entities.Customer, BeWo.Data" cascade="none" fetch="join" />
<many-to-one name="Employee" column="EmployeeOid" class="BeWo.Data.Entities.Employee, BeWo.Data" cascade="none" fetch="join" />
</class>
</hibernate-mapping>

View File

@@ -50,6 +50,7 @@
<property name="Aggressiv" type="Boolean" />
<property name="Hygienebelehrung" type="Boolean" />
<property name="Schutzstufe" type="String" />
<property column="SubstitutionNeed" name="SubstitutionNeed" type="BS.Shared.SubstitutionNeed, BS.Shared" />
<bag name="MerkzeichenListe" table="merkzeichen2customer" generic="true" cascade="all" batch-size="250" lazy="false">
<key column="CustomerOid" />

View File

@@ -47,10 +47,10 @@ namespace BeWo.Data
{
#if DEBUG
//TODO: wieder einkommentieren!
//var hierarchy = (Hierarchy)LogManager.GetRepository();
//var logger = (Logger)hierarchy.GetLogger("NHibernate.SQL");
//logger.AddAppender(new TraceAppender { Layout = new SimpleLayout() });
//hierarchy.Configured = true;
var hierarchy = (Hierarchy)LogManager.GetRepository();
var logger = (Logger)hierarchy.GetLogger("NHibernate.SQL");
logger.AddAppender(new TraceAppender { Layout = new SimpleLayout() });
hierarchy.Configured = true;
#endif
_SessionFactories[MultitenancyOperationContextExt.Current.Tenant] = new Configuration().Configure(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, @"Multitenancy\" + MultitenancyOperationContextExt.Current.Tenant + ".config")).BuildSessionFactory();
}

View File

@@ -30,8 +30,8 @@
NHibernate.ByteCode.Castle.ProxyFactoryFactory, NHibernate.ByteCode.Castle
</property>
<property name="hbm2ddl.keywords">none</property>
<property name="show_sql">false</property> <!-- Bei true wird das SQL im Output Window angezeigt -->
<property name="format_sql">false</property>
<property name="show_sql">true</property> <!-- Bei true wird das SQL im Output Window angezeigt -->
<property name="format_sql">true</property>
<mapping assembly="BeWo.Data" />
</session-factory>

View File

@@ -0,0 +1 @@
ALTER TABLE Customer ADD COLUMN SubstitutionNeed TINYINT(4);

View File

@@ -1,5 +1,4 @@
using System.IO;
using BeWo.Data.Entities;
using BeWo.Data.Entities;
using BS.Shared.DataContracts;
@@ -12,14 +11,18 @@ namespace BeWo.Service.DCEntityMapper
pDataContract.ArbeitszeitOid = pEntity.Oid;
pDataContract.EmployeeOid = pEntity.EmployeeOid;
pDataContract.GueltigVon = pEntity.GueltigVon;
pDataContract.GueltigBis = pEntity.GueltigBis;
pDataContract.Notice = pEntity.Notice;
pDataContract.GueltigVon = pEntity.GueltigVon;
pDataContract.GueltigBis = pEntity.GueltigBis;
pDataContract.Notice = pEntity.Notice;
if(pEntity.Customer != null)
{
pDataContract.Customer = MapperFactory.CompactCustomerDC_Customer.MapToNewDC(pEntity.Customer);
}
if (pEntity.ArbeitszeitEintraege != null)
{
pDataContract.Eintraege =
MapperFactory.ArbeitszeitEintragDC_ArbeitszeitEintrag.MapToNewDCs(pEntity.ArbeitszeitEintraege);
pDataContract.Eintraege = MapperFactory.ArbeitszeitEintragDC_ArbeitszeitEintrag.MapToNewDCs(pEntity.ArbeitszeitEintraege);
}
return pDataContract;
@@ -28,12 +31,20 @@ namespace BeWo.Service.DCEntityMapper
public override Arbeitszeit MergeWithEntity(ArbeitszeitDC pDataContract, Arbeitszeit pEntity)
{
pEntity.EmployeeOid = pDataContract.EmployeeOid;
pEntity.GueltigVon = pDataContract.GueltigVon;
pEntity.GueltigBis = pDataContract.GueltigBis;
pEntity.Notice = pDataContract.Notice;
pEntity.Oid = pDataContract.ArbeitszeitOid;
pEntity.GueltigVon = pDataContract.GueltigVon;
pEntity.GueltigBis = pDataContract.GueltigBis;
pEntity.Notice = pDataContract.Notice;
pEntity.Oid = pDataContract.ArbeitszeitOid;
MapperFactory.ArbeitszeitEintragDC_ArbeitszeitEintrag.MergeWithEntitys(pDataContract.Eintraege, pEntity.ArbeitszeitEintraege);
if(pDataContract.Customer != null)
{
MapperFactory.CompactCustomerDC_Customer.MapToNewEntity(pDataContract.Customer);
}
if(pDataContract.Eintraege != null)
{
MapperFactory.ArbeitszeitEintragDC_ArbeitszeitEintrag.MergeWithEntitys(pDataContract.Eintraege, pEntity.ArbeitszeitEintraege);
}
return pEntity;
}

View File

@@ -16,7 +16,13 @@ namespace BeWo.Service.DCEntityMapper
pDataContract.UhrzeitVon = pEntity.UhrzeitVon;
pDataContract.UhrzeitBis = pEntity.UhrzeitBis;
pDataContract.Notice = pEntity.Notice;
pDataContract.CustomerOid = pEntity.CustomerOid;
pDataContract.CustomerOid = pEntity.Customer?.Oid;
if(pEntity.Customer != null)
{
pDataContract.Customer = MapperFactory.CompactCustomerDC_Customer.MapToNewDC(pEntity.Customer);
}
if (pEntity.Employee != null)
{
pDataContract.Employee = MapperFactory.CompactEmployeeDC_Employee.MapToNewDC(pEntity.Employee);
@@ -35,14 +41,9 @@ namespace BeWo.Service.DCEntityMapper
pEntity.Oid = pDataContract.ArbeitszeitEintragOid;
pEntity.CustomerOid = pDataContract.CustomerOid;
if (pDataContract.Employee != null)
{
pEntity.Employee = DAOFactory.GenericDAO.LoadByID<Employee>(pDataContract.Employee.EmployeeOid);
}
else
{
pEntity.Employee = null;
}
pEntity.Employee = pDataContract.Employee != null ? DAOFactory.GenericDAO.LoadByID<Employee>(pDataContract.Employee.EmployeeOid) : null;
pEntity.Customer = pDataContract.Customer != null ? DAOFactory.GenericDAO.LoadByID<Customer>(pDataContract.Customer.CustomerOid) : null;
return pEntity;
}

View File

@@ -23,8 +23,10 @@ namespace BeWo.Service.DCEntityMapper
pDataContract.TerminationDate = pEntity.TerminationDate;
pDataContract.SubstitutionStartingDayCount = pEntity.AbWelchemKrankheitsTag;
pDataContract.IsSubstitutionWanted = pEntity.VertretungGewuenscht;
pDataContract.SubstitutionNeed = pEntity.SubstitutionNeed;
pDataContract.IsSubstitutionNeeded = pEntity.VertretungDringendErforderlich;
if (pEntity.TerminationReason != null)
if (pEntity.TerminationReason != null)
{
pDataContract.TerminationReason = pEntity.TerminationReason.Value;
}

View File

@@ -77,6 +77,22 @@ namespace BeWo.Service.DCEntityMapper
pDataContract.Schutzstufe = pEntity.Schutzstufe;
pDataContract.Hygienebelehrung = pEntity.Hygienebelehrung;
if(pEntity.SubstitutionNeed == SubstitutionNeed.SubstitutionNeedUnset)
{
if(pEntity.VertretungDringendErforderlich)
{
pDataContract.SubstitutionNeed = SubstitutionNeed.SubstitutionNeeded;
}
else
{
pDataContract.SubstitutionNeed = pEntity.VertretungGewuenscht ? SubstitutionNeed.SubstitutionWanted : SubstitutionNeed.NoSubstitutionWanted;
}
}
else
{
pDataContract.SubstitutionNeed = pEntity.SubstitutionNeed;
}
if (pEntity.BehinderungsartenListe != null)
{
pDataContract.BehinderungsartenListe = pEntity.BehinderungsartenListe.ToList();
@@ -159,9 +175,9 @@ namespace BeWo.Service.DCEntityMapper
pEntity.AssistanceBegin = pDataContract.AssistanceBegin;
pEntity.TerminationDate = pDataContract.TerminationDate;
pEntity.CustomerAlias = pDataContract.CustomerAlias;
pEntity.SubstitutionNeed = pDataContract.SubstitutionNeed;
//if(ContainsFamilyDataData(pDataContract))
//if(ContainsFamilyDataData(pDataContract))
//{
// ConcurrencyCheck(pDataContract.FamilyDataVersion, pEntity.FamilyData);

View File

@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
@@ -8,6 +9,7 @@ using BeWo.Data.Entities;
using BeWo.Service.DCEntityMapper;
using BS.Shared;
using BS.Shared.Core;
using BS.Shared.DataContracts;
using BS.Shared.DataContracts.Compact;
using BS.Shared.Extensions;
@@ -16,18 +18,86 @@ namespace BeWo.Service.SBD
{
internal class VertretungsManager
{
private List<VertretungsItemDC> CreateSubstitutionList(DateTime intervalStart, DateTime intervalEnd)
{
var result = new List<VertretungsItemDC>();
var start = intervalStart;
var end = intervalEnd.AddDays(1).AddTicks(-1);
var allAbsenceTimes = DAOFactory.SearchDAO.FindAbsenceTimes(start, end).ToList();
var customerAbsenceTimes = allAbsenceTimes.Where(absenceTime => absenceTime.CustomerOid.HasValue);
var employeeAbsenceTimes = allAbsenceTimes.Where(absenceTime => absenceTime.EmployeeOid.HasValue);
var substitutions = DAOFactory.SearchDAO.FindVertretungen(start, end).ToList();
var customerOids = new List<long>();
var employeeOids = new List<long>();
// TODO: Eine SearchDAO Funktion schreiben, um die Klienten zu laden?
employeeAbsenceTimes.DoForEach(absenceTime =>
{
if(absenceTime.EmployeeOid.HasValue)
{
employeeOids.AddIfNotIn(absenceTime.EmployeeOid.Value);
}
});
substitutions.DoForEach(substitution =>
{
if(substitution.EmployeeOid.HasValue)
{
employeeOids.AddIfNotIn(substitution.EmployeeOid.Value);
}
});
var employees = DAOFactory.GenericDAO.LoadByIDs<Employee>(employeeOids);
employees.DoForEach(employee =>
{
if(employee.Arbeitszeiten.Any())
{
foreach(var arbeitszeit in employee.Arbeitszeiten.Where(a => a.Customer != null))
{
var date = start;
do
{
if (date.InBetween(arbeitszeit.GueltigVon, arbeitszeit.GueltigBis))
{
customerOids.AddIfNotIn(arbeitszeit.Customer.Oid.Value);
}
date = date.AddDays(1);
} while ((end - date).TotalDays > 0);
}
}
});
customerAbsenceTimes.DoForEach(absenceTime =>
{
if(absenceTime.CustomerOid.HasValue)
{
customerOids.AddIfNotIn(absenceTime.CustomerOid.Value);
}
});
substitutions.DoForEach(substitution =>
{
if(substitution.CustomerOid.HasValue)
{
customerOids.AddIfNotIn(substitution.CustomerOid.Value);
}
});
var customers = DAOFactory.GenericDAO.LoadByIDs<Customer>(customerOids);
// Klienten aus den employeeAbsenceTimes, customerAbsenceTimes und aus den Vertretungen
return result;
}
private static List<ContactDC> LoadContactInformationForEntity<T>(long entityOid) where T : BeWoEntityBase
{
Person entity;
if(typeof(T) == typeof(Employee))
{
entity = DAOFactory.GenericDAO.LoadByID<Employee>(entityOid).Person;
}
else
{
entity = DAOFactory.GenericDAO.LoadByID<Customer>(entityOid).Person;
}
var entity = typeof(T) == typeof(Employee) ? DAOFactory.GenericDAO.LoadByID<Employee>(entityOid).Person : DAOFactory.GenericDAO.LoadByID<Customer>(entityOid).Person;
return MapperFactory.ContactDC_Contact.MapToNewDCs(entity.Contacts);
}
@@ -46,6 +116,16 @@ namespace BeWo.Service.SBD
var customers = DAOFactory.GenericDAO.LoadByIDs<Customer>(customerOids);
var customerContactInformation = new Dictionary<long, List<ContactDC>>();
var employeeOids = new List<long>();
foreach(var absenceTime in absenceTimes)
{
if(absenceTime.EmployeeOid.HasValue)
{
employeeOids.AddIfNotIn(absenceTime.EmployeeOid.Value);
}
}
foreach (var customer in customers)
{
var contacts = MapperFactory.ContactDC_Contact.MapToNewDCs(customer.Person.Contacts);
@@ -67,16 +147,25 @@ namespace BeWo.Service.SBD
continue;
}
foreach (var employee2Customer in employee.Employee2CustomerList.Where(e2c => e2c.Customer.IsActive == ActivationTypeId.Active))
var employeAssistanceTimes = DAOFactory.SearchDAO.GetAssistanceTimesForEmployee(employee.Oid.Value, start, end);
foreach(var item in employeAssistanceTimes)
{
var vertretungsItems = ErstelleVertretungsItemsForAbsenceEmployee(absenceTime, employee, item.Key, vertretungen, start, end, LoadContactInformationForEntity<Customer>(item.Key.Oid.Value), MapperFactory.ContactDC_Contact.MapToNewDCs(employee.Person.Contacts), MapperFactory.CustomerOrganisationRelationDC_Customer2Organisation.MapToNewDCs(item.Key.Customer2OrganisationList));
result.AddRangeIfElementsNotIn(vertretungsItems);
}
foreach (var employee2Customer in employee.Employee2CustomerList.Where(e2c => e2c.Customer.IsActive == ActivationTypeId.Active && !employeAssistanceTimes.Values.Any(a => a.Any(b => b.Employee?.Oid != null && b.Employee.Oid.Value.Equals(e2c.EmployeeOid)))))
{
foreach (var valueListEntry2Object in employee2Customer.ValueList)
{
if (valueListEntry2Object.Entry.Type == ValueListEntryType.StaffRoleType && !valueListEntry2Object.Entry.Value.Equals("ehemalige Betreuung")) // Nur Hauptbetreuer?
if (valueListEntry2Object.Entry.Type == ValueListEntryType.StaffRoleType) //TODO: Wie bei VKMAachen && !valueListEntry2Object.Entry.Value.Equals("ehemalige Betreuung")) // Nur Hauptbetreuer?
{
var items = ErstelleVertretungsItemsForAbsenceEmployee(absenceTime, employee, employee2Customer.Customer, vertretungen, start, end, LoadContactInformationForEntity<Customer>(employee2Customer.Customer.Oid.Value), MapperFactory.ContactDC_Contact.MapToNewDCs(employee.Person.Contacts), MapperFactory.CustomerOrganisationRelationDC_Customer2Organisation.MapToNewDCs(employee2Customer.Customer.Customer2OrganisationList));
if (items != null)
var vertretungsItems = ErstelleVertretungsItemsForAbsenceEmployee(absenceTime, employee, employee2Customer.Customer, vertretungen, start, end, LoadContactInformationForEntity<Customer>(employee2Customer.Customer.Oid.Value), MapperFactory.ContactDC_Contact.MapToNewDCs(employee.Person.Contacts), MapperFactory.CustomerOrganisationRelationDC_Customer2Organisation.MapToNewDCs(employee2Customer.Customer.Customer2OrganisationList));
if (vertretungsItems != null)
{
result.AddRange(items);
result.AddRange(vertretungsItems);
}
}
}
@@ -85,11 +174,12 @@ namespace BeWo.Service.SBD
else if (absenceTime.CustomerOid.HasValue) // Abwesenheit Klient
{
var customer = DAOFactory.GenericDAO.GetActiveByIDs<Customer>(new List<long>{ absenceTime.CustomerOid.Value }).FirstOrDefault();
if(customer == null)
if(customer == null || !customer.Arbeitszeiten.Any() && !customer.Employee2CustomerList.Any())
{
continue;
}
var addEmpty = true;
foreach (var employee2Customer in customer.Employee2CustomerList.Where(e2c => e2c.Employee.IsActive == ActivationTypeId.Active))
@@ -100,22 +190,19 @@ namespace BeWo.Service.SBD
{
var substitutions = vertretungen.Where(vertretung => vertretung.CustomerOid.HasValue && vertretung.CustomerOid == customer.Oid).ToList();
var items = ErstelleVertretungsItemsForAbsenceEmployee(absenceTime, employee2Customer.Employee, customer, substitutions, start, end, customerContactInformation[customer.Oid.Value], MapperFactory.ContactDC_Contact.MapToNewDCs(employee2Customer.Employee.Person.Contacts), MapperFactory.CustomerOrganisationRelationDC_Customer2Organisation.MapToNewDCs(customer.Customer2OrganisationList));
if (items != null)
{
addEmpty = false;
result.AddRange(items);
}
addEmpty = false;
result.AddRange(items);
}
}
}
if (addEmpty)
{
var items = ErstelleVertretungsItemsForAbsenceEmployee(absenceTime, null, customer, null, start, end, customerContactInformation[customer.Oid.Value], null, MapperFactory.CustomerOrganisationRelationDC_Customer2Organisation.MapToNewDCs(customer.Customer2OrganisationList))?.ToList();
if (items != null)
{
result.AddRange(items);
}
// TODO: Schulen hinzufügen bzw. filtern -> Rolle ist Schule
var items = ErstelleVertretungsItemsForAbsenceEmployee(absenceTime, null, customer, null, start, end, customerContactInformation[customer.Oid.Value], null, MapperFactory.CustomerOrganisationRelationDC_Customer2Organisation.MapToNewDCs(customer.Customer2OrganisationList)).ToList();
result.AddRange(items);
}
}
}
@@ -157,24 +244,33 @@ namespace BeWo.Service.SBD
{
var vertretungsItems = new List<VertretungsItemDC>();
var dateTime = start;
while (dateTime <= end)
{
if (LiegtImZeitraum(dateTime, absenceTime))
{
// TODO: Vertretungen erzeugen ein zweites VertretungsItem!
var newVertretungsItem = new VertretungsItemDC {Datum = dateTime, Absencetime = MapperFactory.AbsenceTimeDC_AbsenceTime.MapToNewDC(absenceTime)};
var vertretungsOids = new List<long>();
// Mitarbeiterabwesenheit
if (employee != null)
{
newVertretungsItem.Employee = MapperFactory.CompactEmployeeDC_Employee.MapToNewDC(employee);
newVertretungsItem.EmployeeAddressString = GetEmployeeAddressInfo(employee.Oid.Value);
var lastSubstitutions = DAOFactory.SearchDAO.GetLastSubstitutionItems(employee.Oid.Value, 3);
var lastSubstitutionDCs = MapperFactory.VertretungDC_Vertretung.MapToNewDCs(lastSubstitutions);
newVertretungsItem.LastSubstitutions = lastSubstitutionDCs;
AddArbeitszeitToVertretungsItem(newVertretungsItem, employee, dateTime);
AddArbeitszeitToVertretungsItem(newVertretungsItem, employee, dateTime, customer);
}
newVertretungsItem.Customer = MapperFactory.CompactCustomerDC_Customer.MapToNewDC(customer);
@@ -184,17 +280,43 @@ namespace BeWo.Service.SBD
newVertretungsItem.EmployeeContactInformation = employeeContactInformation;
newVertretungsItem.Schools = schools;
if(customer != null && customer.Arbeitszeiten.Any())
// Klientenabwesenheit von Klient mit Betreuungszeiten oder mit Schule
if (customer != null && customer.Arbeitszeiten.Any() || customer.Customer2OrganisationList.Any(a => a.ValueList.Any(b => b.Entry.Type == ValueListEntryType.EnvironmentOrganisationType && b.Entry.Value.Equals("Schule"))))
{
var betreuungszeiten = MapperFactory.ArbeitszeitDC_Arbeitszeit.MapToNewDCs(customer.Arbeitszeiten);
var time = dateTime;
var interval = betreuungszeiten.Where(w => w.GueltigVon.HasValue && w.GueltigBis.HasValue && time.InBetween(w.GueltigVon.Value, w.GueltigBis.Value, true)).ToList();
var interval = betreuungszeiten.Where(
w =>
{
if(w.GueltigVon == null && w.GueltigBis == null)
{
return true;
}
if(w.GueltigVon.HasValue && w.GueltigBis.HasValue)
{
return time.InBetween(w.GueltigVon.Value, w.GueltigBis.Value, true);
}
if(w.GueltigVon == null && w.GueltigBis.HasValue)
{
return time <= w.GueltigBis;
}
if(w.GueltigVon.HasValue && w.GueltigBis == null)
{
return time >= w.GueltigVon;
}
return false;
}).ToList();
var assistanceTimeEntries = new List<ArbeitszeitEintragDC>();
foreach(var item in interval)
{
assistanceTimeEntries.AddRange(item.Eintraege.Where(assistanceTimeEntry => BS.Shared.Core.DateTimeUtils.ConvertAppointmentDayOfWeekToDayOfWeek(assistanceTimeEntry.Tag) == dateTime.DayOfWeek));
assistanceTimeEntries.AddRange(item.Eintraege.Where(assistanceTimeEntry => DateTimeUtils.ConvertAppointmentDayOfWeekToDayOfWeek(assistanceTimeEntry.Tag) == dateTime.DayOfWeek));
}
if(assistanceTimeEntries.Any())
@@ -211,39 +333,46 @@ namespace BeWo.Service.SBD
}
else
{
if (customer.VertretungDringendErforderlich)
{
newVertretungsItem.VertretungsStatus = VertretungsStatus.MaKrankVertretungBenoetigt;
newVertretungsItem.Dringlichkeit = "Dringend";
newVertretungsItem.DringlichkeitColor = "#FF0000";
}
if (customer.VertretungGewuenscht && !customer.VertretungDringendErforderlich)
{
newVertretungsItem.Dringlichkeit = "Möglichst";
newVertretungsItem.DringlichkeitColor = "#F3D04F";
}
if (customer.AbWelchemKrankheitsTag > 1 && dateTime < absenceTime.Start.Value.AddDays(customer.AbWelchemKrankheitsTag - 1))
{
newVertretungsItem.VertretungsStatus = VertretungsStatus.MaKrankKeineVertretungBenoetigt;
newVertretungsItem.Dringlichkeit = $"Vertretung erst ab dem {customer.AbWelchemKrankheitsTag}.Tag benötigt";
newVertretungsItem.DringlichkeitColor = "#FFFFFF";
}
GetVertretungsstatus(newVertretungsItem, dateTime, absenceTime.Start.Value, customer);
}
if (vertretungen != null)
{
foreach (var vertretung in vertretungen)
{
if (vertretung.EmployeeOid == employee.Oid && vertretung.CustomerOid == customer.Oid)
if (vertretung.EmployeeOid != null && vertretung.CustomerOid != null && vertretung.EmployeeOid == employee.Oid && vertretung.CustomerOid == customer.Oid)
{
if (vertretung.VertretungsZeitraumVon <= dateTime && vertretung.VertretungsZeitraumBis >= dateTime)
if (vertretung.VertretungsZeitraumVon.Date <= dateTime && vertretung.VertretungsZeitraumBis.Date >= dateTime)
{
if (vertretung.VertretenderMitarbeiterOid.HasValue)
{
newVertretungsItem.Vertreter = MapperFactory.CompactEmployeeDC_Employee.MapToNewDC(DAOFactory.GenericDAO.LoadByID<Employee>(vertretung.VertretenderMitarbeiterOid.Value));
newVertretungsItem.VertretungsStatus = VertretungsStatus.MaKrankVertretungVorhanden;
newVertretungsItem.VertreterInfoString = GetEmployeeAddressInfo(vertretung.VertretenderMitarbeiterOid.Value);
// Beachten, dass alle Betreuungszeiten vertreten sind!
// TODO: Wenn nur ein Teil einer Betreuungszeit vertreten wird, muss das VertretungsItem kopiert werden!
// TODO: Mitarbeiterarbeitszeiten berücksichtigen!
var arbeitsZeiten = customer.Arbeitszeiten.Where(w => dateTime.InBetween(w.GueltigVon, w.GueltigBis)).ToList();
arbeitsZeiten.AddRange(employee.Arbeitszeiten.Where(w => dateTime.InBetween(w.GueltigVon, w.GueltigBis) && w.Customer != null && w.Customer.Equals(customer)));
var possibleAssistanceTimes = new List<ArbeitszeitEintrag>();
foreach(var item in arbeitsZeiten)
{
if(dateTime.InBetween(item.GueltigVon, item.GueltigBis))
{
possibleAssistanceTimes.AddRangeIfElementsNotIn(item.ArbeitszeitEintraege.Where(w => DateTimeUtils.ConvertAppointmentDayOfWeekToDayOfWeek(w.Tag).Equals(dateTime.DayOfWeek)));
}
}
if(GetIsSubstitutedCompletely(possibleAssistanceTimes, vertretung, dateTime, absenceTime))
{
newVertretungsItem.VertretungsStatus = VertretungsStatus.MaKrankVertretungVorhanden;
}
else if(vertretung.Oid.HasValue)
{
// Oid speichern und am Ende die Vertretung kopieren
vertretungsOids.AddIfNotIn(vertretung.Oid.Value);
}
}
newVertretungsItem.Vertretung = MapperFactory.VertretungDC_Vertretung.MapToNewDC(vertretung);
@@ -312,6 +441,58 @@ namespace BeWo.Service.SBD
SetTeamleitung(employee, newVertretungsItem);
}
foreach(var substitutionOid in vertretungsOids)
{
var copy = new VertretungsItemDC
{
Datum = newVertretungsItem.Datum,
Arbeitszeiten = newVertretungsItem.Arbeitszeiten,
Customer = newVertretungsItem.Customer,
Employee = newVertretungsItem.Employee,
Schule = newVertretungsItem.Schule,
Dringlichkeit = newVertretungsItem.Dringlichkeit,
DringlichkeitColor = newVertretungsItem.DringlichkeitColor,
Teamleitung = newVertretungsItem.Teamleitung,
Geschlecht = newVertretungsItem.Geschlecht,
Pflege = newVertretungsItem.Pflege,
Toilettengang = newVertretungsItem.Toilettengang,
MitarbeiterEinsatzBei = newVertretungsItem.MitarbeiterEinsatzBei,
Aggressiv = newVertretungsItem.Aggressiv,
MitarbeiterStatusColor = newVertretungsItem.MitarbeiterStatusColor,
KlientStatusColor = newVertretungsItem.KlientStatusColor,
Krankheitszeitraum = newVertretungsItem.Krankheitszeitraum,
VertretungsStatus = newVertretungsItem.VertretungsStatus
};
copy.Krankheitszeitraum = newVertretungsItem.Krankheitszeitraum;
copy.Absencetime = newVertretungsItem.Absencetime;
copy.EmployeeContactInformation = newVertretungsItem.EmployeeContactInformation;
copy.Schools = newVertretungsItem.Schools;
copy.LastSubstitutions = newVertretungsItem.LastSubstitutions;
copy.EmployeePflege = newVertretungsItem.EmployeePflege;
copy.EmployeeAggressivitaet = newVertretungsItem.EmployeeAggressivitaet;
copy.EmployeeHygienebelehrung = newVertretungsItem.EmployeeHygienebelehrung;
copy.EmployeeSchutzstufe = newVertretungsItem.EmployeeSchutzstufe;
copy.EmployeeToilettengang = newVertretungsItem.EmployeeToilettengang;
copy.CustomerAggressivitaet = newVertretungsItem.CustomerAggressivitaet;
copy.CustomerContactInformation = newVertretungsItem.CustomerContactInformation;
copy.CustomerHygienebelehrung = newVertretungsItem.CustomerHygienebelehrung;
copy.CustomerPflege = newVertretungsItem.CustomerPflege;
copy.CustomerSchutzstufe = newVertretungsItem.CustomerSchutzstufe;
copy.Arbeitszeiten = newVertretungsItem.Arbeitszeiten;
copy.CustomerToilettengang = newVertretungsItem.CustomerToilettengang;
copy.Schools = newVertretungsItem.Schools;
copy.Schule = newVertretungsItem.Schule;
GetVertretungsstatus(copy, copy.Datum, copy.Absencetime.Start.Value, DAOFactory.GenericDAO.LoadByID<Customer>(copy.Customer.Oid.Value));
vertretungsItems.AddIfNotIn(copy);
}
vertretungsItems.Add(newVertretungsItem);
}
@@ -432,7 +613,7 @@ namespace BeWo.Service.SBD
}
}
private static void AddArbeitszeitToVertretungsItem(VertretungsItemDC vertretungsItem, Employee employee, DateTime datum)
private static void AddArbeitszeitToVertretungsItem(VertretungsItemDC vertretungsItem, Employee employee, DateTime datum, Customer customer)
{
var shouldAddArbeitszeit = false;
@@ -467,5 +648,127 @@ namespace BeWo.Service.SBD
}
}
}
private static bool GetIsSubstitutedCompletely(IEnumerable<ArbeitszeitEintrag> assistanceTimes, Vertretung substitution, DateTime dateTime, AbsenceTime absenceTime)
{
// TODO: absenceTime beachten!
/*
* Vertretung mit AssistanceTimes und AbsenceTime vergleichen
*
* AssistanceTimes: Do 08:00 - 10:30 und 10:45 - 12:15 und 12:30 - 14:00
* AbsenceTime: 19.09.2019 09:00 bis 30.09.2019 15:00
* Vertretung 1: 19.09.2019 10:00 bis 22.09.2019 13:00
* Vertretung 2:
*
* Das Ende der Abwesenheit darf nicht größer als das Ende der Vertretung sein
* Der Anfang der Abwesenheit darf nicht kleiner sein als der Anfang der Vertretung
*/
//var valid = absenceTime.Start.HasValue && absenceTime.End.HasValue && absenceTime.End.Value <= substitution.VertretungsZeitraumBis && absenceTime.Start.Value >= substitution.VertretungsZeitraumVon;
//if(!valid)
//{
// return false;
//}
var isSubstituted = true;
if(substitution.CustomerOid == 46)
{
}
foreach(var assistanceTime in assistanceTimes)
{
var assistanceDateTimes = Utils.GetAssistanceTimeComparisonDateTime(assistanceTime.UhrzeitVon, assistanceTime.UhrzeitBis, dateTime);
isSubstituted = assistanceDateTimes.Start.AreInBetweenDates(assistanceDateTimes.End, substitution.VertretungsZeitraumVon, substitution.VertretungsZeitraumBis);
if(!isSubstituted)
{
break;
}
}
return isSubstituted;
}
private static void GetVertretungsstatus(VertretungsItemDC vertretungsItem, DateTime dateTime, DateTime absenceTimeStartDate, Customer customer)
{
if (customer.SubstitutionNeed == SubstitutionNeed.SubstitutionNeeded)
{
vertretungsItem.VertretungsStatus = VertretungsStatus.MaKrankVertretungBenoetigt;
vertretungsItem.Dringlichkeit = "Dringend";
vertretungsItem.DringlichkeitColor = "#FF0000";
}
if (customer.SubstitutionNeed == SubstitutionNeed.SubstitutionWanted && customer.SubstitutionNeed != SubstitutionNeed.SubstitutionNeeded)
{
vertretungsItem.Dringlichkeit = "Möglichst";
vertretungsItem.DringlichkeitColor = "#F3D04F";
}
if (customer.AbWelchemKrankheitsTag > 1 && dateTime < absenceTimeStartDate.AddDays(customer.AbWelchemKrankheitsTag - 1))
{
vertretungsItem.VertretungsStatus = VertretungsStatus.MaKrankKeineVertretungBenoetigt;
vertretungsItem.Dringlichkeit = $"Vertretung erst ab dem {customer.AbWelchemKrankheitsTag}.Tag benötigt";
vertretungsItem.DringlichkeitColor = "#FFFFFF";
}
if (customer.AbWelchemKrankheitsTag == 0 && customer.SubstitutionNeed == SubstitutionNeed.SubstitutionWanted == false && customer.SubstitutionNeed == SubstitutionNeed.SubstitutionNeeded == false)
{
vertretungsItem.VertretungsStatus = VertretungsStatus.MaKrankKeineVertretungBenoetigt;
}
}
private static string GetEmployeeAddressInfo(long employeeOid)
{
var result = string.Empty;
var employee = DAOFactory.GenericDAO.LoadByID<Employee>(employeeOid);
var address = employee.Person.Address;
if (address != null)
{
var addressInfo = string.Empty;
addressInfo += employee.Person.LastNameFirstName;
if (!string.IsNullOrWhiteSpace(address.Street))
{
if (addressInfo.Length > 0)
{
addressInfo += "\n\n";
}
addressInfo += address.Street;
}
if (!string.IsNullOrWhiteSpace(address.PostalCode))
{
if (addressInfo.Length > 0)
{
addressInfo += "\n";
}
addressInfo += address.PostalCode;
}
if (!string.IsNullOrWhiteSpace(address.Town))
{
if (addressInfo.Length > 0)
{
addressInfo += " ";
}
addressInfo += address.Town;
}
result = addressInfo;
}
return result;
}
}
}

View File

@@ -712,5 +712,9 @@ namespace BeWo.Service.ServiceContracts
[FaultContract(typeof(BeWoFault))]
[OperationContract]
List<ContactDC> LoadContactInformationForCustomer(long customerOid);
[FaultContract(typeof(BeWoFault))]
[OperationContract]
object ConvertToNewSubstitutionType();
}
}

View File

@@ -371,5 +371,9 @@ namespace BeWo.Service.ServiceContracts
[FaultContract(typeof(BeWoFault))]
[OperationContract]
List<CompactEmployeeDC> GetAllCompactEmployees();
[FaultContract(typeof(BeWoFault))]
[OperationContract]
List<long> LoadTeamsRelatedCustomerOids(long employeeOid);
}
}

View File

@@ -3,7 +3,6 @@ using System.Collections.Generic;
using System.Linq;
using System.ServiceModel;
using BeWo.Data;
using BeWo.Service.Multitenancy;
using BeWo.Service.Plugins;
using BS.Shared.DataContracts.Compact;
using BeWo.Data.Access;
@@ -18,7 +17,6 @@ using BS.Shared.DataContracts;
using Utils = BeWo.Service.Core.Utils;
using BeWo.Service.Invoicing;
using Castle.Components.DictionaryAdapter;
namespace BeWo.Service.ServiceImplementations
{

View File

@@ -4051,6 +4051,41 @@ namespace BeWo.Service.ServiceImplementations
throw Utils.CreateBeWoFaultException(e);
}
}
public object ConvertToNewSubstitutionType()
{
try
{
var allCustomers = DAOFactory.SearchDAO.GetCustomersWithSubstitutionNeedUnset();
foreach(var customer in allCustomers)
{
if (customer.SubstitutionNeed == SubstitutionNeed.SubstitutionNeedUnset)
{
if (customer.VertretungDringendErforderlich)
{
customer.SubstitutionNeed = SubstitutionNeed.SubstitutionNeeded;
}
else if (customer.VertretungGewuenscht)
{
customer.SubstitutionNeed = SubstitutionNeed.SubstitutionWanted;
}
else
{
customer.SubstitutionNeed = SubstitutionNeed.NoSubstitutionWanted;
}
}
}
DAOFactory.GenericDAO.Update(allCustomers);
return null;
}
catch (Exception e)
{
throw Utils.CreateBeWoFaultException(e);
}
}
}
internal struct WohnheimbuchungsIntervallStruct

View File

@@ -1364,14 +1364,17 @@ namespace BeWo.Service.ServiceImplementations
var vertretungsManager = new VertretungsManager();
var vertretungsListe = vertretungsManager.CreateVertretungsListe(date, date);
// EmployeeOids der Mitarbeiter, die einen abwesenden Mitarbeiter vertreten
var ausgewaehlteVertreter = vertretungsListe.Where(vertretungsItem => vertretungsItem.VertretungsStatus != VertretungsStatus.KlientKrank &&
vertretungsItem.Vertreter != null &&
vertretungsItem.Vertreter.ActivationType == ActivationTypeId.Active).Select(item => item.Vertreter.EmployeeOid);
// EmployeeOids der Betreuer abwesender Klienten, die nicht schon einen anderen Klienten vertreten
var employeeOids = vertretungsListe.Where(vertretungsItem => vertretungsItem.Employee != null &&
vertretungsItem.VertretungsStatus == VertretungsStatus.KlientKrank &&
!ausgewaehlteVertreter.Contains(vertretungsItem.Employee.EmployeeOid)).Select(s => s.Employee.EmployeeOid);
// EmployeeOids von abwesenden Mitarbeitern
var abwesenendeEmployeeOids = vertretungsListe.Where(vertretungsItem => vertretungsItem.VertretungsStatus != VertretungsStatus.KlientKrank &&
vertretungsItem.Employee != null).Select(item => item.Employee.EmployeeOid);
@@ -1506,51 +1509,70 @@ namespace BeWo.Service.ServiceImplementations
public void MakeNewEmployeeHistoryEntry(Employee employee, StatementType statementType)
{
var employeeHistory = new EmployeeHistory
{
ChangeType = statementType,
try
{
var employeeHistory = new EmployeeHistory
{
ChangeType = statementType,
Employee_Aggressiv = employee.Aggressiv,
//Employee_ApplicationUserOid,
//Employee_CancellationPeriod,
Employee_EmployeeColor = employee.EmployeeColor,
//Employee_EntryDate,
Employee_HealthInsurance = employee.HealthInsurance,
//Employee_HourlyRate,
Employee_Hygienebelehrung = employee.Hygienebelehrung,
Employee_InsTs = employee.InsTs,
Employee_InsuranceNumber = employee.InsuranceNumber,
Employee_InsUser = employee.InsUser,
Employee_IsActive = employee.IsActive,
Employee_IsQualified = employee.IsQualified,
//Employee_leavedays,
Employee_Notice = employee.Notice,
Employee_Notice2 = employee.Notice2,
Employee_Oid = employee.Oid,
Employee_PersonnelNumber = employee.PersonnelNumber,
//Employee_PersonOid,
Employee_Pflege = employee.Pflege,
//Employee_ProbationPeriod,
Employee_Schutzstufe = employee.Schutzstufe,
//Employee_Sequence,
Employee_SystemEntryID = employee.SystemEntryID,
Employee_TaxNumber = employee.TaxNumber,
Employee_Text1 = employee.Text1,
Employee_Text2 = employee.Text2,
Employee_Text3 = employee.Text3,
Employee_Text4 = employee.Text4,
Employee_Text5 = employee.Text5,
Employee_Tid = employee.Tid,
Employee_Toilettengang = employee.Toilettengang,
Employee_UdpUser = employee.UdpUser,
Employee_Version = employee.Version,
//Employee_weeklyfls = employee,
//Employee_weeklytotalhours,
};
Employee_Aggressiv = employee.Aggressiv,
//Employee_ApplicationUserOid,
//Employee_CancellationPeriod,
Employee_EmployeeColor = employee.EmployeeColor,
//Employee_EntryDate,
Employee_HealthInsurance = employee.HealthInsurance,
//Employee_HourlyRate,
Employee_Hygienebelehrung = employee.Hygienebelehrung,
Employee_InsTs = employee.InsTs,
Employee_InsuranceNumber = employee.InsuranceNumber,
Employee_InsUser = employee.InsUser,
Employee_IsActive = employee.IsActive,
Employee_IsQualified = employee.IsQualified,
//Employee_leavedays,
Employee_Notice = employee.Notice,
Employee_Notice2 = employee.Notice2,
Employee_Oid = employee.Oid,
Employee_PersonnelNumber = employee.PersonnelNumber,
//Employee_PersonOid,
Employee_Pflege = employee.Pflege,
//Employee_ProbationPeriod,
Employee_Schutzstufe = employee.Schutzstufe,
//Employee_Sequence,
Employee_SystemEntryID = employee.SystemEntryID,
Employee_TaxNumber = employee.TaxNumber,
Employee_Text1 = employee.Text1,
Employee_Text2 = employee.Text2,
Employee_Text3 = employee.Text3,
Employee_Text4 = employee.Text4,
Employee_Text5 = employee.Text5,
Employee_Tid = employee.Tid,
Employee_Toilettengang = employee.Toilettengang,
Employee_UdpUser = employee.UdpUser,
Employee_Version = employee.Version,
//Employee_weeklyfls = employee,
//Employee_weeklytotalhours,
};
CustomerServiceImp.MakeNewPersonHistoryEntry(employee.Person, statementType);
CustomerServiceImp.MakeNewPersonHistoryEntry(employee.Person, statementType);
DAOFactory.GenericDAO.Insert(employeeHistory);
}
DAOFactory.GenericDAO.Insert(employeeHistory);
}
catch (Exception e)
{
throw Utils.CreateBeWoFaultException(e);
}
}
public List<long> LoadTeamsRelatedCustomerOids(long employeeOid)
{
try
{
return DAOFactory.SearchDAO.FindTeamRelatedCustomerOids(employeeOid);
}
catch (Exception e)
{
throw Utils.CreateBeWoFaultException(e);
}
}
}
}

View File

@@ -145,6 +145,8 @@ namespace BS.Shared
Team2Customer = 138,
HomeViewPanel = 139,
ReportTemplate = 140,
Arbeitszeit = 141,
ArbeitszeitEintrag = 142,
}
public enum SystemEntryID
@@ -1030,4 +1032,12 @@ namespace BS.Shared
CustomReportPanel = 6,
CustomXamlPanel = 7
}
public enum SubstitutionNeed
{
SubstitutionNeedUnset = 0,
NoSubstitutionWanted = 1,
SubstitutionWanted = 2,
SubstitutionNeeded = 3
}
}

View File

@@ -47,13 +47,12 @@ namespace BS.Shared.Core
IList<IEnumValue> Values { get; }
IList<IEnumValue> SortedValues { get; }
IEnumValue this[Object enumObj] { get; }
IEnumValue this[object enumObj] { get; }
}
public class DisplayEnum<T> : IDisplayEnum
where T : struct, IComparable, IFormattable, IConvertible
public class DisplayEnum<T> : IDisplayEnum where T : struct, IComparable, IFormattable, IConvertible
{
private readonly Object lockObj = new Object();
private readonly object lockObj = new object();
private readonly ISet<T> excludedValues;
private IList<EnumValue<T>> enumValues;
@@ -119,7 +118,7 @@ namespace BS.Shared.Core
protected virtual EnumValue<T> CreateEnumValue(T enumValue)
{
var value = new EnumValue<T>(enumValue, EnumTranslations.AllTranslations[(Enum)(Object)enumValue]);
var value = new EnumValue<T>(enumValue, EnumTranslations.AllTranslations[(Enum)(object)enumValue]);
return value;
}
@@ -133,34 +132,23 @@ namespace BS.Shared.Core
}
}
public EnumValue<T> this[T? enumObj]
public EnumValue<T> this[T? enumObj] => enumObj != null ? this[enumObj.Value] : null;
#region IDisplayEnum Implementation
IList<IEnumValue> IDisplayEnum.Values => Values.Cast<IEnumValue>().ToList();
IList<IEnumValue> IDisplayEnum.SortedValues => SortedValues.Cast<IEnumValue>().ToList();
IEnumValue IDisplayEnum.this[object enumObj]
{
get
{
return enumObj != null ? this[enumObj.Value] : null;
}
}
#region IDisplayEnum Implementation
IList<IEnumValue> IDisplayEnum.Values
{
get { return this.Values.Cast<IEnumValue>().ToList(); }
}
IList<IEnumValue> IDisplayEnum.SortedValues
{
get { return SortedValues.Cast<IEnumValue>().ToList(); }
}
IEnumValue IDisplayEnum.this[Object enumObj]
{
get
{
if (enumObj is T)
if (enumObj is T obj)
{
return this[(T)enumObj];
return this[obj];
}
return null;
}
}

View File

@@ -51,6 +51,8 @@ namespace BS.Shared.Core
public static Dictionary<object, String> SchulbegleitenderZugehörigkeitsTypTranslations;
public static Dictionary<SubstitutionNeed, string> SubstitutionNeedTranslations;
static EnumTranslations()
{
#region UserRightType2Translations
@@ -1141,6 +1143,16 @@ namespace BS.Shared.Core
#endregion
#region SubstitutionNeedTranslations
SubstitutionNeedTranslations = new Dictionary<SubstitutionNeed, string>
{
{SubstitutionNeed.NoSubstitutionWanted, "Kein Vertretungsbedarf"},
{SubstitutionNeed.SubstitutionWanted, "Vertretung gewünscht"},
{SubstitutionNeed.SubstitutionNeeded, "Vertretung dingend erforderlich"}
};
#endregion
AllTranslations = new Dictionary<Enum, String>();
ZahlungstypTranslations.DoForEach(p => AllTranslations.AddAndIgnoreDuplicates(p.Key, p.Value));
AuszahlungsintervallTranslations.DoForEach(p => AllTranslations.AddAndIgnoreDuplicates(p.Key, p.Value));

View File

@@ -902,6 +902,28 @@ namespace BS.Shared.Core
}
public static readonly string TestAppointmentNotice = "k9Rx2mU4y";
public static ArbeitszeitEintragDateTimeObject GetAssistanceTimeComparisonDateTime(string uhrzeitVon, string uhrzeitBis, DateTime date)
{
var day = date.GetShortDateTime();
var isStartSuccessfullyParsed = DateTime.TryParse($"{day:dd.MM.yyyy} {uhrzeitVon}", out var start);
var isEndSuccessfullyParsed = DateTime.TryParse($"{day:dd.MM.yyyy} {uhrzeitBis}", out var end);
if (isStartSuccessfullyParsed && isEndSuccessfullyParsed)
{
return new ArbeitszeitEintragDateTimeObject(start, end);
}
return new ArbeitszeitEintragDateTimeObject(start, end);
}
public static bool IsArbeitsZeitInInterval(DateTime intervalStart, DateTime intervalEnd, ArbeitszeitDC arbeitszeit)
{
return false;
}
}
public struct NullCompareResult
@@ -910,4 +932,16 @@ namespace BS.Shared.Core
public bool Different;
}
public struct ArbeitszeitEintragDateTimeObject
{
public DateTime Start { get; set; }
public DateTime End { get; set; }
public ArbeitszeitEintragDateTimeObject(DateTime start, DateTime end)
{
Start = start;
End = end;
}
}
}

View File

@@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using System.Runtime.Serialization;
using BS.Shared.DataContracts.Compact;
namespace BS.Shared.DataContracts
{
@@ -25,5 +26,7 @@ namespace BS.Shared.DataContracts
[DataMember]
public List<ArbeitszeitEintragDC> Eintraege { get; set; }
[DataMember]
public CompactCustomerDC Customer { get; set; }
}
}

View File

@@ -1,4 +1,5 @@
using System.Runtime.Serialization;
using System;
using System.Runtime.Serialization;
using BS.Shared.DataContracts.Compact;
@@ -35,5 +36,10 @@ namespace BS.Shared.DataContracts
{
return $"{UhrzeitVon} - {UhrzeitBis}";
}
public DayOfWeek DayOfWeek => Core.DateTimeUtils.ConvertAppointmentDayOfWeekToDayOfWeek(Tag);
[DataMember]
public CompactCustomerDC Customer { get; set; }
}
}

View File

@@ -0,0 +1,21 @@
namespace BS.Shared.DataContracts
{
public partial class VertretungsItemDC
{
public override bool Equals(object obj)
{
if(obj is VertretungsItemDC item2)
{
var areCustomersEqual = Customer?.Equals(item2.Customer) ?? false; // Klientenabwesenheit
var areEmployeesEqual = Employee?.Equals(item2.Employee) ?? false; // Mitarbeiterabwesenheit
var areTheSameSubstitution = Vertretung?.Equals(item2.Vertretung) ?? false;
var haveTheSameAbsenceTimes = Absencetime?.Equals(item2.Absencetime) ?? false;
return (areCustomersEqual || areEmployeesEqual) && areTheSameSubstitution && haveTheSameAbsenceTimes;
}
return false;
}
}
}

View File

@@ -142,5 +142,11 @@ namespace BS.Shared.DataContracts.Compact
[DataMember]
public int SubstitutionStartingDayCount { get; set; }
[DataMember]
public SubstitutionNeed SubstitutionNeed { get; set; }
[DataMember]
public bool IsSubstitutionNeeded { get; set; }
}
}

View File

@@ -188,5 +188,8 @@ namespace BS.Shared.DataContracts
[DataMember]
public List<ArbeitszeitDC> Arbeitszeiten { get; set; }
[DataMember]
public SubstitutionNeed SubstitutionNeed { get; set; }
}
}

View File

@@ -6,7 +6,7 @@ using BS.Shared.DataContracts.Compact;
namespace BS.Shared.DataContracts
{
[DataContract]
public class VertretungsItemDC : IDataContract
public partial class VertretungsItemDC : IDataContract
{
[DataMember]
public DateTime Datum { get; set; }
@@ -119,6 +119,10 @@ namespace BS.Shared.DataContracts
[DataMember]
public string EmployeeSchutzstufe { get; set; }
[DataMember]
public string VertreterInfoString { get; set; }
[DataMember]
public string EmployeeAddressString { get; set; }
}
}

View File

@@ -421,7 +421,7 @@ namespace BS.Shared.Extensions
/// <summary>
/// Erzeugt aus zwei Datumsobjekten ein neues mit den Datumsangaben des ersten und den Zeitangaben des zweiten Parameters.
/// </summary>
/// <param name="first">Datum dessen Datewerte übernommen.</param>
/// <param name="first">Datum dessen Datewerte übernommen werden.</param>
/// <param name="second">Datum dessen Zeitwerte übernommen werden.</param>
/// <returns>Gibt ein neues Objekt der Klasse Datum mit dem Datum des ersten Parameters und der Zeit des zweiten Parameters zurück.</returns>
public static DateTime MergeDatesByDate(this DateTime first, DateTime second)
@@ -467,5 +467,46 @@ namespace BS.Shared.Extensions
return WeekOfMonth.None;
}
}
/// <summary>
/// Prüft, ob sich ein Interval aus start1 und end1 innerhalb vom zweiten Interval, das aus start2 und end2 besteht, befindet oder sich mit diesem deckt.
/// </summary>
/// <param name="start1">Beginn des ersten Intervalls.</param>
/// <param name="end1">Ende des ersten Intervalls.</param>
/// <param name="start2">Beginn des zweiten Intervalls.</param>
/// <param name="end2">Ende des zweiten Intervalls.</param>
/// <returns>Ob der das erste Intervall im zweiten liegt</returns>
public static bool AreInBetweenDates(this DateTime start1, DateTime end1, DateTime start2, DateTime end2)
{
return start1 >= start2 && end1 <= end2;
}
/// <summary>
/// Prüft, ob das Datum in einem Zeitraum liegt. Wurde für Betreuungszeiten geschrieben.
/// Achtung: Sind beide Daten des Zeitraums null, wird true zurückgegeben!
/// </summary>
/// <param name="dateTime">Das Datum bei dem zu prüfen ist, ob es im angegebenen Zeitraum liegt</param>
/// <param name="spanStart">Der Beginn des Zeitintervalls</param>
/// <param name="spanEnd">Das Ende des Zeitintervalls</param>
/// <returns>Ob das Datum im angegebenen Zeitraum liegt</returns>
public static bool InBetween(this DateTime dateTime, DateTime? spanStart, DateTime? spanEnd)
{
if(spanStart == null && spanEnd == null)
{
return true;
}
if(spanStart.HasValue && spanEnd.HasValue)
{
return InBetween(dateTime, spanStart.Value, spanEnd.Value, false);
}
if(spanStart == null)
{
return dateTime < spanEnd.Value;
}
return true;
}
}
}

View File

@@ -150,6 +150,7 @@
<Compile Include="DataContracts\AdditionalServiceGroupOfPeopleDC.cs" />
<Compile Include="DataContracts\AdditionalServiceGroupOfPeopleRelationDC.cs" />
<Compile Include="DataContracts\AdditionalServiceRegionDC.cs" />
<Compile Include="DataContracts\ClientPartials\VertretungsItemDC.cs" />
<Compile Include="DataContracts\ReportTemplateDC.cs" />
<Compile Include="DataContracts\BudgetDC.cs" />
<Compile Include="DataContracts\HomeViewPanelDC.cs" />