Unterschriftenstatus zur ServiceRecordHistory hinzugefügt
Frommen: Quittierungsbeleg angepasst; die Unterschriftengrafiken sind jetzt größer Fehler von Tempusdominus bei den Zeitfeldern des MoKs behoben. Quittierungsbelegmodul im MoK: Legende der Symbole hinzugefügt Validierung von Gruppenbuchungen im MoK verbessert.
This commit is contained in:
156
BeWo/BeWo.csproj
156
BeWo/BeWo.csproj
@@ -2548,392 +2548,392 @@
|
||||
<ItemGroup>
|
||||
<PublishFile Include="Blacklight.Wpf.Controls">
|
||||
<Visible>False</Visible>
|
||||
<PublishState>Include</PublishState>
|
||||
<IncludeHash>True</IncludeHash>
|
||||
<Group>
|
||||
</Group>
|
||||
<TargetPath>
|
||||
</TargetPath>
|
||||
<PublishState>Include</PublishState>
|
||||
<IncludeHash>True</IncludeHash>
|
||||
<FileType>Assembly</FileType>
|
||||
</PublishFile>
|
||||
<PublishFile Include="DevExpress.Charts.v17.1.Core">
|
||||
<Visible>False</Visible>
|
||||
<PublishState>Include</PublishState>
|
||||
<IncludeHash>True</IncludeHash>
|
||||
<Group>
|
||||
</Group>
|
||||
<TargetPath>
|
||||
</TargetPath>
|
||||
<PublishState>Include</PublishState>
|
||||
<IncludeHash>True</IncludeHash>
|
||||
<FileType>Assembly</FileType>
|
||||
</PublishFile>
|
||||
<PublishFile Include="DevExpress.Data.v17.1">
|
||||
<Visible>False</Visible>
|
||||
<PublishState>Include</PublishState>
|
||||
<IncludeHash>True</IncludeHash>
|
||||
<Group>
|
||||
</Group>
|
||||
<TargetPath>
|
||||
</TargetPath>
|
||||
<PublishState>Include</PublishState>
|
||||
<IncludeHash>True</IncludeHash>
|
||||
<FileType>Assembly</FileType>
|
||||
</PublishFile>
|
||||
<PublishFile Include="DevExpress.Data.v17.1.Linq">
|
||||
<Visible>False</Visible>
|
||||
<PublishState>Include</PublishState>
|
||||
<IncludeHash>True</IncludeHash>
|
||||
<Group>
|
||||
</Group>
|
||||
<TargetPath>
|
||||
</TargetPath>
|
||||
<PublishState>Include</PublishState>
|
||||
<IncludeHash>True</IncludeHash>
|
||||
<FileType>Assembly</FileType>
|
||||
</PublishFile>
|
||||
<PublishFile Include="DevExpress.Office.v17.1.Core">
|
||||
<Visible>False</Visible>
|
||||
<PublishState>Include</PublishState>
|
||||
<IncludeHash>True</IncludeHash>
|
||||
<Group>
|
||||
</Group>
|
||||
<TargetPath>
|
||||
</TargetPath>
|
||||
<PublishState>Include</PublishState>
|
||||
<IncludeHash>True</IncludeHash>
|
||||
<FileType>Assembly</FileType>
|
||||
</PublishFile>
|
||||
<PublishFile Include="DevExpress.PivotGrid.v17.1.Core">
|
||||
<Visible>False</Visible>
|
||||
<PublishState>Include</PublishState>
|
||||
<IncludeHash>True</IncludeHash>
|
||||
<Group>
|
||||
</Group>
|
||||
<TargetPath>
|
||||
</TargetPath>
|
||||
<PublishState>Include</PublishState>
|
||||
<IncludeHash>True</IncludeHash>
|
||||
<FileType>Assembly</FileType>
|
||||
</PublishFile>
|
||||
<PublishFile Include="DevExpress.Printing.v17.1.Core">
|
||||
<Visible>False</Visible>
|
||||
<PublishState>Include</PublishState>
|
||||
<IncludeHash>True</IncludeHash>
|
||||
<Group>
|
||||
</Group>
|
||||
<TargetPath>
|
||||
</TargetPath>
|
||||
<PublishState>Include</PublishState>
|
||||
<IncludeHash>True</IncludeHash>
|
||||
<FileType>Assembly</FileType>
|
||||
</PublishFile>
|
||||
<PublishFile Include="DevExpress.RichEdit.v17.1.Core">
|
||||
<Visible>False</Visible>
|
||||
<PublishState>Include</PublishState>
|
||||
<IncludeHash>True</IncludeHash>
|
||||
<Group>
|
||||
</Group>
|
||||
<TargetPath>
|
||||
</TargetPath>
|
||||
<PublishState>Include</PublishState>
|
||||
<IncludeHash>True</IncludeHash>
|
||||
<FileType>Assembly</FileType>
|
||||
</PublishFile>
|
||||
<PublishFile Include="DevExpress.RichEdit.v17.1.Export">
|
||||
<Visible>False</Visible>
|
||||
<PublishState>Include</PublishState>
|
||||
<IncludeHash>True</IncludeHash>
|
||||
<Group>
|
||||
</Group>
|
||||
<TargetPath>
|
||||
</TargetPath>
|
||||
<PublishState>Include</PublishState>
|
||||
<IncludeHash>True</IncludeHash>
|
||||
<FileType>Assembly</FileType>
|
||||
</PublishFile>
|
||||
<PublishFile Include="DevExpress.Sparkline.v17.1.Core">
|
||||
<Visible>False</Visible>
|
||||
<PublishState>Include</PublishState>
|
||||
<IncludeHash>True</IncludeHash>
|
||||
<Group>
|
||||
</Group>
|
||||
<TargetPath>
|
||||
</TargetPath>
|
||||
<PublishState>Include</PublishState>
|
||||
<IncludeHash>True</IncludeHash>
|
||||
<FileType>Assembly</FileType>
|
||||
</PublishFile>
|
||||
<PublishFile Include="DevExpress.Utils.v17.1">
|
||||
<Visible>False</Visible>
|
||||
<PublishState>Include</PublishState>
|
||||
<IncludeHash>True</IncludeHash>
|
||||
<Group>
|
||||
</Group>
|
||||
<TargetPath>
|
||||
</TargetPath>
|
||||
<PublishState>Include</PublishState>
|
||||
<IncludeHash>True</IncludeHash>
|
||||
<FileType>Assembly</FileType>
|
||||
</PublishFile>
|
||||
<PublishFile Include="DevExpress.Xpf.Accordion.v17.1">
|
||||
<Visible>False</Visible>
|
||||
<PublishState>Include</PublishState>
|
||||
<IncludeHash>True</IncludeHash>
|
||||
<Group>
|
||||
</Group>
|
||||
<TargetPath>
|
||||
</TargetPath>
|
||||
<PublishState>Include</PublishState>
|
||||
<IncludeHash>True</IncludeHash>
|
||||
<FileType>Assembly</FileType>
|
||||
</PublishFile>
|
||||
<PublishFile Include="DevExpress.Xpf.Charts.v17.1">
|
||||
<Visible>False</Visible>
|
||||
<PublishState>Include</PublishState>
|
||||
<IncludeHash>True</IncludeHash>
|
||||
<Group>
|
||||
</Group>
|
||||
<TargetPath>
|
||||
</TargetPath>
|
||||
<PublishState>Include</PublishState>
|
||||
<IncludeHash>True</IncludeHash>
|
||||
<FileType>Assembly</FileType>
|
||||
</PublishFile>
|
||||
<PublishFile Include="DevExpress.Xpf.Core.v17.1">
|
||||
<Visible>False</Visible>
|
||||
<PublishState>Include</PublishState>
|
||||
<IncludeHash>True</IncludeHash>
|
||||
<Group>
|
||||
</Group>
|
||||
<TargetPath>
|
||||
</TargetPath>
|
||||
<PublishState>Include</PublishState>
|
||||
<IncludeHash>True</IncludeHash>
|
||||
<FileType>Assembly</FileType>
|
||||
</PublishFile>
|
||||
<PublishFile Include="DevExpress.Xpf.Docking.v17.1">
|
||||
<Visible>False</Visible>
|
||||
<PublishState>Include</PublishState>
|
||||
<IncludeHash>True</IncludeHash>
|
||||
<Group>
|
||||
</Group>
|
||||
<TargetPath>
|
||||
</TargetPath>
|
||||
<PublishState>Include</PublishState>
|
||||
<IncludeHash>True</IncludeHash>
|
||||
<FileType>Assembly</FileType>
|
||||
</PublishFile>
|
||||
<PublishFile Include="DevExpress.Xpf.Grid.v17.1">
|
||||
<Visible>False</Visible>
|
||||
<PublishState>Include</PublishState>
|
||||
<IncludeHash>True</IncludeHash>
|
||||
<Group>
|
||||
</Group>
|
||||
<TargetPath>
|
||||
</TargetPath>
|
||||
<PublishState>Include</PublishState>
|
||||
<IncludeHash>True</IncludeHash>
|
||||
<FileType>Assembly</FileType>
|
||||
</PublishFile>
|
||||
<PublishFile Include="DevExpress.Xpf.Grid.v17.1.Core">
|
||||
<Visible>False</Visible>
|
||||
<PublishState>Include</PublishState>
|
||||
<IncludeHash>True</IncludeHash>
|
||||
<Group>
|
||||
</Group>
|
||||
<TargetPath>
|
||||
</TargetPath>
|
||||
<PublishState>Include</PublishState>
|
||||
<IncludeHash>True</IncludeHash>
|
||||
<FileType>Assembly</FileType>
|
||||
</PublishFile>
|
||||
<PublishFile Include="DevExpress.Xpf.Layout.v17.1.Core">
|
||||
<Visible>False</Visible>
|
||||
<PublishState>Include</PublishState>
|
||||
<IncludeHash>True</IncludeHash>
|
||||
<Group>
|
||||
</Group>
|
||||
<TargetPath>
|
||||
</TargetPath>
|
||||
<PublishState>Include</PublishState>
|
||||
<IncludeHash>True</IncludeHash>
|
||||
<FileType>Assembly</FileType>
|
||||
</PublishFile>
|
||||
<PublishFile Include="DevExpress.Xpf.Mvvm.v17.1">
|
||||
<Visible>False</Visible>
|
||||
<PublishState>Include</PublishState>
|
||||
<IncludeHash>True</IncludeHash>
|
||||
<Group>
|
||||
</Group>
|
||||
<TargetPath>
|
||||
</TargetPath>
|
||||
<PublishState>Include</PublishState>
|
||||
<IncludeHash>True</IncludeHash>
|
||||
<FileType>Assembly</FileType>
|
||||
</PublishFile>
|
||||
<PublishFile Include="DevExpress.Xpf.Printing.v17.1">
|
||||
<Visible>False</Visible>
|
||||
<PublishState>Include</PublishState>
|
||||
<IncludeHash>True</IncludeHash>
|
||||
<Group>
|
||||
</Group>
|
||||
<TargetPath>
|
||||
</TargetPath>
|
||||
<PublishState>Include</PublishState>
|
||||
<IncludeHash>True</IncludeHash>
|
||||
<FileType>Assembly</FileType>
|
||||
</PublishFile>
|
||||
<PublishFile Include="DevExpress.Xpf.Printing.v17.1.Core">
|
||||
<Visible>False</Visible>
|
||||
<PublishState>Include</PublishState>
|
||||
<IncludeHash>True</IncludeHash>
|
||||
<Group>
|
||||
</Group>
|
||||
<TargetPath>
|
||||
</TargetPath>
|
||||
<PublishState>Include</PublishState>
|
||||
<IncludeHash>True</IncludeHash>
|
||||
<FileType>Assembly</FileType>
|
||||
</PublishFile>
|
||||
<PublishFile Include="DevExpress.Xpf.Ribbon.v17.1">
|
||||
<Visible>False</Visible>
|
||||
<PublishState>Include</PublishState>
|
||||
<IncludeHash>True</IncludeHash>
|
||||
<Group>
|
||||
</Group>
|
||||
<TargetPath>
|
||||
</TargetPath>
|
||||
<PublishState>Include</PublishState>
|
||||
<IncludeHash>True</IncludeHash>
|
||||
<FileType>Assembly</FileType>
|
||||
</PublishFile>
|
||||
<PublishFile Include="DevExpress.Xpf.Scheduler.v17.1">
|
||||
<Visible>False</Visible>
|
||||
<PublishState>Include</PublishState>
|
||||
<IncludeHash>True</IncludeHash>
|
||||
<Group>
|
||||
</Group>
|
||||
<TargetPath>
|
||||
</TargetPath>
|
||||
<PublishState>Include</PublishState>
|
||||
<IncludeHash>True</IncludeHash>
|
||||
<FileType>Assembly</FileType>
|
||||
</PublishFile>
|
||||
<PublishFile Include="DevExpress.Xpf.Themes.LightGray.v17.1">
|
||||
<Visible>False</Visible>
|
||||
<PublishState>Include</PublishState>
|
||||
<IncludeHash>True</IncludeHash>
|
||||
<Group>
|
||||
</Group>
|
||||
<TargetPath>
|
||||
</TargetPath>
|
||||
<PublishState>Include</PublishState>
|
||||
<IncludeHash>True</IncludeHash>
|
||||
<FileType>Assembly</FileType>
|
||||
</PublishFile>
|
||||
<PublishFile Include="DevExpress.Xpf.Themes.Office2007Black.v17.1">
|
||||
<Visible>False</Visible>
|
||||
<PublishState>Include</PublishState>
|
||||
<IncludeHash>True</IncludeHash>
|
||||
<Group>
|
||||
</Group>
|
||||
<TargetPath>
|
||||
</TargetPath>
|
||||
<PublishState>Include</PublishState>
|
||||
<IncludeHash>True</IncludeHash>
|
||||
<FileType>Assembly</FileType>
|
||||
</PublishFile>
|
||||
<PublishFile Include="DevExpress.Xpf.Themes.Office2010Black.v17.1">
|
||||
<Visible>False</Visible>
|
||||
<PublishState>Include</PublishState>
|
||||
<IncludeHash>True</IncludeHash>
|
||||
<Group>
|
||||
</Group>
|
||||
<TargetPath>
|
||||
</TargetPath>
|
||||
<PublishState>Include</PublishState>
|
||||
<IncludeHash>True</IncludeHash>
|
||||
<FileType>Assembly</FileType>
|
||||
</PublishFile>
|
||||
<PublishFile Include="DevExpress.Xpf.Themes.Office2013.v17.1">
|
||||
<Visible>False</Visible>
|
||||
<PublishState>Include</PublishState>
|
||||
<IncludeHash>True</IncludeHash>
|
||||
<Group>
|
||||
</Group>
|
||||
<TargetPath>
|
||||
</TargetPath>
|
||||
<PublishState>Include</PublishState>
|
||||
<IncludeHash>True</IncludeHash>
|
||||
<FileType>Assembly</FileType>
|
||||
</PublishFile>
|
||||
<PublishFile Include="DevExpress.Xpf.Themes.Office2016White.v17.1">
|
||||
<Visible>False</Visible>
|
||||
<PublishState>Include</PublishState>
|
||||
<IncludeHash>True</IncludeHash>
|
||||
<Group>
|
||||
</Group>
|
||||
<TargetPath>
|
||||
</TargetPath>
|
||||
<PublishState>Include</PublishState>
|
||||
<IncludeHash>True</IncludeHash>
|
||||
<FileType>Assembly</FileType>
|
||||
</PublishFile>
|
||||
<PublishFile Include="DevExpress.XtraBars.v17.1">
|
||||
<Visible>False</Visible>
|
||||
<PublishState>Include</PublishState>
|
||||
<IncludeHash>True</IncludeHash>
|
||||
<Group>
|
||||
</Group>
|
||||
<TargetPath>
|
||||
</TargetPath>
|
||||
<PublishState>Include</PublishState>
|
||||
<IncludeHash>True</IncludeHash>
|
||||
<FileType>Assembly</FileType>
|
||||
</PublishFile>
|
||||
<PublishFile Include="DevExpress.XtraCharts.v17.1">
|
||||
<Visible>False</Visible>
|
||||
<PublishState>Include</PublishState>
|
||||
<IncludeHash>True</IncludeHash>
|
||||
<Group>
|
||||
</Group>
|
||||
<TargetPath>
|
||||
</TargetPath>
|
||||
<PublishState>Include</PublishState>
|
||||
<IncludeHash>True</IncludeHash>
|
||||
<FileType>Assembly</FileType>
|
||||
</PublishFile>
|
||||
<PublishFile Include="DevExpress.XtraEditors.v17.1">
|
||||
<Visible>False</Visible>
|
||||
<PublishState>Include</PublishState>
|
||||
<IncludeHash>True</IncludeHash>
|
||||
<Group>
|
||||
</Group>
|
||||
<TargetPath>
|
||||
</TargetPath>
|
||||
<PublishState>Include</PublishState>
|
||||
<IncludeHash>True</IncludeHash>
|
||||
<FileType>Assembly</FileType>
|
||||
</PublishFile>
|
||||
<PublishFile Include="DevExpress.XtraNavBar.v17.1">
|
||||
<Visible>False</Visible>
|
||||
<PublishState>Include</PublishState>
|
||||
<IncludeHash>True</IncludeHash>
|
||||
<Group>
|
||||
</Group>
|
||||
<TargetPath>
|
||||
</TargetPath>
|
||||
<PublishState>Include</PublishState>
|
||||
<IncludeHash>True</IncludeHash>
|
||||
<FileType>Assembly</FileType>
|
||||
</PublishFile>
|
||||
<PublishFile Include="DevExpress.XtraPivotGrid.v17.1">
|
||||
<Visible>False</Visible>
|
||||
<PublishState>Include</PublishState>
|
||||
<IncludeHash>True</IncludeHash>
|
||||
<Group>
|
||||
</Group>
|
||||
<TargetPath>
|
||||
</TargetPath>
|
||||
<PublishState>Include</PublishState>
|
||||
<IncludeHash>True</IncludeHash>
|
||||
<FileType>Assembly</FileType>
|
||||
</PublishFile>
|
||||
<PublishFile Include="DevExpress.XtraPrinting.v17.1">
|
||||
<Visible>False</Visible>
|
||||
<PublishState>Include</PublishState>
|
||||
<IncludeHash>True</IncludeHash>
|
||||
<Group>
|
||||
</Group>
|
||||
<TargetPath>
|
||||
</TargetPath>
|
||||
<PublishState>Include</PublishState>
|
||||
<IncludeHash>True</IncludeHash>
|
||||
<FileType>Assembly</FileType>
|
||||
</PublishFile>
|
||||
<PublishFile Include="DevExpress.XtraReports.v17.1">
|
||||
<Visible>False</Visible>
|
||||
<PublishState>Include</PublishState>
|
||||
<IncludeHash>True</IncludeHash>
|
||||
<Group>
|
||||
</Group>
|
||||
<TargetPath>
|
||||
</TargetPath>
|
||||
<PublishState>Include</PublishState>
|
||||
<IncludeHash>True</IncludeHash>
|
||||
<FileType>Assembly</FileType>
|
||||
</PublishFile>
|
||||
<PublishFile Include="DevExpress.XtraScheduler.v17.1">
|
||||
<Visible>False</Visible>
|
||||
<PublishState>Include</PublishState>
|
||||
<IncludeHash>True</IncludeHash>
|
||||
<Group>
|
||||
</Group>
|
||||
<TargetPath>
|
||||
</TargetPath>
|
||||
<PublishState>Include</PublishState>
|
||||
<IncludeHash>True</IncludeHash>
|
||||
<FileType>Assembly</FileType>
|
||||
</PublishFile>
|
||||
<PublishFile Include="DevExpress.XtraScheduler.v17.1.Core">
|
||||
<Visible>False</Visible>
|
||||
<PublishState>Include</PublishState>
|
||||
<IncludeHash>True</IncludeHash>
|
||||
<Group>
|
||||
</Group>
|
||||
<TargetPath>
|
||||
</TargetPath>
|
||||
<PublishState>Include</PublishState>
|
||||
<IncludeHash>True</IncludeHash>
|
||||
<FileType>Assembly</FileType>
|
||||
</PublishFile>
|
||||
<PublishFile Include="DevExpress.XtraScheduler.v17.1.Reporting">
|
||||
<Visible>False</Visible>
|
||||
<PublishState>Include</PublishState>
|
||||
<IncludeHash>True</IncludeHash>
|
||||
<Group>
|
||||
</Group>
|
||||
<TargetPath>
|
||||
</TargetPath>
|
||||
<PublishState>Include</PublishState>
|
||||
<IncludeHash>True</IncludeHash>
|
||||
<FileType>Assembly</FileType>
|
||||
</PublishFile>
|
||||
<PublishFile Include="DevExpress.XtraTreeList.v17.1">
|
||||
<Visible>False</Visible>
|
||||
<PublishState>Include</PublishState>
|
||||
<IncludeHash>True</IncludeHash>
|
||||
<Group>
|
||||
</Group>
|
||||
<TargetPath>
|
||||
</TargetPath>
|
||||
<PublishState>Include</PublishState>
|
||||
<IncludeHash>True</IncludeHash>
|
||||
<FileType>Assembly</FileType>
|
||||
</PublishFile>
|
||||
</ItemGroup>
|
||||
|
||||
@@ -21,6 +21,7 @@ namespace BeWo.Scheduler.Converter
|
||||
{
|
||||
if(visualAppointmentViewInfo.CustomViewInfo is CustomFieldCollection customFieldCollection && customFieldCollection[nameof(CustomFieldStorage)] is CustomFieldStorage customFieldStorage)
|
||||
{
|
||||
// ToDo: Bei Terminen einer Serie stimmen die Angaben nicht immer! Ist erst in DevExpress-Version 19.2.6 gefixt!
|
||||
var isAbsenceTime = customFieldStorage.IsAbsenceTime;
|
||||
var isTask = customFieldStorage.IsTask;
|
||||
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
<!-- Region Appointment Templates -->
|
||||
|
||||
<!-- Region VerticalAppointmentTemplate -->
|
||||
<!-- Wird für alle nicht-ganztäglichen Termine benutzt außer in der Monatsansicht -->
|
||||
<ControlTemplate x:Key="{dxscht:SchedulerViewThemeKey ResourceKey=VerticalAppointmentTemplate, IsThemeIndependent=true}" TargetType="{x:Type dxschint:VisualVerticalAppointmentControl}">
|
||||
<dxschint:AppointmentColorConvertControl x:Name="clrConvCtrl" ControlColor="{Binding Path=ViewInfo.CustomViewInfo[CustomFieldStorage].BackgroundColor.GradientStops[0].Color, RelativeSource={RelativeSource TemplatedParent}}" SnapsToDevicePixels="True">
|
||||
<VisualStateManager.VisualStateGroups>
|
||||
@@ -323,6 +324,7 @@
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
@@ -330,8 +332,7 @@
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Grid Grid.Row="0" Grid.Column="0" Margin="0,0,3,0" Grid.ColumnSpan="2">
|
||||
<Grid Grid.Row="1" Grid.Column="0" Margin="0,0,3,0" Grid.ColumnSpan="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
@@ -352,15 +353,15 @@
|
||||
TextWrapping="Wrap"
|
||||
MaxWidth="{Binding Path=ActualWidth, Source={x:Reference Scheduler}}" />
|
||||
</Grid>
|
||||
<Separator Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" Height="1" Background="DimGray" Visibility="{Binding Path=CustomViewInfo[CustomFieldStorage].ToolTipTrennstrichVisibility}" />
|
||||
<Separator Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="2" Height="1" Background="DimGray" Visibility="{Binding Path=CustomViewInfo[CustomFieldStorage].ToolTipTrennstrichVisibility}" />
|
||||
|
||||
<TextBlock Margin="0,0,3,0" Grid.Row="2" Grid.Column="0" Text="Ressourcen:" Visibility="{Binding Path=CustomViewInfo[CustomFieldStorage].ToolTipResourcesVisibility}" />
|
||||
<TextBlock Grid.Row="2" Grid.Column="1" Text="{Binding Path=CustomViewInfo, Converter={StaticResource AppointmentToolTipConverter}, ConverterParameter=Ressourcen}"
|
||||
<TextBlock Margin="0,0,3,0" Grid.Row="3" Grid.Column="0" Text="Ressourcen:" Visibility="{Binding Path=CustomViewInfo[CustomFieldStorage].ToolTipResourcesVisibility}" />
|
||||
<TextBlock Grid.Row="3" Grid.Column="1" Text="{Binding Path=CustomViewInfo, Converter={StaticResource AppointmentToolTipConverter}, ConverterParameter=Ressourcen}"
|
||||
Visibility="{Binding Path=CustomViewInfo[CustomFieldStorage].ToolTipResourcesVisibility}" />
|
||||
|
||||
<TextBlock Margin="0,0,3,0" Grid.Row="3" Grid.Column="0" Text="{t:Translate MitarbeiterPlural:}" Visibility="{Binding Path=CustomViewInfo[CustomFieldStorage].ToolTipEmployeesVisibility}" />
|
||||
<TextBlock Margin="0,0,3,0" Grid.Row="4" Grid.Column="0" Text="{t:Translate MitarbeiterPlural:}" Visibility="{Binding Path=CustomViewInfo[CustomFieldStorage].ToolTipEmployeesVisibility}" />
|
||||
|
||||
<ListView Margin="-6,-3,0,0" Grid.Row="3" Background="Transparent" BorderThickness="0" ItemsSource="{Binding Path=CustomViewInfo[CustomFieldStorage].EmployeeList}" Grid.Column="1" Visibility="{Binding Path=CustomViewInfo[CustomFieldStorage].ToolTipEmployeesVisibility}" Name="ToolTipEmployeeList">
|
||||
<ListView Margin="-6,-3,0,0" Grid.Row="4" Background="Transparent" BorderThickness="0" ItemsSource="{Binding Path=CustomViewInfo[CustomFieldStorage].EmployeeList}" Grid.Column="1" Visibility="{Binding Path=CustomViewInfo[CustomFieldStorage].ToolTipEmployeesVisibility}" Name="ToolTipEmployeeList">
|
||||
<ListView.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<WrapPanel Width="{Binding (FrameworkElement.ActualWidth), RelativeSource={RelativeSource AncestorType=ScrollContentPresenter}}"
|
||||
@@ -383,13 +384,13 @@
|
||||
</ListView.ItemTemplate>
|
||||
</ListView>
|
||||
|
||||
<TextBlock Margin="0,0,3,0" Grid.Row="4" Grid.Column="0" Text="{markup:Translate Klienten:}" Visibility="{Binding Path=CustomViewInfo[CustomFieldStorage].ToolTipCustomersVisibility}" />
|
||||
<TextBlock Grid.Row="4" Grid.Column="1" Text="{Binding Path=CustomViewInfo, Converter={StaticResource AppointmentToolTipConverter}, ConverterParameter=Klienten}"
|
||||
<TextBlock Margin="0,0,3,0" Grid.Row="5" Grid.Column="0" Text="{markup:Translate Klienten:}" Visibility="{Binding Path=CustomViewInfo[CustomFieldStorage].ToolTipCustomersVisibility}" />
|
||||
<TextBlock Grid.Row="5" Grid.Column="1" Text="{Binding Path=CustomViewInfo, Converter={StaticResource AppointmentToolTipConverter}, ConverterParameter=Klienten}"
|
||||
Visibility="{Binding Path=CustomViewInfo[CustomFieldStorage].ToolTipCustomersVisibility}" />
|
||||
<!-- Separator und "Angelegt von: " mit dem Namen des Originators -->
|
||||
<Separator Grid.Row="5" Grid.ColumnSpan="2" Height="1" Background="DimGray" Visibility="{Binding Path=CustomViewInfo[CustomFieldStorage].CanBeEdited, Converter={StaticResource BoolVisibilityConverter}}" />
|
||||
<TextBlock Margin="0,0,3,0" Grid.Row="6" Grid.Column="0" Text="Angelegt von:" Visibility="{Binding Path=CustomViewInfo[CustomFieldStorage].CanBeEdited, Converter={StaticResource BoolVisibilityConverter}}" />
|
||||
<TextBlock Margin="0,0,3,0" Grid.Row="6" Grid.Column="1" Text="{Binding Path=CustomViewInfo[CustomFieldStorage].Originator}" Visibility="{Binding Path=CustomViewInfo[CustomFieldStorage].CanBeEdited, Converter={StaticResource BoolVisibilityConverter}}" />
|
||||
<Separator Grid.Row="6" Grid.ColumnSpan="2" Grid.Column="0" Height="1" Background="DimGray" Visibility="{Binding Path=CustomViewInfo[CustomFieldStorage].CanBeEdited, Converter={StaticResource BoolVisibilityConverter}}" />
|
||||
<TextBlock Margin="0,0,3,0" Grid.Row="7" Grid.Column="0" Text="Angelegt von:" Visibility="{Binding Path=CustomViewInfo[CustomFieldStorage].CanBeEdited, Converter={StaticResource BoolVisibilityConverter}}" />
|
||||
<TextBlock Margin="0,0,3,0" Grid.Row="7" Grid.Column="1" Text="{Binding Path=CustomViewInfo[CustomFieldStorage].Originator}" Visibility="{Binding Path=CustomViewInfo[CustomFieldStorage].CanBeEdited, Converter={StaticResource BoolVisibilityConverter}}" />
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
|
||||
@@ -971,8 +972,7 @@
|
||||
AllowAppointmentCreate="AllowAppointmentCreateEvent"
|
||||
AllowAppointmentDragBetweenResources="AllowAppointmentAenderung"
|
||||
AllowAppointmentDelete="AllowAppointmentAenderung"
|
||||
ActiveViewType="WorkWeek"
|
||||
>
|
||||
ActiveViewType="WorkWeek">
|
||||
<dxsch:SchedulerControl.DayView>
|
||||
<dxsch:DayView AppointmentToolTipContentTemplate="{StaticResource {dxscht:SchedulerViewThemeKey ResourceKey=AppointmentToolTipContentTemplate}}" />
|
||||
</dxsch:SchedulerControl.DayView>
|
||||
|
||||
@@ -1488,9 +1488,11 @@ namespace BeWo.Scheduler.View
|
||||
|
||||
private void Scheduler_AppointmentViewInfoCustomizing(object sender, AppointmentViewInfoCustomizingEventArgs e)
|
||||
{
|
||||
var appointment = e.ViewInfo.Appointment;
|
||||
|
||||
var customFields = e.ViewInfo.Appointment.CustomFields;
|
||||
|
||||
if(customFields[nameof(CustomFieldStorage)] == null)
|
||||
if(customFields[nameof(CustomFieldStorage)] is null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -499,11 +499,11 @@ namespace BeWo.Scheduler.View
|
||||
var customFieldStorage = Appointment.GetCustomFieldStorage();
|
||||
var serviceRecords = customFieldStorage?.ServiceRecordList ?? new List<ServiceRecordDC>();
|
||||
|
||||
ViewModel.ApplyChangesToChangedOccurencyCustomFields(employees, customers, resources, originator, isPrivate, Appointment.RecurrenceIndex.ToString(), new Guid(Appointment.RecurrenceInfo.Id.ToString()), isTask, taskDescription, completedDate, dueDate, completedNotice, supportConceptList, Appointment.Subject, Appointment.AllDay, serviceRecords, start, end);
|
||||
|
||||
var oldRecurrenceInfo = Appointment.RecurrenceInfo.ToXml();
|
||||
var newRecurrenceInfo = ViewModel.NewVM.RecurrenceInfo;
|
||||
|
||||
ViewModel.ApplyChangesToChangedOccurencyCustomFields(employees, customers, resources, originator, isPrivate, Appointment.RecurrenceIndex.ToString(), new Guid(Appointment.RecurrenceInfo.Id.ToString()), isTask, taskDescription, completedDate, dueDate, completedNotice, supportConceptList, Appointment.Subject, Appointment.AllDay, serviceRecords, start, end);
|
||||
|
||||
if(!Equals(oldRecurrenceInfo, newRecurrenceInfo))
|
||||
{
|
||||
// Damit wird verhindert, dass beim Ändern von Zeitangaben bei Serienterminen die Ausnahmen gelöscht werden.
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Diagnostics;
|
||||
using System.Windows;
|
||||
using System.Windows.Media;
|
||||
|
||||
using BS.Shared.DataContracts;
|
||||
using BS.Shared.DataContracts.Compact;
|
||||
using BS.Shared.Extensions;
|
||||
@@ -42,7 +40,7 @@ namespace BeWo.Scheduler.ViewModel
|
||||
|
||||
if(!absenceTimeEnd.HasValue)
|
||||
{
|
||||
return result += _AbsenceTimeStart.Value.GetIntervalDescription(absenceTimeEnd);
|
||||
return $"{result}{_AbsenceTimeStart.Value.GetIntervalDescription(absenceTimeEnd)}";
|
||||
}
|
||||
|
||||
var absenceTimeStart = _AbsenceTimeStart.Value;
|
||||
@@ -52,7 +50,7 @@ namespace BeWo.Scheduler.ViewModel
|
||||
absenceTimeEnd = absenceTimeEnd.Value.AddDays(-1);
|
||||
}
|
||||
|
||||
return result += _AbsenceTimeStart.Value.GetIntervalDescription(absenceTimeEnd);
|
||||
return $"{result}{_AbsenceTimeStart.Value.GetIntervalDescription(absenceTimeEnd)}";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -81,7 +79,7 @@ namespace BeWo.Scheduler.ViewModel
|
||||
|
||||
public string RecurrenceId { get; set; }
|
||||
public int RecurrenceIndex { get; set; }
|
||||
|
||||
|
||||
public CompactEmployeeDC Originator { get; set; }
|
||||
|
||||
private DateTime? _AbsenceTimeStart;
|
||||
@@ -123,8 +121,8 @@ namespace BeWo.Scheduler.ViewModel
|
||||
|
||||
SchedulerAppointmentOid = pAppointment.DataContract?.SchedulerAppointmentOid;
|
||||
|
||||
RecurrenceId = pAppointment.DataContract?.RecurrenceId;
|
||||
RecurrenceIndex = pAppointment.DataContract?.RecurrenceIndex ?? 0;
|
||||
RecurrenceId = pAppointment.DataContract?.RecurrenceIdReference;
|
||||
RecurrenceIndex = pAppointment.DataContract?.RecurrenceIndexReference ?? 0;
|
||||
|
||||
_AbsenceTimeStart = pAppointment.AbsenceTimeStart;
|
||||
_AbsenceTimeEnd = pAppointment.AbsenceTimeEnd;
|
||||
@@ -137,6 +135,10 @@ namespace BeWo.Scheduler.ViewModel
|
||||
ServiceRecordList = pAppointment.ServiceRecordList;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Erzeugt ein CustomFieldStorage-Objekt aus einem SchedulerAppointmentDC. Wird nur für veränderte Serientermine benutzt.
|
||||
/// </summary>
|
||||
/// <param name="pAppointment">Der veränderte Serientermin als SchedulerAppointmentDC</param>
|
||||
public CustomFieldStorage(SchedulerAppointmentDC pAppointment)
|
||||
{
|
||||
IsTask = pAppointment.IsTask;
|
||||
@@ -160,8 +162,8 @@ namespace BeWo.Scheduler.ViewModel
|
||||
|
||||
SchedulerAppointmentOid = pAppointment.SchedulerAppointmentOid;
|
||||
|
||||
RecurrenceId = pAppointment.RecurrenceId;
|
||||
RecurrenceIndex = pAppointment.RecurrenceIndex;
|
||||
RecurrenceId = pAppointment.RecurrenceIdReference;
|
||||
RecurrenceIndex = pAppointment.RecurrenceIndexReference ?? 0;
|
||||
|
||||
HasServiceRecordEntry = pAppointment.HasServiceRecordEntry;
|
||||
|
||||
|
||||
@@ -2,12 +2,12 @@
|
||||
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:detail="clr-namespace:BeWo.View.Detail"
|
||||
xmlns:zeit="clr-namespace:BeWo.View.Detail.Zeiterfassung"
|
||||
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
|
||||
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
|
||||
xmlns:t="clr-namespace:BeWo.MultiLanguage.Markup"
|
||||
Height="Auto" Width="Auto" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Focusable="True"
|
||||
Height="Auto" Width="Auto"
|
||||
HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Focusable="True"
|
||||
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
|
||||
xmlns:markup="clr-namespace:BeWo.MultiLanguage.Markup">
|
||||
<localView:BeWoView.Resources>
|
||||
@@ -92,7 +92,7 @@
|
||||
<GroupBox Style="{StaticResource PopUpWindowStyle}">
|
||||
<GroupBox.Header>
|
||||
<StackPanel Orientation="Horizontal" VerticalAlignment="Center" Margin="0">
|
||||
<Image Source="..\..\Ressources\Icons\HistoryDisabled.png" RenderTransformOrigin="0.5,0.5" Width="Auto" Height="28" Margin="0,0,0,0">
|
||||
<Image Source="/Ressources/Icons/HistoryDisabled.png" RenderTransformOrigin="0.5,0.5" Width="Auto" Height="28" Margin="0,0,0,0">
|
||||
<Image.RenderTransform>
|
||||
<TransformGroup>
|
||||
<ScaleTransform ScaleX="1" ScaleY="1" />
|
||||
@@ -127,25 +127,27 @@
|
||||
</Grid.RowDefinitions>
|
||||
<dxg:GridControl VerticalAlignment="Stretch" HorizontalAlignment="Stretch" x:Name="datagrid_ServiceRecordHistory">
|
||||
<dxg:GridControl.Columns>
|
||||
<dxg:GridColumn AllowEditing="False" FieldName="TimeStamp" Header="Änderungsdatum" ReadOnly="True" EditSettings="{dxe:DateSettings DisplayFormat=dd.MM.yyyy HH:mm}" x:Name="AenderungsdatumColumn" />
|
||||
<dxg:GridColumn AllowEditing="False" FieldName="InsUser" Header="Geändert von" ReadOnly="True" />
|
||||
<dxg:GridColumn AllowEditing="False" FieldName="Employee" Header="{t:Translate MitarbeiterSingular}" ReadOnly="True" />
|
||||
<dxg:GridColumn AllowEditing="False" FieldName="HistoryTypeString" Header="Art der Änderung" ReadOnly="True" />
|
||||
<dxg:GridColumn AllowEditing="False" FieldName="Start" Header="Datum" ReadOnly="True" EditSettings="{dxe:DateSettings DisplayFormat=dd.MM.yyyy}"/>
|
||||
<dxg:GridColumn AllowEditing="False" FieldName="StartDate" Header="Start" ReadOnly="True" EditSettings="{dxe:DateSettings DisplayFormat=HH:mm}"/>
|
||||
<dxg:GridColumn AllowEditing="False" FieldName="EndDate" Header="Ende" ReadOnly="True" EditSettings="{dxe:DateSettings DisplayFormat=HH:mm}"/>
|
||||
<dxg:GridColumn AllowEditing="False" FieldName="RoundedDuration" Header="Dauer" ReadOnly="True" EditSettings="{dxe:TextSettings DisplayFormat=0}" x:Name="RoundedDHeader"/>
|
||||
<dxg:GridColumn AllowEditing="False" FieldName="DurationInStunden" Header="Art (Dauer)" ReadOnly="True" x:Name="DurationInSTDHeader" />
|
||||
<dxg:GridColumn AllowEditing="False" FieldName="Customer" Header="{markup:Translate Klient/in}" ReadOnly="True" />
|
||||
<dxg:GridColumn AllowEditing="False" FieldName="SupportConcept" Header="{markup:Translate Hilfeplan}" ReadOnly="True" />
|
||||
<dxg:GridColumn AllowEditing="False" FieldName="Organisation.Name" Header="{markup:Translate Kostenträger}" ReadOnly="True" />
|
||||
<dxg:GridColumn AllowEditing="False" FieldName="ServiceDescription.Category" Header="Leistungskategorie" ReadOnly="True" />
|
||||
<dxg:GridColumn AllowEditing="False" FieldName="ServiceDescription" Header="Leistung" ReadOnly="True" />
|
||||
<dxg:GridColumn AllowEditing="False" FieldName="TimeStamp" Header="Änderungsdatum" ReadOnly="True" EditSettings="{dxe:DateSettings DisplayFormat=dd.MM.yyyy HH:mm}" x:Name="AenderungsdatumColumn" />
|
||||
<dxg:GridColumn AllowEditing="False" FieldName="InsUser" Header="Geändert von" ReadOnly="True" />
|
||||
<dxg:GridColumn AllowEditing="False" FieldName="Employee" Header="{t:Translate MitarbeiterSingular}" ReadOnly="True" />
|
||||
<dxg:GridColumn AllowEditing="False" FieldName="HistoryTypeString" Header="Art der Änderung" ReadOnly="True" />
|
||||
<dxg:GridColumn AllowEditing="False" FieldName="Start" Header="Datum" ReadOnly="True" EditSettings="{dxe:DateSettings DisplayFormat=dd.MM.yyyy}"/>
|
||||
<dxg:GridColumn AllowEditing="False" FieldName="StartDate" Header="Start" ReadOnly="True" EditSettings="{dxe:DateSettings DisplayFormat=HH:mm}"/>
|
||||
<dxg:GridColumn AllowEditing="False" FieldName="EndDate" Header="Ende" ReadOnly="True" EditSettings="{dxe:DateSettings DisplayFormat=HH:mm}"/>
|
||||
<dxg:GridColumn AllowEditing="False" FieldName="RoundedDuration" Header="Dauer" ReadOnly="True" EditSettings="{dxe:TextSettings DisplayFormat=0}" x:Name="RoundedDHeader"/>
|
||||
<dxg:GridColumn AllowEditing="False" FieldName="DurationInStunden" Header="Art (Dauer)" ReadOnly="True" x:Name="DurationInSTDHeader" />
|
||||
<dxg:GridColumn AllowEditing="False" FieldName="Customer" Header="{markup:Translate Klient/in}" ReadOnly="True" />
|
||||
<dxg:GridColumn AllowEditing="False" FieldName="SupportConcept" Header="{markup:Translate Hilfeplan}" ReadOnly="True" />
|
||||
<dxg:GridColumn AllowEditing="False" FieldName="Organisation.Name" Header="{markup:Translate Kostenträger}" ReadOnly="True" />
|
||||
<dxg:GridColumn AllowEditing="False" FieldName="ServiceDescription.Category" Header="Leistungskategorie" ReadOnly="True" />
|
||||
<dxg:GridColumn AllowEditing="False" FieldName="ServiceDescription" Header="Leistung" ReadOnly="True" />
|
||||
<dxg:GridColumn AllowEditing="False" FieldName="SingleSignatureStateString" Header="{t:Translate Einzelunterschriftsstatus}" ReadOnly="True" />
|
||||
<dxg:GridColumn AllowEditing="False" FieldName="CustomerMonthlySignatureStateString" Header="{t:Translate MonatsunterschriftenstatusKlient}" ReadOnly="True" />
|
||||
<dxg:GridColumn AllowEditing="False" FieldName="EmployeeMonthlySignatureStateString" Header="{t:Translate MonatsunterschriftenstatusMitarbeiter}" ReadOnly="True" />
|
||||
</dxg:GridControl.Columns>
|
||||
<dxg:GridControl.View>
|
||||
<dxg:TableView x:Name="GridView" ShowGroupPanel="False" ShowGroupedColumns="false" ShowTotalSummary="False" NavigationStyle="Row"
|
||||
AllowPerPixelScrolling="True" UseLightweightTemplates="None"
|
||||
DataRowTemplate="{DynamicResource RowDetailTemplate}"/>
|
||||
AllowPerPixelScrolling="True" UseLightweightTemplates="None" DataRowTemplate="{DynamicResource RowDetailTemplate}"/>
|
||||
</dxg:GridControl.View>
|
||||
</dxg:GridControl>
|
||||
</Grid>
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
|
||||
using BS.Shared.DataContracts;
|
||||
@@ -21,16 +20,25 @@ namespace BeWo.View.Detail.Zeiterfassung
|
||||
|
||||
InitializeComponent();
|
||||
datagrid_ServiceRecordHistory.ItemsSource = historyList;
|
||||
GridView.BestFitColumns();
|
||||
|
||||
Focus();
|
||||
|
||||
|
||||
if (!BeWoApp.AppSettings.IsEndDateVisible && !BeWoApp.AppSettings.IsOnlyYearMonthVisible)
|
||||
if(BeWoApp.AppSettings.IsEndDateVisible || BeWoApp.AppSettings.IsOnlyYearMonthVisible)
|
||||
{
|
||||
RoundedDHeader.Header = "Minuten";
|
||||
DurationInSTDHeader.Visible = false;
|
||||
return;
|
||||
}
|
||||
|
||||
RoundedDHeader.Header = "Minuten";
|
||||
DurationInSTDHeader.Visible = false;
|
||||
|
||||
#if DEBUG
|
||||
DurationInSTDHeader.Visible = true;
|
||||
#endif
|
||||
}
|
||||
|
||||
public void OptimizeDataGridColumns()
|
||||
{
|
||||
GridView.BestFitColumns();
|
||||
}
|
||||
}
|
||||
public class RowDetailContainerControl : ContentControl
|
||||
|
||||
@@ -1308,24 +1308,24 @@ namespace BeWo.View.Detail.Zeiterfassung
|
||||
|
||||
private void ShowHistory(ServiceRecordVM vm)
|
||||
{
|
||||
if (vm == null)
|
||||
if (vm is null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
double height = 600;
|
||||
double width = 1200;
|
||||
var height = rootGrid.ActualHeight * .8;//600d;
|
||||
var width = rootGrid.ActualWidth * .8;//1200;
|
||||
|
||||
var serviceRecordHistoryView = new ServiceRecordHistoryView();
|
||||
|
||||
popup_content.Child = serviceRecordHistoryView;
|
||||
|
||||
|
||||
if (rootGrid.ActualHeight < height)
|
||||
if(rootGrid.ActualHeight < height)
|
||||
{
|
||||
height = rootGrid.ActualHeight;
|
||||
}
|
||||
if (rootGrid.ActualWidth < width)
|
||||
|
||||
if(rootGrid.ActualWidth < width)
|
||||
{
|
||||
width = rootGrid.ActualWidth;
|
||||
}
|
||||
@@ -1351,6 +1351,8 @@ namespace BeWo.View.Detail.Zeiterfassung
|
||||
|
||||
serviceRecordHistoryView.ParentView = this;
|
||||
SetPopupViewVisible(true);
|
||||
|
||||
serviceRecordHistoryView.OptimizeDataGridColumns();
|
||||
}));
|
||||
}
|
||||
|
||||
|
||||
@@ -100,12 +100,14 @@ namespace BeWo.View.Report.Kilometerauswertung
|
||||
|
||||
set
|
||||
{
|
||||
if(_Years != value)
|
||||
if(_Years == value)
|
||||
{
|
||||
_Years = value;
|
||||
|
||||
OnPropertyChanged(nameof(Years));
|
||||
return;
|
||||
}
|
||||
|
||||
_Years = value;
|
||||
|
||||
OnPropertyChanged(nameof(Years));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -115,12 +117,14 @@ namespace BeWo.View.Report.Kilometerauswertung
|
||||
|
||||
set
|
||||
{
|
||||
if(_SelectedMonthIndex != value)
|
||||
if(_SelectedMonthIndex == value)
|
||||
{
|
||||
_SelectedMonthIndex = value;
|
||||
|
||||
OnPropertyChanged(nameof(SelectedMonthIndex));
|
||||
return;
|
||||
}
|
||||
|
||||
_SelectedMonthIndex = value;
|
||||
|
||||
OnPropertyChanged(nameof(SelectedMonthIndex));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -132,12 +136,14 @@ namespace BeWo.View.Report.Kilometerauswertung
|
||||
|
||||
set
|
||||
{
|
||||
if(_SelectedYearIndex != value)
|
||||
if(_SelectedYearIndex == value)
|
||||
{
|
||||
_SelectedYearIndex = value;
|
||||
|
||||
OnPropertyChanged(nameof(SelectedYearIndex));
|
||||
return;
|
||||
}
|
||||
|
||||
_SelectedYearIndex = value;
|
||||
|
||||
OnPropertyChanged(nameof(SelectedYearIndex));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -147,12 +153,14 @@ namespace BeWo.View.Report.Kilometerauswertung
|
||||
|
||||
set
|
||||
{
|
||||
if (_StartDate != value)
|
||||
if(_StartDate == value)
|
||||
{
|
||||
_StartDate = value;
|
||||
|
||||
OnPropertyChanged(nameof(StartDate));
|
||||
return;
|
||||
}
|
||||
|
||||
_StartDate = value;
|
||||
|
||||
OnPropertyChanged(nameof(StartDate));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -162,18 +170,19 @@ namespace BeWo.View.Report.Kilometerauswertung
|
||||
|
||||
set
|
||||
{
|
||||
if (_EndDate != value)
|
||||
if(_EndDate == value)
|
||||
{
|
||||
_EndDate = value;
|
||||
|
||||
OnPropertyChanged(nameof(EndDate));
|
||||
return;
|
||||
}
|
||||
|
||||
_EndDate = value;
|
||||
|
||||
OnPropertyChanged(nameof(EndDate));
|
||||
}
|
||||
}
|
||||
|
||||
private KilometerauslastungsType _ReportType = KilometerauslastungsType.Customer;
|
||||
|
||||
|
||||
public KilometerauslastungsView()
|
||||
{
|
||||
InitializeComponent();
|
||||
@@ -223,7 +232,6 @@ namespace BeWo.View.Report.Kilometerauswertung
|
||||
EmployeePopUpEdit.IsEnabled = false;
|
||||
|
||||
}
|
||||
|
||||
|
||||
Unloaded += delegate
|
||||
{
|
||||
@@ -306,7 +314,7 @@ namespace BeWo.View.Report.Kilometerauswertung
|
||||
//var selectedYear = Years[SelectedYearIndex];
|
||||
|
||||
//var rangeDate = new DateTime(selectedYear, SelectedMonthIndex + 1, 1);
|
||||
var url = string.Format("{0}/ReportView.aspx?type={1}&start={2:ddMMyyyy}&end={3:ddMMyyyy}", BeWoApp.SiteOfOrigin, ReportTypes.KilometerAuswertung, StartDate, EndDate);
|
||||
var url = $"{BeWoApp.SiteOfOrigin}/ReportView.aspx?type={ReportTypes.KilometerAuswertung}&start={StartDate:ddMMyyyy}&end={EndDate:ddMMyyyy}";
|
||||
|
||||
var oidList = new List<long>();
|
||||
|
||||
@@ -458,6 +466,7 @@ namespace BeWo.View.Report.Kilometerauswertung
|
||||
_ReportType = KilometerauslastungsType.Employee;
|
||||
break;
|
||||
}
|
||||
|
||||
OnPropertyChanged(nameof(IsCreateButtonEnabled));
|
||||
SetVisibilityValues();
|
||||
}
|
||||
|
||||
@@ -2240,9 +2240,11 @@ namespace BeWoPlanerMobil.Controllers
|
||||
|
||||
if(Model.IsInGroupBookingMode)
|
||||
{
|
||||
ServiceRecordGroupDC serviceRecordGroup = null;
|
||||
|
||||
if (checkServiceRecord.GroupOid.HasValue)
|
||||
{
|
||||
var serviceRecordGroup = OperationsService.GetServiceRecordGroup(checkServiceRecord.GroupOid.Value);
|
||||
serviceRecordGroup = OperationsService.GetServiceRecordGroup(checkServiceRecord.GroupOid.Value);
|
||||
|
||||
serviceRecordGroup.ServiceRecordList.DoForEach(sr => employeeOids.AddIfNotIn(sr.Employee.EmployeeOid));
|
||||
}
|
||||
@@ -2251,22 +2253,44 @@ namespace BeWoPlanerMobil.Controllers
|
||||
Model.GroupBookingSelectedEmployees.DoForEach(e => employeeOids.AddIfNotIn(e.EmployeeOid));
|
||||
}
|
||||
|
||||
var cb2ScOids = Model.SelectedConceptCostBearerRelations.Where(w => w.CostBearer2SupportConceptOid.HasValue).Select(s => s.CostBearer2SupportConceptOid.Value).ToList();
|
||||
var costBearer2SupportConceptOids = Model.SelectedConceptCostBearerRelations.Where(w => w.CostBearer2SupportConceptOid.HasValue).Select(s => s.CostBearer2SupportConceptOid.Value).ToList();
|
||||
|
||||
var relations = CustomerService.GetSupportConceptCostBearerRelationsById(cb2ScOids);
|
||||
var relations = CustomerService.GetSupportConceptCostBearerRelationsById(costBearer2SupportConceptOids);
|
||||
|
||||
foreach (var rel in relations)
|
||||
var isNew = checkServiceRecord.ServiceRecordOid is null;
|
||||
|
||||
if(isNew)
|
||||
{
|
||||
var sr = CloneServiceRecord(checkServiceRecord);
|
||||
foreach (var rel in relations)
|
||||
{
|
||||
var sr = CloneServiceRecord(checkServiceRecord);
|
||||
|
||||
sr.SupportConcept = rel.SupportConcept;
|
||||
sr.CostBearer = rel.CostBearer;
|
||||
sr.CostBearer2SupportConceptOid = rel.CostBearer2SupportConceptOid;
|
||||
sr.SupportConcept = rel.SupportConcept;
|
||||
sr.CostBearer = rel.CostBearer;
|
||||
sr.CostBearer2SupportConceptOid = rel.CostBearer2SupportConceptOid;
|
||||
|
||||
var result = OperationsService.ValidateServiceRecord(sr, null, maxDaysEditSRsAllowed, employeeOids, cb2ScOids);
|
||||
dateRangeString = rel.DateRangeString;
|
||||
var result = OperationsService.ValidateServiceRecord(sr, null, maxDaysEditSRsAllowed, employeeOids, costBearer2SupportConceptOids);
|
||||
dateRangeString = rel.DateRangeString;
|
||||
|
||||
validationResults.Add(new ServiceRecord2Validation(sr, result, dateRangeString));
|
||||
validationResults.Add(new ServiceRecord2Validation(sr, result, dateRangeString));
|
||||
}
|
||||
}
|
||||
else if(serviceRecordGroup != null)
|
||||
{
|
||||
foreach(var serviceRecord in serviceRecordGroup.ServiceRecordList)
|
||||
{
|
||||
var sr = CloneServiceRecord(checkServiceRecord);
|
||||
sr.ServiceRecordOid = serviceRecord.ServiceRecordOid;
|
||||
sr.SupportConcept = serviceRecord.SupportConcept;
|
||||
sr.CostBearer = serviceRecord.CostBearer;
|
||||
sr.CostBearer2SupportConceptOid = serviceRecord.CostBearer2SupportConceptOid;
|
||||
|
||||
var result = OperationsService.ValidateServiceRecord(sr, null, maxDaysEditSRsAllowed, employeeOids, costBearer2SupportConceptOids);
|
||||
var node = CreateFlatSupportConceptItem(CustomerService.LoadCompactSupportConceptDC(sr.SupportConcept.SupportConceptOid, Model.SelectedEmployee.EmployeeOid), null);
|
||||
dateRangeString = node?.SupportConceptTreeNodeDC != null ? node.SupportConceptTreeNodeDC.SupportConceptCostBearerRelDC.DateRangeString : string.Empty;
|
||||
|
||||
validationResults.Add(new ServiceRecord2Validation(sr, result, dateRangeString));
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(!Model.IsInMultiBookingMode)
|
||||
|
||||
@@ -607,7 +607,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
|
||||
if(!AbstractModel.HasRightToInsertRessourceAppointments)
|
||||
{
|
||||
return "Fehler!Sie haben nicht das Recht, Termine mit Ressourcen anzulegen!";
|
||||
return "Fehler! Sie haben nicht das Recht, Termine mit Ressourcen anzulegen!";
|
||||
}
|
||||
|
||||
var oidList = ConvertOidStringToList(resourceOids);
|
||||
@@ -627,8 +627,6 @@ namespace BeWoPlanerMobil.Controllers
|
||||
dateTimes.EndDate = dateTimes.EndDate.AddDays(1);
|
||||
}
|
||||
|
||||
var recurrenceId = Model.SelectedAppointment.RecurrenceId;
|
||||
var recurrenceIndex = Model.SelectedAppointment.RecurrenceIndex;
|
||||
var info = KalenderService.CheckResourceAvailabilityWithEmployeeInformation(dateTimes.StartDate, dateTimes.EndDate, oidList, Model.SelectedAppointment?.SchedulerAppointmentOid, null);
|
||||
|
||||
var result = string.Empty;
|
||||
|
||||
@@ -1,27 +1,27 @@
|
||||
class PasswordSecurity {
|
||||
#numbers = "0123456789";
|
||||
#lowercaseLetters = "abcdefghijklmnopqrstuvwxyz";
|
||||
#uppercaseLetters = "ABDEFGHIJKLMNOPQRSTUVWXYZ";
|
||||
#lowercaseUmlauts = "äöüß";
|
||||
#uppercaseUmlauts = "ÄÖÜ";
|
||||
#specialChars1 = "\\\"\'µ@€!";
|
||||
#specialChars2 = "&/()=?+#*";
|
||||
#specialChars3 = ",.-;:_><|";
|
||||
#specialChars4 = "§$%'{[]}´";
|
||||
#specialChars5 = "`^°~²³";
|
||||
numbers = "0123456789";
|
||||
lowercaseLetters = "abcdefghijklmnopqrstuvwxyz";
|
||||
uppercaseLetters = "ABDEFGHIJKLMNOPQRSTUVWXYZ";
|
||||
lowercaseUmlauts = "äöüß";
|
||||
uppercaseUmlauts = "ÄÖÜ";
|
||||
specialChars1 = "\\\"\'µ@€!";
|
||||
specialChars2 = "&/()=?+*";
|
||||
specialChars3 = ",.-;:_><|";
|
||||
specialChars4 = "§$%'{[]}´";
|
||||
specialChars5 = "`^°~²³";
|
||||
|
||||
#isPartial = false;
|
||||
#partialPassword = "";
|
||||
#passwordLengthDifference = 0;
|
||||
#score = 0;
|
||||
#previousValue = 0;
|
||||
#schalter = false;
|
||||
#previousValues = [];
|
||||
isPartial = false;
|
||||
partialPassword = "";
|
||||
passwordLengthDifference = 0;
|
||||
score = 0;
|
||||
previousValue = 0;
|
||||
schalter = false;
|
||||
previousValues = [];
|
||||
|
||||
#passwordLabelId = "";
|
||||
passwordLabelId = "";
|
||||
|
||||
constructor(pwLabelId) {
|
||||
this.#passwordLabelId = pwLabelId;
|
||||
this.passwordLabelId = pwLabelId;
|
||||
}
|
||||
|
||||
validatePassword(password) {
|
||||
@@ -32,29 +32,29 @@
|
||||
for (var i = 0; i < password.length; i++) {
|
||||
sx += password[i];
|
||||
|
||||
if (sx.length < this.#partialPassword.length) {
|
||||
this.#isPartial = true;
|
||||
this.#passwordLengthDifference = this.#partialPassword.length - sx.length;
|
||||
if (sx.length < this.partialPassword.length) {
|
||||
this.isPartial = true;
|
||||
this.passwordLengthDifference = this.partialPassword.length - sx.length;
|
||||
}
|
||||
|
||||
if (this.#partialPassword !== sx) {
|
||||
this.#partialPassword = sx;
|
||||
if (this.partialPassword !== sx) {
|
||||
this.partialPassword = sx;
|
||||
}
|
||||
|
||||
passwordStrength = this.#calculatePasswordStrength(sx);
|
||||
passwordStrength = this.calculatePasswordStrength(sx);
|
||||
}
|
||||
|
||||
this.#displayPasswordStrength(passwordStrength);
|
||||
this.displayPasswordStrength(passwordStrength);
|
||||
return;
|
||||
}
|
||||
|
||||
this.#score = 0;
|
||||
this.#previousValue = 0;
|
||||
this.score = 0;
|
||||
this.previousValue = 0;
|
||||
|
||||
this.#displayPasswordStrength(-1);
|
||||
this.displayPasswordStrength(-1);
|
||||
}
|
||||
|
||||
#getIntegerFromArray(arr, index) {
|
||||
getIntegerFromArray(arr, index) {
|
||||
if (arr === undefined || arr === null || arr.length < index) {
|
||||
return 0;
|
||||
}
|
||||
@@ -64,55 +64,55 @@
|
||||
return $.isNumeric(intValue) ? intValue : 0;
|
||||
}
|
||||
|
||||
#getLastValue() {
|
||||
if (this.#previousValues === undefined || this.#previousValues === null || this.#previousValues.length === 0) {
|
||||
getLastValue() {
|
||||
if (this.previousValues === undefined || this.previousValues === null || this.previousValues.length === 0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return this.#previousValues[this.#previousValues.length - 1];
|
||||
return this.previousValues[this.previousValues.length - 1];
|
||||
}
|
||||
|
||||
#calculatePasswordStrength(passwordToValidate) {
|
||||
calculatePasswordStrength(passwordToValidate) {
|
||||
var passwordStrength = 0;
|
||||
this.#previousValue = 0;
|
||||
this.previousValue = 0;
|
||||
|
||||
if (this.#isPartial === true) {
|
||||
if (this.#passwordLengthDifference === 1) {
|
||||
this.#score -= this.#getLastValue();
|
||||
this.#previousValues.pop();
|
||||
if (this.isPartial === true) {
|
||||
if (this.passwordLengthDifference === 1) {
|
||||
this.score -= this.getLastValue();
|
||||
this.previousValues.pop();
|
||||
} else {
|
||||
for (var i = 0; i < this.#passwordLengthDifference; i++) {
|
||||
this.#score -= this.#getLastValue();
|
||||
this.#previousValues.pop();
|
||||
for (var i = 0; i < this.passwordLengthDifference; i++) {
|
||||
this.score -= this.getLastValue();
|
||||
this.previousValues.pop();
|
||||
}
|
||||
}
|
||||
|
||||
this.#isPartial = false;
|
||||
this.isPartial = false;
|
||||
} else {
|
||||
var passwordLength = passwordToValidate.length;
|
||||
|
||||
if (passwordLength >= 6 && passwordLength < 9) {
|
||||
this.#score += 1;
|
||||
this.#previousValue = 1;
|
||||
this.#schalter = true;
|
||||
this.score += 1;
|
||||
this.previousValue = 1;
|
||||
this.schalter = true;
|
||||
}
|
||||
|
||||
if (passwordLength >= 9 && passwordLength < 12) {
|
||||
this.#score += 2;
|
||||
this.#previousValue = 2;
|
||||
this.#schalter = true;
|
||||
this.score += 2;
|
||||
this.previousValue = 2;
|
||||
this.schalter = true;
|
||||
}
|
||||
|
||||
if (passwordLength >= 12 && passwordLength < 18) {
|
||||
this.#score += 3;
|
||||
this.#previousValue = 3;
|
||||
this.#schalter = true;
|
||||
this.score += 3;
|
||||
this.previousValue = 3;
|
||||
this.schalter = true;
|
||||
}
|
||||
|
||||
if (passwordLength >= 18) {
|
||||
this.#score += 4;
|
||||
this.#previousValue = 4;
|
||||
this.#schalter = true;
|
||||
this.score += 4;
|
||||
this.previousValue = 4;
|
||||
this.schalter = true;
|
||||
}
|
||||
|
||||
var passwordAsArray = Array.from(passwordToValidate);
|
||||
@@ -120,7 +120,7 @@
|
||||
// Zahlen
|
||||
var containsNumbers = false;
|
||||
for (var i = 0; i < passwordAsArray.length; i++) {
|
||||
if (this.#numbers.includes(passwordAsArray[i])) {
|
||||
if (this.numbers.includes(passwordAsArray[i])) {
|
||||
containsNumbers = true;
|
||||
break;
|
||||
}
|
||||
@@ -129,7 +129,7 @@
|
||||
// Kleinbuchstaben
|
||||
var containsLowercaseLetters = false;
|
||||
for (var i = 0; i < passwordAsArray.length; i++) {
|
||||
if (this.#lowercaseLetters.includes(passwordAsArray[i])) {
|
||||
if (this.lowercaseLetters.includes(passwordAsArray[i])) {
|
||||
containsLowercaseLetters = true;
|
||||
break;
|
||||
}
|
||||
@@ -138,7 +138,7 @@
|
||||
// Großbuchstaben
|
||||
var containsUppercaseLetters = false;
|
||||
for (var i = 0; i < passwordAsArray.length; i++) {
|
||||
if (this.#uppercaseLetters.includes(passwordAsArray[i])) {
|
||||
if (this.uppercaseLetters.includes(passwordAsArray[i])) {
|
||||
containsUppercaseLetters = true;
|
||||
break;
|
||||
}
|
||||
@@ -147,7 +147,7 @@
|
||||
// Kleinumlaute
|
||||
var containsLowercaseUmlauts = false;
|
||||
for (var i = 0; i < passwordAsArray.length; i++) {
|
||||
if (this.#lowercaseUmlauts.includes(passwordAsArray[i])) {
|
||||
if (this.lowercaseUmlauts.includes(passwordAsArray[i])) {
|
||||
containsLowercaseUmlauts = true;
|
||||
break;
|
||||
}
|
||||
@@ -156,7 +156,7 @@
|
||||
// Großumlaute
|
||||
var containsUppercaseUmlauts = false;
|
||||
for (var i = 0; i < passwordAsArray.length; i++) {
|
||||
if (this.#uppercaseUmlauts.includes(passwordAsArray[i])) {
|
||||
if (this.uppercaseUmlauts.includes(passwordAsArray[i])) {
|
||||
containsUppercaseUmlauts = true;
|
||||
break;
|
||||
}
|
||||
@@ -165,7 +165,7 @@
|
||||
// Sonderzeichen 1
|
||||
var containsSpecialCharacters1 = false;
|
||||
for (var i = 0; i < passwordAsArray.length; i++) {
|
||||
if (this.#specialChars1.includes(passwordAsArray[i])) {
|
||||
if (this.specialChars1.includes(passwordAsArray[i])) {
|
||||
containsSpecialCharacters1 = true;
|
||||
break;
|
||||
}
|
||||
@@ -173,7 +173,7 @@
|
||||
|
||||
var containsSpecialCharacters2 = false;
|
||||
for (var i = 0; i < passwordAsArray.length; i++) {
|
||||
if (this.#specialChars2.includes(passwordAsArray[i])) {
|
||||
if (this.specialChars2.includes(passwordAsArray[i])) {
|
||||
containsSpecialCharacters2 = true;
|
||||
break;
|
||||
}
|
||||
@@ -181,7 +181,7 @@
|
||||
|
||||
var containsSpecialCharacters3 = false;
|
||||
for (var i = 0; i < passwordAsArray.length; i++) {
|
||||
if (this.#specialChars3.includes(passwordAsArray[i])) {
|
||||
if (this.specialChars3.includes(passwordAsArray[i])) {
|
||||
containsSpecialCharacters3 = true;
|
||||
break;
|
||||
}
|
||||
@@ -189,7 +189,7 @@
|
||||
|
||||
var containsSpecialCharacters4 = false;
|
||||
for (var i = 0; i < passwordAsArray.length; i++) {
|
||||
if (this.#specialChars4.includes(passwordAsArray[i])) {
|
||||
if (this.specialChars4.includes(passwordAsArray[i])) {
|
||||
containsSpecialCharacters4 = true;
|
||||
break;
|
||||
}
|
||||
@@ -197,94 +197,94 @@
|
||||
|
||||
var containsSpecialCharacters5 = false;
|
||||
for (var i = 0; i < passwordAsArray.length; i++) {
|
||||
if (this.#specialChars5.includes(passwordAsArray[i])) {
|
||||
if (this.specialChars5.includes(passwordAsArray[i])) {
|
||||
containsSpecialCharacters5 = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (containsNumbers === true) {
|
||||
this.#addScoreValue(3);
|
||||
this.addScoreValue(3);
|
||||
}
|
||||
|
||||
if (containsLowercaseLetters === true) {
|
||||
this.#addScoreValue(2);
|
||||
this.addScoreValue(2);
|
||||
}
|
||||
|
||||
if (containsUppercaseLetters === true) {
|
||||
this.#addScoreValue(3);
|
||||
this.addScoreValue(3);
|
||||
}
|
||||
|
||||
if (containsLowercaseUmlauts === true) {
|
||||
this.#addScoreValue(2);
|
||||
this.addScoreValue(2);
|
||||
}
|
||||
|
||||
if (containsUppercaseUmlauts === true) {
|
||||
this.#addScoreValue(2);
|
||||
this.addScoreValue(2);
|
||||
}
|
||||
|
||||
if (containsSpecialCharacters1 === true) {
|
||||
this.#addScoreValue(4);
|
||||
this.addScoreValue(4);
|
||||
}
|
||||
|
||||
if (containsSpecialCharacters2 === true) {
|
||||
this.#addScoreValue(4);
|
||||
this.addScoreValue(4);
|
||||
}
|
||||
|
||||
if (containsSpecialCharacters3 === true) {
|
||||
this.#addScoreValue(4);
|
||||
this.addScoreValue(4);
|
||||
}
|
||||
|
||||
if (containsSpecialCharacters4 === true) {
|
||||
this.#addScoreValue(4);
|
||||
this.addScoreValue(4);
|
||||
}
|
||||
|
||||
if (containsSpecialCharacters5 === true) {
|
||||
this.#addScoreValue(4);
|
||||
this.addScoreValue(4);
|
||||
}
|
||||
|
||||
this.#previousValues.push(this.#previousValue);
|
||||
this.previousValues.push(this.previousValue);
|
||||
}
|
||||
|
||||
if (this.#score <= 15) {
|
||||
if (this.score <= 15) {
|
||||
passwordStrength = 0;
|
||||
}
|
||||
|
||||
if (this.#score > 15 && this.#score <= 55) {
|
||||
if (this.score > 15 && this.score <= 55) {
|
||||
passwordStrength = 1;
|
||||
}
|
||||
|
||||
if (this.#score > 55 && this.#score <= 115) {
|
||||
if (this.score > 55 && this.score <= 115) {
|
||||
passwordStrength = 2;
|
||||
}
|
||||
|
||||
if (this.#score > 115 && this.#score <= 155) {
|
||||
if (this.score > 115 && this.score <= 155) {
|
||||
passwordStrength = 3;
|
||||
}
|
||||
|
||||
if (this.#score > 155) {
|
||||
if (this.score > 155) {
|
||||
passwordStrength = 4;
|
||||
}
|
||||
|
||||
return passwordStrength;
|
||||
}
|
||||
|
||||
#addScoreValue(defaultValue) {
|
||||
addScoreValue(defaultValue) {
|
||||
if (defaultValue === undefined || defaultValue === null || false === $.isNumeric(defaultValue)) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.#score += defaultValue;
|
||||
this.score += defaultValue;
|
||||
|
||||
if (this.#schalter === true) {
|
||||
this.#previousValue += defaultValue;
|
||||
if (this.schalter === true) {
|
||||
this.previousValue += defaultValue;
|
||||
} else {
|
||||
this.#previousValue = defaultValue;
|
||||
this.previousValue = defaultValue;
|
||||
}
|
||||
}
|
||||
|
||||
#displayPasswordStrength(passwordStrength) {
|
||||
var passwordLabel = $("#" + this.#passwordLabelId);
|
||||
displayPasswordStrength(passwordStrength) {
|
||||
var passwordLabel = $("#" + this.passwordLabelId);
|
||||
|
||||
if (passwordStrength === undefined || !$.isNumeric(passwordStrength) || !passwordLabel.length) {
|
||||
return;
|
||||
|
||||
@@ -98,12 +98,6 @@ function calculateDuration(isInvocatedByHoursMinutesButton, startTimeId, endTime
|
||||
isInMin = hoursMinutesDropdownButton.text().replaceAll(/\s/g, "") === "Minuten";
|
||||
}
|
||||
|
||||
logInfo2("calculateDuration aufgerufen:\r\n" +
|
||||
"isInvocatedByHoursMinutesButton: " + isInvocatedByHoursMinutesButton + "\r\n" +
|
||||
"isInvokedByStartElement: " + isInvokedByStartElement + "\r\n" +
|
||||
"isInvokedByEndElement: " + isInvokedByEndElement + "\r\n" +
|
||||
"Format der Dauer: " + (isInMin ? "Minuten" : "Stunden"));
|
||||
|
||||
var durationFormat = isInMin ? "m" : "h";
|
||||
|
||||
if((startTime.length > 0 && startTime.length < 5) || (endTime.length > 0 && endTime.length < 5)) {
|
||||
|
||||
1485
BeWoPlanerMobil/Scripts/tempusdominus-boostrap-4.min.js
vendored
1485
BeWoPlanerMobil/Scripts/tempusdominus-boostrap-4.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -129,7 +129,7 @@
|
||||
var selectedOid = 0;
|
||||
|
||||
if (serviceDescriptionToEdit > 0) {
|
||||
$("#" + leistungSelectId+" > option").each(function() {
|
||||
$("#" + leistungSelectId + " > option").each(function() {
|
||||
var val = $(this).val();
|
||||
|
||||
if (serviceDescriptionToEdit == val) {
|
||||
|
||||
@@ -315,12 +315,9 @@
|
||||
</div>
|
||||
|
||||
<div class="clearfix mt-3">
|
||||
@if(Html.IsInDebugMode())
|
||||
{
|
||||
<button type="button" class="btn btn-bewo-dev float-left" data-toggle="modal" data-target="#qb-info-popup">
|
||||
<span class="fas fa-info"></span>
|
||||
</button>
|
||||
}
|
||||
<button type="button" class="btn btn-primary float-left" data-toggle="modal" data-target="#qb-info-popup">
|
||||
<span class="fas fa-info"></span>
|
||||
</button>
|
||||
|
||||
<button type="button" class="btn btn-primary float-right" id="create-button" onclick="createServiceOverview()">Erstellen</button>
|
||||
</div>
|
||||
|
||||
@@ -41,7 +41,8 @@
|
||||
|
||||
<script type="text/javascript" src="@Url.Content("~/node_modules/bootstrap/dist/js/bootstrap.bundle.min.js")"></script>
|
||||
|
||||
<link rel="stylesheet" href="@Url.Content("~/Content/style.css")" />
|
||||
@*<link rel="stylesheet" href="@Url.Content("~/Content/style.css")" />*@
|
||||
<link rel="stylesheet" href="~/Content/style.css" />
|
||||
<link rel="stylesheet" href="@Url.Content("~/Content/tempusdominus-bootstrap-4.min.css")" />
|
||||
|
||||
<script src="@Url.Content("~/Scripts/ownSoft-Scripts/utils/dateUtils.js")" type="text/javascript"></script>
|
||||
@@ -71,7 +72,7 @@
|
||||
<script src="@Url.Content("~/Scripts/ownSoft-Scripts/utils/service-record-time-calc.js")" type="text/javascript"></script>
|
||||
<script src="@Url.Content("~/Scripts/ownSoft-Scripts/utils/js-helper.js")" type="text/javascript"></script>
|
||||
<script src="@Url.Content("~/Scripts/ownSoft-Scripts/utils/logging.js")" type="text/javascript"></script>
|
||||
<script src="@Url.Content("~/Scripts/ownSoft-Scripts/utils/password-security.js")"></script>
|
||||
<script src="@Url.Content("~/Scripts/ownSoft-Scripts/utils/password-security.js")" type="text/javascript"></script>
|
||||
|
||||
<script>
|
||||
window.addEventListener("error", (event) => {
|
||||
|
||||
@@ -3945,7 +3945,7 @@ namespace BeWo.Data.Access
|
||||
|
||||
public List<ConfirmationReceiptSignature> GetConfirmationReceiptSignaturesByServiceRecord(long serviceRecordOid)
|
||||
{
|
||||
var criteria = CreateCriteria<ConfirmationReceiptSignature>()
|
||||
var criteria = CreateCriteriaIsActive<ConfirmationReceiptSignature>()
|
||||
.CreateAlias(nameof(ConfirmationReceiptSignature.ServiceRecords), "serviceRecord")
|
||||
.Add(Restrictions.Eq("serviceRecord.Oid", serviceRecordOid));
|
||||
|
||||
@@ -5514,5 +5514,66 @@ namespace BeWo.Data.Access
|
||||
|
||||
return list.ToList();
|
||||
}
|
||||
|
||||
public ServiceRecordHistory FindMostRecentServiceRecordHistoryEntryByServiceRecordOid(long serviceRecordOid)
|
||||
{
|
||||
var criteira = CreateCriteria<ServiceRecordHistory>()
|
||||
.Add(Restrictions.Eq(nameof(ServiceRecordHistory.ServiceRecordOid), serviceRecordOid))
|
||||
.AddOrder(Order.Desc(nameof(ServiceRecordHistory.InsTs)));
|
||||
|
||||
return criteira.List<ServiceRecordHistory>().FirstOrDefault();
|
||||
}
|
||||
|
||||
public Dictionary<long, ServiceRecordHistory> FindMostRecentServiceRecordHistoryEntryByServiceRecords(List<long> serviceRecordOids)
|
||||
{
|
||||
var criteria = CreateCriteria<ServiceRecordHistory>()
|
||||
.Add(Restrictions.In(nameof(ServiceRecordHistory.ServiceRecordOid), serviceRecordOids))
|
||||
.AddOrder(Order.Desc(nameof(ServiceRecordHistory.InsTs)));
|
||||
|
||||
var historyEntries = criteria.List<ServiceRecordHistory>();
|
||||
|
||||
var result = new Dictionary<long, ServiceRecordHistory>();
|
||||
|
||||
foreach(var entry in historyEntries)
|
||||
{
|
||||
if(entry.ServiceRecordOid.HasValue && result.ContainsKey(entry.ServiceRecordOid.Value) || entry.ServiceRecordOid is null)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
result.AddIfNotIn(new KeyValuePair<long, ServiceRecordHistory>(entry.ServiceRecordOid.Value, entry));
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public List<ServiceRecord> FindFormerlyLinkedServiceRecords(long confirmationReceiptSignatureOid, long customerOid, long supportConceptOid, long costBearer2SupportConceptOid, string timeSpanString)
|
||||
{
|
||||
if(timeSpanString?.Length != 21)
|
||||
{
|
||||
return new List<ServiceRecord>();
|
||||
}
|
||||
|
||||
var d1 = timeSpanString.Substring(0, 2);
|
||||
var m1 = timeSpanString.Substring(3, 2);
|
||||
var d2 = timeSpanString.Substring(11, 2);
|
||||
var m2 = timeSpanString.Substring(14, 2);
|
||||
var year = timeSpanString.Substring(17, 4);
|
||||
|
||||
var timeSpanStart = DateTime.Parse($"{year}-{m1}-{d1}");
|
||||
var timeSpanEnd = DateTime.Parse($"{year}-{m2}-{d2}");
|
||||
|
||||
// ToDo: Warum wird geprüft, ob der InsTs im Intervall liegt?
|
||||
var criteria = CreateCriteria<ServiceRecord>()
|
||||
//.Add(Restrictions.Between(nameof(ServiceRecord.InsTs), timeSpanStart, timeSpanEnd))
|
||||
.Add(Restrictions.Eq(nameof(ServiceRecord.CustomerOid), customerOid))
|
||||
.Add(Restrictions.Eq(nameof(ServiceRecord.SupportConcept)+".Oid", supportConceptOid))
|
||||
.Add(Restrictions.Eq(nameof(ServiceRecord.CostBearer2SupportConceptOid), costBearer2SupportConceptOid))
|
||||
.Add(Restrictions.Between(nameof(ServiceRecord.Start), timeSpanStart, timeSpanEnd))
|
||||
.Add(Restrictions.Between(nameof(ServiceRecord.End), timeSpanStart, timeSpanEnd))
|
||||
.Add(Expression.Sql(new SqlString($"this_.Oid NOT IN (SELECT ServiceRecordOid FROM confirmationreceiptsignature2servicerecord WHERE ConfirmationReceiptSignatureOid = {confirmationReceiptSignatureOid})")));
|
||||
|
||||
return criteria.List<ServiceRecord>().ToList();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -142,6 +142,10 @@ namespace BeWo.Data.Entities
|
||||
|
||||
private string _Notice5;
|
||||
|
||||
private SignatureStateType _CustomerConfirmationReceiptSignatureStateType;
|
||||
private SignatureStateType _EmployeeConfirmationReceiptSignatureStateType;
|
||||
private SignatureStateType _ServiceRecordSignatureStateType;
|
||||
|
||||
|
||||
public virtual CostBearer2SupportConcept CostBearer2SupportConcept
|
||||
{
|
||||
@@ -653,5 +657,43 @@ namespace BeWo.Data.Entities
|
||||
}
|
||||
}
|
||||
|
||||
public virtual SignatureStateType CustomerConfirmationReceiptSignatureStateType
|
||||
{
|
||||
get => _CustomerConfirmationReceiptSignatureStateType;
|
||||
|
||||
set
|
||||
{
|
||||
if(AreDifferent(_CustomerConfirmationReceiptSignatureStateType, value))
|
||||
{
|
||||
_CustomerConfirmationReceiptSignatureStateType = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public virtual SignatureStateType EmployeeConfirmationReceiptSignatureStateType
|
||||
{
|
||||
get => _EmployeeConfirmationReceiptSignatureStateType;
|
||||
|
||||
set
|
||||
{
|
||||
if(AreDifferent(_EmployeeConfirmationReceiptSignatureStateType, value))
|
||||
{
|
||||
_EmployeeConfirmationReceiptSignatureStateType = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public virtual SignatureStateType ServiceRecordSignatureStateType
|
||||
{
|
||||
get => _ServiceRecordSignatureStateType;
|
||||
|
||||
set
|
||||
{
|
||||
if(AreDifferent(_ServiceRecordSignatureStateType, value))
|
||||
{
|
||||
_ServiceRecordSignatureStateType = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -34,14 +34,18 @@
|
||||
<property column="GroupRoundedDuration" type="Decimal" name="GroupRoundedDuration" />
|
||||
<property column="GroupOid" type="Int64" name="GroupOid" update="false" insert="false" />
|
||||
<property column="ServiceRecordType" type="BS.Shared.ServiceRecordTypeId, BS.Shared" name="ServiceRecordType" />
|
||||
<property column="DistanceInMeter" type="Decimal" name="DistanceInMeter" />
|
||||
<property column="Relevance" type="Int32" name="Relevance" />
|
||||
<property column="IsCreatedInMobileClient" type="Boolean" name="IsCreatedInMobileClient" />
|
||||
<property column="DistanceInMeter" type="Decimal" name="DistanceInMeter" />
|
||||
<property column="Relevance" type="Int32" name="Relevance" />
|
||||
<property column="IsCreatedInMobileClient" type="Boolean" name="IsCreatedInMobileClient" />
|
||||
<property column="Notice2" type="String" name="Notice2" length="1024" />
|
||||
<property column="Notice3" type="String" name="Notice3" length="1024" />
|
||||
<property column="Notice4" type="String" name="Notice4" length="1024" />
|
||||
<property column="Notice5" type="String" name="Notice5" length="1024" />
|
||||
|
||||
<property column="CustomerConfirmationReceiptSignatureStateType" type="BS.Shared.SignatureStateType, BS.Shared" name="CustomerConfirmationReceiptSignatureStateType" />
|
||||
<property column="EmployeeConfirmationReceiptSignatureStateType" type="BS.Shared.SignatureStateType, BS.Shared" name="EmployeeConfirmationReceiptSignatureStateType" />
|
||||
<property column="ServiceRecordSignatureStateType" type="BS.Shared.SignatureStateType, BS.Shared" name="ServiceRecordSignatureStateType" />
|
||||
|
||||
<many-to-one name="Group" column="GroupOid" class="BeWo.Data.Entities.ServiceRecordGroup,BeWo.Data" cascade="none" />
|
||||
<many-to-one name="Employee" column="EmployeeOid" class="BeWo.Data.Entities.Employee,BeWo.Data" cascade="none" />
|
||||
<many-to-one name="Customer" column="CustomerOid" class="BeWo.Data.Entities.Customer,BeWo.Data" cascade="none" />
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<PropertyGroup>
|
||||
<NameOfLastUsedPublishProfile>BeWo2.0</NameOfLastUsedPublishProfile>
|
||||
<UseIISExpress>true</UseIISExpress>
|
||||
<LastActiveSolutionConfig>Release|Any CPU</LastActiveSolutionConfig>
|
||||
<LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
|
||||
<Use64BitIISExpress>false</Use64BitIISExpress>
|
||||
<IISExpressSSLPort />
|
||||
<IISExpressAnonymousAuthentication />
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
ALTER TABLE servicerecordhistory ADD COLUMN `CustomerConfirmationReceiptSignatureStateType` int DEFAULT 0;
|
||||
ALTER TABLE servicerecordhistory ADD COLUMN `EmployeeConfirmationReceiptSignatureStateType` int DEFAULT 0;
|
||||
ALTER TABLE servicerecordhistory ADD COLUMN `ServiceRecordSignatureStateType` int DEFAULT 0;
|
||||
@@ -62,7 +62,6 @@ namespace ChristinaFrommen
|
||||
this.xrTableCell7 = new DevExpress.XtraReports.UI.XRTableCell();
|
||||
this.xrTableCell43 = new DevExpress.XtraReports.UI.XRTableCell();
|
||||
this.xrTableCell49 = new DevExpress.XtraReports.UI.XRTableCell();
|
||||
this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components);
|
||||
this.formattingRuleStartDate = new DevExpress.XtraReports.UI.FormattingRule();
|
||||
this.ReportHeader = new DevExpress.XtraReports.UI.ReportHeaderBand();
|
||||
this.xrLabel14 = new DevExpress.XtraReports.UI.XRLabel();
|
||||
@@ -118,12 +117,13 @@ namespace ChristinaFrommen
|
||||
this.xrLabel1 = new DevExpress.XtraReports.UI.XRLabel();
|
||||
this.xrPictureBox1 = new DevExpress.XtraReports.UI.XRPictureBox();
|
||||
this.fieldKontaktArt = new DevExpress.XtraReports.UI.CalculatedField();
|
||||
this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components);
|
||||
((System.ComponentModel.ISupportInitialize)(this.xrTable3)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.xrTableServiceRecords1)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.xrTableAbwesenheiten)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.xrRichText2)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.xrRichText1)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this)).BeginInit();
|
||||
//
|
||||
// Detail
|
||||
@@ -534,10 +534,6 @@ namespace ChristinaFrommen
|
||||
this.xrTableCell49.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopCenter;
|
||||
this.xrTableCell49.Weight = 0.44692737430167606D;
|
||||
//
|
||||
// bindingSource1
|
||||
//
|
||||
this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.ServicesOverviewRO);
|
||||
//
|
||||
// formattingRuleStartDate
|
||||
//
|
||||
this.formattingRuleStartDate.Condition = "[StartDate2] < [StartDate]";
|
||||
@@ -767,7 +763,7 @@ namespace ChristinaFrommen
|
||||
this.xrLabel9,
|
||||
this.xrLabel1,
|
||||
this.xrPictureBox1});
|
||||
this.GroupFooter1.HeightF = 290F;
|
||||
this.GroupFooter1.HeightF = 333.5418F;
|
||||
this.GroupFooter1.KeepTogether = true;
|
||||
this.GroupFooter1.Name = "GroupFooter1";
|
||||
//
|
||||
@@ -790,16 +786,16 @@ namespace ChristinaFrommen
|
||||
//
|
||||
this.xrPictureBox2.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
|
||||
new DevExpress.XtraReports.UI.XRBinding("Image", null, "CustomerSignature")});
|
||||
this.xrPictureBox2.LocationFloat = new DevExpress.Utils.PointFloat(186.6944F, 234.5F);
|
||||
this.xrPictureBox2.LocationFloat = new DevExpress.Utils.PointFloat(49.36104F, 242.625F);
|
||||
this.xrPictureBox2.Name = "xrPictureBox2";
|
||||
this.xrPictureBox2.SizeF = new System.Drawing.SizeF(199.3611F, 35.50002F);
|
||||
this.xrPictureBox2.SizeF = new System.Drawing.SizeF(336.6944F, 70.91675F);
|
||||
this.xrPictureBox2.Sizing = DevExpress.XtraPrinting.ImageSizeMode.ZoomImage;
|
||||
//
|
||||
// lblUnterschriftKlient
|
||||
//
|
||||
this.lblUnterschriftKlient.Borders = DevExpress.XtraPrinting.BorderSide.Top;
|
||||
this.lblUnterschriftKlient.Font = new System.Drawing.Font("Arial", 10F);
|
||||
this.lblUnterschriftKlient.LocationFloat = new DevExpress.Utils.PointFloat(49.3611F, 270F);
|
||||
this.lblUnterschriftKlient.LocationFloat = new DevExpress.Utils.PointFloat(49.36104F, 313.5417F);
|
||||
this.lblUnterschriftKlient.Name = "lblUnterschriftKlient";
|
||||
this.lblUnterschriftKlient.Padding = new DevExpress.XtraPrinting.PaddingInfo(3, 2, 0, 0, 100F);
|
||||
this.lblUnterschriftKlient.SizeF = new System.Drawing.SizeF(336.6944F, 20F);
|
||||
@@ -815,7 +811,7 @@ namespace ChristinaFrommen
|
||||
//
|
||||
this.lblUnterschriftMitarbeiter.Borders = DevExpress.XtraPrinting.BorderSide.Top;
|
||||
this.lblUnterschriftMitarbeiter.Font = new System.Drawing.Font("Arial", 10F);
|
||||
this.lblUnterschriftMitarbeiter.LocationFloat = new DevExpress.Utils.PointFloat(398.31F, 270F);
|
||||
this.lblUnterschriftMitarbeiter.LocationFloat = new DevExpress.Utils.PointFloat(402.7543F, 313.5418F);
|
||||
this.lblUnterschriftMitarbeiter.Name = "lblUnterschriftMitarbeiter";
|
||||
this.lblUnterschriftMitarbeiter.Padding = new DevExpress.XtraPrinting.PaddingInfo(3, 2, 0, 0, 100F);
|
||||
this.lblUnterschriftMitarbeiter.SizeF = new System.Drawing.SizeF(336.6944F, 19.99998F);
|
||||
@@ -1205,10 +1201,10 @@ namespace ChristinaFrommen
|
||||
//
|
||||
this.xrPictureBox1.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
|
||||
new DevExpress.XtraReports.UI.XRBinding("Image", null, "EmployeeSignature")});
|
||||
this.xrPictureBox1.LocationFloat = new DevExpress.Utils.PointFloat(535.6389F, 234.5F);
|
||||
this.xrPictureBox1.LocationFloat = new DevExpress.Utils.PointFloat(402.7543F, 242.625F);
|
||||
this.xrPictureBox1.Name = "xrPictureBox1";
|
||||
this.xrPictureBox1.Scripts.OnBeforePrint = "xrPictureBox1_BeforePrint";
|
||||
this.xrPictureBox1.SizeF = new System.Drawing.SizeF(199.3611F, 35.50002F);
|
||||
this.xrPictureBox1.SizeF = new System.Drawing.SizeF(336.69F, 70.91675F);
|
||||
this.xrPictureBox1.Sizing = DevExpress.XtraPrinting.ImageSizeMode.ZoomImage;
|
||||
//
|
||||
// fieldKontaktArt
|
||||
@@ -1218,6 +1214,10 @@ namespace ChristinaFrommen
|
||||
this.fieldKontaktArt.FieldType = DevExpress.XtraReports.UI.FieldType.String;
|
||||
this.fieldKontaktArt.Name = "fieldKontaktArt";
|
||||
//
|
||||
// bindingSource1
|
||||
//
|
||||
this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.ServicesOverviewRO);
|
||||
//
|
||||
// Quittierungsbeleg
|
||||
//
|
||||
this.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] {
|
||||
@@ -1243,10 +1243,10 @@ namespace ChristinaFrommen
|
||||
this.Version = "17.1";
|
||||
((System.ComponentModel.ISupportInitialize)(this.xrTable3)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.xrTableServiceRecords1)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.xrTableAbwesenheiten)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.xrRichText2)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.xrRichText1)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this)).EndInit();
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using System;
|
||||
using System.Security.Cryptography;
|
||||
using BeWo.Data.Access;
|
||||
using BeWo.Data.Entities;
|
||||
using BS.Shared.DataContracts;
|
||||
@@ -42,6 +41,9 @@ namespace BeWo.Service.DCEntityMapper
|
||||
pDataContract.DistanceInMeterDecimal = pEntity.DistanceInMeter;
|
||||
pDataContract.Relevance = pEntity.Relevance;
|
||||
pDataContract.IsCreatedInMobileClient = pEntity.IsCreatedInMobileClient;
|
||||
pDataContract.CustomerConfirmationReceiptSignatureStateType = pEntity.CustomerConfirmationReceiptSignatureStateType;
|
||||
pDataContract.EmployeeConfirmationReceiptSignatureStateType = pEntity.EmployeeConfirmationReceiptSignatureStateType;
|
||||
pDataContract.ServiceRecordSignatureStateType = pEntity.ServiceRecordSignatureStateType;
|
||||
|
||||
|
||||
try
|
||||
@@ -78,14 +80,12 @@ namespace BeWo.Service.DCEntityMapper
|
||||
|
||||
if (pEntity.ServiceDescription != null)
|
||||
{
|
||||
pDataContract.ServiceDescription =
|
||||
MapperFactory.ServiceDescriptionDC_ServiceDescription.MapToNewDC(pEntity.ServiceDescription);
|
||||
pDataContract.ServiceDescription = MapperFactory.ServiceDescriptionDC_ServiceDescription.MapToNewDC(pEntity.ServiceDescription);
|
||||
}
|
||||
|
||||
if (pEntity.SupportConcept != null)
|
||||
{
|
||||
pDataContract.SupportConcept =
|
||||
MapperFactory.CompactSupportConceptDC_SupportConcept.MapToNewDC(pEntity.SupportConcept);
|
||||
pDataContract.SupportConcept = MapperFactory.CompactSupportConceptDC_SupportConcept.MapToNewDC(pEntity.SupportConcept);
|
||||
}
|
||||
|
||||
var x = MapperFactory.ServiceRecordDC_ServiceRecord.MapToNewDC(DAOFactory.SearchDAO.FindServiceRecordforHistory(pEntity.ServiceRecordOid.Value));
|
||||
|
||||
@@ -113,7 +113,7 @@ namespace BeWo.Service.Plugins
|
||||
//t = "3890031575"; // Die Wohnhelfer Kuhrau
|
||||
//t = "3536719736"; // BeWo Stefanie Schäfer (BeWoKerpen)
|
||||
//t = "7739670213"; // SPZ Leverkusen
|
||||
t = "3341456098"; // Hilfe Daheim (früher BeWo Schillinger)
|
||||
//t = "3341456098"; // Hilfe Daheim (früher BeWo Schillinger)
|
||||
//t = "4271389563"; // Komm Mit
|
||||
//t = "5430005891"; // Marienhospital Eickel
|
||||
//t = "3265049248"; // Gerdas Pflegedienst
|
||||
@@ -324,7 +324,7 @@ namespace BeWo.Service.Plugins
|
||||
//t = "9094672461"; // Transkulturelles Betreuungsbüro (Toprak GmbH)
|
||||
//t = "9008813932"; // Aids Hilfe Giessen
|
||||
//t = "4052216789"; // Perspektiven e.V.
|
||||
//t = "7663765314"; // Christina Frommen (Frommen BeWo)
|
||||
t = "7663765314"; // Christina Frommen (Frommen BeWo)
|
||||
//t = "5462295916"; // BeWo Dellbrueck
|
||||
//t = "2120989920"; // Sozialbüro Schüßler und Wilckens GbR
|
||||
//t = "9815376800"; // Haus Dülken GmbH + Co. KG
|
||||
|
||||
@@ -33,7 +33,7 @@ namespace BeWo.Service.Plugins
|
||||
DateTime start = groupRecord.Start.Value;
|
||||
bool noTime = start.Hour == 0 && start.Minute == 0 && start.Second == 1; //Keine Zeit angegeben
|
||||
|
||||
if (!noTime)
|
||||
if(!noTime)
|
||||
{
|
||||
IList<ServiceRecord> records =
|
||||
DAOFactory.SearchDAO.FindServiceRecordsDetailsForLastDays(
|
||||
@@ -230,7 +230,7 @@ namespace BeWo.Service.Plugins
|
||||
// });
|
||||
//}
|
||||
|
||||
if(!(newServiceRecord.ServiceRecordOid is null))
|
||||
if(newServiceRecord.ServiceRecordOid.HasValue)
|
||||
{
|
||||
var original = DAOFactory.GenericDAO.LoadByID<ServiceRecord>(newServiceRecord.ServiceRecordOid.Value);
|
||||
|
||||
|
||||
@@ -105,6 +105,10 @@ namespace BeWo.Service.Plugins
|
||||
AddOrReplaceTranslation(dict, "Unterschriften der Mitarbeiter für den Quittierungsbeleg stellvertretend leisten (monatlich)", "Unterschriften für den Quittierungsbeleg stellvertretend leisten (monatlich)");
|
||||
//AddOrReplaceTranslation(dict, "StundenkontoTagesansicht", "Tagesansicht anzeigen");
|
||||
|
||||
AddOrReplaceTranslation(dict, "Einzelunterschriftsstatus", "Unterschrift einzeln");
|
||||
AddOrReplaceTranslation(dict, "MonatsunterschriftenstatusKlient", "Unterschrift mtl. Klient");
|
||||
AddOrReplaceTranslation(dict, "MonatsunterschriftenstatusMitarbeiter", "Unterschrift mtl. Mitarbeiter");
|
||||
|
||||
return dict;
|
||||
}
|
||||
|
||||
|
||||
@@ -1948,7 +1948,7 @@ namespace BeWo.Service.ServiceImplementations
|
||||
|
||||
DAOFactory.GenericDAO.Insert(lServiceRecords);
|
||||
|
||||
MakeServiceRecordHistoryEntry(lServiceRecords, lServiceRecords.Select(sr => sr.Oid.Value).ToList(), StatementType.Insert);
|
||||
MakeServiceRecordHistoryEntry(lServiceRecords.ToList(), lServiceRecords.Select(sr => sr.Oid.Value).ToList(), StatementType.Insert);
|
||||
|
||||
return lServiceRecords.Select(sr => sr.Oid.Value).ToList();
|
||||
}
|
||||
@@ -2130,7 +2130,6 @@ namespace BeWo.Service.ServiceImplementations
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: vorhandene Unterschriften löschen!
|
||||
public ServiceRecordGroupDC UpdateServiceRecordGroup(ServiceRecordGroupDC pServiceRecordGroup)
|
||||
{
|
||||
try
|
||||
@@ -2147,7 +2146,7 @@ namespace BeWo.Service.ServiceImplementations
|
||||
|
||||
if (Math.Abs(minutesNew - minutesOrg) < 0.1 && pServiceRecordGroup.StartDate.Value.Hour == 0 && pServiceRecordGroup.StartDate.Value.Minute == 0 && pServiceRecordGroup.StartDate.Value.Second == 0)
|
||||
{
|
||||
//prüfen ob korrigiert werden muss
|
||||
// Prüfen, ob korrigiert werden muss
|
||||
if (originalStart.Value.Hour != 0 || originalStart.Value.Minute != 0)
|
||||
{
|
||||
pServiceRecordGroup.StartDate = originalStart;
|
||||
@@ -2174,16 +2173,17 @@ namespace BeWo.Service.ServiceImplementations
|
||||
srdc.GroupRoundedDuration = pServiceRecordGroup.RoundedDuration;
|
||||
}
|
||||
|
||||
// Bei geänderten Daten oder Uhrzeiten werden die Klientenunterschriften gelöscht
|
||||
var serviceRecords = pServiceRecordGroup.ServiceRecordList;
|
||||
var originalServiceRecords = lOriginal.ServiceRecordList;
|
||||
DeleteSignaturesFromServiceRecords(serviceRecords, originalServiceRecords);
|
||||
// (Veraltet. Es ist keine Änderung an der Zeit bei vorhandener Einzelunterschrift) Bei geänderten Daten oder Uhrzeiten werden die Klientenunterschriften gelöscht
|
||||
var serviceRecords = pServiceRecordGroup.ServiceRecordList;
|
||||
var originalServiceRecords = lOriginal.ServiceRecordList.ToList();
|
||||
var serviceRecordOidsWithDeletedSingleSignatures = DeleteSignaturesFromServiceRecords(serviceRecords, originalServiceRecords);
|
||||
var serviceRecordsdWithRemovedConfirmationReceiptSignatures = RemoveServiceRecordsFromConfirmationReceiptSignatures(serviceRecords, originalServiceRecords, false);
|
||||
|
||||
MapperFactory.ServiceRecordGroupDC_ServiceRecordGroup.MergeWithEntity(pServiceRecordGroup, lOriginal);
|
||||
|
||||
var lServiceRecords = new List<ServiceRecord>();
|
||||
|
||||
// update servicerecords
|
||||
// Update der einzelnen Servicerecords
|
||||
MapperFactory.ServiceRecordDC_ServiceRecord.MergeWithEntitys(pServiceRecordGroup.ServiceRecordList, lOriginal.ServiceRecordList);
|
||||
foreach (var iServiceRecord in lOriginal.ServiceRecordList)
|
||||
{
|
||||
@@ -2196,14 +2196,16 @@ namespace BeWo.Service.ServiceImplementations
|
||||
lServiceRecords.Add(iServiceRecord);
|
||||
}
|
||||
|
||||
RemoveServiceRecordsFromConfirmationReceiptSignatures(MapperFactory.ServiceRecordDC_ServiceRecord.MapToNewDCs(lServiceRecords), lOriginal.ServiceRecordList.ToList(), false);
|
||||
|
||||
var groupDurationCalculator = PluginLoader.FindClass<GroupDurationCalculator>();
|
||||
|
||||
groupDurationCalculator?.CalculateGroupDuration(lOriginal);
|
||||
|
||||
DAOFactory.GenericDAO.Update(lOriginal);
|
||||
MakeServiceRecordHistoryEntry(lServiceRecords, null, StatementType.Update);
|
||||
|
||||
// Die ServiceRecords, deren Einzelunterschriften duch bearbeitete Zeitangaben im Zuge des Updates gelöscht werden zu der SignatureStatus-Liste hinzugefügt (sollte eigentlich nicht vorkommen)
|
||||
var serviceRecords2SignatureStates = GenerateSignatureStates(serviceRecordOidsWithDeletedSingleSignatures, serviceRecordsdWithRemovedConfirmationReceiptSignatures, lOriginal.ServiceRecordList.ToList());
|
||||
|
||||
MakeServiceRecordHistoryEntryWithSignatureStates(serviceRecords2SignatureStates, StatementType.Update);
|
||||
|
||||
var newGroupDC = MapperFactory.ServiceRecordGroupDC_ServiceRecordGroup.MapToNewDC(lOriginal);
|
||||
|
||||
@@ -2217,14 +2219,121 @@ namespace BeWo.Service.ServiceImplementations
|
||||
}
|
||||
}
|
||||
|
||||
private static void MakeServiceRecordHistoryEntryWithSignatureStates(List<ServiceRecord2SignatureStates> serviceRecords2SignatureStates, StatementType statementType)
|
||||
{
|
||||
var serviceRecordHistoryEntries = new List<ServiceRecordHistory>();
|
||||
|
||||
|
||||
foreach(var serviceRecord2SignatureState in serviceRecords2SignatureStates)
|
||||
{
|
||||
var serviceRecord = serviceRecord2SignatureState.ServiceRecord;
|
||||
var singleSignatureState = serviceRecord2SignatureState.SingleSignatureStateType;
|
||||
var customerMonthlySignatureState = serviceRecord2SignatureState.CustomerMonthlySignatureStateType;
|
||||
var employeeMonthlySignatureState = serviceRecord2SignatureState.EmployeeMonthlySignatreStateType;
|
||||
|
||||
ServiceRecordHistory previousRecordHistoryEntry = null;
|
||||
|
||||
if(serviceRecord.Oid.HasValue)
|
||||
{
|
||||
previousRecordHistoryEntry = DAOFactory.SearchDAO.FindMostRecentServiceRecordHistoryEntryByServiceRecordOid(serviceRecord.Oid.Value);
|
||||
}
|
||||
|
||||
serviceRecordHistoryEntries.AddIfNotIn(new ServiceRecordHistory
|
||||
{
|
||||
TimeStamp = DateTime.Now,
|
||||
ChangeType = statementType,
|
||||
CostBearer2SupportConcept = serviceRecord.CostBearer2SupportConcept,
|
||||
CostBearer2SupportConceptOid = serviceRecord.CostBearer2SupportConceptOid,
|
||||
Customer = serviceRecord.Customer,
|
||||
CustomerOid = serviceRecord.CustomerOid,
|
||||
Employee = serviceRecord.Employee,
|
||||
EmployeeOid = serviceRecord.EmployeeOid,
|
||||
End = serviceRecord.End,
|
||||
Group = serviceRecord.Group,
|
||||
GroupEmployeeCount = serviceRecord.GroupEmployeeCount,
|
||||
GroupOid = serviceRecord.GroupOid,
|
||||
GroupPersonCount = serviceRecord.GroupPersonCount,
|
||||
GroupRoundedDuration = serviceRecord.GroupRoundedDuration,
|
||||
IP = serviceRecord.IP,
|
||||
IsActive = serviceRecord.IsActive,
|
||||
Notice = serviceRecord.Notice,
|
||||
ServiceRecordOid = serviceRecord.Oid,
|
||||
RoundedDuration = serviceRecord.RoundedDuration,
|
||||
ServiceDescription = serviceRecord.ServiceDescription,
|
||||
ServiceRecordType = serviceRecord.ServiceRecordType,
|
||||
ServiceRecordInsTs = serviceRecord.InsTs,
|
||||
ServiceRecordVersion = serviceRecord.Version ?? 0,
|
||||
ServiceRecordInsUser = serviceRecord.InsUser,
|
||||
ServiceRecordUdpUser = serviceRecord.UdpUser,
|
||||
Start = serviceRecord.Start,
|
||||
SupportConcept = serviceRecord.SupportConcept,
|
||||
SystemEntryID = serviceRecord.SystemEntryID,
|
||||
DistanceInMeter = serviceRecord.DistanceInMeter,
|
||||
IsCreatedInMobileClient = serviceRecord.IsCreatedInMobileClient,
|
||||
ServiceRecordSignatureStateType = singleSignatureState ?? previousRecordHistoryEntry?.ServiceRecordSignatureStateType ?? SignatureStateType.None,
|
||||
CustomerConfirmationReceiptSignatureStateType = customerMonthlySignatureState ?? previousRecordHistoryEntry?.CustomerConfirmationReceiptSignatureStateType ?? SignatureStateType.None,
|
||||
EmployeeConfirmationReceiptSignatureStateType = employeeMonthlySignatureState ?? previousRecordHistoryEntry?.EmployeeConfirmationReceiptSignatureStateType ?? SignatureStateType.None
|
||||
});
|
||||
}
|
||||
|
||||
DAOFactory.GenericDAO.Insert(serviceRecordHistoryEntries);
|
||||
}
|
||||
|
||||
private static List<ServiceRecord2SignatureStates> GenerateSignatureStates(List<ServiceRecord> serviceRecordsWithDeletedSingleSignatures, List<ServiceRecord2SignatureStates> serviceRecordsdWithRemovedConfirmationReceiptSignatures, List<ServiceRecord> originals)
|
||||
{
|
||||
var serviceRecords2SignatureStates = new List<ServiceRecord2SignatureStates>();
|
||||
|
||||
// Die ServiceRecords, deren Einzelunterschriften duch bearbeitete Zeitangaben im Zuge des Updates gelöscht werden zu der SignatureStatus-Liste hinzugefügt (sollte eigentlich nicht vorkommen)
|
||||
foreach(var serviceRecord in serviceRecordsWithDeletedSingleSignatures)
|
||||
{
|
||||
serviceRecords2SignatureStates.Add(new ServiceRecord2SignatureStates(serviceRecord, SignatureStateType.AutomaticallyDeleted, null, null));
|
||||
}
|
||||
|
||||
// Die ServiceRecords, deren Monatsunterschriften duch bearbeitete Zeitangaben im Zuge des Updates gelöscht werden zu der SignatureStatus-Liste hinzugefügt
|
||||
foreach(var serviceRecord2SignatureStates in serviceRecordsdWithRemovedConfirmationReceiptSignatures)
|
||||
{
|
||||
var existingServiceRecord2SignatureStates = serviceRecords2SignatureStates.FirstOrDefault(f => f.ServiceRecord.Equals(serviceRecord2SignatureStates.ServiceRecord));
|
||||
|
||||
if(existingServiceRecord2SignatureStates is null)
|
||||
{
|
||||
serviceRecords2SignatureStates.Add(serviceRecord2SignatureStates);
|
||||
}
|
||||
else
|
||||
{
|
||||
existingServiceRecord2SignatureStates.CustomerMonthlySignatureStateType = serviceRecord2SignatureStates.CustomerMonthlySignatureStateType;
|
||||
existingServiceRecord2SignatureStates.EmployeeMonthlySignatreStateType = serviceRecord2SignatureStates.EmployeeMonthlySignatreStateType;
|
||||
}
|
||||
}
|
||||
|
||||
// Die ServiceRecords, bei denen keine Zeitangaben geändert wurden und deren Unterschriften so erhalten bleiben, werden zu der SignatureStatus-Liste hinzugefügt
|
||||
foreach(var serviceRecord in originals)
|
||||
{
|
||||
if(serviceRecord.Oid is null)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
var oid = serviceRecord.Oid.Value;
|
||||
|
||||
if(serviceRecordsWithDeletedSingleSignatures.All(a => a.Oid.HasValue && a.Oid.Value.Equals(oid)) &&
|
||||
serviceRecordsdWithRemovedConfirmationReceiptSignatures.All(a => a.ServiceRecord.Oid.HasValue && a.ServiceRecord.Oid.Value.Equals(oid)))
|
||||
{
|
||||
serviceRecords2SignatureStates.AddIfNotIn(new ServiceRecord2SignatureStates(serviceRecord, null, null, null));
|
||||
}
|
||||
}
|
||||
|
||||
return serviceRecords2SignatureStates;
|
||||
}
|
||||
|
||||
public void UpdateServiceRecords(List<ServiceRecordDC> pServiceRecords)
|
||||
{
|
||||
try
|
||||
{
|
||||
var lOriginals = DAOFactory.GenericDAO.LoadByIDs<ServiceRecord>(pServiceRecords.Select(sr => sr.ServiceRecordOid.Value));
|
||||
|
||||
DeleteSignaturesFromServiceRecords(pServiceRecords, lOriginals);
|
||||
RemoveServiceRecordsFromConfirmationReceiptSignatures(pServiceRecords, lOriginals, false);
|
||||
// ToDo: KGW? Man kann bei ServiceReocrds die Uhrzeiten, die eine Einzelunterschrift ungültig machen würde, nicht ändern.
|
||||
var serviceRecordsWithDeletedSingleSignatures = DeleteSignaturesFromServiceRecords(pServiceRecords, lOriginals);
|
||||
var serviceRecordsdWithRemovedConfirmationReceiptSignatures = RemoveServiceRecordsFromConfirmationReceiptSignatures(pServiceRecords, lOriginals, false);
|
||||
|
||||
if (lOriginals.Count == 1 && pServiceRecords.Count == 1)
|
||||
{
|
||||
@@ -2239,11 +2348,10 @@ namespace BeWo.Service.ServiceImplementations
|
||||
var minutesOrg = originalEnde.Value.Subtract(originalStart.Value).TotalMinutes;
|
||||
var minutesNew = srDc.End.Value.Subtract(srDc.Start.Value).TotalMinutes;
|
||||
|
||||
|
||||
//Start und Ende korrigieren
|
||||
// Start und Ende korrigieren
|
||||
if (Math.Abs(minutesNew - minutesOrg) < 0.1 && srDc.Start.Value.Hour == 0 && srDc.Start.Value.Minute == 0 && srDc.Start.Value.Second == 0)
|
||||
{
|
||||
//prüfen, ob korrigiert werden muss
|
||||
// Prüfen, ob korrigiert werden muss
|
||||
if (originalStart.Value.Hour != 0 ||
|
||||
originalStart.Value.Minute != 0)
|
||||
{
|
||||
@@ -2252,66 +2360,47 @@ namespace BeWo.Service.ServiceImplementations
|
||||
//pServiceRecordGroup.RoundedDuration = (decimal)originalEnde.Value.Subtract(originalStart.Value).TotalMinutes;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
MapperFactory.ServiceRecordDC_ServiceRecord.MergeWithEntitys(pServiceRecords, lOriginals);
|
||||
|
||||
var srdc = PluginLoader.FindClass<ServiceRecordDurationCalculator>();
|
||||
var gdc = PluginLoader.FindClass<GroupDurationCalculator>();
|
||||
var serviceRecordDurationCalculator = PluginLoader.FindClass<ServiceRecordDurationCalculator>();
|
||||
var groupDurationCalculator = PluginLoader.FindClass<GroupDurationCalculator>();
|
||||
|
||||
foreach (var serviceRecord in lOriginals)
|
||||
foreach(var serviceRecord in lOriginals)
|
||||
{
|
||||
if (srdc != null)
|
||||
{
|
||||
srdc.CalculateRoundedDuration(serviceRecord);
|
||||
}
|
||||
serviceRecordDurationCalculator?.CalculateRoundedDuration(serviceRecord);
|
||||
|
||||
if (serviceRecord.GroupOid.HasValue && serviceRecord.GroupPersonCount.HasValue && serviceRecord.GroupEmployeeCount.HasValue && gdc != null)
|
||||
if (serviceRecord.GroupOid.HasValue && serviceRecord.GroupPersonCount.HasValue && serviceRecord.GroupEmployeeCount.HasValue && groupDurationCalculator != null)
|
||||
{
|
||||
var gc = gdc.CalculateGroupDuration(serviceRecord.GroupPersonCount.Value,
|
||||
serviceRecord.GroupEmployeeCount.Value, serviceRecord.RoundedDuration);
|
||||
var groupDuration = groupDurationCalculator.CalculateGroupDuration(serviceRecord.GroupPersonCount.Value, serviceRecord.GroupEmployeeCount.Value, serviceRecord.RoundedDuration);
|
||||
|
||||
var singleduration = serviceRecord.RoundedDuration / serviceRecord.GroupPersonCount.Value;
|
||||
|
||||
if (gc != null)
|
||||
if (groupDuration != null)
|
||||
{
|
||||
singleduration = gc.SingleDuration;
|
||||
singleduration = groupDuration.SingleDuration;
|
||||
}
|
||||
|
||||
serviceRecord.RoundedDuration = singleduration;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
if (srdc != null)
|
||||
var saveInterceptor = PluginLoader.FindClass<SaveInterceptor>();
|
||||
if(saveInterceptor != null)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
var si = PluginLoader.FindClass<SaveInterceptor>();
|
||||
if (si != null)
|
||||
{
|
||||
foreach (var serviceRecord in lOriginals)
|
||||
foreach(var serviceRecord in lOriginals)
|
||||
{
|
||||
si.BeforeSaveServiceRecord(serviceRecord);
|
||||
saveInterceptor.BeforeSaveServiceRecord(serviceRecord);
|
||||
}
|
||||
}
|
||||
|
||||
//RemoveServiceRecordsFromConfirmationReceiptSignatures(pServiceRecords, lOriginals);
|
||||
|
||||
DAOFactory.GenericDAO.Update(lOriginals);
|
||||
|
||||
var serviceRecords2SignatureStates = GenerateSignatureStates(serviceRecordsWithDeletedSingleSignatures, serviceRecordsdWithRemovedConfirmationReceiptSignatures, lOriginals);//new List<ServiceRecord2SignatureStates>();
|
||||
|
||||
lOriginals =
|
||||
DAOFactory.GenericDAO.LoadByIDs<ServiceRecord>(
|
||||
pServiceRecords.Select(sr => sr.ServiceRecordOid.Value));
|
||||
|
||||
MakeServiceRecordHistoryEntry(lOriginals, null, StatementType.Update);
|
||||
MakeServiceRecordHistoryEntryWithSignatureStates(serviceRecords2SignatureStates, StatementType.Update);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
@@ -3045,89 +3134,103 @@ namespace BeWo.Service.ServiceImplementations
|
||||
}
|
||||
}
|
||||
|
||||
private static void MakeServiceRecordHistoryEntry(IEnumerable<ServiceRecord> lOriginals, IEnumerable<long> serviceRecordOidList, StatementType statementType)
|
||||
// ToDo: Unterschriftenbemerkung hier einbauen
|
||||
private static void MakeServiceRecordHistoryEntry(List<ServiceRecord> lOriginals, IEnumerable<long> serviceRecordOidList, StatementType statementType)
|
||||
{
|
||||
var hServiceRecords = new List<ServiceRecordHistory>();
|
||||
var serviceRecordHistoryEntries = new List<ServiceRecordHistory>();
|
||||
|
||||
if (statementType.Equals(StatementType.Insert) && serviceRecordOidList != null)
|
||||
{
|
||||
int iterator = 0;
|
||||
foreach (ServiceRecordHistory history in lOriginals.Select(ServiceRecordOriginal => new ServiceRecordHistory
|
||||
var iterator = 0;
|
||||
foreach (var history in lOriginals.Select(serviceRecordOriginal => new ServiceRecordHistory
|
||||
{
|
||||
TimeStamp = DateTime.Now,
|
||||
ChangeType = statementType,
|
||||
CostBearer2SupportConcept = ServiceRecordOriginal.CostBearer2SupportConcept,
|
||||
CostBearer2SupportConceptOid = ServiceRecordOriginal.CostBearer2SupportConceptOid,
|
||||
Customer = ServiceRecordOriginal.Customer,
|
||||
CustomerOid = ServiceRecordOriginal.CustomerOid,
|
||||
Employee = ServiceRecordOriginal.Employee,
|
||||
EmployeeOid = ServiceRecordOriginal.EmployeeOid,
|
||||
End = ServiceRecordOriginal.End,
|
||||
Group = ServiceRecordOriginal.Group,
|
||||
GroupEmployeeCount = ServiceRecordOriginal.GroupEmployeeCount,
|
||||
GroupOid = ServiceRecordOriginal.GroupOid,
|
||||
GroupPersonCount = ServiceRecordOriginal.GroupPersonCount,
|
||||
GroupRoundedDuration = ServiceRecordOriginal.GroupRoundedDuration,
|
||||
IP = ServiceRecordOriginal.IP,
|
||||
IsActive = ServiceRecordOriginal.IsActive,
|
||||
Notice = ServiceRecordOriginal.Notice,
|
||||
ServiceRecordOid = serviceRecordOidList.ElementAt(iterator),
|
||||
RoundedDuration = ServiceRecordOriginal.RoundedDuration,
|
||||
ServiceDescription = ServiceRecordOriginal.ServiceDescription,
|
||||
ServiceRecordType = ServiceRecordOriginal.ServiceRecordType,
|
||||
ServiceRecordInsTs = ServiceRecordOriginal.InsTs,
|
||||
ServiceRecordVersion = ServiceRecordOriginal.Version.Value,
|
||||
ServiceRecordInsUser = ServiceRecordOriginal.InsUser,
|
||||
ServiceRecordUdpUser = ServiceRecordOriginal.UdpUser,
|
||||
Start = ServiceRecordOriginal.Start,
|
||||
SupportConcept = ServiceRecordOriginal.SupportConcept,
|
||||
SystemEntryID = ServiceRecordOriginal.SystemEntryID,
|
||||
DistanceInMeter = ServiceRecordOriginal.DistanceInMeter,
|
||||
IsCreatedInMobileClient = ServiceRecordOriginal.IsCreatedInMobileClient
|
||||
TimeStamp = DateTime.Now,
|
||||
ChangeType = statementType,
|
||||
CostBearer2SupportConcept = serviceRecordOriginal.CostBearer2SupportConcept,
|
||||
CostBearer2SupportConceptOid = serviceRecordOriginal.CostBearer2SupportConceptOid,
|
||||
Customer = serviceRecordOriginal.Customer,
|
||||
CustomerOid = serviceRecordOriginal.CustomerOid,
|
||||
Employee = serviceRecordOriginal.Employee,
|
||||
EmployeeOid = serviceRecordOriginal.EmployeeOid,
|
||||
End = serviceRecordOriginal.End,
|
||||
Group = serviceRecordOriginal.Group,
|
||||
GroupEmployeeCount = serviceRecordOriginal.GroupEmployeeCount,
|
||||
GroupOid = serviceRecordOriginal.GroupOid,
|
||||
GroupPersonCount = serviceRecordOriginal.GroupPersonCount,
|
||||
GroupRoundedDuration = serviceRecordOriginal.GroupRoundedDuration,
|
||||
IP = serviceRecordOriginal.IP,
|
||||
IsActive = serviceRecordOriginal.IsActive,
|
||||
Notice = serviceRecordOriginal.Notice,
|
||||
ServiceRecordOid = serviceRecordOidList.ElementAt(iterator),
|
||||
RoundedDuration = serviceRecordOriginal.RoundedDuration,
|
||||
ServiceDescription = serviceRecordOriginal.ServiceDescription,
|
||||
ServiceRecordType = serviceRecordOriginal.ServiceRecordType,
|
||||
ServiceRecordInsTs = serviceRecordOriginal.InsTs,
|
||||
ServiceRecordVersion = serviceRecordOriginal.Version ?? 0,
|
||||
ServiceRecordInsUser = serviceRecordOriginal.InsUser,
|
||||
ServiceRecordUdpUser = serviceRecordOriginal.UdpUser,
|
||||
Start = serviceRecordOriginal.Start,
|
||||
SupportConcept = serviceRecordOriginal.SupportConcept,
|
||||
SystemEntryID = serviceRecordOriginal.SystemEntryID,
|
||||
DistanceInMeter = serviceRecordOriginal.DistanceInMeter,
|
||||
IsCreatedInMobileClient = serviceRecordOriginal.IsCreatedInMobileClient
|
||||
}))
|
||||
{
|
||||
iterator++;
|
||||
hServiceRecords.Add(history);
|
||||
serviceRecordHistoryEntries.Add(history);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
hServiceRecords.AddRange(lOriginals.Select(ServiceRecordOriginal => new ServiceRecordHistory
|
||||
foreach(var original in lOriginals)
|
||||
{
|
||||
TimeStamp = DateTime.Now,
|
||||
ChangeType = statementType,
|
||||
CostBearer2SupportConcept = ServiceRecordOriginal.CostBearer2SupportConcept,
|
||||
CostBearer2SupportConceptOid = ServiceRecordOriginal.CostBearer2SupportConceptOid,
|
||||
Customer = ServiceRecordOriginal.Customer,
|
||||
CustomerOid = ServiceRecordOriginal.CustomerOid,
|
||||
Employee = ServiceRecordOriginal.Employee,
|
||||
EmployeeOid = ServiceRecordOriginal.EmployeeOid,
|
||||
End = ServiceRecordOriginal.End,
|
||||
Group = ServiceRecordOriginal.Group,
|
||||
GroupEmployeeCount = ServiceRecordOriginal.GroupEmployeeCount,
|
||||
GroupOid = ServiceRecordOriginal.GroupOid,
|
||||
GroupPersonCount = ServiceRecordOriginal.GroupPersonCount,
|
||||
GroupRoundedDuration = ServiceRecordOriginal.GroupRoundedDuration,
|
||||
IP = ServiceRecordOriginal.IP,
|
||||
IsActive = ServiceRecordOriginal.IsActive,
|
||||
Notice = ServiceRecordOriginal.Notice,
|
||||
ServiceRecordOid = ServiceRecordOriginal.Oid,
|
||||
RoundedDuration = ServiceRecordOriginal.RoundedDuration,
|
||||
ServiceDescription = ServiceRecordOriginal.ServiceDescription,
|
||||
ServiceRecordType = ServiceRecordOriginal.ServiceRecordType,
|
||||
ServiceRecordInsTs = ServiceRecordOriginal.InsTs,
|
||||
ServiceRecordVersion = ServiceRecordOriginal.Version.Value,
|
||||
ServiceRecordInsUser = ServiceRecordOriginal.InsUser,
|
||||
ServiceRecordUdpUser = ServiceRecordOriginal.UdpUser,
|
||||
Start = ServiceRecordOriginal.Start,
|
||||
SupportConcept = ServiceRecordOriginal.SupportConcept,
|
||||
SystemEntryID = ServiceRecordOriginal.SystemEntryID,
|
||||
DistanceInMeter = ServiceRecordOriginal.DistanceInMeter,
|
||||
IsCreatedInMobileClient = ServiceRecordOriginal.IsCreatedInMobileClient
|
||||
}));
|
||||
ServiceRecordHistory previousRecordHistoryEntry = null;
|
||||
|
||||
if(original.Oid.HasValue)
|
||||
{
|
||||
previousRecordHistoryEntry = DAOFactory.SearchDAO.FindMostRecentServiceRecordHistoryEntryByServiceRecordOid(original.Oid.Value);
|
||||
}
|
||||
|
||||
serviceRecordHistoryEntries.AddIfNotIn(new ServiceRecordHistory
|
||||
{
|
||||
TimeStamp = DateTime.Now,
|
||||
ChangeType = statementType,
|
||||
CostBearer2SupportConcept = original.CostBearer2SupportConcept,
|
||||
CostBearer2SupportConceptOid = original.CostBearer2SupportConceptOid,
|
||||
Customer = original.Customer,
|
||||
CustomerOid = original.CustomerOid,
|
||||
Employee = original.Employee,
|
||||
EmployeeOid = original.EmployeeOid,
|
||||
End = original.End,
|
||||
Group = original.Group,
|
||||
GroupEmployeeCount = original.GroupEmployeeCount,
|
||||
GroupOid = original.GroupOid,
|
||||
GroupPersonCount = original.GroupPersonCount,
|
||||
GroupRoundedDuration = original.GroupRoundedDuration,
|
||||
IP = original.IP,
|
||||
IsActive = original.IsActive,
|
||||
Notice = original.Notice,
|
||||
ServiceRecordOid = original.Oid,
|
||||
RoundedDuration = original.RoundedDuration,
|
||||
ServiceDescription = original.ServiceDescription,
|
||||
ServiceRecordType = original.ServiceRecordType,
|
||||
ServiceRecordInsTs = original.InsTs,
|
||||
ServiceRecordVersion = original.Version ?? 0,
|
||||
ServiceRecordInsUser = original.InsUser,
|
||||
ServiceRecordUdpUser = original.UdpUser,
|
||||
Start = original.Start,
|
||||
SupportConcept = original.SupportConcept,
|
||||
SystemEntryID = original.SystemEntryID,
|
||||
DistanceInMeter = original.DistanceInMeter,
|
||||
IsCreatedInMobileClient = original.IsCreatedInMobileClient,
|
||||
ServiceRecordSignatureStateType = previousRecordHistoryEntry?.ServiceRecordSignatureStateType ?? SignatureStateType.None,
|
||||
CustomerConfirmationReceiptSignatureStateType = previousRecordHistoryEntry?.CustomerConfirmationReceiptSignatureStateType ?? SignatureStateType.None,
|
||||
EmployeeConfirmationReceiptSignatureStateType = previousRecordHistoryEntry?.EmployeeConfirmationReceiptSignatureStateType ?? SignatureStateType.None
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
DAOFactory.GenericDAO.Insert(hServiceRecords);
|
||||
DAOFactory.GenericDAO.Insert(serviceRecordHistoryEntries);
|
||||
}
|
||||
|
||||
public IList<TextModuleDC> GetAllTextModules()
|
||||
@@ -3283,6 +3386,8 @@ namespace BeWo.Service.ServiceImplementations
|
||||
|
||||
DAOFactory.GenericDAO.Update(sr);
|
||||
|
||||
MakeSignatureStatusTypeServiceRecordHistoryEntry(sr, SignatureStateType.Valid, null, null);
|
||||
|
||||
return updatedSignatureDC;
|
||||
}
|
||||
catch (Exception e)
|
||||
@@ -3678,7 +3783,6 @@ namespace BeWo.Service.ServiceImplementations
|
||||
|
||||
public long InsertNewServiceRecordAndSignature(ServiceRecordDC sr, SignatureDC sig)
|
||||
{
|
||||
|
||||
try
|
||||
{
|
||||
var dcList = new List<ServiceRecordDC> { sr };
|
||||
@@ -3691,6 +3795,10 @@ namespace BeWo.Service.ServiceImplementations
|
||||
var lSignature = MapperFactory.SignatureDC_Signature.MapToNewEntity(sig);
|
||||
|
||||
DAOFactory.GenericDAO.Insert(lSignature);
|
||||
|
||||
var serviceRecord = DAOFactory.GenericDAO.LoadByID<ServiceRecord>(serviceRecordOid);
|
||||
|
||||
MakeSignatureStatusTypeServiceRecordHistoryEntry(serviceRecord, SignatureStateType.Valid, null, null);
|
||||
}
|
||||
|
||||
return serviceRecordOid;
|
||||
@@ -6838,6 +6946,8 @@ namespace BeWo.Service.ServiceImplementations
|
||||
var confRecSig = MapperFactory.ConfirmationReceiptSignatureDC_ConfirmationReceiptSignature.MapToNewEntity(confirmationReceiptSignature);
|
||||
|
||||
DAOFactory.GenericDAO.Insert(confRecSig);
|
||||
|
||||
MakeHistoryEntriesForConfirmationReceiptSignatures(new List<ConfirmationReceiptSignature> { confRecSig }, SignatureStateType.Valid);
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
@@ -6852,6 +6962,8 @@ namespace BeWo.Service.ServiceImplementations
|
||||
var confRecSigs = MapperFactory.ConfirmationReceiptSignatureDC_ConfirmationReceiptSignature.MapToNewEntities(confirmationReceiptSignatures);
|
||||
|
||||
DAOFactory.GenericDAO.Insert(confRecSigs);
|
||||
|
||||
MakeHistoryEntriesForConfirmationReceiptSignatures(confRecSigs, SignatureStateType.Valid);
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
@@ -6859,6 +6971,31 @@ namespace BeWo.Service.ServiceImplementations
|
||||
}
|
||||
}
|
||||
|
||||
private static void MakeHistoryEntriesForConfirmationReceiptSignatures(List<ConfirmationReceiptSignature> confirmationReceiptSignatures, SignatureStateType signatureStateType)
|
||||
{
|
||||
foreach(var confirmationReceiptSignature in confirmationReceiptSignatures)
|
||||
{
|
||||
foreach(var serviceRecord in confirmationReceiptSignature.ServiceRecords)
|
||||
{
|
||||
SignatureStateType? customerMonthlySignatureStateType;
|
||||
SignatureStateType? employeeMonthlySignatureStateTyp;
|
||||
|
||||
if(confirmationReceiptSignature.SignatureType == SignatureType.Customer)
|
||||
{
|
||||
customerMonthlySignatureStateType = signatureStateType;
|
||||
employeeMonthlySignatureStateTyp = null;
|
||||
}
|
||||
else
|
||||
{
|
||||
customerMonthlySignatureStateType = null;
|
||||
employeeMonthlySignatureStateTyp = signatureStateType;
|
||||
}
|
||||
|
||||
MakeSignatureStatusTypeServiceRecordHistoryEntry(serviceRecord, null, customerMonthlySignatureStateType, employeeMonthlySignatureStateTyp);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void DeleteConfirmationReceiptSignature(long confirmationReceiptSignatureOid)
|
||||
{
|
||||
try
|
||||
@@ -6868,6 +7005,8 @@ namespace BeWo.Service.ServiceImplementations
|
||||
//DAOFactory.GenericDAO.Delete(confirmationReceiptSignatureToDelete);
|
||||
|
||||
ServiceLogic.SetActivationType<ConfirmationReceiptSignature>(new Dictionary<long, long> { { confirmationReceiptSignatureOid, confirmationReceiptSignatureToDelete.Version.Value } }, ActivationTypeId.Deleted);
|
||||
|
||||
MakeHistoryEntriesForConfirmationReceiptSignatures(new List<ConfirmationReceiptSignature> { confirmationReceiptSignatureToDelete }, SignatureStateType.ManuallyDeleted);
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
@@ -7587,12 +7726,11 @@ namespace BeWo.Service.ServiceImplementations
|
||||
{
|
||||
try
|
||||
{
|
||||
//var originals = DAOFactory.GenericDAO.LoadByIDs<ConfirmationReceiptSignature>(oid2Version.Select(e => e.Key));
|
||||
//originals.DoForEach(or => MapperFactory.ConfirmationReceiptSignatureDC_ConfirmationReceiptSignature.ConcurrencyCheck(oid2Version[or.Oid.Value], or));
|
||||
|
||||
//DAOFactory.GenericDAO.Delete(originals);
|
||||
var originals = DAOFactory.GenericDAO.LoadByIDs<ConfirmationReceiptSignature>(oid2Version.Select(e => e.Key));
|
||||
|
||||
ServiceLogic.SetActivationType<ConfirmationReceiptSignature>(oid2Version, ActivationTypeId.Deleted);
|
||||
|
||||
MakeHistoryEntriesForConfirmationReceiptSignatures(originals, SignatureStateType.ManuallyDeleted);
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
@@ -7676,12 +7814,13 @@ namespace BeWo.Service.ServiceImplementations
|
||||
/// <param name="serviceRecordsToUpdate">ServiceRecords, die geändert oder gelöscht werden</param>
|
||||
/// <param name="oldServiceRecords">Die originalen ServiceRecords, mit denen die geänderten verglichen werden</param>
|
||||
/// <param name="isDeleting">Ist true, wenn es sich um das Löschen von ServiceRecords handelt</param>
|
||||
private static void RemoveServiceRecordsFromConfirmationReceiptSignatures(List<ServiceRecordDC> serviceRecordsToUpdate, List<ServiceRecord> oldServiceRecords, bool isDeleting)
|
||||
private static List<ServiceRecord2SignatureStates> RemoveServiceRecordsFromConfirmationReceiptSignatures(List<ServiceRecordDC> serviceRecordsToUpdate, IEnumerable<ServiceRecord> oldServiceRecords, bool isDeleting)
|
||||
{
|
||||
var result = new List<ServiceRecord2SignatureStates>();
|
||||
var serviceRecordOids = new List<long>();
|
||||
var oldVsNew = new Dictionary<ServiceRecord, ServiceRecordDC>();
|
||||
var orderedOldOnes = oldServiceRecords.Where(x => x.Oid.HasValue).OrderBy(x => x.Oid.Value).ToList();
|
||||
var orderedNewOnes = serviceRecordsToUpdate.Where(x => x.ServiceRecordOid.HasValue).OrderBy(x => x.ServiceRecordOid.Value).ToList();
|
||||
var oldVsNew = new Dictionary<ServiceRecord, ServiceRecordDC>();
|
||||
var orderedOldOnes = oldServiceRecords.Where(x => x.Oid.HasValue).OrderBy(x => x.Oid.Value).ToList();
|
||||
var orderedNewOnes = serviceRecordsToUpdate.Where(x => x.ServiceRecordOid.HasValue).OrderBy(x => x.ServiceRecordOid.Value).ToList();
|
||||
|
||||
foreach(var oldSr in orderedOldOnes)
|
||||
{
|
||||
@@ -7727,12 +7866,143 @@ namespace BeWo.Service.ServiceImplementations
|
||||
var oids2Versions = new Dictionary<long, long>();
|
||||
confirmationReceiptSignatures2Delete.DoForEach(signature =>
|
||||
{
|
||||
if(signature.Oid is null || signature.Version is null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
oids2Versions.Add(signature.Oid.Value, signature.Version.Value);
|
||||
});
|
||||
|
||||
ServiceLogic.SetActivationType<ConfirmationReceiptSignature>(oids2Versions, ActivationTypeId.Deleted);
|
||||
|
||||
var timeAlteredServiceRecords = DAOFactory.GenericDAO.LoadByIDs<ServiceRecord>(serviceRecordOids);
|
||||
var mostRecentServiceRecordHistoryEntries = DAOFactory.SearchDAO.FindMostRecentServiceRecordHistoryEntryByServiceRecords(serviceRecordOids);
|
||||
|
||||
if(confirmationReceiptSignatures2Update.Any())
|
||||
{
|
||||
foreach(var serviceRecord in timeAlteredServiceRecords)
|
||||
{
|
||||
ServiceRecordHistory previousServiceRecordHistoryEntry = null;
|
||||
|
||||
if(serviceRecord.Oid.HasValue && mostRecentServiceRecordHistoryEntries.ContainsKey(serviceRecord.Oid.Value))
|
||||
{
|
||||
previousServiceRecordHistoryEntry = mostRecentServiceRecordHistoryEntries[serviceRecord.Oid.Value];
|
||||
}
|
||||
|
||||
var newCustomerSignatureState = DetermineNewSignatureState(previousServiceRecordHistoryEntry?.CustomerConfirmationReceiptSignatureStateType);
|
||||
var newEmployeeSignatureState = DetermineNewSignatureState(previousServiceRecordHistoryEntry?.EmployeeConfirmationReceiptSignatureStateType);
|
||||
|
||||
var newSignatureStatesObject = new ServiceRecord2SignatureStates(
|
||||
serviceRecord,
|
||||
null,
|
||||
newCustomerSignatureState,
|
||||
newEmployeeSignatureState
|
||||
);
|
||||
|
||||
result.Add(newSignatureStatesObject);
|
||||
}
|
||||
}
|
||||
|
||||
foreach(var confirmationReceiptSignature in confirmationReceiptSignatures2Delete)
|
||||
{
|
||||
var first = confirmationReceiptSignature.ServiceRecords.FirstOrDefault();
|
||||
|
||||
if(first != null)
|
||||
{
|
||||
var customerOid = first.CustomerOid.Value;
|
||||
var supportConceptOid = first.SupportConcept.Oid.Value;
|
||||
var costbearer2SupportConceptOid = first.CostBearer2SupportConceptOid.Value;
|
||||
var timeSpanString = confirmationReceiptSignature.TimeSpanString;
|
||||
var signatureOid = confirmationReceiptSignature.Oid.Value;
|
||||
|
||||
var formerlySignedServiceRecords = DAOFactory.SearchDAO.FindFormerlyLinkedServiceRecords(signatureOid, customerOid, supportConceptOid, costbearer2SupportConceptOid, timeSpanString);
|
||||
|
||||
var mostRecentHistoryEntries = DAOFactory.SearchDAO.FindMostRecentServiceRecordHistoryEntryByServiceRecords(formerlySignedServiceRecords.Select(s => s.Oid.Value).ToList());
|
||||
|
||||
mostRecentServiceRecordHistoryEntries.AddAndIgnoreDuplicates(mostRecentHistoryEntries);
|
||||
|
||||
confirmationReceiptSignature.ServiceRecords.AddRangeIfElementsNotIn(formerlySignedServiceRecords);
|
||||
}
|
||||
|
||||
foreach(var serviceRecord in confirmationReceiptSignature.ServiceRecords)
|
||||
{
|
||||
var previousServiceRecord2SignatureStates = result.FirstOrDefault(f => f.ServiceRecord.Equals(serviceRecord));
|
||||
|
||||
var newSignatureStatesObject = new ServiceRecord2SignatureStates(
|
||||
serviceRecord,
|
||||
null,
|
||||
SignatureStateType.None,
|
||||
SignatureStateType.None
|
||||
);
|
||||
|
||||
if(previousServiceRecord2SignatureStates is null)
|
||||
{
|
||||
ServiceRecordHistory previousServiceRecordHistoryEntry = null;
|
||||
|
||||
if(serviceRecord.Oid.HasValue && mostRecentServiceRecordHistoryEntries.ContainsKey(serviceRecord.Oid.Value))
|
||||
{
|
||||
previousServiceRecordHistoryEntry = mostRecentServiceRecordHistoryEntries[serviceRecord.Oid.Value];
|
||||
}
|
||||
|
||||
newSignatureStatesObject.CustomerMonthlySignatureStateType = DetermineNewDeletedSignatureState(previousServiceRecordHistoryEntry?.CustomerConfirmationReceiptSignatureStateType);
|
||||
newSignatureStatesObject.EmployeeMonthlySignatreStateType = DetermineNewDeletedSignatureState(previousServiceRecordHistoryEntry?.EmployeeConfirmationReceiptSignatureStateType);
|
||||
}
|
||||
else
|
||||
{
|
||||
newSignatureStatesObject.CustomerMonthlySignatureStateType = DetermineNewDeletedSignatureState(previousServiceRecord2SignatureStates.CustomerMonthlySignatureStateType);
|
||||
newSignatureStatesObject.EmployeeMonthlySignatreStateType = DetermineNewDeletedSignatureState(previousServiceRecord2SignatureStates.EmployeeMonthlySignatreStateType);
|
||||
}
|
||||
|
||||
result.AddIfNotIn(newSignatureStatesObject);
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
private static SignatureStateType DetermineNewDeletedSignatureState(SignatureStateType? previouSignatureStateType)
|
||||
{
|
||||
switch(previouSignatureStateType)
|
||||
{
|
||||
case null:
|
||||
return SignatureStateType.None;
|
||||
case SignatureStateType.None:
|
||||
return SignatureStateType.None;
|
||||
case SignatureStateType.ManuallyDeleted:
|
||||
return SignatureStateType.ManuallyDeleted;
|
||||
default:
|
||||
return SignatureStateType.AutomaticallyDeleted;
|
||||
}
|
||||
}
|
||||
|
||||
private static SignatureStateType DetermineNewSignatureState(SignatureStateType? previousSignatureStateType)
|
||||
{
|
||||
var newSignatureStateType = SignatureStateType.None;
|
||||
|
||||
switch(previousSignatureStateType)
|
||||
{
|
||||
case SignatureStateType.Valid:
|
||||
newSignatureStateType = SignatureStateType.Invalid;
|
||||
break;
|
||||
case SignatureStateType.Invalid:
|
||||
newSignatureStateType = SignatureStateType.Invalid;
|
||||
break;
|
||||
case SignatureStateType.ManuallyDeleted:
|
||||
newSignatureStateType = (SignatureStateType) previousSignatureStateType;
|
||||
break;
|
||||
case SignatureStateType.AutomaticallyDeleted:
|
||||
newSignatureStateType = (SignatureStateType) previousSignatureStateType;
|
||||
break;
|
||||
}
|
||||
|
||||
return newSignatureStateType;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Löscht die Zeiterfassungseinträge aus der Linktable, die Zeiterfassungseinträge mit Monatsunterschriften verbindet.
|
||||
/// </summary>
|
||||
/// <param name="serviceRecords">Die Zeiterfassungseinträge, die gelöscht werden und eventuell mit Monatsunterschriften verknüpft sind.</param>
|
||||
private static void RemoveServiceRecordsFromConfirmationReceiptSignatureForDeletion(IEnumerable<ServiceRecord> serviceRecords)
|
||||
{
|
||||
var serviceRecordOids = serviceRecords.Select(serviceRecord => serviceRecord.Oid.Value).ToList();
|
||||
@@ -7806,8 +8076,14 @@ namespace BeWo.Service.ServiceImplementations
|
||||
}
|
||||
}
|
||||
|
||||
private static void DeleteSignaturesFromServiceRecords(IEnumerable<ServiceRecordDC> serviceRecords, IEnumerable<ServiceRecord> originals)
|
||||
/// <summary>
|
||||
/// Löscht die Einzelunterschriften von ServiceRecords und aktualisiert die ServiceRecords
|
||||
/// </summary>
|
||||
/// <param name="serviceRecords"></param>
|
||||
/// <param name="originals"></param>
|
||||
private static List<ServiceRecord> DeleteSignaturesFromServiceRecords(IEnumerable<ServiceRecordDC> serviceRecords, List<ServiceRecord> originals)
|
||||
{
|
||||
var result = new List<ServiceRecord>();
|
||||
var oldVsNew = new Dictionary<ServiceRecord, ServiceRecordDC>();
|
||||
var orderedOldOnes = originals.Where(x => x.Oid.HasValue).OrderBy(x => x.Oid.Value).ToList();
|
||||
var orderedNewOnes = serviceRecords.Where(x => x.ServiceRecordOid.HasValue).OrderBy(x => x.ServiceRecordOid.Value).ToList();
|
||||
@@ -7843,7 +8119,15 @@ namespace BeWo.Service.ServiceImplementations
|
||||
});
|
||||
|
||||
ServiceLogic.SetActivationType<Signature>(oids2Versions, ActivationTypeId.Deleted);
|
||||
|
||||
foreach(var serviceRecord in originals)
|
||||
{
|
||||
//MakeSignatureStatusTypeServiceRecordHistoryEntry(serviceRecord, SignatureStateType.Invalid, null, null);
|
||||
result.AddIfNotIn(serviceRecord);
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public List<DienstZeileDC> InitDienstzeilen(DienstBlockDC block, List<DienstInfoDC> dienste, DateTime date, int? standardanzahlZeilen)
|
||||
@@ -7991,29 +8275,10 @@ namespace BeWo.Service.ServiceImplementations
|
||||
|
||||
DAOFactory.GenericDAO.Delete(signature);
|
||||
|
||||
//var customerSignature = DAOFactory.SearchDAO.GetConfirmationReceiptSignatureForServiceRecords(new List<long> { serviceRecordOid }, SignatureType.Customer);
|
||||
//var employeeSignature = DAOFactory.SearchDAO.GetConfirmationReceiptSignatureForServiceRecords(new List<long> { serviceRecordOid }, SignatureType.Employee);
|
||||
|
||||
serviceRecord.SignatureOid = null;
|
||||
DAOFactory.GenericDAO.Update(serviceRecord);
|
||||
|
||||
// Das Löschen einer Unterschrift für einen einzelnen Eintrag in der Zeiterfassung macht eine vorhandene Monatsunterschrift nicht ungültig
|
||||
//if(customerSignature?.ServiceRecords.Any(sr => sr.Oid.HasValue && sr.Oid.Value.Equals(serviceRecordOid)) ?? false)
|
||||
//{
|
||||
// customerSignature.ServiceRecords = customerSignature.ServiceRecords.Where(sr => sr.Oid.HasValue && !sr.Oid.Value.Equals(serviceRecordOid)).ToList();
|
||||
|
||||
// DAOFactory.GenericDAO.Update(customerSignature);
|
||||
//}
|
||||
|
||||
//if(!(employeeSignature?.ServiceRecords.Any(sr => sr.Oid.HasValue && sr.Oid.Value.Equals(serviceRecordOid)) ?? false))
|
||||
//{
|
||||
// return;
|
||||
//}
|
||||
|
||||
//employeeSignature.ServiceRecords = employeeSignature.ServiceRecords.Where(sr => sr.Oid.HasValue && !sr.Oid.Value.Equals(serviceRecordOid)).ToList();
|
||||
|
||||
//DAOFactory.GenericDAO.Update(employeeSignature);
|
||||
|
||||
MakeSignatureStatusTypeServiceRecordHistoryEntry(serviceRecord, SignatureStateType.ManuallyDeleted, null, null);
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
@@ -8038,5 +8303,169 @@ namespace BeWo.Service.ServiceImplementations
|
||||
throw Utils.CreateBeWoFaultException(e);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* private static void MakeServiceRecordHistoryEntry(IEnumerable<ServiceRecord> lOriginals, IEnumerable<long> serviceRecordOidList, StatementType statementType)
|
||||
{
|
||||
var hServiceRecords = new List<ServiceRecordHistory>();
|
||||
|
||||
if (statementType.Equals(StatementType.Insert) && serviceRecordOidList != null)
|
||||
{
|
||||
int iterator = 0;
|
||||
foreach (ServiceRecordHistory history in lOriginals.Select(ServiceRecordOriginal => new ServiceRecordHistory
|
||||
{
|
||||
TimeStamp = DateTime.Now,
|
||||
ChangeType = statementType,
|
||||
CostBearer2SupportConcept = ServiceRecordOriginal.CostBearer2SupportConcept,
|
||||
CostBearer2SupportConceptOid = ServiceRecordOriginal.CostBearer2SupportConceptOid,
|
||||
Customer = ServiceRecordOriginal.Customer,
|
||||
CustomerOid = ServiceRecordOriginal.CustomerOid,
|
||||
Employee = ServiceRecordOriginal.Employee,
|
||||
EmployeeOid = ServiceRecordOriginal.EmployeeOid,
|
||||
End = ServiceRecordOriginal.End,
|
||||
Group = ServiceRecordOriginal.Group,
|
||||
GroupEmployeeCount = ServiceRecordOriginal.GroupEmployeeCount,
|
||||
GroupOid = ServiceRecordOriginal.GroupOid,
|
||||
GroupPersonCount = ServiceRecordOriginal.GroupPersonCount,
|
||||
GroupRoundedDuration = ServiceRecordOriginal.GroupRoundedDuration,
|
||||
IP = ServiceRecordOriginal.IP,
|
||||
IsActive = ServiceRecordOriginal.IsActive,
|
||||
Notice = ServiceRecordOriginal.Notice,
|
||||
ServiceRecordOid = serviceRecordOidList.ElementAt(iterator),
|
||||
RoundedDuration = ServiceRecordOriginal.RoundedDuration,
|
||||
ServiceDescription = ServiceRecordOriginal.ServiceDescription,
|
||||
ServiceRecordType = ServiceRecordOriginal.ServiceRecordType,
|
||||
ServiceRecordInsTs = ServiceRecordOriginal.InsTs,
|
||||
ServiceRecordVersion = ServiceRecordOriginal.Version.Value,
|
||||
ServiceRecordInsUser = ServiceRecordOriginal.InsUser,
|
||||
ServiceRecordUdpUser = ServiceRecordOriginal.UdpUser,
|
||||
Start = ServiceRecordOriginal.Start,
|
||||
SupportConcept = ServiceRecordOriginal.SupportConcept,
|
||||
SystemEntryID = ServiceRecordOriginal.SystemEntryID,
|
||||
DistanceInMeter = ServiceRecordOriginal.DistanceInMeter,
|
||||
IsCreatedInMobileClient = ServiceRecordOriginal.IsCreatedInMobileClient
|
||||
}))
|
||||
{
|
||||
iterator++;
|
||||
hServiceRecords.Add(history);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
hServiceRecords.AddRange(lOriginals.Select(ServiceRecordOriginal => new ServiceRecordHistory
|
||||
{
|
||||
TimeStamp = DateTime.Now,
|
||||
ChangeType = statementType,
|
||||
CostBearer2SupportConcept = ServiceRecordOriginal.CostBearer2SupportConcept,
|
||||
CostBearer2SupportConceptOid = ServiceRecordOriginal.CostBearer2SupportConceptOid,
|
||||
Customer = ServiceRecordOriginal.Customer,
|
||||
CustomerOid = ServiceRecordOriginal.CustomerOid,
|
||||
Employee = ServiceRecordOriginal.Employee,
|
||||
EmployeeOid = ServiceRecordOriginal.EmployeeOid,
|
||||
End = ServiceRecordOriginal.End,
|
||||
Group = ServiceRecordOriginal.Group,
|
||||
GroupEmployeeCount = ServiceRecordOriginal.GroupEmployeeCount,
|
||||
GroupOid = ServiceRecordOriginal.GroupOid,
|
||||
GroupPersonCount = ServiceRecordOriginal.GroupPersonCount,
|
||||
GroupRoundedDuration = ServiceRecordOriginal.GroupRoundedDuration,
|
||||
IP = ServiceRecordOriginal.IP,
|
||||
IsActive = ServiceRecordOriginal.IsActive,
|
||||
Notice = ServiceRecordOriginal.Notice,
|
||||
ServiceRecordOid = ServiceRecordOriginal.Oid,
|
||||
RoundedDuration = ServiceRecordOriginal.RoundedDuration,
|
||||
ServiceDescription = ServiceRecordOriginal.ServiceDescription,
|
||||
ServiceRecordType = ServiceRecordOriginal.ServiceRecordType,
|
||||
ServiceRecordInsTs = ServiceRecordOriginal.InsTs,
|
||||
ServiceRecordVersion = ServiceRecordOriginal.Version.Value,
|
||||
ServiceRecordInsUser = ServiceRecordOriginal.InsUser,
|
||||
ServiceRecordUdpUser = ServiceRecordOriginal.UdpUser,
|
||||
Start = ServiceRecordOriginal.Start,
|
||||
SupportConcept = ServiceRecordOriginal.SupportConcept,
|
||||
SystemEntryID = ServiceRecordOriginal.SystemEntryID,
|
||||
DistanceInMeter = ServiceRecordOriginal.DistanceInMeter,
|
||||
IsCreatedInMobileClient = ServiceRecordOriginal.IsCreatedInMobileClient
|
||||
}));
|
||||
}
|
||||
|
||||
DAOFactory.GenericDAO.Insert(hServiceRecords);
|
||||
}
|
||||
*/
|
||||
private static void MakeSignatureStatusTypeServiceRecordHistoryEntry(ServiceRecord serviceRecord, SignatureStateType? singleSignatureStateType, SignatureStateType? customerMonthlySignatureStateType, SignatureStateType? employeeMonthlySignatureStateType)
|
||||
{
|
||||
// Alten ServiceRecordHistory laden
|
||||
var mostRecentHistoryEntry = DAOFactory.SearchDAO.FindMostRecentServiceRecordHistoryEntryByServiceRecordOid(serviceRecord.Oid.Value);
|
||||
|
||||
var seviceRecordHistoryEntry = new ServiceRecordHistory
|
||||
{
|
||||
TimeStamp = DateTime.Now,
|
||||
ChangeType = StatementType.Signature,
|
||||
CostBearer2SupportConcept = serviceRecord.CostBearer2SupportConcept,
|
||||
CostBearer2SupportConceptOid = serviceRecord.CostBearer2SupportConceptOid,
|
||||
Customer = serviceRecord.Customer,
|
||||
CustomerOid = serviceRecord.CustomerOid,
|
||||
Employee = serviceRecord.Employee,
|
||||
EmployeeOid = serviceRecord.EmployeeOid,
|
||||
End = serviceRecord.End,
|
||||
Group = serviceRecord.Group,
|
||||
GroupEmployeeCount = serviceRecord.GroupEmployeeCount,
|
||||
GroupOid = serviceRecord.GroupOid,
|
||||
GroupPersonCount = serviceRecord.GroupPersonCount,
|
||||
GroupRoundedDuration = serviceRecord.GroupRoundedDuration,
|
||||
IP = serviceRecord.IP,
|
||||
IsActive = serviceRecord.IsActive,
|
||||
Notice = serviceRecord.Notice,
|
||||
ServiceRecordOid = serviceRecord.Oid,
|
||||
RoundedDuration = serviceRecord.RoundedDuration,
|
||||
ServiceDescription = serviceRecord.ServiceDescription,
|
||||
ServiceRecordType = serviceRecord.ServiceRecordType,
|
||||
ServiceRecordInsTs = serviceRecord.InsTs,
|
||||
ServiceRecordVersion = serviceRecord.Version.Value,
|
||||
ServiceRecordInsUser = serviceRecord.InsUser,
|
||||
ServiceRecordUdpUser = serviceRecord.UdpUser,
|
||||
Start = serviceRecord.Start,
|
||||
SupportConcept = serviceRecord.SupportConcept,
|
||||
SystemEntryID = serviceRecord.SystemEntryID,
|
||||
DistanceInMeter = serviceRecord.DistanceInMeter,
|
||||
IsCreatedInMobileClient = serviceRecord.IsCreatedInMobileClient,
|
||||
CustomerConfirmationReceiptSignatureStateType = customerMonthlySignatureStateType ?? mostRecentHistoryEntry?.CustomerConfirmationReceiptSignatureStateType ?? SignatureStateType.None,
|
||||
EmployeeConfirmationReceiptSignatureStateType = employeeMonthlySignatureStateType ?? mostRecentHistoryEntry?.EmployeeConfirmationReceiptSignatureStateType ?? SignatureStateType.None,
|
||||
ServiceRecordSignatureStateType = singleSignatureStateType ?? mostRecentHistoryEntry?.ServiceRecordSignatureStateType ?? SignatureStateType.None
|
||||
};
|
||||
|
||||
DAOFactory.GenericDAO.Insert(seviceRecordHistoryEntry);
|
||||
}
|
||||
}
|
||||
|
||||
public class ServiceRecord2SignatureStates
|
||||
{
|
||||
public ServiceRecord ServiceRecord { get; }
|
||||
public SignatureStateType? SingleSignatureStateType { get; set; }
|
||||
public SignatureStateType? CustomerMonthlySignatureStateType { get; set; }
|
||||
public SignatureStateType? EmployeeMonthlySignatreStateType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Erzeugt das Objekt mit den SignatureStates. Wird als Wert eines States null übergeben, wird beim Erzeugen des ServiceRecordHistory-Eintrags der Wert des vorherigen ServiceRecordHistory-Eintrags genommen, falls vorhanden.
|
||||
/// </summary>
|
||||
/// <param name="serviceRecord"></param>
|
||||
/// <param name="singleSignatureStateType"></param>
|
||||
/// <param name="customerMonthlySignatureStateType"></param>
|
||||
/// <param name="employeeMonthlySignatreStateType"></param>
|
||||
public ServiceRecord2SignatureStates(ServiceRecord serviceRecord, SignatureStateType? singleSignatureStateType, SignatureStateType? customerMonthlySignatureStateType, SignatureStateType? employeeMonthlySignatreStateType)
|
||||
{
|
||||
ServiceRecord = serviceRecord;
|
||||
SingleSignatureStateType = singleSignatureStateType;
|
||||
CustomerMonthlySignatureStateType = customerMonthlySignatureStateType;
|
||||
EmployeeMonthlySignatreStateType = employeeMonthlySignatreStateType;
|
||||
}
|
||||
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
if(obj is ServiceRecord2SignatureStates sr2Ss && !(sr2Ss.ServiceRecord is null))
|
||||
{
|
||||
return ServiceRecord?.Equals(sr2Ss.ServiceRecord) ?? false;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -810,7 +810,8 @@ namespace BS.Shared
|
||||
Update = 1,
|
||||
Delete = 2,
|
||||
Archived = 3,
|
||||
Reactivate = 4
|
||||
Reactivate = 4,
|
||||
Signature = 5
|
||||
}
|
||||
|
||||
public enum AppointmentDayOfWeek
|
||||
@@ -1183,4 +1184,16 @@ namespace BS.Shared
|
||||
GroupBookingMode = 1,
|
||||
MultiBookingMode = 2
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Der Unterschriftenstatus in der ServiceRecordHistory für den Status der Einzelunterschriften, der Monatsunterschriften des Klienten und der des Mitarbeiters
|
||||
/// </summary>
|
||||
public enum SignatureStateType
|
||||
{
|
||||
None = 0,
|
||||
Valid = 1,
|
||||
Invalid = 2,
|
||||
ManuallyDeleted = 3,
|
||||
AutomaticallyDeleted = 4
|
||||
}
|
||||
}
|
||||
@@ -604,7 +604,7 @@ namespace BS.Shared.Core
|
||||
|
||||
if(textModule.Parent.Parent != null)
|
||||
{
|
||||
GetParentTextModule(textModule.Parent.Parent);
|
||||
GetParentTextModule(textModule.Parent);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,9 +42,34 @@ namespace BS.Shared.DataContracts
|
||||
return "Geändert";
|
||||
case StatementType.Delete:
|
||||
return "Gelöscht";
|
||||
|
||||
case StatementType.Signature:
|
||||
return "Unterschrift";
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public string SingleSignatureStateString => TranslateSignatureState(ServiceRecordSignatureStateType);
|
||||
public string CustomerMonthlySignatureStateString => TranslateSignatureState(CustomerConfirmationReceiptSignatureStateType);
|
||||
public string EmployeeMonthlySignatureStateString => TranslateSignatureState(EmployeeConfirmationReceiptSignatureStateType);
|
||||
|
||||
private static string TranslateSignatureState(SignatureStateType signatureStateType)
|
||||
{
|
||||
switch(signatureStateType)
|
||||
{
|
||||
case SignatureStateType.None:
|
||||
return "Keine";
|
||||
case SignatureStateType.Valid:
|
||||
return "Gültig";
|
||||
case SignatureStateType.Invalid:
|
||||
return "Ungültig";
|
||||
case SignatureStateType.ManuallyDeleted:
|
||||
return "Manuell gelöscht";
|
||||
case SignatureStateType.AutomaticallyDeleted:
|
||||
return "Automatisch gelöscht";
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -115,5 +115,14 @@ namespace BS.Shared.DataContracts
|
||||
|
||||
[DataMember]
|
||||
public ZeiterfassungsDauer? DurationInStunden { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public SignatureStateType CustomerConfirmationReceiptSignatureStateType { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public SignatureStateType EmployeeConfirmationReceiptSignatureStateType { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public SignatureStateType ServiceRecordSignatureStateType { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user