Merge branch 'master' of ssh://float.ownsoft.de/git/beyondSoft/BeWo

This commit is contained in:
2025-05-08 13:24:04 +02:00
82 changed files with 11446 additions and 5062 deletions

1
.gitignore vendored
View File

@@ -5,6 +5,7 @@ DebugConfig.txt
Host/Multitenancy/demo.config
*.log.txt
*temp.txt
*.Secrets.config
# Folder
bin[Rr]elease/

View File

@@ -94,8 +94,15 @@
</StartupObject>
</PropertyGroup>
<ItemGroup>
<Compile Include="Converter\Features\AiConversationMessageSystemConverter.cs" />
<Compile Include="Converter\NewlineConverter.cs" />
<Compile Include="ServiceProxy\GeneratedAiEnhancedService.cs" />
<Compile Include="Services\BeWoControlFactory.cs" />
<Compile Include="Services\BeWoWindowFactory.cs" />
<Compile Include="Services\BeWoWindowService.cs" />
<Compile Include="Services\IControlFactory.cs" />
<Compile Include="Services\IWindowFactory.cs" />
<Compile Include="Services\IWindowService.cs" />
<Compile Include="ViewModel\AiConfigVM.cs" />
<Compile Include="View\Detail\AI\AiConfigView.xaml.cs">
<DependentUpon>AiConfigView.xaml</DependentUpon>
@@ -107,7 +114,6 @@
<DependentUpon>RtfEditView.xaml</DependentUpon>
</Compile>
<Compile Include="View\TemplateSelectors\AiConversationMessageTemplateSelector.cs" />
<Compile Include="View\Windows\AiWindowBuilder.cs" />
<Compile Include="View\Windows\AnimatedBeWoWindow.xaml.cs">
<DependentUpon>AnimatedBeWoWindow.xaml</DependentUpon>
</Compile>
@@ -3512,7 +3518,6 @@
<Resource Include="Ressources\Icons\chatbot2.png" />
</ItemGroup>
<ItemGroup>
<Folder Include="Converter\Features\" />
<Folder Include="Scripts\" />
<Folder Include="View\Controls\Popup\" />
</ItemGroup>

View File

@@ -45,11 +45,15 @@ namespace BeWo
public partial class BeWoApp : INotifyPropertyChanged
{
private static DebugMessageLogView _DebugMessageLogView;
private static FrameworkElement _lockedContent;
private static AppSettings _AppSettings;
private static CompactEmployeeDC _CompactLoggedOnEmployee;
private static EmployeeDC _LoggedOnEmployee;
private static UserDC _LoggedOnUser;
private static MandatorDC _Mandator;
private static bool _IsInDeveloperMode;
public static LoginControl LoginControl;
public static MainControl MainControl;
public static string ShortVersion = "3.25";
@@ -57,43 +61,39 @@ namespace BeWo
public static string Version = "Version 3.25";
public static int RenderTier = 0;
public static bool IsInDesignMode = DesignerProperties.GetIsInDesignMode(new DependencyObject());
internal static string IpAddress = string.Empty;
internal static string Tenant = string.Empty;
internal static string ServerName = string.Empty;
internal static string UserName = string.Empty;
internal static string UserPassword = string.Empty;
internal static string TwoFactorPin = string.Empty;
internal static string chatServerURL = string.Empty;
private static AppSettings _AppSettings;
private static CompactEmployeeDC _CompactLoggedOnEmployee;
private static EmployeeDC _LoggedOnEmployee;
private static UserDC _LoggedOnUser;
private static MandatorDC _Mandator;
private static string _ServerAddress;
private static int _LockUITime = 30;
private static List<Window> OpenDevExpressEditForms = new List<Window>();
private static List<Window> OpenDevExpressEditForms = new List<Window>();
private static DocumentWatcher _DocumentWatcher;
internal static PasswortSecurityStrength PasswortStrength;
public static BeWoApp CurrentBeWo => Current as BeWoApp;
public static Dictionary<string, string> ICD10Diagnosis { get; set; }
public static bool IsInDeveloperMode {
get => _IsInDeveloperMode;
set
{
if(IsInDeveloperMode == value)
return;
_IsInDeveloperMode = value;
CurrentBeWo.FirePropertyChanged(nameof(IsInDeveloperMode));
}
}
public static EmployeeDC LoggedOnEmployee
{
get => _LoggedOnEmployee;
@@ -561,6 +561,7 @@ namespace BeWo
// REFACTOR: getUserSetting verwenden?
AppSettings.ModuleAiEnabled = getUserSetting(SettingsKeys.ModuleAiEnabled);
AppSettings.ModuleAiSettingsEnabled = getUserSetting(SettingsKeys.ModuleAiSettingsEnabled);
switch (_Mandator.BeWoClientType)
{
@@ -622,15 +623,18 @@ namespace BeWo
showDienstplanung = true;
showHilfeplanBezeichnung = true;
AppSettings.AllowStorno = true;
AppSettings.ShowAI = true;
AppSettings.ShowAIInternal = true;
//AppSettings.ShowAI = true;
//AppSettings.ShowAIInternal = true;
AppSettings.ShowWorktime = true;
AppSettings.ShowPersehImport = true;
AppSettings.ShowWohnhilfe = true;
//AppSettings.AllowGkvAbrechnung = true;
//AppSettings.AllowGkvAbrechnung = false;
//showInfoButtonInCalender = true;
IsInDeveloperMode = true;
//IsInDeveloperMode = false;
AppSettings.ModuleAiEnabled = true;
AppSettings.ModuleAiSettingsEnabled = false;
#endif
AppSettings.ShowDatevFields = showDatevFields;
@@ -671,6 +675,11 @@ namespace BeWo
BS.Shared.Settings.ApplicationSettings.SupportConceptExpirationLimitInMonths = AppSettings.HilfeplanAuslaufAuswahl;
if (IsInDeveloperMode)
{
applyDeveloperMode();
}
if(MainControl is object)
{
MainControl.UpdateMandator();
@@ -678,6 +687,11 @@ namespace BeWo
}
}
private static void applyDeveloperMode()
{
AppSettings.ModuleAiSettingsEnabled = true;
}
private static bool getUserSetting(string key)
{
var val = UserSettingsUtils.GetSettingValue(_Mandator.Settings, key);
@@ -932,7 +946,11 @@ namespace BeWo
internal static void ShowError(string message, Exception ex, bool showSupportForm, bool showStacktrace)
{
if (MainControl != null)
if (MainControl?.CurrentAnimatedBeWoWindow is object)
{
MessageBox.Show(message + "\n\n" + ex);
}
else if (MainControl != null)
{
MainControl.Dispatcher.BeginInvoke(DispatcherPriority.Normal, (Action) (() =>
{

View File

@@ -0,0 +1,32 @@
using BeWo.View.Navigation.Filter;
using BS.Shared.DataContracts;
using BS.Shared;
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Data;
using BeWo.ViewModel;
namespace BeWo.Converter.Features
{
public class AiConversationMessageSystemConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
if (BeWoApp.IsInDeveloperMode)
return value;
var ret = (value as IEnumerable<AiConversationMessageVM>).Where(vm => vm.Role != AiConversationMessageRole.System);
return ret;
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
throw new NotImplementedException();
}
}
}

View File

@@ -293,5 +293,15 @@ namespace BeWo.Core
return null;
}
public static void ScrollToBottom(ListBox listBox)
{
if (VisualTreeHelper.GetChildrenCount(listBox) > 0)
{
Border border = (Border)VisualTreeHelper.GetChild(listBox, 0);
ScrollViewer scrollViewer = (ScrollViewer)VisualTreeHelper.GetChild(border, 0);
scrollViewer.ScrollToBottom();
}
}
}
}

View File

@@ -487,6 +487,7 @@ namespace BeWo.Core.Config
public bool AllowGkvAbrechnung { get; set; }
public bool ModuleAiEnabled { get; set; }
public bool ModuleAiSettingsEnabled { get; set; }
public bool ShowWohnhilfe { get; set; }
public bool ShowImportAbschlagszahlungen { get; set; }

View File

@@ -147,9 +147,9 @@ namespace BeWo
AutoLogin = true,
//SelectView = UIContext.AiConversation,
//SelectIndex = 8,
//DefaultLoginUsername = "m1",
//DefaultLoginPassword = "bewobewo",
//DefaultProfilename = "5000000000",
DefaultLoginUsername = "m1",
DefaultLoginPassword = "bewobewo",
DefaultProfilename = "5000000000",
EnableAutoRemoteDebugging = true
});

View File

@@ -2,7 +2,9 @@
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.IO.Ports;
using System.Linq;
using System.Runtime.Remoting.Contexts;
using System.Security.Cryptography;
using System.Text;
using System.Windows;
@@ -19,6 +21,7 @@ using BeWo.Core.Service;
using BeWo.Scheduler.View;
using BeWo.SchulbegleitenderDienst;
using BeWo.ServiceProxy;
using BeWo.Services;
using BeWo.View;
using BeWo.View.Detail;
using BeWo.View.Detail.Zeiterfassung;
@@ -33,6 +36,7 @@ using BS.Shared.Core;
using BS.Shared.DataContracts;
using BS.Shared.Extensions;
using BS.Shared.Translation;
using DevExpress.XtraEditors;
using Hyperlink = System.Windows.Documents.Hyperlink;
namespace BeWo
@@ -180,9 +184,35 @@ namespace BeWo
#endif
UpdateMandator();
ControlFactory = new BeWoControlFactory();
WindowFactory = new BeWoWindowFactory();
WindowService = new BeWoWindowService(WindowFactory, ControlFactory);
}
public AnimatedBeWoWindow CurrentAnimatedBeWoWindow { get; set; }
private AnimatedBeWoWindow _CurrentAnimatedBeWoWindow;
public AnimatedBeWoWindow CurrentAnimatedBeWoWindow
{
get => _CurrentAnimatedBeWoWindow;
set
{
if (value == _CurrentAnimatedBeWoWindow)
return;
_CurrentAnimatedBeWoWindow = value;
if (value is null)
HideModalBackgroundFade(.5);
else
{
ShowModalBackgroundFade(.5);
}
}
}
internal IControlFactory ControlFactory { get; set; }
internal IWindowFactory WindowFactory { get; set; }
internal IWindowService WindowService { get; set; }
public List<ModalViewWindow> OpenedModalViewWindows { get; set; }
@@ -379,8 +409,7 @@ namespace BeWo
if (_ModalPopupControls.Count == 0)
{
grid_main.Children.Remove(ModalPopupBackGround);
ModalPopupBackGround = null;
HideModalBackground();
}
else
{
@@ -471,16 +500,6 @@ namespace BeWo
}
}
public void ShowViewAsModalPopup(string title, Control control, HorizontalAlignment horizontalAlignment = HorizontalAlignment.Center, VerticalAlignment verticalAlignment = VerticalAlignment.Center)
{
var groupbox = new GroupBox();
groupbox.Header = title;
groupbox.Content = control;
ShowControlAsModalPopup(groupbox, horizontalAlignment, verticalAlignment);
}
public void ShowControlAsModalPopup(Control control)
{
ShowControlAsModalPopup(control, HorizontalAlignment.Center, VerticalAlignment.Center);
@@ -931,13 +950,26 @@ namespace BeWo
}
}
internal void ShowModalBackground()
internal void ShowModalBackgroundFade(double duration = 0.3, double opacity = 0.5)
{
if (ModalPopupBackGround is Grid && grid_main.Children.Contains(ModalPopupBackGround))
return;
ShowModalBackground(0);
DoubleAnimation lAnim = new DoubleAnimation(opacity, new Duration(TimeSpan.FromSeconds(duration)));
ModalPopupBackGround.BeginAnimation(OpacityProperty, lAnim);
}
internal void ShowModalBackground(double start_opacity = .5)
{
if (ModalPopupBackGround is Grid && grid_main.Children.Contains(ModalPopupBackGround))
return;
ModalPopupBackGround = new Grid
{
IsHitTestVisible = true,
Background = Brushes.White,
Opacity = .5
Opacity = start_opacity
};
Grid.SetColumnSpan(ModalPopupBackGround, 3);
@@ -948,6 +980,28 @@ namespace BeWo
Panel.SetZIndex(ModalPopupBackGround, 500);
}
internal void HideModalBackgroundFade(double duration = 0.3)
{
if (ModalPopupBackGround is null || !grid_main.Children.Contains(ModalPopupBackGround))
return;
DoubleAnimation lAnim = new DoubleAnimation(0, new Duration(TimeSpan.FromSeconds(duration)));
lAnim.Completed += (s, e) =>
{
HideModalBackground();
};
ModalPopupBackGround.BeginAnimation(OpacityProperty, lAnim);
}
internal void HideModalBackground()
{
if (ModalPopupBackGround is null || !grid_main.Children.Contains(ModalPopupBackGround))
return;
grid_main.Children.Remove(ModalPopupBackGround);
ModalPopupBackGround = null;
}
private void logoutanimation_Completed(object sender, EventArgs e)
{
//var navigationService = NavigationService.GetNavigationService(this);

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,24 +1,30 @@
<dx:DXWindow x:Class="BeWo.Scheduling.View.OpenAppointmentsView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
xmlns:drawing="http://schemas.devexpress.com/winfx/2008/xaml/scheduler/internal"
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
xmlns:converter="clr-namespace:BeWo.Scheduling.Converter"
mc:Ignorable="d" Height="400" Width="650"
ShowIcon="False" MinHeight="300" MinWidth="500"
dx:ThemeManager.ThemeName="Office2010Black"
WindowStartupLocation="CenterScreen" Closing="OpenAppointmentsView_OnClosing">
<dx:DXWindow
x:Class="BeWo.Scheduling.View.OpenAppointmentsView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:converter="clr-namespace:BeWo.Scheduling.Converter"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:drawing="http://schemas.devexpress.com/winfx/2008/xaml/scheduler/internal"
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
Width="650"
Height="400"
MinWidth="500"
MinHeight="300"
dx:ThemeManager.ThemeName="Office2010Black"
Closing="OpenAppointmentsView_OnClosing"
ShowIcon="False"
WindowStartupLocation="CenterScreen"
mc:Ignorable="d">
<dx:DXWindow.Resources>
<drawing:TimeSpanToDateTimeConverter x:Key="TimeSpanToDateTimeConverter"/>
<drawing:TimeSpanToDateTimeConverter x:Key="TimeSpanToDateTimeConverter" />
<converter:RecurringAppointmentDurationConverter x:Key="RecurringAppointmentDurationConverter" />
<converter:RequestVisibilityConverter x:Key="RequestVisibilityConverter" />
<converter:ParticipationRequestListViewConverter x:Key="ParticipationRequestListViewConverter" />
<LinearGradientBrush x:Key="NavigationContentBrush" EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FF04B4D0" Offset="0" />
<GradientStop Color="#FF038195" Offset="1" />
<LinearGradientBrush x:Key="NavigationContentBrush" StartPoint="0.5,0" EndPoint="0.5,1">
<GradientStop Offset="0" Color="#FF04B4D0" />
<GradientStop Offset="1" Color="#FF038195" />
</LinearGradientBrush>
</dx:DXWindow.Resources>
<Grid>
@@ -34,10 +40,17 @@
<Grid.RowDefinitions>
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<ListView x:Name="OpenAppointmentsList" Grid.Column="0" MinWidth="120" SelectionMode="Single" Margin="3"
ItemsSource="{Binding OpenAppointments, UpdateSourceTrigger=PropertyChanged}" MaxWidth="300"
SelectedItem="{Binding SelectedAppointment, UpdateSourceTrigger=PropertyChanged}"
Background="{StaticResource NavigationContentBrush}" SelectedIndex="0">
<ListView
x:Name="OpenAppointmentsList"
Grid.Column="0"
MinWidth="120"
MaxWidth="300"
Margin="3"
Background="{StaticResource NavigationContentBrush}"
ItemsSource="{Binding OpenAppointments, UpdateSourceTrigger=PropertyChanged}"
SelectedIndex="0"
SelectedItem="{Binding SelectedAppointment, UpdateSourceTrigger=PropertyChanged}"
SelectionMode="Single">
<ListView.ItemContainerStyle>
<Style TargetType="{x:Type ListViewItem}">
<Setter Property="HorizontalContentAlignment" Value="{Binding Path=HorizontalContentAlignment, RelativeSource={RelativeSource AncestorLevel=1, AncestorType={x:Type ItemsControl}, Mode=FindAncestor}}" />
@@ -47,38 +60,58 @@
<Setter.Value>
<ControlTemplate>
<Grid>
<Border CornerRadius="5" MinHeight="20" Background="Transparent" />
<Border x:Name="ItemBorder" CornerRadius="5" MinHeight="20" Background="#FF000000">
<Border
MinHeight="20"
Background="Transparent"
CornerRadius="5" />
<Border
x:Name="ItemBorder"
MinHeight="20"
Background="#FF000000"
CornerRadius="5">
<Border.OpacityMask>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#19000000" Offset="0" />
<GradientStop Color="#26000000" Offset="1" />
<LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
<GradientStop Offset="0" Color="#19000000" />
<GradientStop Offset="1" Color="#26000000" />
</LinearGradientBrush>
</Border.OpacityMask>
</Border>
<Border x:Name="ItemContent" CornerRadius="5" MinHeight="20">
<Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="5,3,5,3" OpacityMask="{x:Null}" SnapsToDevicePixels="True">
<TextBlock VerticalAlignment="Center" Text="{Binding Converter={StaticResource ParticipationRequestListViewConverter}, ConverterParameter=LabelId}" FontSize="12" Foreground="#FFD2D2D2" FontFamily="Microsoft Sans Serif" />
<Border
x:Name="ItemContent"
MinHeight="20"
CornerRadius="5">
<Grid
Margin="5,3,5,3"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
OpacityMask="{x:Null}"
SnapsToDevicePixels="True">
<TextBlock
VerticalAlignment="Center"
FontFamily="Microsoft Sans Serif"
FontSize="12"
Foreground="#FFD2D2D2"
Text="{Binding Converter={StaticResource ParticipationRequestListViewConverter}, ConverterParameter=LabelId}" />
</Grid>
</Border>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="OpacityMask" TargetName="ItemBorder">
<Setter TargetName="ItemBorder" Property="OpacityMask">
<Setter.Value>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#33000000" Offset="0" />
<GradientStop Color="#66000000" Offset="1" />
<LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
<GradientStop Offset="0" Color="#33000000" />
<GradientStop Offset="1" Color="#66000000" />
</LinearGradientBrush>
</Setter.Value>
</Setter>
</Trigger>
<Trigger Property="ListBoxItem.IsSelected" Value="True">
<Setter Property="OpacityMask" TargetName="ItemBorder">
<Setter TargetName="ItemBorder" Property="OpacityMask">
<Setter.Value>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#99000000" Offset="0" />
<GradientStop Color="#CC000000" Offset="1" />
<LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
<GradientStop Offset="0" Color="#99000000" />
<GradientStop Offset="1" Color="#CC000000" />
</LinearGradientBrush>
</Setter.Value>
</Setter>
@@ -88,11 +121,11 @@
<Condition Property="ListBoxItem.IsSelected" Value="True" />
<Condition Property="Selector.IsSelectionActive" Value="False" />
</MultiTrigger.Conditions>
<Setter Property="OpacityMask" TargetName="ItemBorder">
<Setter TargetName="ItemBorder" Property="OpacityMask">
<Setter.Value>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#99000000" Offset="0" />
<GradientStop Color="#B2000000" Offset="1" />
<LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
<GradientStop Offset="0" Color="#99000000" />
<GradientStop Offset="1" Color="#B2000000" />
</LinearGradientBrush>
</Setter.Value>
</Setter>
@@ -104,7 +137,7 @@
</Style>
</ListView.ItemContainerStyle>
</ListView>
<Grid Grid.Column="1" Grid.Row="0">
<Grid Grid.Row="0" Grid.Column="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
@@ -122,51 +155,221 @@
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<TextBlock Grid.ColumnSpan="4" HorizontalAlignment="Center" Visibility="{Binding Path=SelectedAppointment, Converter={StaticResource RequestVisibilityConverter}, ConverterParameter=TerminVerstrichen}" Foreground="#9a0000">Dieser Termin liegt in der Vergangenheit</TextBlock>
<Label Grid.Column="0" Grid.Row="1" Content="Betreff" Margin="3" />
<TextBox Grid.Column="1" Grid.ColumnSpan="3" Grid.Row="1" Height="23" Margin="3" Text="{Binding Path=SelectedAppointment.Subject, Mode=OneWay}" IsReadOnly="True" />
<TextBlock
Grid.ColumnSpan="4"
HorizontalAlignment="Center"
Foreground="#9a0000"
Visibility="{Binding Path=SelectedAppointment, Converter={StaticResource RequestVisibilityConverter}, ConverterParameter=TerminVerstrichen}">
Dieser Termin liegt in der Vergangenheit
</TextBlock>
<Label
Grid.Row="1"
Grid.Column="0"
Margin="3"
Content="Betreff" />
<TextBox
Grid.Row="1"
Grid.Column="1"
Grid.ColumnSpan="3"
Height="23"
Margin="3"
IsReadOnly="True"
Text="{Binding Path=SelectedAppointment.Subject, Mode=OneWay}" />
<Label Grid.Column="0" Grid.Row="2" Content="Ort" Margin="3" />
<TextBox Grid.Column="1" Grid.ColumnSpan="3" Grid.Row="2" Height="23" Margin="3" Text="{Binding Path=SelectedAppointment.Location, Mode=OneWay}" IsReadOnly="True" />
<Label
Grid.Row="2"
Grid.Column="0"
Margin="3"
Content="Ort" />
<TextBox
Grid.Row="2"
Grid.Column="1"
Grid.ColumnSpan="3"
Height="23"
Margin="3"
IsReadOnly="True"
Text="{Binding Path=SelectedAppointment.Location, Mode=OneWay}" />
<Label Grid.Column="0" Grid.Row="3" Content="Organisator" Margin="3" />
<TextBox Grid.Column="1" Grid.ColumnSpan="3" Grid.Row="3" Height="23" Margin="3" Text="{Binding Path=SelectedAppointment.Originator.FirstNameLastName, Mode=OneWay}" IsReadOnly="True" />
<Label
Grid.Row="3"
Grid.Column="0"
Margin="3"
Content="Organisator" />
<TextBox
Grid.Row="3"
Grid.Column="1"
Grid.ColumnSpan="3"
Height="23"
Margin="3"
IsReadOnly="True"
Text="{Binding Path=SelectedAppointment.Originator.FirstNameLastName, Mode=OneWay}" />
<Label Grid.Column="0" Grid.Row="4" VerticalAlignment="Center" Content="Start" Margin="3"/>
<dxe:DateEdit Grid.Column="1" Grid.Row="4" MaskType="DateTimeAdvancingCaret" Background="White" Height="23" MinWidth="80" Margin="3" IsEnabled="True" EditValue="{Binding SelectedAppointment.Start, Mode=OneWay}" IsReadOnly="True" PopupOpening="PopupBaseEdit_OnPopupOpening" />
<dxe:TextEdit IsEnabled="True" Grid.Column="2" Grid.Row="4" MaskType="DateTime" Mask="t" MaskUseAsDisplayFormat="True" Margin="3" Height="23" EditValue ="{Binding SelectedAppointment.StartTime, Converter={StaticResource TimeSpanToDateTimeConverter}, Mode=OneWay}" IsReadOnly="True"/>
<dxe:CheckEdit IsEnabled="False" Grid.Column="3" Grid.Row="4" Content="Ganztägig" EditValue ="{Binding SelectedAppointment.AllDay, Mode=OneWay}" HorizontalAlignment="Right" Margin="3" IsReadOnly="True" />
<Label
Grid.Row="4"
Grid.Column="0"
Margin="3"
VerticalAlignment="Center"
Content="Start" />
<dxe:DateEdit
Grid.Row="4"
Grid.Column="1"
Height="23"
MinWidth="80"
Margin="3"
Background="White"
EditValue="{Binding SelectedAppointment.Start, Mode=OneWay}"
IsEnabled="True"
IsReadOnly="True"
MaskType="DateTimeAdvancingCaret"
PopupOpening="PopupBaseEdit_OnPopupOpening" />
<dxe:TextEdit
Grid.Row="4"
Grid.Column="2"
Height="23"
Margin="3"
EditValue="{Binding SelectedAppointment.StartTime, Converter={StaticResource TimeSpanToDateTimeConverter}, Mode=OneWay}"
IsEnabled="True"
IsReadOnly="True"
Mask="t"
MaskType="DateTime"
MaskUseAsDisplayFormat="True" />
<dxe:CheckEdit
Grid.Row="4"
Grid.Column="3"
Margin="3"
HorizontalAlignment="Right"
Content="Ganztägig"
EditValue="{Binding SelectedAppointment.AllDay, Mode=OneWay}"
IsEnabled="False"
IsReadOnly="True" />
<Label Grid.Column="0" Grid.Row="5" VerticalAlignment="Center" Content="Ende" Margin="3"/>
<dxe:DateEdit IsEnabled="True" Grid.Column="1" Grid.Row="5" MaskType="DateTimeAdvancingCaret" Background="White" Height="23" MinWidth="80" Margin="3" EditValue="{Binding SelectedAppointment.End, Mode=OneWay}" IsReadOnly="True" PopupOpening="PopupBaseEdit_OnPopupOpening" />
<dxe:TextEdit IsEnabled="True" Grid.Column="2" Grid.Row="5" MaskType="DateTime" Mask="t" MaskUseAsDisplayFormat="True" Margin="3" Height="23" EditValue ="{Binding SelectedAppointment.EndTime, Converter={StaticResource TimeSpanToDateTimeConverter}, Mode=OneWay}" IsReadOnly="True"/>
<Label
Grid.Row="5"
Grid.Column="0"
Margin="3"
VerticalAlignment="Center"
Content="Ende" />
<dxe:DateEdit
Grid.Row="5"
Grid.Column="1"
Height="23"
MinWidth="80"
Margin="3"
Background="White"
EditValue="{Binding SelectedAppointment.End, Mode=OneWay}"
IsEnabled="True"
IsReadOnly="True"
MaskType="DateTimeAdvancingCaret"
PopupOpening="PopupBaseEdit_OnPopupOpening" />
<dxe:TextEdit
Grid.Row="5"
Grid.Column="2"
Height="23"
Margin="3"
EditValue="{Binding SelectedAppointment.EndTime, Converter={StaticResource TimeSpanToDateTimeConverter}, Mode=OneWay}"
IsEnabled="True"
IsReadOnly="True"
Mask="t"
MaskType="DateTime"
MaskUseAsDisplayFormat="True" />
<Label Grid.Column="0" Grid.Row="6" VerticalAlignment="Center" Content="Serientermin" Margin="3" Visibility="{Binding Path=SelectedAppointment, Converter={StaticResource RequestVisibilityConverter}, ConverterParameter=SerienterminLabel}" />
<TextBlock Grid.Column="1" Grid.Row="6" Grid.ColumnSpan="3" Margin="3" Padding="0" Foreground="Black" VerticalAlignment="Center"
Text="{Binding Path=SelectedAppointment, Converter={StaticResource RecurringAppointmentDurationConverter}}"
Visibility="{Binding Path=SelectedAppointment, Converter={StaticResource RequestVisibilityConverter}, ConverterParameter=SerienterminLabel}"
TextWrapping="WrapWithOverflow"/>
<Label
Grid.Row="6"
Grid.Column="0"
Margin="3"
VerticalAlignment="Center"
Content="Serientermin"
Visibility="{Binding Path=SelectedAppointment, Converter={StaticResource RequestVisibilityConverter}, ConverterParameter=SerienterminLabel}" />
<TextBlock
Grid.Row="6"
Grid.Column="1"
Grid.ColumnSpan="3"
Margin="3"
Padding="0"
VerticalAlignment="Center"
Foreground="Black"
Text="{Binding Path=SelectedAppointment, Converter={StaticResource RecurringAppointmentDurationConverter}}"
TextWrapping="WrapWithOverflow"
Visibility="{Binding Path=SelectedAppointment, Converter={StaticResource RequestVisibilityConverter}, ConverterParameter=SerienterminLabel}" />
<Label Grid.Column="0" Grid.Row="7" Margin="3" Content="Notiz"/>
<TextBox Grid.Column="1" Grid.Row="7" Grid.ColumnSpan="3" AcceptsReturn="True" VerticalScrollBarVisibility="Auto" VerticalAlignment="Stretch" HorizontalScrollBarVisibility="Disabled" Margin="3" TextWrapping="Wrap" Text="{Binding Path=SelectedAppointment.Description, Mode=OneWay}" IsReadOnly="True" />
<Label
Grid.Row="7"
Grid.Column="0"
Margin="3"
Content="Notiz" />
<TextBox
Grid.Row="7"
Grid.Column="1"
Grid.ColumnSpan="3"
Margin="3"
VerticalAlignment="Stretch"
AcceptsReturn="True"
HorizontalScrollBarVisibility="Disabled"
IsReadOnly="True"
Text="{Binding Path=SelectedAppointment.Description, Mode=OneWay}"
TextWrapping="Wrap"
VerticalScrollBarVisibility="Auto" />
<Grid Grid.Row="8" Grid.Column="0" Grid.ColumnSpan="4">
<Grid
Grid.Row="8"
Grid.Column="0"
Grid.ColumnSpan="4">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Button x:Name="AlleBestaetigen" Grid.Column="0" Content="Alle bestätigen" Margin="3" Click="ConfirmAllButton_OnClick" Width="100" />
<StackPanel x:Name="ZusagenStack" Grid.Column="1" HorizontalAlignment="Right" Orientation="Horizontal" Visibility="{Binding Path=SelectedAppointment, Converter={StaticResource RequestVisibilityConverter}, ConverterParameter=ZusagenStack}">
<Button
x:Name="AlleBestaetigen"
Grid.Column="0"
Width="100"
Margin="3"
Click="ConfirmAllButton_OnClick"
Content="Alle bestätigen" />
<StackPanel
x:Name="ZusagenStack"
Grid.Column="1"
HorizontalAlignment="Right"
Orientation="Horizontal"
Visibility="{Binding Path=SelectedAppointment, Converter={StaticResource RequestVisibilityConverter}, ConverterParameter=ZusagenStack}">
<StackPanel HorizontalAlignment="Right" Orientation="Horizontal">
<Button Margin="3" Content="Zusagen" Click="ConfirmButton_OnClick" IsEnabled="{Binding SelectedAppointment, Converter={StaticResource ObjectBoolConverter}}" />
<Button Margin="3" Content="Mit Vorbehalt" Click="ConfirmWithReservationButton_OnClick" IsEnabled="{Binding SelectedAppointment, Converter={StaticResource ObjectBoolConverter}}" />
<Button Margin="3" Content="Absagen" Click="RejectButton_OnClick" IsEnabled="{Binding SelectedAppointment, Converter={StaticResource ObjectBoolConverter}}" />
<Button
Margin="3"
Click="ConfirmButton_OnClick"
Content="Zusagen"
IsEnabled="{Binding SelectedAppointment, Converter={StaticResource ObjectBoolConverter}}" />
<Button
Margin="3"
Click="ConfirmWithReservationButton_OnClick"
Content="Mit Vorbehalt"
IsEnabled="{Binding SelectedAppointment, Converter={StaticResource ObjectBoolConverter}}" />
<Button
Margin="3"
Click="RejectButton_OnClick"
Content="Absagen"
IsEnabled="{Binding SelectedAppointment, Converter={StaticResource ObjectBoolConverter}}" />
</StackPanel>
</StackPanel>
</Grid>
<Button x:Name="OkButton" Grid.Row="8" Grid.Column="0" Grid.ColumnSpan="4" HorizontalAlignment="Right" Margin="3" Width="100" Content="OK" Click="OkButton_OnClick" Visibility="{Binding Path=SelectedAppointment, Converter={StaticResource RequestVisibilityConverter}, ConverterParameter=OKBtn}" />
<Button
x:Name="OkButton"
Grid.Row="8"
Grid.Column="0"
Grid.ColumnSpan="4"
Width="100"
Margin="3"
HorizontalAlignment="Right"
Click="OkButton_OnClick"
Content="OK"
Visibility="{Binding Path=SelectedAppointment, Converter={StaticResource RequestVisibilityConverter}, ConverterParameter=OKBtn}" />
</Grid>
</Grid>
<Button Grid.Row="1" x:Name="CloseBtn" Content="Schließen" HorizontalAlignment="Right" Margin="3" Width="100" Click="CloseButton_OnClick" />
<Button
x:Name="CloseBtn"
Grid.Row="1"
Width="100"
Margin="3"
HorizontalAlignment="Right"
Click="CloseButton_OnClick"
Content="Schließen" />
</Grid>
</dx:DXWindow>

File diff suppressed because it is too large Load Diff

View File

@@ -28,12 +28,20 @@ namespace BeWo.ServiceProxy
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IAiEnhancedService/GetAiConversations", ReplyAction="http://tempuri.org/IAiEnhancedService/GetAiConversationsResponse")]
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IAiEnhancedService/GetAiConversationsBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
System.Collections.Generic.List<BS.Shared.DataContracts.Feature.AI.AiConversationDC> GetAiConversations(int uicontext);
System.Collections.Generic.List<BS.Shared.DataContracts.Feature.AI.AiConversationDC> GetAiConversations(int uicontext, long? oid);
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IAiEnhancedService/CreateAiConversation", ReplyAction="http://tempuri.org/IAiEnhancedService/CreateAiConversationResponse")]
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IAiEnhancedService/CreateAiConversationBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
BS.Shared.DataContracts.Feature.AI.AiConversationDC CreateAiConversation(BS.Shared.DataContracts.Feature.AI.AiConversationDC conversation, long modell_oid);
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IAiEnhancedService/CloneAiConversation", ReplyAction="http://tempuri.org/IAiEnhancedService/CloneAiConversationResponse")]
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IAiEnhancedService/CloneAiConversationBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
BS.Shared.DataContracts.Feature.AI.AiConversationDC CloneAiConversation(long conversation_oid, System.Nullable<long> message_oid);
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IAiEnhancedService/DeleteAiConversation", ReplyAction="http://tempuri.org/IAiEnhancedService/DeleteAiConversationResponse")]
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IAiEnhancedService/DeleteAiConversationBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
void DeleteAiConversation(long conversation_oid);
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IAiEnhancedService/SendNewMessage", ReplyAction="http://tempuri.org/IAiEnhancedService/SendNewMessageResponse")]
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IAiEnhancedService/SendNewMessageBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
System.Collections.Generic.List<BS.Shared.DataContracts.AiConversationMessageDC> SendNewMessage(long conversation, string message);
@@ -88,9 +96,9 @@ namespace BeWo.ServiceProxy
return base.Channel.GetAiModels();
}
public System.Collections.Generic.List<BS.Shared.DataContracts.Feature.AI.AiConversationDC> GetAiConversations(int uicontext)
public System.Collections.Generic.List<BS.Shared.DataContracts.Feature.AI.AiConversationDC> GetAiConversations(int uicontext, long? oid)
{
return base.Channel.GetAiConversations(uicontext);
return base.Channel.GetAiConversations(uicontext, oid);
}
public BS.Shared.DataContracts.Feature.AI.AiConversationDC CreateAiConversation(BS.Shared.DataContracts.Feature.AI.AiConversationDC conversation, long modell_oid)
@@ -98,6 +106,16 @@ namespace BeWo.ServiceProxy
return base.Channel.CreateAiConversation(conversation, modell_oid);
}
public BS.Shared.DataContracts.Feature.AI.AiConversationDC CloneAiConversation(long conversation_oid, System.Nullable<long> message_oid)
{
return base.Channel.CloneAiConversation(conversation_oid, message_oid);
}
public void DeleteAiConversation(long conversation_oid)
{
base.Channel.DeleteAiConversation(conversation_oid);
}
public System.Collections.Generic.List<BS.Shared.DataContracts.AiConversationMessageDC> SendNewMessage(long conversation, string message)
{
return base.Channel.SendNewMessage(conversation, message);

View File

@@ -80,10 +80,10 @@ namespace BeWo.ServiceProxy
=> DoSync<AiEnhancedServiceClient, IAiEnhancedService>(pAction);
public static T DoAiEnhancedServiceSnyc<T>(Func<IAiEnhancedService, T> pFunc)
=> DoSync<AiEnhancedServiceClient, IAiEnhancedService, T>(pFunc);
public static void DoAiEnhancedServiceAsnyc(Action<IAiEnhancedService> pAction, Action pCallback = null, bool showWaitDialog = true, UserControl caller = null)
=> DoAsync<AiEnhancedServiceClient, IAiEnhancedService>(pAction, pCallback, showWaitDialog, caller?.Dispatcher);
public static void DoAiEnhancedServiceAsnyc<T>(Func<IAiEnhancedService, T> pFunc, Action<T> pCallback = null, bool showWaitDialog = true, UserControl caller = null)
=> DoAsync<AiEnhancedServiceClient, IAiEnhancedService, T>(pFunc, pCallback, showWaitDialog, caller?.Dispatcher);
public static void DoAiEnhancedServiceAsnyc(Action<IAiEnhancedService> pAction, Action pCallback = null, Action<Exception> pErrorCallback = null, bool showWaitDialog = true, UserControl caller = null)
=> DoAsync<AiEnhancedServiceClient, IAiEnhancedService>(pAction, pCallback, pErrorCallback, showWaitDialog, caller?.Dispatcher);
public static void DoAiEnhancedServiceAsnyc<T>(Func<IAiEnhancedService, T> pFunc, Action<T> pCallback = null, Action<Exception> pErrorCallback = null, bool showWaitDialog = true, UserControl caller = null)
=> DoAsync<AiEnhancedServiceClient, IAiEnhancedService, T>(pFunc, pCallback, pErrorCallback, showWaitDialog, caller?.Dispatcher);
#endregion
#region OperationsEnhancedService
@@ -91,10 +91,10 @@ namespace BeWo.ServiceProxy
=> DoSync<OperationsEnhancedServiceClient, IOperationsEnhancedService>(pAction);
public static T DoOperationsEnhancedServiceSnyc<T>(Func<IOperationsEnhancedService, T> pFunc)
=> DoSync<OperationsEnhancedServiceClient, IOperationsEnhancedService, T>(pFunc);
public static void DoOperationsEnhancedServiceAsnyc(Action<IOperationsEnhancedService> pAction, Action pCallback = null, bool showWaitDialog = true, UserControl caller = null)
=> DoAsync<OperationsEnhancedServiceClient, IOperationsEnhancedService>(pAction, pCallback, showWaitDialog, caller?.Dispatcher);
public static void DoOperationsEnhancedServiceAsnyc<T>(Func<IOperationsEnhancedService, T> pFunc, Action<T> pCallback = null, bool showWaitDialog = true, UserControl caller = null)
=> DoAsync<OperationsEnhancedServiceClient, IOperationsEnhancedService, T>(pFunc, pCallback, showWaitDialog, caller?.Dispatcher);
public static void DoOperationsEnhancedServiceAsnyc(Action<IOperationsEnhancedService> pAction, Action pCallback = null, Action<Exception> pErrorCallback = null, bool showWaitDialog = true, UserControl caller = null)
=> DoAsync<OperationsEnhancedServiceClient, IOperationsEnhancedService>(pAction, pCallback, pErrorCallback, showWaitDialog, caller?.Dispatcher);
public static void DoOperationsEnhancedServiceAsnyc<T>(Func<IOperationsEnhancedService, T> pFunc, Action<T> pCallback = null, Action<Exception> pErrorCallback = null, bool showWaitDialog = true, UserControl caller = null)
=> DoAsync<OperationsEnhancedServiceClient, IOperationsEnhancedService, T>(pFunc, pCallback, pErrorCallback, showWaitDialog, caller?.Dispatcher);
#endregion
@@ -311,7 +311,7 @@ namespace BeWo.ServiceProxy
}
public static void DoGkvAccountingServiceAsyncGUI<T>(Func<IGkvAccountingService, T> pFunc, Action<T> pCallBack, Dispatcher dispatcher)
{
DoAsync<GkvAccountingServiceClient, IGkvAccountingService, T>(pFunc, pCallBack, true, dispatcher);
DoAsync<GkvAccountingServiceClient, IGkvAccountingService, T>(pFunc, pCallBack, null, true, dispatcher);
}
public static void DoGkvAccountingServiceAsync(Action<IGkvAccountingService> pAction)
@@ -523,7 +523,9 @@ namespace BeWo.ServiceProxy
public static void DoStreamingServiceAsync<T>(Func<IStreamingService, T> pFunc, Action<T> pCallBack, Action pErrorCallBack)
{
DoAsync<StreamingServiceClient, IStreamingService, T>(pFunc, pCallBack, pErrorCallBack, true);
Action<Exception> tErrorCallBack = (e) => pErrorCallBack();
DoAsync<StreamingServiceClient, IStreamingService, T>(pFunc, pCallBack, tErrorCallBack, true);
}
public static void DoStreamingServiceAsync(Action<IStreamingService> pAction)
@@ -694,27 +696,33 @@ namespace BeWo.ServiceProxy
DoAsync<TClient, TInterface, T>(pFunc, pCallback, null, showWaitDialog);
}
private static void DoAsync<TClient, TInterface, T>(Func<TInterface, T> pFunc, Action<T> pCallback, bool showWaitDialog, Dispatcher dispatcher)
private static void DoAsync<TClient, TInterface, T>(Func<TInterface, T> pFunc, Action<T> pCallback, Action<Exception> pErrorCallback, bool showWaitDialog, Dispatcher dispatcher)
where TClient : ClientBase<TInterface>, TInterface, new()
where TInterface : class
{
if(dispatcher is null)
if (dispatcher is null)
{
dispatcher = BeWoApp.Current.Dispatcher;
}
Action<T> action = (t) => dispatcher.BeginInvoke(
Action<T> tCallback = (t) => dispatcher.BeginInvoke(
DispatcherPriority.Normal,
(Action)delegate
{
pCallback(t);
pCallback?.Invoke(t);
});
DoAsync<TClient, TInterface, T>(pFunc, action, showWaitDialog);
Action<Exception> tErrorCallback = (t) => dispatcher.BeginInvoke(
DispatcherPriority.Normal,
(Action)delegate
{
pErrorCallback?.Invoke(t);
});
DoAsync<TClient, TInterface, T>(pFunc, tCallback, tErrorCallback, showWaitDialog);
}
private static void DoAsync<TClient, TInterface, T>(Func<TInterface, T> pFunc, Action<T> pCallback, Action pErrorCallback, bool showWaitDialog)
private static void DoAsync<TClient, TInterface, T>(Func<TInterface, T> pFunc, Action<T> pCallback, Action<Exception> pErrorCallback, bool showWaitDialog)
where TClient : ClientBase<TInterface>, TInterface, new()
where TInterface : class
{
@@ -754,9 +762,10 @@ namespace BeWo.ServiceProxy
}
ShowErrorMessage(e);
if (pErrorCallback != null)
{
pErrorCallback();
pErrorCallback(e);
}
}
},
@@ -785,23 +794,30 @@ namespace BeWo.ServiceProxy
DoAsync<TClient, TInterface>(pAction, null, showWaitDialog);
}
private static void DoAsync<TClient, TInterface>(Action<TInterface> pAction, Action pCallback, bool showWaitDialog, Dispatcher dispatcher)
private static void DoAsync<TClient, TInterface>(Action<TInterface> pAction, Action pCallback, Action<Exception> pErrorCallback, bool showWaitDialog, Dispatcher dispatcher)
where TClient : ClientBase<TInterface>, TInterface, new()
where TInterface : class
{
Action action = pCallback;
if (dispatcher != null)
if (dispatcher is null)
{
action = () => dispatcher.BeginInvoke(
DispatcherPriority.Normal,
(Action)delegate
{
pCallback();
});
dispatcher = BeWoApp.Current.Dispatcher;
}
DoAsync<TClient, TInterface>(pAction, action, showWaitDialog);
Action tCallback = () => dispatcher.BeginInvoke(
DispatcherPriority.Normal,
(Action)delegate
{
pCallback();
});
Action<Exception> tErrorCallback = (t) => dispatcher.BeginInvoke(
DispatcherPriority.Normal,
(Action)delegate
{
pErrorCallback(t);
});
DoAsync<TClient, TInterface>(pAction, tCallback, tErrorCallback, showWaitDialog);
}
// private static void DoAsync<TClient, TInterface>(Action<TInterface> pAction, Action pCallback, bool )
@@ -809,6 +825,13 @@ namespace BeWo.ServiceProxy
private static void DoAsync<TClient, TInterface>(Action<TInterface> pAction, Action pCallback, bool showWaitDialog)
where TClient : ClientBase<TInterface>, TInterface, new()
where TInterface : class
{
DoAsync<TClient, TInterface>(pAction, pCallback, null, showWaitDialog);
}
private static void DoAsync<TClient, TInterface>(Action<TInterface> pAction, Action pCallback, Action<Exception> pErrorCallback, bool showWaitDialog)
where TClient : ClientBase<TInterface>, TInterface, new()
where TInterface : class
{
try
{
@@ -846,6 +869,11 @@ namespace BeWo.ServiceProxy
}
ShowErrorMessage(e);
if (pErrorCallback != null)
{
pErrorCallback(e);
}
}
},
null);

View File

@@ -0,0 +1,72 @@
using BeWo.View.Detail.AI;
using BS.Shared;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
namespace BeWo.Services
{
internal class BeWoControlFactory : IControlFactory
{
public Control GetAiConversationControl(UIContext uIContext, Dictionary<TableID, long[]> context, long? reference_oid = null)
{
var styleString = getStyleString(uIContext);
var control = styleString is object ? new AiConversationChatView(styleString) : new AiConversationChatView();
control.ViewModel.UIContext = (int)uIContext;
control.ViewModel.ReferenceObjectOid = reference_oid;
control.ViewModel.ContextBeWoObjects = context;
return control;
}
private string getStyleString(UIContext uIContext) {
switch (uIContext)
{
case UIContext.SupportConcept: return "ModuleAiControlSupportConceptStyle";
case UIContext.Customer: return "ModuleAiControlCustomerStyle";
case UIContext.Person: return "ModuleAiControlPersonStyle";
case UIContext.Employee: return "ModuleAiControlEmployeeStyle";
case UIContext.Organisation: return "ModuleAiControlOrganisationStyle";
case UIContext.Team:
break;
case UIContext.Dokumente:
break;
case UIContext.User:
break;
case UIContext.UserGroup:
break;
case UIContext.Report:
break;
case UIContext.Scheduler:
break;
case UIContext.Wohnheim:
break;
case UIContext.Vertretungen:
break;
case UIContext.CustomerTeam:
break;
case UIContext.Scheduling:
break;
case UIContext.Finance:
break;
case UIContext.Administration:
break;
case UIContext.AiConversation:
break;
case UIContext.AiConversationPopup:
break;
case UIContext.ServiceRecord: return "ModuleAiControlZeiterfassungStyle";
case UIContext.CustomerSingle: return "ModuleAiControlCustomerStyle";
case UIContext.PersonSingle: return "ModuleAiControlPersonStyle";
case UIContext.EmployeeSingle: return "ModuleAiControlEmployeeStyle";
}
return null;
}
}
}

View File

@@ -0,0 +1,80 @@
using BeWo.View.Detail.AI;
using BeWo.View.Windows;
using BS.Shared;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
namespace BeWo.Services
{
internal class BeWoWindowFactory : IWindowFactory
{
public Dictionary<UIContext, string> UIContext2Header { get; set; } = new Dictionary<UIContext, string>()
{
{UIContext.ServiceRecord, "Zeiterfassung KI Chat" },
{UIContext.Customer, "Klienten Übersicht KI Chat" },
{UIContext.Person, "Personen Übersicht KI Chat" },
{UIContext.Employee, "Mitarbeiter Übersicht KI Chat" },
{UIContext.Organisation, "Organisation Übersicht KI Chat" },
{UIContext.SupportConcept, "Hilfeplan Übersicht KI Chat" },
{UIContext.CustomerSingle, "Klient KI Chat" },
};
public AnimatedBeWoWindow GetAiConversationWindow(UIContext uIContext, Control control, double height = 600, double width = 1200)
{
UIContext2Header.TryGetValue(uIContext, out string title);
if (string.IsNullOrEmpty(title))
title = "default";
var window = GetAnimatedBeWoWindow(title, control,height, width);
return window;
}
private AnimatedBeWoWindow GetAnimatedBeWoWindow(string title, Control control, double height = 600, double width = 600)
{
var beWoWindow = new AnimatedBeWoWindow();
beWoWindow.Height = height;
beWoWindow.Width = width;
beWoWindow.WindowStartupLocation = WindowStartupLocation.CenterOwner;
beWoWindow.Owner = BeWoApp.CurrentBeWo.MainWindow;
beWoWindow.Title = title + " Fenster";
beWoWindow.rootGroupBox.Header = title;
beWoWindow.GroupBoxContent = control;
return beWoWindow;
}
public Control GetAiModalViewWindow(UIContext uIContext, Control control, double height = 600, double width = 1200)
{
UIContext2Header.TryGetValue(uIContext, out string title);
if (string.IsNullOrEmpty(title))
title = "default";
var popup = GetAiModalViewWindow(title, control, height, width);
return popup;
}
private Control GetAiModalViewWindow(string title, Control control, double height = 600, double width = 600)
{
var popup = new GroupBox();
popup.Style = Application.Current.FindResource("PopUpWindowStyle") as Style;
popup.Header = title;
popup.Content = control;
popup.Height = height;
popup.Width = width;
return popup;
}
}
}

View File

@@ -0,0 +1,69 @@
using BeWo.View.Windows;
using BS.Shared;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
namespace BeWo.Services
{
internal class BeWoWindowService : IWindowService
{
private readonly IWindowFactory _builder;
private readonly IControlFactory _controlFactory;
public BeWoWindowService(IWindowFactory builder, IControlFactory controlFactory)
{
_builder = builder;
_controlFactory = controlFactory;
}
public void ShowAiConversationWindow(UIContext uIContext, Dictionary<TableID, long[]> bewoObjects, long? reference_oid = null)
{
#if !DEBUG
BeWoApp.ShowInfoMessage("Diese Funktion befindet sich in der Testphase.");
return;
#endif
ShowWindowDialog(
cf => cf.GetAiConversationControl(uIContext, bewoObjects, reference_oid),
(wf, ctrl) => wf.GetAiConversationWindow(uIContext, ctrl));
}
public void ShowAiConversationModalViewWindow(UIContext uIContext, Dictionary<TableID, long[]> bewoObjects, long? reference_oid = null)
{
#if !DEBUG
BeWoApp.ShowInfoMessage("Diese Funktion befindet sich in der Testphase.");
return;
#endif
ShowModalViewWindow(cf => cf.GetAiConversationControl(uIContext, bewoObjects, reference_oid),
(wf, ctrl) => wf.GetAiModalViewWindow(uIContext, ctrl));
}
private void ShowWindow(Func<IControlFactory, Control> getControl, Func<IWindowFactory, Control, Window> getWindow)
{
var control = getControl(_controlFactory);
var window = getWindow(_builder, control);
window.Show();
}
private void ShowWindowDialog(Func<IControlFactory, Control> getControl, Func<IWindowFactory, Control, Window> getWindow)
{
var control = getControl(_controlFactory);
var window = getWindow(_builder, control);
window.ShowDialog();
}
private void ShowModalViewWindow(Func<IControlFactory, Control> getControl, Func<IWindowFactory, Control, Control> getPopup)
{
var control = getControl(_controlFactory);
var window = getPopup(_builder, control);
window.CommandBindings.Add(new CommandBinding(ApplicationCommands.Close, (s, e) => BeWoApp.MainControl.CloseCurrentPopUp()));
BeWoApp.MainControl.ShowControlAsModalPopup(window);
}
}
}

View File

@@ -0,0 +1,16 @@
using BS.Shared;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
namespace BeWo.Services
{
internal interface IControlFactory
{
Control GetAiConversationControl(UIContext uIContext, Dictionary<TableID, long[]> context, long? reference_oid = null);
}
}

View File

@@ -0,0 +1,18 @@
using BeWo.View.Windows;
using BS.Shared;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
namespace BeWo.Services
{
internal interface IWindowFactory
{
AnimatedBeWoWindow GetAiConversationWindow(UIContext uIContext, Control control, double height = 600, double width = 1200);
Control GetAiModalViewWindow(UIContext uIContext, Control control, double height = 600, double width = 1200);
}
}

View File

@@ -0,0 +1,17 @@
using BS.Shared;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
namespace BeWo.Services
{
internal interface IWindowService
{
void ShowAiConversationWindow(UIContext uIContext, Dictionary<TableID, long[]> bewoObjects, long? reference_oid = null);
void ShowAiConversationModalViewWindow(UIContext uIContext, Dictionary<TableID, long[]> bewoObjects, long? reference_oid = null);
}
}

View File

@@ -102,6 +102,34 @@
<!-- Endregion -->
<!-- Module AI Farben -->
<Color x:Key="ModuleAiControlDefaultNavigationHeaderColor">#ffaaaaaa</Color>
<Color x:Key="ModuleAiControlDefaultNavigationContentColor">#FFD7DADB</Color>
<Color x:Key="ModuleAiControlDefaultNavigationContentColor2">#FF92A9B3</Color>
<Color x:Key="ModuleAiControlZeiterfassungNavigationHeaderColor">#FFC80000</Color>
<Color x:Key="ModuleAiControlZeiterfassungNavigationContentColor">#FFD7DADB</Color>
<Color x:Key="ModuleAiControlZeiterfassungNavigationContentColor2">#FF92A9B3</Color>
<Color x:Key="ModuleAiControlSupportConceptNavigationHeaderColor">#FF993B3B</Color>
<Color x:Key="ModuleAiControlSupportConceptNavigationContentColor">#FFD7DADB</Color>
<Color x:Key="ModuleAiControlSupportConceptNavigationContentColor2">#FF92A9B3</Color>
<Color x:Key="ModuleAiControlCustomerNavigationHeaderColor">#FF19485C</Color>
<Color x:Key="ModuleAiControlCustomerNavigationContentColor">#FFD7DADB</Color>
<Color x:Key="ModuleAiControlCustomerNavigationContentColor2">#FF92A9B3</Color>
<Color x:Key="ModuleAiControlPersonNavigationHeaderColor">#FF9E3D02</Color>
<Color x:Key="ModuleAiControlPersonNavigationContentColor">#FFD7DADB</Color>
<Color x:Key="ModuleAiControlPersonNavigationContentColor2">#FF92A9B3</Color>
<Color x:Key="ModuleAiControlEmployeeNavigationHeaderColor">#FF205C19</Color>
<Color x:Key="ModuleAiControlEmployeeNavigationContentColor">#FFD7DADB</Color>
<Color x:Key="ModuleAiControlEmployeeNavigationContentColor2">#FF92A9B3</Color>
<Color x:Key="ModuleAiControlOrganisationNavigationHeaderColor">#FFC8C000</Color>
<Color x:Key="ModuleAiControlOrganisationNavigationContentColor">#FFD7DADB</Color>
<Color x:Key="ModuleAiControlOrganisationNavigationContentColor2">#FF92A9B3</Color>
<SolidColorBrush x:Key="ModuleAiChatTabItem" Color="#FFFFFFBF" />
<SolidColorBrush x:Key="ModuleAiChatPrimaryColor" Color="#FFCECF7F" />
</ResourceDictionary>

View File

@@ -52,35 +52,4 @@
</Setter.Value>
</Setter>
</Style>
<Style x:Key="ModuleAiZeiterfassungStyle" TargetType="{x:Type GroupBox}">
<Style.Resources>
<SolidColorBrush x:Key="NavigationHeaderBrush" Color="#aaaaaa" />
<LinearGradientBrush x:Key="NavigationContentBrush" StartPoint="0.5,0" EndPoint="0.5,1">
<GradientStop Offset="0" Color="#FFD7DADB" />
<GradientStop Offset="1" Color="#FF92A9B3" />
</LinearGradientBrush>
<!--<SolidColorBrush x:Key="NavigationHeaderBrush" Color="#FF5C0000" />
<LinearGradientBrush x:Key="NavigationContentBrush" StartPoint="0.5,0" EndPoint="0.5,1">
<GradientStop Offset="0" Color="#ef4444" />
<GradientStop Offset="3" Color="#dc2626" />
</LinearGradientBrush>-->
</Style.Resources>
<Setter Property="Template" Value="{StaticResource NavigationGroupTemplate2}" />
</Style>
<!-- OLD -->
<Style x:Key="ModuleAiNavigationStyle" TargetType="{x:Type GroupBox}">
<Style.Resources>
<SolidColorBrush x:Key="NavigationHeaderBrush" Color="#FFC64605" />
<LinearGradientBrush x:Key="NavigationContentBrush" StartPoint="0.5,0" EndPoint="0.5,1">
<GradientStop Offset="0" Color="#FFFFC48A" />
<GradientStop Offset="1" Color="#FFFF7830" />
</LinearGradientBrush>
</Style.Resources>
<Setter Property="Template" Value="{StaticResource NavigationGroupTemplate2}" />
</Style>
</ResourceDictionary>

View File

@@ -5,6 +5,10 @@
xmlns:templateselectors="clr-namespace:BeWo.View.TemplateSelectors"
xmlns:viewmodel="clr-namespace:BeWo.ViewModel">
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="..\DataTemplates\ControlTemplates.xaml" />
</ResourceDictionary.MergedDictionaries>
<Style x:Key="MessageTextBoxStyle" TargetType="{x:Type TextBox}">
<Setter Property="Margin" Value="0" />
<Setter Property="Height" Value="auto" />
@@ -18,6 +22,96 @@
<Style x:Key="TextBlockStyle" TargetType="{x:Type TextBlock}" />
<Style x:Key="ModuleAiControlDefaultStyle" TargetType="{x:Type GroupBox}">
<Style.Resources>
<SolidColorBrush x:Key="NavigationHeaderBrush" Color="{StaticResource ModuleAiControlDefaultNavigationHeaderColor}" />
<LinearGradientBrush x:Key="NavigationContentBrush" StartPoint="0.5,0" EndPoint="0.5,1">
<GradientStop Offset="0" Color="{StaticResource ModuleAiControlDefaultNavigationContentColor}" />
<GradientStop Offset="1" Color="{StaticResource ModuleAiControlDefaultNavigationContentColor2}" />
</LinearGradientBrush>
</Style.Resources>
<Setter Property="Template" Value="{StaticResource NavigationGroupTemplate2}" />
</Style>
<Style x:Key="ModuleAiControlZeiterfassungStyle" TargetType="{x:Type GroupBox}">
<Style.Resources>
<SolidColorBrush x:Key="NavigationHeaderBrush" Color="{StaticResource ModuleAiControlZeiterfassungNavigationHeaderColor}" />
<LinearGradientBrush x:Key="NavigationContentBrush" StartPoint="0.5,0" EndPoint="0.5,1">
<GradientStop Offset="0" Color="{StaticResource ModuleAiControlZeiterfassungNavigationContentColor}" />
<GradientStop Offset="1" Color="{StaticResource ModuleAiControlZeiterfassungNavigationContentColor2}" />
</LinearGradientBrush>
</Style.Resources>
<Setter Property="Template" Value="{StaticResource NavigationGroupTemplate2}" />
</Style>
<Style x:Key="ModuleAiControlSupportConceptStyle" TargetType="{x:Type GroupBox}">
<Style.Resources>
<SolidColorBrush x:Key="NavigationHeaderBrush" Color="{StaticResource ModuleAiControlSupportConceptNavigationHeaderColor}" />
<LinearGradientBrush x:Key="NavigationContentBrush" StartPoint="0.5,0" EndPoint="0.5,1">
<GradientStop Offset="0" Color="{StaticResource ModuleAiControlSupportConceptNavigationContentColor}" />
<GradientStop Offset="1" Color="{StaticResource ModuleAiControlSupportConceptNavigationContentColor2}" />
</LinearGradientBrush>
</Style.Resources>
<Setter Property="Template" Value="{StaticResource NavigationGroupTemplate2}" />
</Style>
<Style x:Key="ModuleAiControlCustomerStyle" TargetType="{x:Type GroupBox}">
<Style.Resources>
<SolidColorBrush x:Key="NavigationHeaderBrush" Color="{StaticResource ModuleAiControlCustomerNavigationHeaderColor}" />
<LinearGradientBrush x:Key="NavigationContentBrush" StartPoint="0.5,0" EndPoint="0.5,1">
<GradientStop Offset="0" Color="{StaticResource ModuleAiControlCustomerNavigationContentColor}" />
<GradientStop Offset="1" Color="{StaticResource ModuleAiControlCustomerNavigationContentColor2}" />
</LinearGradientBrush>
</Style.Resources>
<Setter Property="Template" Value="{StaticResource NavigationGroupTemplate2}" />
</Style>
<Style x:Key="ModuleAiControlPersonStyle" TargetType="{x:Type GroupBox}">
<Style.Resources>
<SolidColorBrush x:Key="NavigationHeaderBrush" Color="{StaticResource ModuleAiControlPersonNavigationHeaderColor}" />
<LinearGradientBrush x:Key="NavigationContentBrush" StartPoint="0.5,0" EndPoint="0.5,1">
<GradientStop Offset="0" Color="{StaticResource ModuleAiControlPersonNavigationContentColor}" />
<GradientStop Offset="1" Color="{StaticResource ModuleAiControlPersonNavigationContentColor2}" />
</LinearGradientBrush>
</Style.Resources>
<Setter Property="Template" Value="{StaticResource NavigationGroupTemplate2}" />
</Style>
<Style x:Key="ModuleAiControlEmployeeStyle" TargetType="{x:Type GroupBox}">
<Style.Resources>
<SolidColorBrush x:Key="NavigationHeaderBrush" Color="{StaticResource ModuleAiControlEmployeeNavigationHeaderColor}" />
<LinearGradientBrush x:Key="NavigationContentBrush" StartPoint="0.5,0" EndPoint="0.5,1">
<GradientStop Offset="0" Color="{StaticResource ModuleAiControlEmployeeNavigationContentColor}" />
<GradientStop Offset="1" Color="{StaticResource ModuleAiControlEmployeeNavigationContentColor2}" />
</LinearGradientBrush>
</Style.Resources>
<Setter Property="Template" Value="{StaticResource NavigationGroupTemplate2}" />
</Style>
<Style x:Key="ModuleAiControlOrganisationStyle" TargetType="{x:Type GroupBox}">
<Style.Resources>
<SolidColorBrush x:Key="NavigationHeaderBrush" Color="{StaticResource ModuleAiControlOrganisationNavigationHeaderColor}" />
<LinearGradientBrush x:Key="NavigationContentBrush" StartPoint="0.5,0" EndPoint="0.5,1">
<GradientStop Offset="0" Color="{StaticResource ModuleAiControlOrganisationNavigationContentColor}" />
<GradientStop Offset="1" Color="{StaticResource ModuleAiControlOrganisationNavigationContentColor2}" />
</LinearGradientBrush>
</Style.Resources>
<Setter Property="Template" Value="{StaticResource NavigationGroupTemplate2}" />
</Style>
<!-- OLD -->
<Style x:Key="ModuleAiNavigationStyle" TargetType="{x:Type GroupBox}">
<Style.Resources>
<SolidColorBrush x:Key="NavigationHeaderBrush" Color="#FFC64605" />
<LinearGradientBrush x:Key="NavigationContentBrush" StartPoint="0.5,0" EndPoint="0.5,1">
<GradientStop Offset="0" Color="#FFFFC48A" />
<GradientStop Offset="1" Color="#FFFF7830" />
</LinearGradientBrush>
</Style.Resources>
<Setter Property="Template" Value="{StaticResource NavigationGroupTemplate2}" />
</Style>
<DataTemplate x:Key="ConversationHamburgerMenuItemTemplate" DataType="{x:Type viewmodel:AiConversationVM}">
<dxwui:HamburgerMenuNavigationButton Content="{Binding Displayname}" />
</DataTemplate>
@@ -54,7 +148,13 @@
FontSize="10"
FontWeight="Thin"
Style="{StaticResource TextBlockStyle}"
Text="{Binding Modell.ModelName, StringFormat=Modell: {0}}" />
Text="{Binding Updated, StringFormat=Aktualisiert: {0:dd.MM.yyyy HH:mm:ss}}" />
<!--<TextBlock
Grid.Row="2"
FontSize="10"
FontWeight="Thin"
Style="{StaticResource TextBlockStyle}"
Text="{Binding Modell.ModelName, StringFormat=Modell: {0}}" />-->
</Grid>
</Border>
</DataTemplate>
@@ -178,10 +278,37 @@
</Border>
</DataTemplate>
<DataTemplate x:Key="CheckboxAssistentMessageTemplate">
<StackPanel VerticalAlignment="Center" Orientation="Horizontal">
<CheckBox
Margin="4"
VerticalAlignment="Center"
IsChecked="{Binding IsChecked}" />
<ContentPresenter Content="{Binding}" ContentTemplate="{StaticResource AssistentMessageTemplate}" />
</StackPanel>
</DataTemplate>
<DataTemplate x:Key="CheckboxUserMessageTemplate">
<StackPanel VerticalAlignment="Center" Orientation="Horizontal">
<CheckBox
Margin="4"
VerticalAlignment="Center"
IsChecked="{Binding IsChecked}" />
<ContentPresenter Content="{Binding}" ContentTemplate="{StaticResource UserMessageTemplate}" />
</StackPanel>
</DataTemplate>
<templateselectors:AiConversationMessageTemplateSelector
x:Key="AiConversationMessageTemplateSelector"
AssistentMessageTemplate="{StaticResource AssistentMessageTemplate}"
SystemMessageTemplate="{StaticResource SystemMessageTemplate}"
UserMessageTemplate="{StaticResource UserMessageTemplate}" />
<templateselectors:AiConversationMessageTemplateSelector
x:Key="AiConversationCloneMessageTemplateSelector"
AssistentMessageTemplate="{StaticResource CheckboxAssistentMessageTemplate}"
SystemMessageTemplate="{StaticResource SystemMessageTemplate}"
UserMessageTemplate="{StaticResource UserMessageTemplate}" />
</ResourceDictionary>

View File

@@ -3,6 +3,7 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:ai="clr-namespace:BeWo.View.Detail.AI"
xmlns:conv="clr-namespace:BeWo.Converter.Features"
xmlns:core="clr-namespace:BS.Shared.Core;assembly=BS.Shared"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
@@ -12,6 +13,7 @@
xmlns:localView="clr-namespace:BeWo.View"
xmlns:markup="clr-namespace:BeWo.MultiLanguage.Markup"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:shared="clr-namespace:BS.Shared;assembly=BS.Shared"
xmlns:t="clr-namespace:BeWo.MultiLanguage.Markup"
xmlns:uc="clr-namespace:BeWo.Controls;assembly=BeWo.Controls"
xmlns:viewmodel="clr-namespace:BeWo.ViewModel"
@@ -29,13 +31,14 @@
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="..\..\..\Styles\ModernOrangeBlack.xaml" />
</ResourceDictionary.MergedDictionaries>
<conv:AiConversationMessageSystemConverter x:Key="AiConversationMessageSystemConverter" />
</ResourceDictionary>
</localView:BeWoView.Resources>
<localView:BeWoView.DataContext>
<listviewmodel:AiConversationListVM />
</localView:BeWoView.DataContext>
<Grid>
<GroupBox Style="{StaticResource ModuleAiZeiterfassungStyle}">
<GroupBox x:Name="rootgroupbox" Style="{StaticResource ModuleAiControlDefaultStyle}">
<GroupBox.Header>
<StackPanel
Grid.Row="0"
@@ -119,7 +122,7 @@
ItemsSource="{Binding VMList}"
ScrollViewer.CanContentScroll="False"
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
SelectedItem="{Binding SelectedVM}">
SelectedItem="{Binding SelectedVM, Mode=TwoWay}">
<ListView.ItemContainerStyle>
<Style TargetType="ListViewItem">
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
@@ -130,7 +133,7 @@
</ListView>
</Grid>
<Grid Grid.Column="1">
<Grid Grid.Column="1" PreviewKeyDown="Grid_PreviewKeyDown">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="1000000*" MaxWidth="1200" />
@@ -147,7 +150,7 @@
Background="Transparent"
BorderThickness="0"
ItemTemplateSelector="{StaticResource AiConversationMessageTemplateSelector}"
ItemsSource="{Binding SelectedVM.Messages.VMList, Converter={StaticResource TestDebugConverter}}"
ItemsSource="{Binding SelectedVM.Messages.VMList, Converter={StaticResource AiConversationMessageSystemConverter}, UpdateSourceTrigger=PropertyChanged}"
ScrollViewer.CanContentScroll="False"
ScrollViewer.HorizontalScrollBarVisibility="Disabled">
<ListView.ItemContainerStyle>
@@ -173,8 +176,13 @@
<Grid
Grid.Row="1"
Grid.Column="1"
Margin="4,4,4,4"
Visibility="{Binding SelectedVM, Converter={StaticResource ObjectVisibilityConverter}}">
Margin="4">
<Grid.Visibility>
<MultiBinding Converter="{StaticResource BooleanAndVisibilityMultiConverter}">
<Binding Converter="{StaticResource ObjectBoolConverter}" Path="SelectedVM" />
<Binding Converter="{StaticResource UserPermission2BoolConverter}" ConverterParameter="{x:Static shared:UserRightType.AiModuleChatAdd}" />
</MultiBinding>
</Grid.Visibility>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0" />
<ColumnDefinition Width="*" />
@@ -195,20 +203,22 @@
Grid.Column="1"
Height="auto"
MaxHeight="200"
Margin="4"
Margin="0,0,4,0"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
AcceptsReturn="True"
Text="{Binding MessageInput}" />
IsReadOnly="{Binding IsSending}"
Text="{Binding MessageInput, UpdateSourceTrigger=PropertyChanged}" />
<Button
Grid.Column="2"
Height="auto"
MinHeight="25"
MaxHeight="100"
Margin="4"
Margin="0"
VerticalAlignment="Stretch"
Command="{Binding SendNewMessageCommand}"
Content="Senden" />
Content="Senden"
Visibility="Visible" />
</Grid>
</Grid>
</Grid>
@@ -243,7 +253,7 @@
<Button
x:Name="btnSettings"
Margin="4,0,0,0"
Command="{Binding OpenAiSettingCommand, RelativeSource={RelativeSource AncestorType={x:Type localView:BeWoView}, Mode=FindAncestor}}"
Command="{Binding OpenSettingCommand}"
Content="Einstellungen" />
<Button
x:Name="btnTest"
@@ -251,6 +261,16 @@
Command="{Binding TestCommand}"
Content="Test Szenario"
Visibility="Collapsed" />
<Button
x:Name="btnClone"
Margin="4,0,0,0"
Command="{Binding OpenCloneCommand}"
Content="Klonen" />
<Button
x:Name="btnDelete"
Margin="4,0,0,0"
Command="{Binding AskDeleteCommand}"
Content="Löschen" />
</StackPanel>
<StackPanel
Height="Auto"
@@ -292,6 +312,7 @@
x:Name="popup_settings"
Width="auto"
Height="auto"
IsOpen="{Binding IsSettingsOpen}"
Placement="Center"
StaysOpen="False">
<Border
@@ -319,6 +340,64 @@
SelectedItem="{Binding Config.SelectedModel, Mode=TwoWay}" />
</Grid>-->
</Popup>
<Popup
x:Name="popup_conversation_clone"
IsOpen="{Binding IsCloneOpen}"
Loaded="popup_conversation_clone_Loaded"
Placement="Center"
StaysOpen="False">
<Border
Width="400"
Height="600"
Padding="0"
Background="{DynamicResource NavigationContentBrush}"
BorderThickness="1"
CornerRadius="5">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="auto" />
</Grid.RowDefinitions>
<ListView
x:Name="listbox_messages_clone"
Padding="3"
Background="Transparent"
BorderThickness="0"
ItemTemplateSelector="{StaticResource AiConversationCloneMessageTemplateSelector}"
ItemsSource="{Binding SelectedVM.Messages.VMList, Converter={StaticResource AiConversationMessageSystemConverter}, UpdateSourceTrigger=PropertyChanged}"
ScrollViewer.CanContentScroll="False"
ScrollViewer.HorizontalScrollBarVisibility="Disabled">
<ListView.ItemContainerStyle>
<Style TargetType="ListViewItem">
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
<Setter Property="Padding" Value="4" />
<Setter Property="BorderThickness" Value="0" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ListViewItem}">
<ContentPresenter Margin="{TemplateBinding Padding}" />
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ListView.ItemContainerStyle>
<ListView.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel Orientation="Vertical" />
</ItemsPanelTemplate>
</ListView.ItemsPanel>
</ListView>
<Button
Grid.Row="1"
Margin="8,4,8,8"
Command="{Binding CloneCommand}">
Klonen
</Button>
</Grid>
</Border>
<!-- AiConversationCloneMessageTemplateSelector -->
</Popup>
</Grid>
</GroupBox>
</Grid>

View File

@@ -1,4 +1,5 @@
using BeWo.ServiceProxy;
using BeWo.Core;
using BeWo.ServiceProxy;
using BeWo.ViewModel.ListViewModel;
using BS.Shared.Extensions;
using DevExpress.Mvvm;
@@ -30,11 +31,20 @@ namespace BeWo.View.Detail.AI
{
InitializeComponent();
OpenAiSettingCommand = new DelegateCommand(OpenAiSetting);
((INotifyCollectionChanged)listbox_messages.Items).CollectionChanged += listbox_conversations_SelectionChanged;
popup_settings.Closed += (s, e) => ViewModel.UpdateConfig();
ViewModel.SendNewMessageSuccess += (s, e) =>
{
if (txt_input_message.Visibility == Visibility.Visible)
txt_input_message.Focus();
};
}
public AiConversationChatView(string stylestring) : this()
{
rootgroupbox.Style = (Style)FindResource(stylestring);
}
public AiConversationListVM ViewModel
@@ -43,32 +53,48 @@ namespace BeWo.View.Detail.AI
set => DataContext = value;
}
public DelegateCommand OpenAiSettingCommand { get; set; }
private void BeWoView_Loaded(object sender, RoutedEventArgs e)
{
if (BeWoApp.IsInDesignMode)
return;
ViewModel.ReloadConfigCommand.Execute(null);
ViewModel.ReloadConversationsCommand.Execute(null);
}
private void OpenAiSetting()
{
ServiceFacade.DoAiEnhancedServiceAsnyc(x => x.GetAiModels(), (x) =>
{
ViewModel.Models.MakeEqualTo(x);
popup_settings.IsOpen = true;
}, true, this);
}
private void listbox_conversations_SelectionChanged(object sender, NotifyCollectionChangedEventArgs e)
{
if (VisualTreeHelper.GetChildrenCount(listbox_messages) > 0)
BeWoWpfUtils.ScrollToBottom(listbox_messages);
}
private void popup_conversation_clone_Loaded(object sender, RoutedEventArgs e)
{
BeWoWpfUtils.ScrollToBottom(listbox_messages_clone);
}
private void Grid_PreviewKeyDown(object sender, KeyEventArgs e)
{
if (e.Key == Key.Enter)
{
Border border = (Border)VisualTreeHelper.GetChild(listbox_messages, 0);
ScrollViewer scrollViewer = (ScrollViewer)VisualTreeHelper.GetChild(border, 0);
scrollViewer.ScrollToBottom();
if ((Keyboard.Modifiers & ModifierKeys.Shift) == ModifierKeys.Shift)
{
// Shift + Enter gedrückt
Console.WriteLine("Shift + Enter erkannt");
}
else
{
// Nur Enter gedrückt
// Console.WriteLine("Enter erkannt");
object p = null;
if(ViewModel.SendNewMessageCommand.CanExecute(p))
ViewModel.SendNewMessageCommand.Execute(p);
e.Handled = true;
}
// Optional: Event als behandelt markieren, wenn du die Standardaktion unterdrücken willst
// e.Handled = true;
}
}
}

View File

@@ -804,6 +804,7 @@
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
<RowDefinition Height="10" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Rectangle Height="6" Fill="{StaticResource CustomerContentBrush}" />
@@ -3786,10 +3787,10 @@
Selector.Selected="tabitem_log_Selected" />
</TabControl>
<Border
Grid.Row="2"
Grid.Row="3"
Grid.ColumnSpan="3"
Height="40"
Margin="0,10,0,0"
Margin="0,0,0,0"
VerticalAlignment="Stretch"
Background="#FF000000">
<Border.OpacityMask>
@@ -3798,12 +3799,40 @@
<GradientStop Offset="1" Color="#33FFFFFF" />
</LinearGradientBrush>
</Border.OpacityMask>
</Border>
<StackPanel
Grid.Row="2"
Grid.Row="3"
Grid.ColumnSpan="3"
Margin="0"
HorizontalAlignment="Left"
VerticalAlignment="Center"
Orientation="Horizontal">
<StackPanel.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="..\..\Styles\ModernOrangeBlack.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</StackPanel.Resources>
<Button
x:Name="btnOpenAi2"
Margin="10,0,0,0"
Command="{Binding Path=OpenAiWindowCommand, RelativeSource={RelativeSource AncestorType={x:Type localView:BeWoView}}}"
Content="AI Chat Window"
Style="{StaticResource NavigationToolbarButtonStyle}" />
<Button
x:Name="btnOpenAi3"
Margin="10,0,0,0"
Command="{Binding Path=OpenAiPopupCommand, RelativeSource={RelativeSource AncestorType={x:Type localView:BeWoView}}}"
Content="AI Chat Popup"
Style="{StaticResource NavigationToolbarButtonStyle}" />
</StackPanel>
<StackPanel
Grid.Row="3"
Grid.ColumnSpan="3"
Height="Auto"
Margin="5,10,0,0"
Margin="5,0,0,0"
HorizontalAlignment="Right"
VerticalAlignment="Center"
Orientation="Horizontal">

View File

@@ -51,6 +51,9 @@ using Hyperlink = System.Windows.Documents.Hyperlink;
using MessageBox = System.Windows.MessageBox;
using VerticalAlignment = System.Windows.VerticalAlignment;
using BeWo.AI;
using BeWo.View.Navigation;
using DevExpress.Mvvm;
using System.Collections;
namespace BeWo.View.Detail
{
@@ -96,10 +99,12 @@ namespace BeWo.View.Detail
public CustomerView(CustomerVM pCustomerVM)
{
InitializeComponent();
DataContext = ViewModel;
DataContext = ViewModel;
OpenAiWindowCommand = new DelegateCommand(OpenAiWindow, () => BeWoApp.HasLoggedOnUserRight(UserRightType.AiModuleView) && !ViewModel.IsNew);
OpenAiPopupCommand = new DelegateCommand(OpenAiPopup, () => BeWoApp.HasLoggedOnUserRight(UserRightType.AiModuleView2) && !ViewModel.IsNew);
BehinderungsartenSelection.CommandBindings.Add(new CommandBinding(ApplicationCommands.Close, (s, e) => this.Dispatch(() => { PopupBehinderungsarten.IsOpen = false; })));
BehinderungsartenSelection.CommandBindings.Add(new CommandBinding(ApplicationCommands.Close, (s, e) => this.Dispatch(() => { PopupBehinderungsarten.IsOpen = false; })));
MerkzeichenSelection.CommandBindings.Add(new CommandBinding(ApplicationCommands.Close, (s, e) => this.Dispatch(() => { PopupMerkzeichen.IsOpen = false; })));
_AlleEintragKategorien = pCustomerVM.EintragKategorien;
@@ -289,7 +294,42 @@ namespace BeWo.View.Detail
#endif
}
void Image_EditValueChanged(object sender, DevExpress.Xpf.Editors.EditValueChangedEventArgs e)
public DelegateCommand OpenAiWindowCommand { get; }
public DelegateCommand OpenAiPopupCommand { get; }
public Dictionary<TableID, long[]> GetVisibleInformationReferences()
{
var visible = ViewModel;
return GetVisibleInformationReferences(visible);
}
private Dictionary<TableID, long[]> GetVisibleInformationReferences(CustomerVM customer)
{
var dict = new Dictionary<TableID, long[]>() {
{ TableID.Customer, new long[]{customer.DataContract.CustomerOid.Value } }
};
return dict;
}
private void OpenAiWindow()
{
var customer_oid = ViewModel.DataContract.CustomerOid;
var context = GetVisibleInformationReferences();
MainControl.WindowService.ShowAiConversationWindow(UIContext.CustomerSingle, context, customer_oid);
}
private void OpenAiPopup()
{
var customer_oid = ViewModel.DataContract.CustomerOid;
var context = GetVisibleInformationReferences();
MainControl.WindowService.ShowAiConversationModalViewWindow(UIContext.CustomerSingle, context, customer_oid);
}
void Image_EditValueChanged(object sender, DevExpress.Xpf.Editors.EditValueChangedEventArgs e)
{
_ViewModel.CustomerImage = Img.EditValue as byte[];
}
@@ -361,7 +401,7 @@ namespace BeWo.View.Detail
//get { return BeWoApp.Tenant == "demo" && BeWoApp.UserName == "demo"; }
}
private void Log(string log)
private void Log(string log)
{
if (ShouldLog)
{

File diff suppressed because it is too large Load Diff

View File

@@ -5097,20 +5097,15 @@ namespace BeWo.View.Detail.Zeiterfassung
var context = ViewModel.GetVisibleInformationReferences(records);
var window = BeWoWindowBuilder.AiWindowBuilder.GetAiConversationWindow(UIContext.ServiceRecord, context);
window?.ShowDialog();
}
MainControl.WindowService.ShowAiConversationWindow(UIContext.ServiceRecord, context);
}
private void Ai_Button2_Click(object sender, RoutedEventArgs e)
{
var records = GetVisibleRecordVMs();
var context = ViewModel.GetVisibleInformationReferences(records);
var control = BeWoWindowBuilder.AiWindowBuilder.GetAiConversationControl(UIContext.ServiceRecord, context);
if(control is object)
MainControl.ShowControlAsModalPopup(control);
MainControl.WindowService.ShowAiConversationModalViewWindow(UIContext.ServiceRecord, context);
}
private IEnumerable<ServiceRecordVM> GetVisibleRecordVMs()

View File

@@ -205,19 +205,14 @@ namespace BeWo.View.Navigation
{
var context = GetVisibleInformationReferences();
var window = BeWoWindowBuilder.AiWindowBuilder.GetAiConversationWindow(UIContext.Customer, context);
window?.ShowDialog();
MainControl.WindowService.ShowAiConversationWindow(UIContext.Customer, context);
}
private void OpenAiPopup()
{
var context = GetVisibleInformationReferences();
var control = BeWoWindowBuilder.AiWindowBuilder.GetAiConversationControl(UIContext.Customer, context);
if (control is object)
MainControl.ShowControlAsModalPopup(control);
MainControl.WindowService.ShowAiConversationModalViewWindow(UIContext.Customer, context);
}
private void SupportConceptFilterComboBoxOnSelectionChanged(object o, SelectionChangedEventArgs selectionChangedEventArgs)

View File

@@ -112,19 +112,14 @@ namespace BeWo.View.Navigation
{
var context = GetVisibleInformationReferences();
var window = BeWoWindowBuilder.AiWindowBuilder.GetAiConversationWindow(UIContext.Employee, context);
window?.ShowDialog();
MainControl.WindowService.ShowAiConversationWindow(UIContext.Employee, context);
}
private void OpenAiPopup()
{
var context = GetVisibleInformationReferences();
var control = BeWoWindowBuilder.AiWindowBuilder.GetAiConversationControl(UIContext.Employee, context);
if (control is object)
MainControl.ShowControlAsModalPopup(control);
MainControl.WindowService.ShowAiConversationModalViewWindow(UIContext.Employee, context);
}
private bool MainNavigationView_ArchiveObject(IFilterableDC obj)

View File

@@ -1,7 +1,9 @@
using System.Collections.Generic;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Windows;
using System.Windows.Input;
using BeWo.Core;
using BeWo.Core.Service;
using BeWo.ServiceProxy;
@@ -13,6 +15,7 @@ using BS.Shared.Core;
using BS.Shared.DataContracts;
using BS.Shared.DataContracts.Compact;
using BS.Shared.Extensions;
using DevExpress.Mvvm;
using Microsoft.Win32;
namespace BeWo.View.Navigation
@@ -27,21 +30,64 @@ namespace BeWo.View.Navigation
public OrganisationNavigationView()
{
this.InitializeComponent();
InitializeComponent();
this.mainNavigationView.Sorter = new OrganisationSorter();
mainNavigationView.OpenAiWindowCommand = new DelegateCommand(OpenAiWindow, () => BeWoApp.HasLoggedOnUserRight(UserRightType.AiModuleView));
mainNavigationView.OpenAiPopupCommand = new DelegateCommand(OpenAiPopup, () => BeWoApp.HasLoggedOnUserRight(UserRightType.AiModuleView2));
this.mainNavigationView.ArchiveButtonVisible =
mainNavigationView.Sorter = new OrganisationSorter();
mainNavigationView.ArchiveButtonVisible =
BeWoApp.LoggedOnUser.HasRight(UserRightType.Organisation_AllowArchiving);
this.mainNavigationView.ShowArchivedObjectsVisible = true;
mainNavigationView.ShowArchivedObjectsVisible = true;
}
private void OnLoaded(object sender, RoutedEventArgs e)
{
ReloadData(false);
}
private void mainNavigationView_CreateNewObject()
CommandManager.InvalidateRequerySuggested();
}
public Dictionary<TableID, long[]> GetVisibleInformationReferences()
{
var visible = mainNavigationView.objectListBox.ItemsSource;
return GetVisibleInformationReferences(visible);
}
private Dictionary<TableID, long[]> GetVisibleInformationReferences(IEnumerable visible_persons)
{
var oids = new List<long>();
foreach (var p in visible_persons)
{
var orga = p as CompactOrganisationDC;
oids.Add(orga.OrganisationOid);
}
var dict = new Dictionary<TableID, long[]>() {
{
TableID.Organisation, oids.ToArray()}
};
return dict;
}
private void OpenAiWindow()
{
var context = GetVisibleInformationReferences();
MainControl.WindowService.ShowAiConversationWindow(UIContext.Organisation, context);
}
private void OpenAiPopup()
{
var context = GetVisibleInformationReferences();
MainControl.WindowService.ShowAiConversationModalViewWindow(UIContext.Organisation, context);
}
private void mainNavigationView_CreateNewObject()
{
VMFactory.CreateOrganisationVMAsync(cb => this.Dispatch(delegate { this.MainControl.NavigateTo(new OrganisationView(cb) { ParentView = this }); }));
}

View File

@@ -114,19 +114,14 @@ namespace BeWo.View.Navigation
{
var context = GetVisibleInformationReferences();
var window = BeWoWindowBuilder.AiWindowBuilder.GetAiConversationWindow(UIContext.Person, context);
window?.ShowDialog();
MainControl.WindowService.ShowAiConversationWindow(UIContext.Person, context);
}
private void OpenAiPopup()
{
var context = GetVisibleInformationReferences();
var control = BeWoWindowBuilder.AiWindowBuilder.GetAiConversationControl(UIContext.Person, context);
if (control is object)
MainControl.ShowControlAsModalPopup(control);
MainControl.WindowService.ShowAiConversationModalViewWindow(UIContext.Person, context);
}
private void SupportConceptFilterComboBoxOnSelectionChanged(object o, SelectionChangedEventArgs selectionChangedEventArgs)

View File

@@ -1,68 +1,93 @@
<localView:BeWoView x:Class="BeWo.View.Navigation.SupportConceptNavigationView"
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:localNavView="clr-namespace:BeWo.View.Navigation"
xmlns:t="clr-namespace:BeWo.MultiLanguage.Markup"
Loaded="OnLoaded">
<Grid>
<Grid.Resources>
<DataTemplate x:Key="SupportConceptDetailInfoTemplate">
<ListView ItemsSource="{Binding}" Margin="5" HorizontalAlignment="Stretch" HorizontalContentAlignment="Stretch" Background="{x:Null}" BorderBrush="{x:Null}">
<ListView.ItemContainerStyle>
<Style TargetType="{x:Type ListBoxItem}">
<Setter Property="Focusable" Value="false" />
</Style>
</ListView.ItemContainerStyle>
<ListView.Resources>
<SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" Color="Transparent" />
<SolidColorBrush x:Key="{x:Static SystemColors.ControlBrushKey}" Color="Transparent" />
</ListView.Resources>
<ListView.ItemTemplate>
<DataTemplate>
<Grid>
<Border Margin="0 0 0 3" x:Name="ItemBorder" CornerRadius="5" MinHeight="30" Background="#FF000000">
<Border.OpacityMask>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#19000000" Offset="0" />
<GradientStop Color="#26000000" Offset="1" />
</LinearGradientBrush>
</Border.OpacityMask>
</Border>
<StackPanel Margin="5">
<localView:BeWoView
x:Class="BeWo.View.Navigation.SupportConceptNavigationView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:localNavView="clr-namespace:BeWo.View.Navigation"
xmlns:localView="clr-namespace:BeWo.View"
xmlns:t="clr-namespace:BeWo.MultiLanguage.Markup"
Loaded="OnLoaded">
<Grid>
<Grid.Resources>
<DataTemplate x:Key="SupportConceptDetailInfoTemplate">
<ListView
Margin="5"
HorizontalAlignment="Stretch"
HorizontalContentAlignment="Stretch"
Background="{x:Null}"
BorderBrush="{x:Null}"
ItemsSource="{Binding}">
<ListView.ItemContainerStyle>
<Style TargetType="{x:Type ListBoxItem}">
<Setter Property="Focusable" Value="false" />
</Style>
</ListView.ItemContainerStyle>
<ListView.Resources>
<SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" Color="Transparent" />
<SolidColorBrush x:Key="{x:Static SystemColors.ControlBrushKey}" Color="Transparent" />
</ListView.Resources>
<ListView.ItemTemplate>
<DataTemplate>
<Grid>
<Border
x:Name="ItemBorder"
MinHeight="30"
Margin="0,0,0,3"
Background="#FF000000"
CornerRadius="5">
<Border.OpacityMask>
<LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
<GradientStop Offset="0" Color="#19000000" />
<GradientStop Offset="1" Color="#26000000" />
</LinearGradientBrush>
</Border.OpacityMask>
</Border>
<StackPanel Margin="5">
<TextBlock Text="{Binding CostBearer, Converter={StaticResource StringFormatConverter}, ConverterParameter={t:Translate Kostenträger: \{0\}}}" FontSize="14" Foreground="#FFD2D2D2" FontFamily="Microsoft Sans Serif" />
<TextBlock
FontFamily="Microsoft Sans Serif"
FontSize="14"
Foreground="#FFD2D2D2"
Text="{Binding CostBearer, Converter={StaticResource StringFormatConverter}, ConverterParameter={t:Translate Kostenträger: \{0\}}}" />
<TextBlock FontSize="12" Foreground="#FFD2D2D2" FontFamily="Microsoft Sans Serif" Margin="5 5 0 0"
Text="{Binding ApprovedHours, Converter={StaticResource StringFormatConverter}, ConverterParameter=Genehmigte Stunden: \{0:0.##\}}" />
<TextBlock
Margin="5,5,0,0"
FontFamily="Microsoft Sans Serif"
FontSize="12"
Foreground="#FFD2D2D2"
Text="{Binding ApprovedHours, Converter={StaticResource StringFormatConverter}, ConverterParameter=Genehmigte Stunden: \{0:0.##\}}" />
<TextBlock FontSize="12" Foreground="#FFD2D2D2" FontFamily="Microsoft Sans Serif" Margin="5 2 0 0"
Text="{Binding RecordedHours, Converter={StaticResource StringFormatConverter}, ConverterParameter=Geleistete Stunden: \{0:0.##\}}" />
</StackPanel>
</Grid>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</DataTemplate>
</Grid.Resources>
<localNavView:MainNavigationView x:Name="mainNavigationView"
MainGroupHeader="{t:Translate Hilfepläne}"
CreateNewObject="mainNavigationView_CreateNewObject"
OpenObject="mainNavigationView_OpenObject"
DeleteObject="mainNavigationView_DeleteObject"
ArchiveObject="mainNavigationView_ArchiveObject"
DeleteDemands="DeleteAll, SupportConceptView_Delete"
CreateDemands="CreateAll, SupportConceptView_Create"
ExcelExport="mainNavigationView_ExcelExport"
Print="mainNavigationView_Print"
CopyObject="MainNavigation_CopyObject"
ImportObjects="MainNavigationView_OnImportObjects"
ShowDetailsPanel="True"
DetailPanelItemTemplate="{StaticResource SupportConceptDetailInfoTemplate}"
ContentGroupStyle="{StaticResource SupportConceptNavigationStyle}"
MainListItemStyle="{StaticResource SupportConceptDetailStyle}"
HistoryListItemStyle="{StaticResource SupportConceptHistoryStyle}"
OpenMailMergeWindow="MainNavigationView_OnOpenMailMergeWindow"
OnReloadData="MainNavigationView_OnReloadData"/>
</Grid>
<TextBlock
Margin="5,2,0,0"
FontFamily="Microsoft Sans Serif"
FontSize="12"
Foreground="#FFD2D2D2"
Text="{Binding RecordedHours, Converter={StaticResource StringFormatConverter}, ConverterParameter=Geleistete Stunden: \{0:0.##\}}" />
</StackPanel>
</Grid>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</DataTemplate>
</Grid.Resources>
<localNavView:MainNavigationView
x:Name="mainNavigationView"
ArchiveObject="mainNavigationView_ArchiveObject"
ContentGroupStyle="{StaticResource SupportConceptNavigationStyle}"
CopyObject="MainNavigation_CopyObject"
CreateDemands="CreateAll, SupportConceptView_Create"
CreateNewObject="mainNavigationView_CreateNewObject"
DeleteDemands="DeleteAll, SupportConceptView_Delete"
DeleteObject="mainNavigationView_DeleteObject"
DetailPanelItemTemplate="{StaticResource SupportConceptDetailInfoTemplate}"
ExcelExport="mainNavigationView_ExcelExport"
HistoryListItemStyle="{StaticResource SupportConceptHistoryStyle}"
ImportObjects="MainNavigationView_OnImportObjects"
MainGroupHeader="{t:Translate Hilfepläne}"
MainListItemStyle="{StaticResource SupportConceptDetailStyle}"
OnReloadData="MainNavigationView_OnReloadData"
OpenMailMergeWindow="MainNavigationView_OnOpenMailMergeWindow"
OpenObject="mainNavigationView_OpenObject"
Print="mainNavigationView_Print"
ShowDetailsPanel="True" />
</Grid>
</localView:BeWoView>

View File

@@ -23,6 +23,9 @@ using BeWo.MultiLanguage;
using BS.Shared.Translation;
using Microsoft.Win32;
using BeWo.View.Windows;
using DevExpress.Mvvm;
using System.Collections;
using System.Windows.Input;
namespace BeWo.View.Navigation
{
@@ -44,7 +47,10 @@ namespace BeWo.View.Navigation
{
this.InitializeComponent();
this.mainNavigationView.Sorter = new SupportConceptSorter();
mainNavigationView.OpenAiWindowCommand = new DelegateCommand(OpenAiWindow, () => BeWoApp.HasLoggedOnUserRight(UserRightType.AiModuleView));
mainNavigationView.OpenAiPopupCommand = new DelegateCommand(OpenAiPopup, () => BeWoApp.HasLoggedOnUserRight(UserRightType.AiModuleView2));
this.mainNavigationView.Sorter = new SupportConceptSorter();
this.mainNavigationView.ArchiveButtonVisible = BeWoApp.LoggedOnUser.HasRight(UserRightType.SupportConceptView_AllowArchiving);
this.mainNavigationView.ShowArchivedObjectsVisible = true;
@@ -194,7 +200,45 @@ namespace BeWo.View.Navigation
}
}
private void SupportConceptFilterComboBoxOnSelectionChanged(object o, SelectionChangedEventArgs selectionChangedEventArgs)
public Dictionary<TableID, long[]> GetVisibleInformationReferences()
{
var visible = mainNavigationView.objectListBox.ItemsSource;
return GetVisibleInformationReferences(visible);
}
private Dictionary<TableID, long[]> GetVisibleInformationReferences(IEnumerable visible_persons)
{
var oids = new List<long>();
foreach (var p in visible_persons)
{
var scdc = p as CompactSupportConceptDC;
oids.Add(scdc.SupportConceptOid);
}
var dict = new Dictionary<TableID, long[]>() {
{
TableID.SupportConcept, oids.ToArray()}
};
return dict;
}
private void OpenAiWindow()
{
var context = GetVisibleInformationReferences();
MainControl.WindowService.ShowAiConversationWindow(UIContext.SupportConcept, context);
}
private void OpenAiPopup()
{
var context = GetVisibleInformationReferences();
MainControl.WindowService.ShowAiConversationModalViewWindow(UIContext.SupportConcept, context);
}
private void SupportConceptFilterComboBoxOnSelectionChanged(object o, SelectionChangedEventArgs selectionChangedEventArgs)
{
//chkShowOnlyTeamSCs.IsChecked = false;
//BeWoApp.AppSettings.ShowOnlyMySupportConcepts = this.chkShowOnlyMySCs.IsChecked.Value;
@@ -232,7 +276,9 @@ namespace BeWo.View.Navigation
private void OnLoaded(object sender, RoutedEventArgs e)
{
ReloadData(false);
}
CommandManager.InvalidateRequerySuggested();
}
private void UpdateCustomFilter()
{

View File

@@ -1,58 +0,0 @@
using BeWo.View.Detail.AI;
using BS.Shared;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using static BeWo.View.Windows.BeWoWindowBuilder;
namespace BeWo.View.Windows
{
public class AiWindowBuilder
{
public Dictionary<UIContext, string> UIContext2Header { get; set; } = new Dictionary<UIContext, string>()
{
{UIContext.ServiceRecord, "Zeiterfassung KI Chat" },
{UIContext.Customer, "Klienten Übersicht KI Chat" },
};
public Window GetAiConversationWindow(UIContext uIContext, Dictionary<TableID, long[]> context, double height = 600, double width = 1200)
{
#if !DEBUG
BeWoApp.ShowInfoMessage("Diese Funktion befindet sich in der Testphase.");
return null;
#endif
string title = null;
UIContext2Header.TryGetValue(uIContext, out title);
if (string.IsNullOrEmpty(title))
title = "default";
var control = GetAiConversationControl(uIContext, context);
var window = GetAnimatedBeWoWindow(title, control, 400, height, 1000, 500, width, 1600);
return window;
}
public UserControl GetAiConversationControl(UIContext uIContext, Dictionary<TableID, long[]> context)
{
#if !DEBUG
BeWoApp.ShowInfoMessage("Diese Funktion befindet sich in der Testphase.");
return null;
#endif
var control = new AiConversationChatView();
control.ViewModel.UIContext = (int)uIContext;
control.ViewModel.ContextBeWoObjects = context;
return control;
}
}
}

View File

@@ -64,11 +64,6 @@ namespace BeWo.View.Windows
rootGroupBox.Content = fe;
}
public AnimatedBeWoWindow(FrameworkElement fe, string stylestring) : this(fe)
{
rootGroupBox.Style = (Style)FindResource(stylestring);
}
public void Window_Closing(object sender, CancelEventArgs e)
{
if (!closeStoryBoardCompleted && !isClosing)

View File

@@ -15,8 +15,6 @@ namespace BeWo.View.Windows
{
public static class BeWoWindowBuilder
{
public static AiWindowBuilder AiWindowBuilder { get; } = new AiWindowBuilder();
public static BeWoWindow GetTextViewer(string title, string text, bool fixed_size = false, double height = 600, double width = 600)
{
if (fixed_size)
@@ -86,32 +84,6 @@ namespace BeWo.View.Windows
return beWoWindow;
}
public static AnimatedBeWoWindow GetAnimatedBeWoWindow(string title, Control control, double min_height, double height, double max_height, double min_width, double width, double max_width)
{
var beWoWindow = new AnimatedBeWoWindow();
if (min_height > height || height > max_height)
throw new InvalidOperationException($"Window Height: {min_height} < {height} < {max_height}");
if (min_width > width || width > max_width)
throw new InvalidOperationException($"Window Width: {min_width} < {width} < {max_width}");
beWoWindow.Height = height;
beWoWindow.MinHeight = min_height;
beWoWindow.MaxHeight = max_height;
beWoWindow.Width = width;
beWoWindow.MinWidth = min_width;
beWoWindow.MaxHeight = max_width;
beWoWindow.WindowStartupLocation = WindowStartupLocation.CenterOwner;
beWoWindow.Owner = BeWoApp.CurrentBeWo.MainWindow;
beWoWindow.Title = title + " Fenster";
beWoWindow.rootGroupBox.Header = title;
beWoWindow.GroupBoxContent = control;
return beWoWindow;
}
public static void ShowErrorMessageBox(string text)
{
MessageBox.Show(text, "Fehler", MessageBoxButton.OK, MessageBoxImage.Asterisk);

View File

@@ -101,6 +101,8 @@ namespace BeWo.ViewModel
Temperature = pDataContract.Temperature;
Top_P = pDataContract.Top_P;
Max_Gen_Len = pDataContract.Max_Gen_Len;
SetDirty(false);
}
}
}

View File

@@ -9,6 +9,7 @@ namespace BeWo.ViewModel
{
public class AiConversationMessageVM : AbstractDCMapperVM<AiConversationMessageDC>
{
private bool _IsChecked;
private string _Message;
public AiConversationMessageVM(AiConversationMessageDC dc) : base(dc, dc.Oid is null)
@@ -16,6 +17,19 @@ namespace BeWo.ViewModel
}
public bool IsChecked
{
get { return _IsChecked; }
set
{
if (!AreDifferent(IsChecked, value))
return;
_IsChecked = value;
FirePropertyChanged(nameof(IsChecked));
}
}
public string Message
{
get { return _Message; }

View File

@@ -48,8 +48,9 @@ namespace BeWo.ViewModel.ListViewModel
public AbstractDCListMapperVM() : this(null) { }
public event EventHandler SelectedVMChanged;
public virtual int AddedCount
public virtual int AddedCount
{
get
{
@@ -94,7 +95,8 @@ namespace BeWo.ViewModel.ListViewModel
{
_SelectedVM = value;
FirePropertyChanged(nameof(SelectedVM));
}
SelectedVMChanged?.Invoke(this, EventArgs.Empty);
}
}
public override bool IsDirty

View File

@@ -1,10 +1,12 @@
using BeWo.ServiceProxy;
using BeWo.Core;
using BeWo.ServiceProxy;
using BS.Shared;
using BS.Shared.DataContracts;
using BS.Shared.DataContracts.Feature.AI;
using BS.Shared.Extensions;
using ChatController.Utilities.Extensions;
using DevExpress.Mvvm;
using DevExpress.Xpf.Editors;
using DevExpress.XtraPrinting.Native;
using System;
using System.Collections.Generic;
@@ -14,6 +16,8 @@ using System.Linq;
using System.Runtime.Remoting.Contexts;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Input;
using System.Windows.Markup;
using System.Windows.Threading;
@@ -21,13 +25,17 @@ namespace BeWo.ViewModel.ListViewModel
{
public class AiConversationListVM : AbstractDCListMapperVM<AiConversationDC, AiConversationVM>
{
private bool _IsSettingsOpen;
private bool _IsCloneOpen;
private bool _IsSending;
private string _MessageInput;
private string _ContextInput;
private AiModelDC _SelectedModel;
private AiConfigVM _Config;
public AiConversationListVM() : this(null)
public AiConversationListVM() : this(null)
{
if (BeWoApp.IsInDesignMode)
{
@@ -39,22 +47,35 @@ namespace BeWo.ViewModel.ListViewModel
{
Models = new ObservableSortCollection<AiModelDC>();
SendNewMessageCommand = new DelegateCommand(SendNewMessage, CanSendNewMessage);
RequestNewConversationCommand = new DelegateCommand(RequestNewConversation);
TestCommand = new DelegateCommand(Test);
SendNewMessageCommand = new DelegateCommand(SendNewMessage, () => SelectedVM is object && !string.IsNullOrWhiteSpace(MessageInput) && !IsSending);
RequestNewConversationCommand = new DelegateCommand(RequestNewConversation, () => BeWoApp.HasLoggedOnUserRight(UserRightType.AiModuleChatAdd));
//TestCommand = new DelegateCommand(Test);
ReloadConfigCommand = new DelegateCommand(ReloadConfig);
ReloadConversationsCommand = new DelegateCommand(ReloadConversations);
ReloadModelsCommand = new DelegateCommand(ReloadModels);
OpenSettingCommand = new DelegateCommand(OpenSetting, () => (BeWoApp.AppSettings?.ModuleAiSettingsEnabled ?? true) && BeWoApp.HasLoggedOnUserRight(UserRightType.AiModuleViewSetting));
OpenCloneCommand = new DelegateCommand(OpenClone, () => BeWoApp.HasLoggedOnUserRight(UserRightType.AiModuleChatClone) && SelectedVM is object);
CloneCommand = new DelegateCommand(Clone);
AskDeleteCommand = new DelegateCommand(AskDelete, () => BeWoApp.HasLoggedOnUserRight(UserRightType.AiModuleChatDelete) && SelectedVM is object);
}
public event EventHandler SendNewMessageSuccess;
public DelegateCommand SendNewMessageCommand { get; set; }
public DelegateCommand RequestNewConversationCommand { get; set; }
public DelegateCommand TestCommand { get; set; }
public DelegateCommand AskDeleteCommand { get; set; }
public DelegateCommand ReloadConfigCommand { get; set; }
public DelegateCommand ReloadConversationsCommand { get; set; }
public DelegateCommand ReloadModelsCommand { get; set; }
public DelegateCommand OpenSettingCommand { get; set; }
public DelegateCommand OpenCloneCommand { get; set; }
public DelegateCommand CloneCommand { get; set; }
public ObservableCollection<AiModelDC> Models { get; set; }
public AiModelDC SelectedModel
{
@@ -93,7 +114,6 @@ namespace BeWo.ViewModel.ListViewModel
FirePropertyChanged(nameof(MessageInput));
}
}
public string ContextInput
{
get { return _ContextInput; }
@@ -107,47 +127,99 @@ namespace BeWo.ViewModel.ListViewModel
}
}
public int UIContext{ get; set; }
public bool IsSettingsOpen
{
get => _IsSettingsOpen;
set
{
_IsSettingsOpen = value;
FirePropertyChanged(nameof(IsSettingsOpen));
}
}
public bool IsCloneOpen
{
get => _IsCloneOpen;
set
{
_IsCloneOpen = value;
FirePropertyChanged(nameof(IsCloneOpen));
}
}
public bool IsSending
{
get => _IsSending;
set
{
_IsSending = value;
FirePropertyChanged(nameof(IsSending));
}
}
public int UIContext { get; set; }
public long? ReferenceObjectOid { get; set; }
public Dictionary<TableID, long[]> ContextBeWoObjects { get; set; }
public void RequestNewConversation()
private void RequestNewConversation()
{
var conv = new AiConversationDC();
conv.UIContext = UIContext;
conv.ContextBeWoObjects = ContextBeWoObjects;
ServiceFacade.DoAiEnhancedServiceAsnyc(x => x.CreateAiConversation(conv, Config.SelectedModel.Oid.Value), dc => {
var vm = new AiConversationVM(dc);
VMList.Insert(0, vm);
SelectedVM = vm;
}, true, null);
ServiceFacade.DoAiEnhancedServiceAsnyc(x => x.CreateAiConversation(conv, Config.SelectedModel.Oid.Value), InsertConverstion);
}
public void SendNewMessage()
private void SendNewMessage()
{
var conv = SelectedVM;
if (IsSending)
throw new InvalidOperationException("Sendet bereits");
var msg_dc = new AiConversationMessageDC();
msg_dc.Message = MessageInput;
msg_dc.Role = BS.Shared.AiConversationMessageRole.User;
msg_dc.Created = DateTime.Now;
var msg_vm = new AiConversationMessageVM(msg_dc);
conv.Messages.VMList.Add(msg_vm);
ServiceFacade.DoAiEnhancedServiceAsnyc(x => x.SendNewMessage(conv.DataContract.Oid.Value, MessageInput), (messages) =>
IsSending = true;
try
{
if (messages.Count != 2)
throw new InvalidOperationException("message count: " + messages.Count);
var conv = SelectedVM;
msg_vm.DataContract = messages[0];
var msg_dc = new AiConversationMessageDC();
conv.Messages.VMList.Add(new AiConversationMessageVM(messages[1]));
});
msg_dc.Message = MessageInput;
msg_dc.Role = BS.Shared.AiConversationMessageRole.User;
msg_dc.Created = DateTime.Now;
var msg_vm = new AiConversationMessageVM(msg_dc);
conv.Messages.VMList.Add(msg_vm);
ServiceFacade.DoAiEnhancedServiceAsnyc(
x => x.SendNewMessage(conv.DataContract.Oid.Value, MessageInput),
(messages) =>
{
if (messages.Count != 2)
throw new InvalidOperationException("message count: " + messages.Count);
msg_vm.DataContract = messages[0];
conv.Messages.VMList.Add(new AiConversationMessageVM(messages[1]));
MessageInput = string.Empty;
IsSending = false;
SendNewMessageSuccess?.Invoke(this, EventArgs.Empty);
},
(exception) =>
{
conv.Messages.VMList.Remove(msg_vm);
IsSending = false;
}
);
}
catch (Exception ex) {
IsSending = false;
}
}
public void Test()
private void Test()
{
throw new NotImplementedException();
@@ -186,6 +258,13 @@ namespace BeWo.ViewModel.ListViewModel
//}
}
private void InsertConverstion(AiConversationDC dc)
{
var vm = new AiConversationVM(dc);
VMList.Insert(0, vm);
SelectedVM = vm;
}
private void ReloadConfig()
{
ServiceFacade.DoAiEnhancedServiceAsnyc(x => x.GetAiConfig(), (x) =>
@@ -220,8 +299,9 @@ namespace BeWo.ViewModel.ListViewModel
private void ReloadConversations()
{
var ui_context = UIContext;
var reference = ReferenceObjectOid;
ServiceFacade.DoAiEnhancedServiceAsnyc(x => x.GetAiConversations(ui_context), (x) =>
ServiceFacade.DoAiEnhancedServiceAsnyc(x => x.GetAiConversations(ui_context, reference), (x) =>
{
x.Reverse();
var vms = new AiConversationListVM(x);
@@ -229,11 +309,68 @@ namespace BeWo.ViewModel.ListViewModel
});
}
private bool CanSendNewMessage()
private void OpenSetting()
{
return SelectedVM is object;
ServiceFacade.DoAiEnhancedServiceAsnyc(x => x.GetAiModels(), (x) =>
{
Models.MakeEqualTo(x);
IsSettingsOpen = true;
});
}
private void OpenClone()
{
foreach (var message in SelectedVM.Messages.VMList)
{
message.IsChecked = true;
}
IsCloneOpen = true;
}
private void Clone()
{
var conv = SelectedVM;
AiConversationMessageVM last = null;
foreach (var msg in conv.Messages.VMList)
{
if (!msg.IsChecked)
break;
last = msg;
}
var conv_oid = conv.DataContract.Oid.Value;
var msg_oid = last?.DataContract.Oid;
ServiceFacade.DoAiEnhancedServiceAsnyc(x => x.CloneAiConversation(conv_oid, msg_oid), dc =>
{
InsertConverstion(dc);
CloseClone();
});
}
private void CloseClone()
{
IsCloneOpen = false;
}
public void AskDelete()
{
var selected = SelectedVM;
var oid = selected.DataContract.Oid.Value;
var msg = $"Wollen Sie die ausgewählte Konversation ({oid}) löschen?";
if (MessageBox.Show(msg, "Konversation löschen", MessageBoxButton.YesNo, MessageBoxImage.Warning) ==
MessageBoxResult.Yes)
{
ServiceFacade.DoAiEnhancedServiceAsnyc(x => x.DeleteAiConversation(oid), () => {
VMList.Remove(selected);
CommandManager.InvalidateRequerySuggested();
//SelectedVM = VMList.FirstOrDefault();
});
}
}
#region Designer
private void InitDesigner()
{
@@ -277,7 +414,7 @@ namespace BeWo.ViewModel.ListViewModel
message_dc2,
message_dc3,
};
var conversation_dc = new AiConversationDC()
{
Created = DateTime.Now,

View File

@@ -7,6 +7,7 @@ using DevExpress.XtraPrinting.Native;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
@@ -19,7 +20,36 @@ namespace BeWo.ViewModel.ListViewModel
public AiConversationMessageListVM() : this(null) { }
public AiConversationMessageListVM(List<AiConversationMessageDC> pDCs) : base(pDCs)
{
VMList.ListChanged += (s, e) =>
{
if (e.ListChangedType == ListChangedType.ItemChanged)
{
var changedItem = VMList[e.NewIndex];
Item_PropertyChanged(changedItem, new PropertyChangedEventArgs(nameof(AiConversationMessageVM.IsChecked)));
}
};
}
private void Item_PropertyChanged(object sender, PropertyChangedEventArgs e)
{
if (e.PropertyName == nameof(AiConversationMessageVM.IsChecked))
{
var changedItem = (AiConversationMessageVM)sender;
int index = VMList.IndexOf(changedItem);
if (changedItem.IsChecked)
{
for (int i = 0; i <= index; i++)
if (!VMList[i].IsChecked)
VMList[i].IsChecked = true;
}
else
{
for (int i = index; i < VMList.Count; i++)
if (VMList[i].IsChecked)
VMList[i].IsChecked = false;
}
}
}
}
}

View File

@@ -101,7 +101,6 @@ namespace BeWo.ViewModel
{IsUnterschriftRight, false},
{(r) => r == UserRightType.SupportConcept_ImportData, BeWoApp.AppSettings.ShowPersehImport},
{(r) => r == UserRightType.AiChatInZeiterfassung, BeWoApp.AppSettings.ShowAI},
{IsDakotaRight, BeWoApp.AppSettings.AllowGkvAbrechnung},
{IsAiModuleRight, BeWoApp.AppSettings.ModuleAiEnabled},
};
@@ -291,13 +290,8 @@ namespace BeWo.ViewModel
return true;
return false;
}
private static bool IsDakotaRight(UserRightType right)
=> right == UserRightType.Finance_Gkv_Create ||
right == UserRightType.Finance_Gkv_Delete ||
right == UserRightType.Finance_Gkv_Send ||
right == UserRightType.Finance_Gkv_View;
private static bool IsAiModuleRight(UserRightType right) =>
ContainsRight(right, UserRightType.AiModuleView, UserRightType.AiModuleView2, UserRightType.AiModuleChatAdd, UserRightType.AiModuleChatDelete, UserRightType.AiModuleChatEdit);
ContainsRight(right, UserRightType.AiModuleView, UserRightType.AiModuleView2, UserRightType.AiModuleChatAdd, UserRightType.AiModuleChatDelete, UserRightType.AiModuleChatEdit, UserRightType.AiModuleViewSetting, UserRightType.AiModuleChatClone);
private static bool ContainsRight(UserRightType right, params UserRightType[] rightTypes)
{

View File

@@ -204,7 +204,9 @@ namespace BeWo.Data.Security
|| r == UserRightType.AiModuleView2
|| r == UserRightType.AiModuleChatAdd
|| r == UserRightType.AiModuleChatDelete
|| r == UserRightType.AiModuleChatEdit;
|| r == UserRightType.AiModuleChatEdit
|| r == UserRightType.AiModuleChatClone
|| r == UserRightType.AiModuleViewSetting;
}
}
}

View File

@@ -457,6 +457,8 @@
<Content Include="Scripts\jquery-3.7.1.slim.min.map" />
<Content Include="Scripts\jquery-3.7.1.min.map" />
<Content Include="Scripts\jquery.mobile-1.4.5.min.map" />
<None Include="Web.Secrets.config.template" />
<Content Include="Web.Secrets.config" />
</ItemGroup>
<ItemGroup>
<Compile Include="Admin.aspx.cs">
@@ -638,7 +640,6 @@
if not exist "$(ProjectDir)binRelease" mkdir "$(ProjectDir)binRelease"
del "$(ProjectDir)binRelease\*" /Q
xcopy "$(SolutionDir)$(TargetName)\bin\" "$(ProjectDir)binRelease" /Y /I
del "$(ProjectDir)binRelease\*.pdb" /Q
del "$(ProjectDir)binRelease\*.xml" /Q
del "$(ProjectDir)binRelease\*.config" /Q
)</PostBuildEvent>

View File

@@ -0,0 +1,10 @@
//------------------------------------------------------------------------------
// Installation:
// Einfach diese Datei kopieren und den Kommentar hier oben entfernen.
// Ggf. um fehlende API Keys ergänzen
//------------------------------------------------------------------------------
<appSettings>
<add key="OpenWebUIKey" value=""/>
</appSettings>

View File

@@ -271,6 +271,7 @@
<add key="SmtpUser" value="bewoplaner.support@ownsoft.de" />
<add key="SmtpPassword" value="JJVjJntw2yaRDAxInotF" />
<add key="Recipient" value="error@bewoplaner.de" />
<add key="SupportEMail" value="support@bewoplaner.de" />
<add key="LicenseInfoUrl" value="https://support.bewoplaner.de/api/getlicensecount.php?k=[TENANT]" />
<add key="LicenseOrderUrl" value="https://support.bewoplaner.de/lizenzbestellung/?k=[TENANT]" />
@@ -307,7 +308,6 @@
<add key="SendMailModuleGkvReceiver" value="dakota.exchange@ownsoft.de" />
<add key="OpenWebUIUrl" value="https://owui1.ownsoft.de/"/>
<add key="OpenWebUIKey" value="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjMyNzJlZjc5LWRmZjEtNDdjYS05NWNlLWZhNjk1ZDdjZGQ4NCJ9.mhQZvSx_mY18J9nHUDTd36wWhDAOrzzlfG9FOS5MeSM"/>
</appSettings>
<!-- <> <> <> Appsettings <> <> <> -->
<devExpress>

View File

@@ -0,0 +1,80 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{C1FED668-ADB9-47E0-B589-1389618E1B6E}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>BEWODIREKTGmbH</RootNamespace>
<AssemblyName>8399918984_Reports</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\..\CustomerDlls\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>..\..\CustomerDlls\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="DevExpress.Drawing.v23.2, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.Data.v23.2, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.Office.v23.2.Core, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.RichEdit.v23.2.Core, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.RichEdit.v23.2.Export, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.Printing.v23.2.Core, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.Data.Desktop.v23.2, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.Utils.v23.2, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.XtraPrinting.v23.2, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.Charts.v23.2.Core, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.XtraCharts.v23.2, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.XtraReports.v23.2, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Service\CustomVacationService.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Data\Data.csproj">
<Project>{B0D73E3D-4AE7-4024-93A6-DB1F46D7CCEE}</Project>
<Name>Data</Name>
</ProjectReference>
<ProjectReference Include="..\..\Report\Report.csproj">
<Project>{40d8b312-ea64-49e3-a31a-5e57ed4d5654}</Project>
<Name>Report</Name>
</ProjectReference>
<ProjectReference Include="..\..\Service\Service.csproj">
<Project>{094331c3-ecee-4c89-bbfd-4c9ded89f0ef}</Project>
<Name>Service</Name>
</ProjectReference>
<ProjectReference Include="..\..\Shared\Shared.csproj">
<Project>{2f50b83d-a3f0-4ec4-979a-3f9b7e3d8ed4}</Project>
<Name>Shared</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

View File

@@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// Allgemeine Informationen über eine Assembly werden über die folgenden
// Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern,
// die einer Assembly zugeordnet sind.
[assembly: AssemblyTitle("KundeXyz")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("KundeXyz")]
[assembly: AssemblyCopyright("Copyright © 2020")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Durch Festlegen von ComVisible auf FALSE werden die Typen in dieser Assembly
// für COM-Komponenten unsichtbar. Wenn Sie auf einen Typ in dieser Assembly von
// COM aus zugreifen müssen, sollten Sie das ComVisible-Attribut für diesen Typ auf "True" festlegen.
[assembly: ComVisible(false)]
// Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird
[assembly: Guid("c1fed668-adb9-47e0-b589-1389618e1b6e")]
// Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten:
//
// Hauptversion
// Nebenversion
// Buildnummer
// Revision
//
// Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden,
// indem Sie "*" wie unten gezeigt eingeben:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

View File

@@ -0,0 +1,39 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BeWo.Report;
using BeWo.Report.ReportObjects;
using BeWo.Service.Plugins;
using DevExpress.XtraReports.UI;
namespace BEWODIREKTGmbH
{
public class CustomVacationService : VacationService
{
public override decimal CalcCorrectNumberOfLeaveDaysForSpecialContractSituation(DateTime entryDate, DateTime? endDate, int anzahlArbeitstage, int restlicheTageImJahr, decimal? urlaubstageProJahr)
{
decimal urlaubstage = 0;
if (urlaubstageProJahr == null)
urlaubstageProJahr = 0m;
if (entryDate.Day == 1 && entryDate.Month == 1 || entryDate.Day == 2 && entryDate.Month == 1) //Erster Tag im Jahr
{
//Prüfen, ob Enddatum Ende des Jahres oder früher ist
if (endDate == null || (endDate.HasValue && endDate.Value.Day == 31 && endDate.Value.Month == 12))
urlaubstage = (decimal)urlaubstageProJahr;
else
urlaubstage = (decimal)urlaubstageProJahr / 365m * restlicheTageImJahr;
}
else
{
urlaubstage = (decimal)urlaubstageProJahr / 365m * restlicheTageImJahr;
}
// Runden
urlaubstage = UrlaubstageRunden(urlaubstage);
return urlaubstage;
}
}
}

View File

@@ -89,6 +89,12 @@
<Compile Include="SettlementReport.Designer.cs">
<DependentUpon>SettlementReport.cs</DependentUpon>
</Compile>
<Compile Include="SettlementReport2.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="SettlementReport2.Designer.cs">
<DependentUpon>SettlementReport2.cs</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Data\Data.csproj">
@@ -122,6 +128,10 @@
<DependentUpon>SettlementReport.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="SettlementReport2.resx">
<DependentUpon>SettlementReport2.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<None Include="app.config" />

View File

@@ -0,0 +1 @@
DevExpress.XtraReports.UI.XtraReport, DevExpress.XtraReports.v23.2, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a

File diff suppressed because it is too large Load Diff

View File

@@ -117,7 +117,4 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="bindingSource1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root>

View File

@@ -29,12 +29,14 @@ namespace CaritasWuppertalSolingen
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
DevExpress.XtraReports.UI.XRWatermark xrWatermark1 = new DevExpress.XtraReports.UI.XRWatermark();
this.Detail = new DevExpress.XtraReports.UI.DetailBand();
this.xrTableServiceRecords1 = new DevExpress.XtraReports.UI.XRTable();
this.xrTableRow2 = new DevExpress.XtraReports.UI.XRTableRow();
this.xrTableCell3 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell5 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell9 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell6 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell12 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell1 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell2 = new DevExpress.XtraReports.UI.XRTableCell();
@@ -71,13 +73,15 @@ namespace CaritasWuppertalSolingen
this.xrTableCell34 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell35 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell36 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell7 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell37 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell38 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell4 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrPictureBox2 = new DevExpress.XtraReports.UI.XRPictureBox();
this.xrLabel1 = new DevExpress.XtraReports.UI.XRLabel();
this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components);
this.ReportFooter = new DevExpress.XtraReports.UI.ReportFooterBand();
this.xrLabel3 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel2 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel17 = new DevExpress.XtraReports.UI.XRLabel();
this.xrPictureBox1 = new DevExpress.XtraReports.UI.XRPictureBox();
this.xrPictureBox3 = new DevExpress.XtraReports.UI.XRPictureBox();
@@ -93,6 +97,7 @@ namespace CaritasWuppertalSolingen
this.fieldBillableFLS = new DevExpress.XtraReports.UI.CalculatedField();
this.fieldAbrechenbareFLS = new DevExpress.XtraReports.UI.CalculatedField();
this.customerCountField = new DevExpress.XtraReports.UI.CalculatedField();
this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components);
((System.ComponentModel.ISupportInitialize)(this.xrTableServiceRecords1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.xrTable1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.xrTable2)).BeginInit();
@@ -103,8 +108,8 @@ namespace CaritasWuppertalSolingen
//
this.Detail.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] {
this.xrTableServiceRecords1});
this.Detail.Font = new System.Drawing.Font("Arial", 10F);
this.Detail.HeightF = 18.00003F;
this.Detail.Font = new DevExpress.Drawing.DXFont("Arial", 10F);
this.Detail.HeightF = 38.83336F;
this.Detail.Name = "Detail";
this.Detail.Padding = new DevExpress.XtraPrinting.PaddingInfo(0, 0, 0, 0, 100F);
this.Detail.StylePriority.UseFont = false;
@@ -116,13 +121,13 @@ namespace CaritasWuppertalSolingen
this.xrTableServiceRecords1.Borders = ((DevExpress.XtraPrinting.BorderSide)((((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Top)
| DevExpress.XtraPrinting.BorderSide.Right)
| DevExpress.XtraPrinting.BorderSide.Bottom)));
this.xrTableServiceRecords1.Font = new System.Drawing.Font("Arial", 10F, System.Drawing.FontStyle.Bold);
this.xrTableServiceRecords1.Font = new DevExpress.Drawing.DXFont("Arial", 10F, DevExpress.Drawing.DXFontStyle.Bold);
this.xrTableServiceRecords1.LocationFloat = new DevExpress.Utils.PointFloat(0F, 0F);
this.xrTableServiceRecords1.Name = "xrTableServiceRecords1";
this.xrTableServiceRecords1.Padding = new DevExpress.XtraPrinting.PaddingInfo(0, 0, 0, 0, 100F);
this.xrTableServiceRecords1.Rows.AddRange(new DevExpress.XtraReports.UI.XRTableRow[] {
this.xrTableRow2});
this.xrTableServiceRecords1.SizeF = new System.Drawing.SizeF(745F, 18.00003F);
this.xrTableServiceRecords1.SizeF = new System.Drawing.SizeF(747F, 38.83336F);
this.xrTableServiceRecords1.StylePriority.UseBackColor = false;
this.xrTableServiceRecords1.StylePriority.UseFont = false;
this.xrTableServiceRecords1.StylePriority.UseTextAlignment = false;
@@ -134,6 +139,7 @@ namespace CaritasWuppertalSolingen
this.xrTableCell3,
this.xrTableCell5,
this.xrTableCell9,
this.xrTableCell6,
this.xrTableCell12,
this.xrTableCell1,
this.xrTableCell2});
@@ -141,7 +147,7 @@ namespace CaritasWuppertalSolingen
this.xrTableRow2.Padding = new DevExpress.XtraPrinting.PaddingInfo(0, 0, 0, 0, 100F);
this.xrTableRow2.StylePriority.UseFont = false;
this.xrTableRow2.StylePriority.UseTextAlignment = false;
this.xrTableRow2.Weight = 1D;
this.xrTableRow2.Weight = 2.1574053744754798D;
//
// xrTableCell3
//
@@ -150,22 +156,33 @@ namespace CaritasWuppertalSolingen
this.xrTableCell3.StylePriority.UseFont = false;
this.xrTableCell3.StylePriority.UseTextAlignment = false;
this.xrTableCell3.Text = "Datum";
this.xrTableCell3.Weight = 0.24385918004234175D;
this.xrTableCell3.Weight = 0.23155195826840228D;
//
// xrTableCell5
//
this.xrTableCell5.Name = "xrTableCell5";
this.xrTableCell5.Text = "Uhrzeit";
this.xrTableCell5.Weight = 0.35359580902731286D;
this.xrTableCell5.Weight = 0.28238044860824668D;
//
// xrTableCell9
//
this.xrTableCell9.Multiline = true;
this.xrTableCell9.Name = "xrTableCell9";
this.xrTableCell9.Padding = new DevExpress.XtraPrinting.PaddingInfo(5, 2, 0, 0, 100F);
this.xrTableCell9.StylePriority.UseFont = false;
this.xrTableCell9.StylePriority.UseTextAlignment = false;
this.xrTableCell9.Text = "Anzahl Minuten";
this.xrTableCell9.Weight = 0.29263101914685585D;
this.xrTableCell9.Text = "Fachleistung\r\nMinuten";
this.xrTableCell9.Weight = 0.32909015808977155D;
//
// xrTableCell6
//
this.xrTableCell6.Multiline = true;
this.xrTableCell6.Name = "xrTableCell6";
this.xrTableCell6.Padding = new DevExpress.XtraPrinting.PaddingInfo(5, 2, 0, 0, 100F);
this.xrTableCell6.StylePriority.UseFont = false;
this.xrTableCell6.StylePriority.UseTextAlignment = false;
this.xrTableCell6.Text = "Fehlkontakt\r\nMinuten";
this.xrTableCell6.Weight = 0.26120277288401827D;
//
// xrTableCell12
//
@@ -177,19 +194,19 @@ namespace CaritasWuppertalSolingen
this.xrTableCell12.StylePriority.UseTextAlignment = false;
this.xrTableCell12.Text = "Gruppe";
this.xrTableCell12.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
this.xrTableCell12.Weight = 0.26824509979493039D;
this.xrTableCell12.Weight = 0.26649646613383693D;
//
// xrTableCell1
//
this.xrTableCell1.Name = "xrTableCell1";
this.xrTableCell1.Text = "Mitarbeiter(in)";
this.xrTableCell1.Weight = 0.29263101784925583D;
this.xrTableCell1.Weight = 0.30944175873071955D;
//
// xrTableCell2
//
this.xrTableCell2.Name = "xrTableCell2";
this.xrTableCell2.Text = "Unterschrift Klient(in)";
this.xrTableCell2.Weight = 0.36578877213079231D;
this.xrTableCell2.Weight = 0.42921835442334955D;
//
// formattingRuleStartDate
//
@@ -207,7 +224,7 @@ namespace CaritasWuppertalSolingen
//
// xrTable1
//
this.xrTable1.Font = new System.Drawing.Font("Arial", 12F, System.Drawing.FontStyle.Bold);
this.xrTable1.Font = new DevExpress.Drawing.DXFont("Arial", 12F, DevExpress.Drawing.DXFontStyle.Bold);
this.xrTable1.LocationFloat = new DevExpress.Utils.PointFloat(0F, 0F);
this.xrTable1.Name = "xrTable1";
this.xrTable1.Rows.AddRange(new DevExpress.XtraReports.UI.XRTableRow[] {
@@ -232,7 +249,7 @@ namespace CaritasWuppertalSolingen
//
// xrTableCell22
//
this.xrTableCell22.Font = new System.Drawing.Font("Arial", 11F, System.Drawing.FontStyle.Bold);
this.xrTableCell22.Font = new DevExpress.Drawing.DXFont("Arial", 11F, DevExpress.Drawing.DXFontStyle.Bold);
this.xrTableCell22.Name = "xrTableCell22";
this.xrTableCell22.StylePriority.UseFont = false;
this.xrTableCell22.StylePriority.UseTextAlignment = false;
@@ -242,7 +259,7 @@ namespace CaritasWuppertalSolingen
//
// xrTableCell23
//
this.xrTableCell23.Font = new System.Drawing.Font("Arial", 11F, System.Drawing.FontStyle.Bold);
this.xrTableCell23.Font = new DevExpress.Drawing.DXFont("Arial", 11F, DevExpress.Drawing.DXFontStyle.Bold);
this.xrTableCell23.Name = "xrTableCell23";
this.xrTableCell23.StylePriority.UseFont = false;
this.xrTableCell23.StylePriority.UseTextAlignment = false;
@@ -260,7 +277,7 @@ namespace CaritasWuppertalSolingen
//
// cellAz
//
this.cellAz.Font = new System.Drawing.Font("Arial", 11F, System.Drawing.FontStyle.Bold);
this.cellAz.Font = new DevExpress.Drawing.DXFont("Arial", 11F, DevExpress.Drawing.DXFontStyle.Bold);
this.cellAz.Name = "cellAz";
this.cellAz.StylePriority.UseFont = false;
this.cellAz.StylePriority.UseTextAlignment = false;
@@ -272,7 +289,7 @@ namespace CaritasWuppertalSolingen
//
this.xrTableCell25.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "SupportConceptCostBearer.CustomerReferenceNumber")});
this.xrTableCell25.Font = new System.Drawing.Font("Arial", 11F, System.Drawing.FontStyle.Bold);
this.xrTableCell25.Font = new DevExpress.Drawing.DXFont("Arial", 11F, DevExpress.Drawing.DXFontStyle.Bold);
this.xrTableCell25.Name = "xrTableCell25";
this.xrTableCell25.StylePriority.UseFont = false;
this.xrTableCell25.StylePriority.UseTextAlignment = false;
@@ -290,7 +307,7 @@ namespace CaritasWuppertalSolingen
//
// xrTableCell26
//
this.xrTableCell26.Font = new System.Drawing.Font("Arial", 11F, System.Drawing.FontStyle.Bold);
this.xrTableCell26.Font = new DevExpress.Drawing.DXFont("Arial", 11F, DevExpress.Drawing.DXFontStyle.Bold);
this.xrTableCell26.Name = "xrTableCell26";
this.xrTableCell26.StylePriority.UseFont = false;
this.xrTableCell26.StylePriority.UseTextAlignment = false;
@@ -302,7 +319,7 @@ namespace CaritasWuppertalSolingen
//
this.xrTableCell27.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "ApprovedFLSTotal", "{0:0.##}")});
this.xrTableCell27.Font = new System.Drawing.Font("Arial", 11F, System.Drawing.FontStyle.Bold);
this.xrTableCell27.Font = new DevExpress.Drawing.DXFont("Arial", 11F, DevExpress.Drawing.DXFontStyle.Bold);
this.xrTableCell27.Name = "xrTableCell27";
this.xrTableCell27.StylePriority.UseFont = false;
this.xrTableCell27.StylePriority.UseTextAlignment = false;
@@ -320,7 +337,7 @@ namespace CaritasWuppertalSolingen
//
// xrTableCell28
//
this.xrTableCell28.Font = new System.Drawing.Font("Arial", 11F, System.Drawing.FontStyle.Bold);
this.xrTableCell28.Font = new DevExpress.Drawing.DXFont("Arial", 11F, DevExpress.Drawing.DXFontStyle.Bold);
this.xrTableCell28.Name = "xrTableCell28";
this.xrTableCell28.StylePriority.UseFont = false;
this.xrTableCell28.StylePriority.UseTextAlignment = false;
@@ -330,7 +347,7 @@ namespace CaritasWuppertalSolingen
//
// xrTableCell29
//
this.xrTableCell29.Font = new System.Drawing.Font("Arial", 11F, System.Drawing.FontStyle.Bold);
this.xrTableCell29.Font = new DevExpress.Drawing.DXFont("Arial", 11F, DevExpress.Drawing.DXFontStyle.Bold);
this.xrTableCell29.Name = "xrTableCell29";
this.xrTableCell29.StylePriority.UseFont = false;
this.xrTableCell29.StylePriority.UseTextAlignment = false;
@@ -348,7 +365,7 @@ namespace CaritasWuppertalSolingen
//
// xrTableCell30
//
this.xrTableCell30.Font = new System.Drawing.Font("Arial", 11F, System.Drawing.FontStyle.Bold);
this.xrTableCell30.Font = new DevExpress.Drawing.DXFont("Arial", 11F, DevExpress.Drawing.DXFontStyle.Bold);
this.xrTableCell30.Name = "xrTableCell30";
this.xrTableCell30.StylePriority.UseFont = false;
this.xrTableCell30.StylePriority.UseTextAlignment = false;
@@ -358,7 +375,7 @@ namespace CaritasWuppertalSolingen
//
// xrTableCell31
//
this.xrTableCell31.Font = new System.Drawing.Font("Arial", 11F, System.Drawing.FontStyle.Bold);
this.xrTableCell31.Font = new DevExpress.Drawing.DXFont("Arial", 11F, DevExpress.Drawing.DXFontStyle.Bold);
this.xrTableCell31.Name = "xrTableCell31";
this.xrTableCell31.StylePriority.UseFont = false;
this.xrTableCell31.StylePriority.UseTextAlignment = false;
@@ -376,7 +393,7 @@ namespace CaritasWuppertalSolingen
//
// xrTableCell32
//
this.xrTableCell32.Font = new System.Drawing.Font("Arial", 11F, System.Drawing.FontStyle.Bold);
this.xrTableCell32.Font = new DevExpress.Drawing.DXFont("Arial", 11F, DevExpress.Drawing.DXFontStyle.Bold);
this.xrTableCell32.Name = "xrTableCell32";
this.xrTableCell32.StylePriority.UseFont = false;
this.xrTableCell32.StylePriority.UseTextAlignment = false;
@@ -386,7 +403,7 @@ namespace CaritasWuppertalSolingen
//
// xrTableCell33
//
this.xrTableCell33.Font = new System.Drawing.Font("Arial", 11F, System.Drawing.FontStyle.Bold);
this.xrTableCell33.Font = new DevExpress.Drawing.DXFont("Arial", 11F, DevExpress.Drawing.DXFontStyle.Bold);
this.xrTableCell33.Name = "xrTableCell33";
this.xrTableCell33.StylePriority.UseFont = false;
this.xrTableCell33.StylePriority.UseTextAlignment = false;
@@ -417,7 +434,6 @@ namespace CaritasWuppertalSolingen
//
// topMarginBand1
//
this.topMarginBand1.HeightF = 100F;
this.topMarginBand1.Name = "topMarginBand1";
//
// bottomMarginBand1
@@ -446,13 +462,13 @@ namespace CaritasWuppertalSolingen
this.xrTable2.BorderColor = System.Drawing.Color.Black;
this.xrTable2.Borders = ((DevExpress.XtraPrinting.BorderSide)(((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Right)
| DevExpress.XtraPrinting.BorderSide.Bottom)));
this.xrTable2.Font = new System.Drawing.Font("Arial", 10F);
this.xrTable2.Font = new DevExpress.Drawing.DXFont("Arial", 10F);
this.xrTable2.LocationFloat = new DevExpress.Utils.PointFloat(0F, 0F);
this.xrTable2.Name = "xrTable2";
this.xrTable2.Padding = new DevExpress.XtraPrinting.PaddingInfo(0, 0, 0, 0, 100F);
this.xrTable2.Rows.AddRange(new DevExpress.XtraReports.UI.XRTableRow[] {
this.xrTableRow10});
this.xrTable2.SizeF = new System.Drawing.SizeF(745F, 45F);
this.xrTable2.SizeF = new System.Drawing.SizeF(747F, 45F);
this.xrTable2.StylePriority.UseFont = false;
this.xrTable2.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft;
//
@@ -462,6 +478,7 @@ namespace CaritasWuppertalSolingen
this.xrTableCell34,
this.xrTableCell35,
this.xrTableCell36,
this.xrTableCell7,
this.xrTableCell37,
this.xrTableCell38,
this.xrTableCell4});
@@ -481,7 +498,7 @@ namespace CaritasWuppertalSolingen
this.xrTableCell34.StylePriority.UseTextAlignment = false;
this.xrTableCell34.Text = "xrTableCell13";
this.xrTableCell34.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
this.xrTableCell34.Weight = 0.12588960336301602D;
this.xrTableCell34.Weight = 0.11151517520893943D;
//
// xrTableCell35
//
@@ -491,19 +508,34 @@ namespace CaritasWuppertalSolingen
this.xrTableCell35.StylePriority.UseTextAlignment = false;
this.xrTableCell35.Text = "xrTableCell6";
this.xrTableCell35.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
this.xrTableCell35.Weight = 0.18253989897361256D;
this.xrTableCell35.Weight = 0.13599417170679223D;
//
// xrTableCell36
//
this.xrTableCell36.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "Services.Minutes", "{0:0.##}")});
new DevExpress.XtraReports.UI.XRBinding("Text", null, "Services.Notice3")});
this.xrTableCell36.Name = "xrTableCell36";
this.xrTableCell36.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrTableCell36.StylePriority.UseFont = false;
this.xrTableCell36.StylePriority.UseTextAlignment = false;
this.xrTableCell36.Text = "xrTableCell16";
this.xrTableCell36.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
this.xrTableCell36.Weight = 0.1510674976251869D;
this.xrTableCell36.TextFormatString = "{0:#,#}";
this.xrTableCell36.Weight = 0.15848950969842021D;
//
// xrTableCell7
//
this.xrTableCell7.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "Services.Notice4")});
this.xrTableCell7.Multiline = true;
this.xrTableCell7.Name = "xrTableCell7";
this.xrTableCell7.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrTableCell7.StylePriority.UseFont = false;
this.xrTableCell7.StylePriority.UseTextAlignment = false;
this.xrTableCell7.Text = "xrTableCell7";
this.xrTableCell7.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
this.xrTableCell7.TextFormatString = "{0:#,#}";
this.xrTableCell7.Weight = 0.12579519213807711D;
//
// xrTableCell37
//
@@ -516,7 +548,7 @@ namespace CaritasWuppertalSolingen
this.xrTableCell37.StylePriority.UseTextAlignment = false;
this.xrTableCell37.Text = "xrTableCell17";
this.xrTableCell37.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
this.xrTableCell37.Weight = 0.138478534641708D;
this.xrTableCell37.Weight = 0.12834446477247974D;
//
// xrTableCell38
//
@@ -526,7 +558,7 @@ namespace CaritasWuppertalSolingen
this.xrTableCell38.StylePriority.UseTextAlignment = false;
this.xrTableCell38.Text = "xrTableCell2";
this.xrTableCell38.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
this.xrTableCell38.Weight = 0.15106750229714766D;
this.xrTableCell38.Weight = 0.14902666631516082D;
//
// xrTableCell4
//
@@ -536,7 +568,7 @@ namespace CaritasWuppertalSolingen
this.xrTableCell4.Name = "xrTableCell4";
this.xrTableCell4.StylePriority.UseTextAlignment = false;
this.xrTableCell4.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft;
this.xrTableCell4.Weight = 0.18883435805247803D;
this.xrTableCell4.Weight = 0.20671127486834998D;
//
// xrPictureBox2
//
@@ -556,7 +588,7 @@ namespace CaritasWuppertalSolingen
this.xrLabel1.CanShrink = true;
this.xrLabel1.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "Services.SignatureDate", "{0:dd.MM.yyyy}")});
this.xrLabel1.Font = new System.Drawing.Font("Arial", 9F);
this.xrLabel1.Font = new DevExpress.Drawing.DXFont("Arial", 9F);
this.xrLabel1.LocationFloat = new DevExpress.Utils.PointFloat(0F, 0F);
this.xrLabel1.Multiline = true;
this.xrLabel1.Name = "xrLabel1";
@@ -566,15 +598,12 @@ namespace CaritasWuppertalSolingen
this.xrLabel1.StylePriority.UseFont = false;
this.xrLabel1.StylePriority.UseTextAlignment = false;
this.xrLabel1.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft;
//this.xrLabel1.BeforePrint += new DevExpress.XtraReports.UI.BeforePrintEventHandler(this.xrPictureBox1_BeforePrint);
//
// bindingSource1
//
this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.ServicesOverviewRO);
//
// ReportFooter
//
this.ReportFooter.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] {
this.xrLabel3,
this.xrLabel2,
this.xrLabel17,
this.xrPictureBox1,
this.xrPictureBox3,
@@ -590,12 +619,43 @@ namespace CaritasWuppertalSolingen
this.ReportFooter.HeightF = 204.1667F;
this.ReportFooter.Name = "ReportFooter";
//
// xrLabel3
//
this.xrLabel3.Font = new DevExpress.Drawing.DXFont("Arial", 10F);
this.xrLabel3.LocationFloat = new DevExpress.Utils.PointFloat(391.0418F, 0F);
this.xrLabel3.Multiline = true;
this.xrLabel3.Name = "xrLabel3";
this.xrLabel3.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrLabel3.SizeF = new System.Drawing.SizeF(94.375F, 53.4167F);
this.xrLabel3.StylePriority.UseFont = false;
this.xrLabel3.StylePriority.UseTextAlignment = false;
this.xrLabel3.Text = "Summe Fehlkontakte";
this.xrLabel3.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft;
//
// xrLabel2
//
this.xrLabel2.Borders = ((DevExpress.XtraPrinting.BorderSide)(((DevExpress.XtraPrinting.BorderSide.Top | DevExpress.XtraPrinting.BorderSide.Right)
| DevExpress.XtraPrinting.BorderSide.Bottom)));
this.xrLabel2.BorderWidth = 2F;
this.xrLabel2.Font = new DevExpress.Drawing.DXFont("Arial", 10F, DevExpress.Drawing.DXFontStyle.Bold);
this.xrLabel2.LocationFloat = new DevExpress.Utils.PointFloat(298.5414F, 0F);
this.xrLabel2.Name = "xrLabel2";
this.xrLabel2.Padding = new DevExpress.XtraPrinting.PaddingInfo(3, 3, 0, 0, 100F);
this.xrLabel2.SizeF = new System.Drawing.SizeF(92.50043F, 53.42F);
this.xrLabel2.StylePriority.UseBorders = false;
this.xrLabel2.StylePriority.UseBorderWidth = false;
this.xrLabel2.StylePriority.UseFont = false;
this.xrLabel2.StylePriority.UsePadding = false;
this.xrLabel2.StylePriority.UseTextAlignment = false;
this.xrLabel2.Text = "[TotalFLMFehlkontakte] = [TotalFLSFehlkontakte!0.##] Std.";
this.xrLabel2.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
//
// xrLabel17
//
this.xrLabel17.BackColor = System.Drawing.Color.Transparent;
this.xrLabel17.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "EmployeeSignatureDate", "{0:dd.MM.yyyy}")});
this.xrLabel17.Font = new System.Drawing.Font("Arial", 10F);
this.xrLabel17.Font = new DevExpress.Drawing.DXFont("Arial", 10F);
this.xrLabel17.LocationFloat = new DevExpress.Utils.PointFloat(424.0926F, 143.6667F);
this.xrLabel17.Name = "xrLabel17";
this.xrLabel17.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
@@ -608,7 +668,7 @@ namespace CaritasWuppertalSolingen
// xrPictureBox1
//
this.xrPictureBox1.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Image", null, "EmployeeSignature")});
new DevExpress.XtraReports.UI.XRBinding("ImageSource", null, "EmployeeSignature")});
this.xrPictureBox1.LocationFloat = new DevExpress.Utils.PointFloat(561.4214F, 143.6667F);
this.xrPictureBox1.Name = "xrPictureBox1";
this.xrPictureBox1.Scripts.OnBeforePrint = "xrPictureBox1_BeforePrint";
@@ -618,7 +678,7 @@ namespace CaritasWuppertalSolingen
// xrPictureBox3
//
this.xrPictureBox3.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Image", null, "CustomerSignature")});
new DevExpress.XtraReports.UI.XRBinding("ImageSource", null, "CustomerSignature")});
this.xrPictureBox3.LocationFloat = new DevExpress.Utils.PointFloat(137.3333F, 143.6667F);
this.xrPictureBox3.Name = "xrPictureBox3";
this.xrPictureBox3.SizeF = new System.Drawing.SizeF(183.5736F, 35.50002F);
@@ -628,7 +688,7 @@ namespace CaritasWuppertalSolingen
//
this.xrLabel18.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "CustomerSignatureDate", "{0:dd.MM.yyyy}")});
this.xrLabel18.Font = new System.Drawing.Font("Arial", 10F);
this.xrLabel18.Font = new DevExpress.Drawing.DXFont("Arial", 10F);
this.xrLabel18.LocationFloat = new DevExpress.Utils.PointFloat(0F, 143.6667F);
this.xrLabel18.Name = "xrLabel18";
this.xrLabel18.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
@@ -641,7 +701,7 @@ namespace CaritasWuppertalSolingen
// xrLabel6
//
this.xrLabel6.Borders = DevExpress.XtraPrinting.BorderSide.Top;
this.xrLabel6.Font = new System.Drawing.Font("Arial", 10F);
this.xrLabel6.Font = new DevExpress.Drawing.DXFont("Arial", 10F);
this.xrLabel6.LocationFloat = new DevExpress.Utils.PointFloat(0F, 179.1667F);
this.xrLabel6.Name = "xrLabel6";
this.xrLabel6.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
@@ -655,7 +715,7 @@ namespace CaritasWuppertalSolingen
// xrLabel7
//
this.xrLabel7.Borders = DevExpress.XtraPrinting.BorderSide.Top;
this.xrLabel7.Font = new System.Drawing.Font("Arial", 10F);
this.xrLabel7.Font = new DevExpress.Drawing.DXFont("Arial", 10F);
this.xrLabel7.LocationFloat = new DevExpress.Utils.PointFloat(525.8428F, 179.1667F);
this.xrLabel7.Name = "xrLabel7";
this.xrLabel7.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
@@ -669,7 +729,7 @@ namespace CaritasWuppertalSolingen
// xrLabel10
//
this.xrLabel10.Borders = DevExpress.XtraPrinting.BorderSide.Top;
this.xrLabel10.Font = new System.Drawing.Font("Arial", 10F);
this.xrLabel10.Font = new DevExpress.Drawing.DXFont("Arial", 10F);
this.xrLabel10.LocationFloat = new DevExpress.Utils.PointFloat(101.7499F, 179.1667F);
this.xrLabel10.Name = "xrLabel10";
this.xrLabel10.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
@@ -683,7 +743,7 @@ namespace CaritasWuppertalSolingen
// xrLabel11
//
this.xrLabel11.Borders = DevExpress.XtraPrinting.BorderSide.Top;
this.xrLabel11.Font = new System.Drawing.Font("Arial", 10F);
this.xrLabel11.Font = new DevExpress.Drawing.DXFont("Arial", 10F);
this.xrLabel11.LocationFloat = new DevExpress.Utils.PointFloat(424.0926F, 179.1667F);
this.xrLabel11.Name = "xrLabel11";
this.xrLabel11.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
@@ -697,47 +757,48 @@ namespace CaritasWuppertalSolingen
// lblWithFactor
//
this.lblWithFactor.CanShrink = true;
this.lblWithFactor.Font = new System.Drawing.Font("Arial", 10F);
this.lblWithFactor.LocationFloat = new DevExpress.Utils.PointFloat(9.998268F, 53.4167F);
this.lblWithFactor.Font = new DevExpress.Drawing.DXFont("Arial", 10F);
this.lblWithFactor.LocationFloat = new DevExpress.Utils.PointFloat(9.998322F, 53.4167F);
this.lblWithFactor.Multiline = true;
this.lblWithFactor.Name = "lblWithFactor";
this.lblWithFactor.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.lblWithFactor.SizeF = new System.Drawing.SizeF(233.96F, 53.42F);
this.lblWithFactor.SizeF = new System.Drawing.SizeF(172.0016F, 53.42F);
this.lblWithFactor.StylePriority.UseFont = false;
this.lblWithFactor.Text = "2. Summe der abzurechnenden Leistungen (= 1 x 1,2)\r\n";
this.lblWithFactor.StylePriority.UseTextAlignment = false;
this.lblWithFactor.Text = "2. Summe abzurechnende Leistungen (= 1 x 1,2)\r\n";
this.lblWithFactor.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight;
//
// lblSumWithFactor
//
this.lblSumWithFactor.Borders = ((DevExpress.XtraPrinting.BorderSide)((((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Top)
| DevExpress.XtraPrinting.BorderSide.Right)
this.lblSumWithFactor.Borders = ((DevExpress.XtraPrinting.BorderSide)(((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Right)
| DevExpress.XtraPrinting.BorderSide.Bottom)));
this.lblSumWithFactor.BorderWidth = 2F;
this.lblSumWithFactor.CanShrink = true;
this.lblSumWithFactor.Font = new System.Drawing.Font("Arial", 10F, System.Drawing.FontStyle.Bold);
this.lblSumWithFactor.LocationFloat = new DevExpress.Utils.PointFloat(243.96F, 53.42F);
this.lblSumWithFactor.Font = new DevExpress.Drawing.DXFont("Arial", 10F, DevExpress.Drawing.DXFontStyle.Bold);
this.lblSumWithFactor.LocationFloat = new DevExpress.Utils.PointFloat(182F, 53.42F);
this.lblSumWithFactor.Multiline = true;
this.lblSumWithFactor.Name = "lblSumWithFactor";
this.lblSumWithFactor.Padding = new DevExpress.XtraPrinting.PaddingInfo(3, 3, 0, 0, 100F);
this.lblSumWithFactor.SizeF = new System.Drawing.SizeF(121F, 54.21F);
this.lblSumWithFactor.SizeF = new System.Drawing.SizeF(116.5414F, 54.21F);
this.lblSumWithFactor.StylePriority.UseBorders = false;
this.lblSumWithFactor.StylePriority.UseBorderWidth = false;
this.lblSumWithFactor.StylePriority.UseFont = false;
this.lblSumWithFactor.StylePriority.UsePadding = false;
this.lblSumWithFactor.StylePriority.UseTextAlignment = false;
this.lblSumWithFactor.Text = "[fieldBillableFLS!0.##] x 1,2 = [fieldAbrechenbareFLS!0.##] Std.";
this.lblSumWithFactor.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
//
// xrLabel15
//
this.xrLabel15.Font = new System.Drawing.Font("Arial", 10F);
this.xrLabel15.LocationFloat = new DevExpress.Utils.PointFloat(9.999964F, 0F);
this.xrLabel15.Font = new DevExpress.Drawing.DXFont("Arial", 10F);
this.xrLabel15.LocationFloat = new DevExpress.Utils.PointFloat(9.999974F, 0F);
this.xrLabel15.Multiline = true;
this.xrLabel15.Name = "xrLabel15";
this.xrLabel15.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrLabel15.SizeF = new System.Drawing.SizeF(233.9583F, 53.4167F);
this.xrLabel15.SizeF = new System.Drawing.SizeF(172F, 53.4167F);
this.xrLabel15.StylePriority.UseFont = false;
this.xrLabel15.Text = "1. Summe der unmittelbaren \r\nBetreuungsleistungen („face-to-face“ \r\nBeziehungswei" +
"se „ear-to-ear):\r\n";
this.xrLabel15.StylePriority.UseTextAlignment = false;
this.xrLabel15.Text = "1. Summe Fachleistungen (face-to-face bzw. \r\near-to-ear)\r\n";
this.xrLabel15.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight;
//
// xrLabel16
//
@@ -745,17 +806,17 @@ namespace CaritasWuppertalSolingen
| DevExpress.XtraPrinting.BorderSide.Right)
| DevExpress.XtraPrinting.BorderSide.Bottom)));
this.xrLabel16.BorderWidth = 2F;
this.xrLabel16.Font = new System.Drawing.Font("Arial", 10F, System.Drawing.FontStyle.Bold);
this.xrLabel16.LocationFloat = new DevExpress.Utils.PointFloat(243.96F, 0F);
this.xrLabel16.Font = new DevExpress.Drawing.DXFont("Arial", 10F, DevExpress.Drawing.DXFontStyle.Bold);
this.xrLabel16.LocationFloat = new DevExpress.Utils.PointFloat(182F, 0F);
this.xrLabel16.Name = "xrLabel16";
this.xrLabel16.Padding = new DevExpress.XtraPrinting.PaddingInfo(3, 3, 0, 0, 100F);
this.xrLabel16.SizeF = new System.Drawing.SizeF(121F, 53.42F);
this.xrLabel16.SizeF = new System.Drawing.SizeF(116.5414F, 53.42F);
this.xrLabel16.StylePriority.UseBorders = false;
this.xrLabel16.StylePriority.UseBorderWidth = false;
this.xrLabel16.StylePriority.UseFont = false;
this.xrLabel16.StylePriority.UsePadding = false;
this.xrLabel16.StylePriority.UseTextAlignment = false;
this.xrLabel16.Text = "[TotalFLMBillable] = [fieldBillableFLS!0.##] Std.";
this.xrLabel16.Text = "[TotalFLMoFehlkontakte] = [TotalFLSoFehlkontakte!0.##] Std.";
this.xrLabel16.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
//
// fieldBillableFLS
@@ -778,6 +839,10 @@ namespace CaritasWuppertalSolingen
this.customerCountField.FieldType = DevExpress.XtraReports.UI.FieldType.String;
this.customerCountField.Name = "customerCountField";
//
// bindingSource1
//
this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.ServicesOverviewRO);
//
// Stundenzettel
//
this.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] {
@@ -797,11 +862,13 @@ namespace CaritasWuppertalSolingen
this.formattingRuleServiceDesc,
this.formattingRuleCostBearer,
this.formattingRuleEmployeeName});
this.Margins = new System.Drawing.Printing.Margins(50, 30, 100, 63);
this.Margins = new DevExpress.Drawing.DXMargins(50F, 30F, 100F, 63F);
this.PageHeight = 1169;
this.PageWidth = 827;
this.PaperKind = DevExpress.Drawing.Printing.DXPaperKind.A4;
this.Version = "17.1";
this.Version = "23.2";
xrWatermark1.Id = "Watermark1";
this.Watermarks.Add(xrWatermark1);
((System.ComponentModel.ISupportInitialize)(this.xrTableServiceRecords1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.xrTable1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.xrTable2)).EndInit();
@@ -876,5 +943,9 @@ namespace CaritasWuppertalSolingen
private DevExpress.XtraReports.UI.XRPictureBox xrPictureBox1;
private DevExpress.XtraReports.UI.XRPictureBox xrPictureBox3;
private DevExpress.XtraReports.UI.XRLabel xrLabel18;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell6;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell7;
private DevExpress.XtraReports.UI.XRLabel xrLabel3;
private DevExpress.XtraReports.UI.XRLabel xrLabel2;
}
}

View File

@@ -1,6 +1,5 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using System.IO;
using System.Text;
using System.Text.RegularExpressions;
@@ -26,8 +25,8 @@ namespace CaritasWuppertalSolingen
public void SetReportDataSource(ServicesOverviewRO pRO)
{
var org = GetOrganisation(pRO);
decimal rateFactor = GetRateFactor(pRO);
var org = GetOrganisation(pRO);
if (org != null)
{
if (org.Name.Contains("Jugendamt"))
@@ -36,21 +35,19 @@ namespace CaritasWuppertalSolingen
lblWithFactor.Visible = false;
lblSumWithFactor.Visible = false;
}
var rateFactor = GetRateFactor(pRO);
lblWithFactor.Text = String.Format("2. Summe der abzurechnenden Leistungen (= 1 x {0:0.0})", rateFactor);
lblSumWithFactor.Text = String.Format("{0:0.##} x {1:0.0} = {2:0.##} Std.", pRO.TotalFLMBillable/60,
rateFactor, (pRO.TotalFLMBillable/60)*(double)rateFactor);
lblWithFactor.Text = String.Format("2. Summe abzurechnende Leistungen (= 1 x {0:0.0})", rateFactor);
}
if (pRO.Services != null)
{
List<ServicesOverviewRO.ServiceDetail> servicesBillable = new List<ServicesOverviewRO.ServiceDetail>();
double flMinutes = 0;
double fkMinutes = 0;
foreach (var sd in pRO.Services)
{
if (sd.IsBillable)
if (sd.IsBillable || sd.ServiceDescription.ToLower().Contains("fehlkontakt") || sd.ServiceCategory.ToLower().Contains("fehlkontakt"))
{
ServicesOverviewRO.CreateSignatureString(sd);
@@ -83,10 +80,24 @@ namespace CaritasWuppertalSolingen
sd.EmployeeAbbr = ma.ToString();
}
if (sd.ServiceDescription.ToLower().Contains("fehlkontakt") || sd.ServiceCategory.ToLower().Contains("fehlkontakt") || (sd.ProzentAbrechenbar < 100))
{
sd.Notice4 = String.Format("{0}", sd.Minutes);
fkMinutes += sd.Minutes;
}
else
{
sd.Notice3 = String.Format("{0}", sd.Minutes);
flMinutes += sd.Minutes;
}
servicesBillable.Add(sd);
}
}
lblSumWithFactor.Text = String.Format("{0:0.##} x {1:0.0} = {2:0.##} Std.", flMinutes/60,
rateFactor, (flMinutes/60)*(double)rateFactor);
pRO.Services = servicesBillable;
}
bindingSource1.DataSource = pRO;
@@ -124,7 +135,6 @@ namespace CaritasWuppertalSolingen
private void xrPictureBox2_BeforePrint(object sender, System.ComponentModel.CancelEventArgs e)
{
XRPictureBox xrBox = sender as XRPictureBox;
//var test = this.GetCurrent
string base64String = xrBox.Tag as string;
if (!String.IsNullOrWhiteSpace(base64String))
{

View File

@@ -117,7 +117,4 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="bindingSource1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>21, 17</value>
</metadata>
</root>

File diff suppressed because it is too large Load Diff

View File

@@ -6,7 +6,7 @@ using BeWo.Report;
using BeWo.Report.ReportObjects;
using BS.Shared.DataContracts;
namespace CaritasWuppertalSolingen
namespace CaritasWuppertalSolingen.Alt
{
public partial class Spitzabrechnung : DevExpress.XtraReports.UI.XtraReport, IBeWoReport<SettlementRO>
{

View File

@@ -117,7 +117,4 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="bindingSource1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root>

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,73 @@
using System;
using DevExpress.XtraReports.UI;
using BeWo.Report.ReportObjects;
using BeWo.Report;
using BS.Shared.Extensions;
namespace CaritasWuppertalSolingen
{
public partial class Spitzabrechnung : DevExpress.XtraReports.UI.XtraReport, IBeWoReport<Settlement2RO>
{
public Spitzabrechnung()
{
InitializeComponent();
}
public void SetReportDataSource(Settlement2RO pRO)
{
bool isBeWo67 = false;
bool isJugendamt = false;
if (!String.IsNullOrEmpty(pRO.RecipientOrganisation))
{
if (pRO.RecipientOrganisation == "LVR 2")
{
isBeWo67 = true;
}
else if (pRO.RecipientOrganisation.Contains("Jugendamt"))
{
isJugendamt = true;
}
pRO.RecipientOrganisation = pRO.RecipientOrganisation.Replace("LVR 1", "LVR");
pRO.RecipientOrganisation = pRO.RecipientOrganisation.Replace("LVR 2", "LVR");
}
if (isBeWo67)
{
lblBetreuungskosten.Text = "Betreuungskostenabrechnung § 67 SGB XII";
}
else if (isJugendamt)
{
lblBetreuungskosten.Text = "Betreuungskostenabrechnung § 35a SGB XII";
}
if (String.IsNullOrEmpty(pRO.Notice))
{
lblNotice.Visible = false;
}
decimal rateFactor = 1;
foreach (var ii in pRO.InvoiceItems)
{
if (ii.RateFactor.HasValue)
{
rateFactor = (100 + ii.RateFactor.Value) / 100;
}
if (!pRO.FehlkontakteString.IsNullOrEmpty() && ii.RateFactor == 0)
{
Zwischensumme.Visible = true;
ii.AbrechnungsText = ii.AbrechnungsText.Replace("FLS", "Std.");
ii.ItemDescription = "Fehlkontakte";
}
else if (ii.ItemDescription.IsNullOrEmpty())
{
ii.ItemDescription = "Fachleistungsstunden";
}
}
pRO.RateFactor = (double)rateFactor;
this.bindingSource1.DataSource = pRO;
}
}
}

View File

@@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@@ -0,0 +1,31 @@
using System;
using System.Collections.Generic;
using System.Configuration;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml;
namespace BeWo.Service.Core
{
public static class MergedConfig
{
public static string GetSetting(string key)
{
// 1. Versuche, aus AppSettings.local.config zu lesen
var localConfigPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Web.Secrets.config");
if (File.Exists(localConfigPath))
{
var xml = new XmlDocument();
xml.Load(localConfigPath);
var node = xml.SelectSingleNode($"/appSettings/add[@key='{key}']");
if (node is XmlElement element)
return element.GetAttribute("value");
}
// 2. Fallback: Standard-AppSettings
return ConfigurationManager.AppSettings[key];
}
}
}

View File

@@ -5,12 +5,13 @@ using System.Linq;
using BeWo.Data.Entities;
using BeWo.Service.Core;
using BeWo.Service.Interfaces;
using BS.Shared;
using BS.Shared.Extensions;
namespace BeWo.Service.DCEntityMapper
{
public abstract class AbstractIDCEntityMapper<TEntity, TDC> : IDCEntityMapper<TEntity, TDC>
public abstract class AbstractIDCEntityMapper<TEntity, TDC> : IDCEntityMapper<TEntity, TDC>, IJsonMapper<TEntity, TDC>
where TDC : new() where TEntity : BeWoEntityBase, new()
{
public bool ConcurrencyCheck(long? pDataContractVersion, BeWoEntityBase pEntity)

View File

@@ -40,6 +40,7 @@ namespace BeWo.Service.DCEntityMapper
{
var dict = new Dictionary<string, object>()
{
{"EmployeeOid", pDC.EmployeeOid },
{"PersonellNumber", pDC.PersonnelNumber },
{"FullName", pDC.FirstNameLastName },
};

View File

@@ -57,12 +57,29 @@ namespace BeWo.Service.DCEntityMapper
return pDC.OrganisationOid == pEntity.Oid;
}
//public override CompactOrganisationDC CreateNewDC()
//{
// CompactOrganisationDC dc = new CompactOrganisationDC();
// dc.CostRatePeriods = new List<CostRatePeriodDC>();
// return dc;
//}
}
//public override CompactOrganisationDC CreateNewDC()
//{
// CompactOrganisationDC dc = new CompactOrganisationDC();
// dc.CostRatePeriods = new List<CostRatePeriodDC>();
// return dc;
//}
public override Dictionary<string, object> ToJsonDictionary(CompactOrganisationDC pDC)
{
var jsonObject = new Dictionary<string, object>()
{
{"OrganisationOid", pDC.OrganisationOid },
{"Name", pDC.Name },
{"Abteilung", pDC.Name2 },
{"Kundennummer", pDC.DebitorNumber },
{"Geschäftspartnernummer", pDC.BusinessPartnerId },
{"Adress", pDC.AddressString },
{"IKDatenannahmestelle", pDC.IKDatenannahmestelle },
{"IKKostentrager", pDC.IKKostentrager },
{"IKKrankenkasse", pDC.IKKrankenkasse},
};
return jsonObject;
}
}
}

View File

@@ -1,80 +1,92 @@
using System;
using System.Collections.Generic;
using BeWo.Data.Entities;
using BS.Shared.DataContracts.Compact;
namespace BeWo.Service.DCEntityMapper
{
public class CompactSupportConceptDC_SupportConcept : AbstractIDCEntityMapper<SupportConcept, CompactSupportConceptDC>
{
#region Public Methods
public class CompactSupportConceptDC_SupportConcept : AbstractIDCEntityMapper<SupportConcept, CompactSupportConceptDC>
{
public override CompactSupportConceptDC MergeWithDC(SupportConcept pEntity, CompactSupportConceptDC pDataContract)
{
pDataContract.SupportConceptOid = pEntity.Oid.Value;
pDataContract.SupportConceptVersion = pEntity.Version.Value;
pDataContract.Customer = MapperFactory.CompactCustomerDC_Customer.MapToNewDC(pEntity.Customer);
pDataContract.ActivationType = pEntity.IsActive;
pDataContract.ConferenceDate = pEntity.ConferenceDate;
public override CompactSupportConceptDC MergeWithDC(SupportConcept pEntity, CompactSupportConceptDC pDataContract)
{
pDataContract.SupportConceptOid = pEntity.Oid.Value;
pDataContract.SupportConceptVersion = pEntity.Version.Value;
pDataContract.Customer = MapperFactory.CompactCustomerDC_Customer.MapToNewDC(pEntity.Customer);
pDataContract.ActivationType = pEntity.IsActive;
pDataContract.ConferenceDate = pEntity.ConferenceDate;
foreach (var iCBRel in pEntity.CostBearer2SupportConceptList)
{
CompactCostBearerDC costBearer = new CompactCostBearerDC();
foreach (var iCBRel in pEntity.CostBearer2SupportConceptList)
{
CompactCostBearerDC costBearer = new CompactCostBearerDC();
if (iCBRel.CostBearer.Organisation != null)
{
CompactOrganisationDC orgDC = new CompactOrganisationDC();
orgDC.Name = iCBRel.CostBearer.Organisation.Name;
orgDC.OrganisationOid = iCBRel.CostBearer.Organisation.Oid.Value;
if (iCBRel.CostBearer.Organisation != null)
{
CompactOrganisationDC orgDC = new CompactOrganisationDC();
orgDC.Name = iCBRel.CostBearer.Organisation.Name;
orgDC.OrganisationOid = iCBRel.CostBearer.Organisation.Oid.Value;
if (iCBRel.CostBearer.Organisation.Address != null)
{
orgDC.Street = iCBRel.CostBearer.Organisation.Address.Street;
orgDC.PostalCode = iCBRel.CostBearer.Organisation.Address.PostalCode;
orgDC.Town = iCBRel.CostBearer.Organisation.Address.Town;
}
if (iCBRel.CostBearer.Organisation.Address != null)
{
orgDC.Street = iCBRel.CostBearer.Organisation.Address.Street;
orgDC.PostalCode = iCBRel.CostBearer.Organisation.Address.PostalCode;
orgDC.Town = iCBRel.CostBearer.Organisation.Address.Town;
}
costBearer.Organisation = orgDC;
}
costBearer.CostBearerID = iCBRel.CostBearer.ID;
costBearer.CostBearerOid = iCBRel.CostBearer.Oid.Value;
costBearer.CostBearer2SupportConceptOid = iCBRel.Oid.Value;
costBearer.SupportConceptStatus = iCBRel.Status;
costBearer.RequestedStartDate = iCBRel.RequestedStartDate;
costBearer.RequestedEndDate = iCBRel.RequestedEndDate;
costBearer.ApprovedStartDate = iCBRel.ApprovedStartDate;
costBearer.ApprovedEndDate = iCBRel.ApprovedEndDate;
costBearer.Organisation = orgDC;
}
costBearer.CostBearerID = iCBRel.CostBearer.ID;
costBearer.CostBearerOid = iCBRel.CostBearer.Oid.Value;
costBearer.CostBearer2SupportConceptOid = iCBRel.Oid.Value;
costBearer.SupportConceptStatus = iCBRel.Status;
costBearer.RequestedStartDate = iCBRel.RequestedStartDate;
costBearer.RequestedEndDate = iCBRel.RequestedEndDate;
costBearer.ApprovedStartDate = iCBRel.ApprovedStartDate;
costBearer.ApprovedEndDate = iCBRel.ApprovedEndDate;
// costBearer.ApprovedFLS = iCBRel.ApprovedFLS;
// costBearer.ApprovedFLSTotal = iCBRel.ApprovedFLSTotal;
costBearer.CustomerReferenceNumber = iCBRel.CustomerReferenceNumber;
costBearer.IsCalculatingWithFactor = iCBRel.CostBearer.IsCalculatingWithFactor;
// costBearer.ApprovedFLS = iCBRel.ApprovedFLS;
// costBearer.ApprovedFLSTotal = iCBRel.ApprovedFLSTotal;
costBearer.CustomerReferenceNumber = iCBRel.CustomerReferenceNumber;
costBearer.IsCalculatingWithFactor = iCBRel.CostBearer.IsCalculatingWithFactor;
pDataContract.IsApproved = iCBRel.ApprovedStartDate.HasValue;
pDataContract.CostBearerList.Add(costBearer);
pDataContract.CostBearerOids2CostBearerRelOids.Add(costBearer.Oid.Value, iCBRel.Oid.Value);
pDataContract.CustomerReferenceNumbers.Add(iCBRel.CustomerReferenceNumber);
pDataContract.CostBearerRelOids.Add(iCBRel.Oid.Value);
}
pDataContract.IsApproved = iCBRel.ApprovedStartDate.HasValue;
pDataContract.CostBearerList.Add(costBearer);
pDataContract.CostBearerOids2CostBearerRelOids.Add(costBearer.Oid.Value, iCBRel.Oid.Value);
pDataContract.CustomerReferenceNumbers.Add(iCBRel.CustomerReferenceNumber);
pDataContract.CostBearerRelOids.Add(iCBRel.Oid.Value);
}
return pDataContract;
}
return pDataContract;
}
public override SupportConcept MergeWithEntity(CompactSupportConceptDC pDataContract, SupportConcept pEntity)
{
throw new NotImplementedException();
}
public override SupportConcept MergeWithEntity(CompactSupportConceptDC pDataContract, SupportConcept pEntity)
{
throw new NotImplementedException();
}
#endregion
protected override bool AreDCAndEntityEqual(CompactSupportConceptDC pDC, SupportConcept pEntity)
{
return pDC.SupportConceptOid == pEntity.Oid;
}
#region Methods
public override Dictionary<string, object> ToJsonDictionary(CompactSupportConceptDC pDC)
{
var customer = MapperFactory.CompactCustomerDC_Customer.ToJsonDictionary(pDC.Customer);
protected override bool AreDCAndEntityEqual(CompactSupportConceptDC pDC, SupportConcept pEntity)
{
return pDC.SupportConceptOid == pEntity.Oid;
}
var jsonObject = new Dictionary<string, object>()
{
{"SupportConceptOid", pDC.SupportConceptOid },
{"Address", pDC.AddressString },
{"AllCostBearerNames", pDC.AllCostBearerNames},
{"CostBearer", pDC.CostBearer },
{"CostBearerDetailStrings", pDC.CostBearerDetailStrings },
{"Customer", customer },
{"StartDate", pDC.StartDate },
{"EndDate", pDC.EndDate }
};
#endregion
}
return jsonObject;
}
}
}

View File

@@ -17,67 +17,67 @@ namespace BeWo.Service.DCEntityMapper
{
MapperFactory.PersonDC_Person.MergeWithDC(pEntity.Person, pDataContract);
pDataContract.Disabilities = MapperFactory.ValueListEntryDC_ValueListEntry.MapToNewDCs(pEntity.ValueList.FindByType(ValueListEntryType.DisabilityType).Select(e2o => e2o.Entry));
pDataContract.CustomerCareTypes = MapperFactory.ValueListEntryDC_ValueListEntry.MapToNewDCs(pEntity.ValueList.FindByType(ValueListEntryType.CustomerCareType).Select(e2o => e2o.Entry));
pDataContract.AbsenceTimes = MapperFactory.AbsenceTimeDC_AbsenceTime.MapToNewDCs(pEntity.AbsenceTimes);
pDataContract.RelatedEmployees = MapperFactory.EmployeeCustomerRelDC_Employee2CustomerMapper.MapToNewDCs(pEntity.Employee2CustomerList);
pDataContract.RelatedTeams = MapperFactory.TeamCustomerRelDC_Team2CustomerMapper.MapToNewDCs(pEntity.Team2CustomerList);
pDataContract.CostBearers = MapperFactory.CustomerCostBearerRelDC_Customer2CostBearer.MapToNewDCs(pEntity.Customer2CostBearerList);
pDataContract.EnvironmentPersons = MapperFactory.CustomerPersonRelationDC_Customer2Person.MapToNewDCs(pEntity.Customer2PersonList);
pDataContract.EnvironmentOrganisations = MapperFactory.CustomerOrganisationRelationDC_Customer2Organisation.MapToNewDCs(pEntity.Customer2OrganisationList);
pDataContract.Arbeitszeiten = MapperFactory.ArbeitszeitDC_Arbeitszeit.MapToNewDCs(pEntity.Arbeitszeiten);
//if(pEntity.Jugendamt != null)
// pDataContract.Jugendamt = MapperFactory.CompactOrganisationDC_Organisation.MapToNewDC(pEntity.Jugendamt);
pDataContract.Disabilities = MapperFactory.ValueListEntryDC_ValueListEntry.MapToNewDCs(pEntity.ValueList.FindByType(ValueListEntryType.DisabilityType).Select(e2o => e2o.Entry));
pDataContract.CustomerCareTypes = MapperFactory.ValueListEntryDC_ValueListEntry.MapToNewDCs(pEntity.ValueList.FindByType(ValueListEntryType.CustomerCareType).Select(e2o => e2o.Entry));
pDataContract.AbsenceTimes = MapperFactory.AbsenceTimeDC_AbsenceTime.MapToNewDCs(pEntity.AbsenceTimes);
pDataContract.RelatedEmployees = MapperFactory.EmployeeCustomerRelDC_Employee2CustomerMapper.MapToNewDCs(pEntity.Employee2CustomerList);
pDataContract.RelatedTeams = MapperFactory.TeamCustomerRelDC_Team2CustomerMapper.MapToNewDCs(pEntity.Team2CustomerList);
pDataContract.CostBearers = MapperFactory.CustomerCostBearerRelDC_Customer2CostBearer.MapToNewDCs(pEntity.Customer2CostBearerList);
pDataContract.EnvironmentPersons = MapperFactory.CustomerPersonRelationDC_Customer2Person.MapToNewDCs(pEntity.Customer2PersonList);
pDataContract.EnvironmentOrganisations = MapperFactory.CustomerOrganisationRelationDC_Customer2Organisation.MapToNewDCs(pEntity.Customer2OrganisationList);
pDataContract.Arbeitszeiten = MapperFactory.ArbeitszeitDC_Arbeitszeit.MapToNewDCs(pEntity.Arbeitszeiten);
//if(pEntity.Jugendamt != null)
// pDataContract.Jugendamt = MapperFactory.CompactOrganisationDC_Organisation.MapToNewDC(pEntity.Jugendamt);
//if (pEntity.Ansprechpartner != null)
// pDataContract.Ansprechpartner = MapperFactory.CompactPersonDC_Person.MapToNewDC(pEntity.Ansprechpartner);
//if (pEntity.Ansprechpartner != null)
// pDataContract.Ansprechpartner = MapperFactory.CompactPersonDC_Person.MapToNewDC(pEntity.Ansprechpartner);
pDataContract.Medikamentenverordnungslisten = MapperFactory.MedikamentenverordnungslisteDC_Medikamentenverordnungsliste.MapToNewDCs(pEntity.Medikamentenverordnungslisten);
pDataContract.DistanceInMeter = pEntity.DistanceInMeter;
pDataContract.CustomerAlias = pEntity.CustomerAlias;
pDataContract.Diagnosis = pEntity.Diagnosis;
pDataContract.Childs = pEntity.Childs;
pDataContract.EquityContribution = pEntity.EquityContribution;
pDataContract.ICD10Diagnosis = pEntity.ICD10Diagnosis;
pDataContract.Notice = pEntity.Notice;
pDataContract.ReferenceNumber = pEntity.ReferenceNumber;
pDataContract.CustomerVersion = pEntity.Version;
pDataContract.CustomerOid = pEntity.Oid;
pDataContract.ActivationType = pEntity.IsActive;
pDataContract.AssistanceBegin = pEntity.AssistanceBegin;
pDataContract.TerminationDate = pEntity.TerminationDate;
pDataContract.DebitorNumber = pEntity.DebitorNumber;
pDataContract.CostCenter = pEntity.CostCenter;
pDataContract.Medication = pEntity.Medication;
pDataContract.Environment = pEntity.Environment;
pDataContract.IsAdvisedOrAttended = pEntity.IsAdvisedOrAttended;
//if(pEntity.FamilyData != null)
//{
// pDataContract.Kindesmutter = pEntity.FamilyData.Kindesmutter;
// pDataContract.Kindesvater = pEntity.FamilyData.Kindesvater;
// pDataContract.Geschwister = pEntity.FamilyData.Geschwister;
// pDataContract.Vormund = pEntity.FamilyData.Vormund;
// pDataContract.FamilyDataOid = pEntity.FamilyData.Oid;
// pDataContract.FamilyDataVersion = pEntity.FamilyData.Version;
//}
pDataContract.Medikamentenverordnungslisten = MapperFactory.MedikamentenverordnungslisteDC_Medikamentenverordnungsliste.MapToNewDCs(pEntity.Medikamentenverordnungslisten);
pDataContract.DistanceInMeter = pEntity.DistanceInMeter;
pDataContract.CustomerAlias = pEntity.CustomerAlias;
pDataContract.Diagnosis = pEntity.Diagnosis;
pDataContract.Childs = pEntity.Childs;
pDataContract.EquityContribution = pEntity.EquityContribution;
pDataContract.ICD10Diagnosis = pEntity.ICD10Diagnosis;
pDataContract.Notice = pEntity.Notice;
pDataContract.ReferenceNumber = pEntity.ReferenceNumber;
pDataContract.CustomerVersion = pEntity.Version;
pDataContract.CustomerOid = pEntity.Oid;
pDataContract.ActivationType = pEntity.IsActive;
pDataContract.AssistanceBegin = pEntity.AssistanceBegin;
pDataContract.TerminationDate = pEntity.TerminationDate;
pDataContract.DebitorNumber = pEntity.DebitorNumber;
pDataContract.CostCenter = pEntity.CostCenter;
pDataContract.Medication = pEntity.Medication;
pDataContract.Environment = pEntity.Environment;
pDataContract.IsAdvisedOrAttended = pEntity.IsAdvisedOrAttended;
pDataContract.AusstVersAmt = pEntity.AusstVersAmt;
pDataContract.AusweisGueltigVon = pEntity.AusweisGueltigVon;
pDataContract.AusweisGueltigBis = pEntity.AusweisGueltigBis;
pDataContract.AusweisUnbefristetGueltig = pEntity.AusweisUnbefristetGueltig;
pDataContract.AusweisAktenzeichen = pEntity.AusweisAktenzeichen;
pDataContract.BeiblattGueltigBis = pEntity.BeiblattGueltigBis;
pDataContract.GradDerBehinderung = pEntity.GradDerBehinderung;
pDataContract.Pflegegrad = pEntity.Pflegegrad;
pDataContract.VertretungGewuenscht = pEntity.VertretungGewuenscht;
pDataContract.AbWelchemKrankheitsTag = pEntity.AbWelchemKrankheitsTag;
pDataContract.VertretungDringendErforderlich = pEntity.VertretungDringendErforderlich;
pDataContract.Pflege = pEntity.Pflege;
pDataContract.Toilettengang = pEntity.Toilettengang;
pDataContract.Aggressiv = pEntity.Aggressiv;
pDataContract.Schutzstufe = pEntity.Schutzstufe;
pDataContract.Hygienebelehrung = pEntity.Hygienebelehrung;
//if(pEntity.FamilyData != null)
//{
// pDataContract.Kindesmutter = pEntity.FamilyData.Kindesmutter;
// pDataContract.Kindesvater = pEntity.FamilyData.Kindesvater;
// pDataContract.Geschwister = pEntity.FamilyData.Geschwister;
// pDataContract.Vormund = pEntity.FamilyData.Vormund;
// pDataContract.FamilyDataOid = pEntity.FamilyData.Oid;
// pDataContract.FamilyDataVersion = pEntity.FamilyData.Version;
//}
pDataContract.AusstVersAmt = pEntity.AusstVersAmt;
pDataContract.AusweisGueltigVon = pEntity.AusweisGueltigVon;
pDataContract.AusweisGueltigBis = pEntity.AusweisGueltigBis;
pDataContract.AusweisUnbefristetGueltig = pEntity.AusweisUnbefristetGueltig;
pDataContract.AusweisAktenzeichen = pEntity.AusweisAktenzeichen;
pDataContract.BeiblattGueltigBis = pEntity.BeiblattGueltigBis;
pDataContract.GradDerBehinderung = pEntity.GradDerBehinderung;
pDataContract.Pflegegrad = pEntity.Pflegegrad;
pDataContract.VertretungGewuenscht = pEntity.VertretungGewuenscht;
pDataContract.AbWelchemKrankheitsTag = pEntity.AbWelchemKrankheitsTag;
pDataContract.VertretungDringendErforderlich = pEntity.VertretungDringendErforderlich;
pDataContract.Pflege = pEntity.Pflege;
pDataContract.Toilettengang = pEntity.Toilettengang;
pDataContract.Aggressiv = pEntity.Aggressiv;
pDataContract.Schutzstufe = pEntity.Schutzstufe;
pDataContract.Hygienebelehrung = pEntity.Hygienebelehrung;
pDataContract.Uebernahmeort = pEntity.Uebernahmeort;
pDataContract.Verhalten = pEntity.Verhalten;
pDataContract.Betreuungsbedarf = pEntity.Betreuungsbedarf;
@@ -87,30 +87,30 @@ namespace BeWo.Service.DCEntityMapper
pDataContract.VersichertenStatus = pEntity.VersichertenStatus;
if (pEntity.SubstitutionNeed == SubstitutionNeed.SubstitutionNeedUnset)
{
if(pEntity.VertretungDringendErforderlich)
{
pDataContract.SubstitutionNeed = SubstitutionNeed.SubstitutionNeeded;
}
else
{
pDataContract.SubstitutionNeed = pEntity.VertretungGewuenscht ? SubstitutionNeed.SubstitutionWanted : SubstitutionNeed.NoSubstitutionWanted;
}
}
else
{
pDataContract.SubstitutionNeed = pEntity.SubstitutionNeed;
}
{
if (pEntity.VertretungDringendErforderlich)
{
pDataContract.SubstitutionNeed = SubstitutionNeed.SubstitutionNeeded;
}
else
{
pDataContract.SubstitutionNeed = pEntity.VertretungGewuenscht ? SubstitutionNeed.SubstitutionWanted : SubstitutionNeed.NoSubstitutionWanted;
}
}
else
{
pDataContract.SubstitutionNeed = pEntity.SubstitutionNeed;
}
if (pEntity.BehinderungsartenListe != null)
{
pDataContract.BehinderungsartenListe = pEntity.BehinderungsartenListe.ToList();
}
if (pEntity.BehinderungsartenListe != null)
{
pDataContract.BehinderungsartenListe = pEntity.BehinderungsartenListe.ToList();
}
if (pEntity.MerkzeichenListe != null)
{
pDataContract.MerkzeichenListe = pEntity.MerkzeichenListe.ToList();
}
if (pEntity.MerkzeichenListe != null)
{
pDataContract.MerkzeichenListe = pEntity.MerkzeichenListe.ToList();
}
if (pEntity.TerminationReason != null)
{
@@ -123,8 +123,8 @@ namespace BeWo.Service.DCEntityMapper
{
pDataContract.ICD10DiagnosisCodes = pEntity.Diagnosis2CustomerList.Select(e => e.ICD10DiagnosisCode).ToList();
}
IList<VarFieldDef> defs = DAOFactory.SearchDAO.GetVarFieldDefs(TableID.Customer);
IList<VarFieldDef> defs = DAOFactory.SearchDAO.GetVarFieldDefs(TableID.Customer);
pDataContract.CustomerVarFields = MapperFactory.VarFieldDC_VarField.VarFieldMapToDCs(defs, pEntity.VarFieldValueList);
pDataContract.AssessmentSheetCategoryDCs = MapperFactory.AssessmentSheetCategoryDC_AssessmentSheetCategory.MapToNewDCs(pEntity.AssessmentSheetCategoryList);
@@ -161,7 +161,7 @@ namespace BeWo.Service.DCEntityMapper
MapperFactory.AbsenceTimeDC_AbsenceTime.MergeWithEntitys(pDataContract.AbsenceTimes, pEntity.AbsenceTimes);
MapperFactory.CustomerPersonRelationDC_Customer2Person.MergeWithEntitys(pDataContract.EnvironmentPersons, pEntity.Customer2PersonList);
MapperFactory.CustomerPersonRelationDC_Customer2Person.MergeWithEntitys(pDataContract.EnvironmentPersons, pEntity.Customer2PersonList);
MapperFactory.CustomerOrganisationRelationDC_Customer2Organisation.MergeWithEntitys(pDataContract.EnvironmentOrganisations, pEntity.Customer2OrganisationList);
pEntity.DistanceInMeter = pDataContract.DistanceInMeter;
@@ -172,58 +172,58 @@ namespace BeWo.Service.DCEntityMapper
//pEntity.Ansprechpartner = pDataContract.Ansprechpartner != null ? DAOFactory.GenericDAO.LoadByID<Person>(pDataContract.Ansprechpartner.PersonOid) : null;
pEntity.Diagnosis = pDataContract.Diagnosis;
pEntity.Medication = pDataContract.Medication;
pEntity.Environment = pDataContract.Environment;
pEntity.Childs = pDataContract.Childs;
pEntity.EquityContribution = pDataContract.EquityContribution;
pEntity.ICD10Diagnosis = pDataContract.ICD10Diagnosis;
pEntity.Notice = pDataContract.Notice;
pEntity.ReferenceNumber = pDataContract.ReferenceNumber;
pEntity.Oid = pDataContract.CustomerOid;
pEntity.IsActive = pDataContract.ActivationType;
pEntity.AssistanceBegin = pDataContract.AssistanceBegin;
pEntity.TerminationDate = pDataContract.TerminationDate;
pEntity.CustomerAlias = pDataContract.CustomerAlias;
pEntity.SubstitutionNeed = pDataContract.SubstitutionNeed;
//if(ContainsFamilyDataData(pDataContract))
//{
// ConcurrencyCheck(pDataContract.FamilyDataVersion, pEntity.FamilyData);
pEntity.Diagnosis = pDataContract.Diagnosis;
pEntity.Medication = pDataContract.Medication;
pEntity.Environment = pDataContract.Environment;
pEntity.Childs = pDataContract.Childs;
pEntity.EquityContribution = pDataContract.EquityContribution;
pEntity.ICD10Diagnosis = pDataContract.ICD10Diagnosis;
pEntity.Notice = pDataContract.Notice;
pEntity.ReferenceNumber = pDataContract.ReferenceNumber;
pEntity.Oid = pDataContract.CustomerOid;
pEntity.IsActive = pDataContract.ActivationType;
pEntity.AssistanceBegin = pDataContract.AssistanceBegin;
pEntity.TerminationDate = pDataContract.TerminationDate;
pEntity.CustomerAlias = pDataContract.CustomerAlias;
pEntity.SubstitutionNeed = pDataContract.SubstitutionNeed;
// pEntity.FamilyData.Oid = pDataContract.FamilyDataOid;
// pEntity.FamilyData.Kindesmutter = pDataContract.Kindesmutter;
// pEntity.FamilyData.Kindesvater = pDataContract.Kindesvater;
// pEntity.FamilyData.Geschwister = pDataContract.Geschwister;
// pEntity.FamilyData.Vormund = pDataContract.Vormund;
//}
//else if (pEntity.FamilyData != null)
//{
// // all-delete-orphan wird von NHibernate (noch) nicht unterstützt für many-to-one
// FamilyData lFamilyData = pEntity.FamilyData;
// pEntity.FamilyData = null;
// DAOFactory.GenericDAO.Delete(lFamilyData);
//}
//if(ContainsFamilyDataData(pDataContract))
//{
// ConcurrencyCheck(pDataContract.FamilyDataVersion, pEntity.FamilyData);
pEntity.AusstVersAmt = pDataContract.AusstVersAmt;
pEntity.AusweisGueltigVon = pDataContract.AusweisGueltigVon;
pEntity.AusweisGueltigBis = pDataContract.AusweisGueltigBis;
pEntity.AusweisUnbefristetGueltig = pDataContract.AusweisUnbefristetGueltig;
pEntity.AusweisAktenzeichen = pDataContract.AusweisAktenzeichen;
pEntity.BeiblattGueltigBis = pDataContract.BeiblattGueltigBis;
pEntity.GradDerBehinderung = pDataContract.GradDerBehinderung;
pEntity.BehinderungsartenListe = pDataContract.BehinderungsartenListe;
pEntity.MerkzeichenListe = pDataContract.MerkzeichenListe;
pEntity.Pflegegrad = pDataContract.Pflegegrad;
pEntity.VertretungGewuenscht = pDataContract.VertretungGewuenscht;
pEntity.AbWelchemKrankheitsTag = pDataContract.AbWelchemKrankheitsTag;
pEntity.VertretungDringendErforderlich = pDataContract.VertretungDringendErforderlich;
pEntity.Pflege = pDataContract.Pflege;
pEntity.Toilettengang = pDataContract.Toilettengang;
pEntity.Aggressiv = pDataContract.Aggressiv;
pEntity.Schutzstufe = pDataContract.Schutzstufe;
pEntity.Hygienebelehrung = pDataContract.Hygienebelehrung;
// pEntity.FamilyData.Oid = pDataContract.FamilyDataOid;
// pEntity.FamilyData.Kindesmutter = pDataContract.Kindesmutter;
// pEntity.FamilyData.Kindesvater = pDataContract.Kindesvater;
// pEntity.FamilyData.Geschwister = pDataContract.Geschwister;
// pEntity.FamilyData.Vormund = pDataContract.Vormund;
//}
//else if (pEntity.FamilyData != null)
//{
// // all-delete-orphan wird von NHibernate (noch) nicht unterstützt für many-to-one
// FamilyData lFamilyData = pEntity.FamilyData;
// pEntity.FamilyData = null;
// DAOFactory.GenericDAO.Delete(lFamilyData);
//}
pEntity.AusstVersAmt = pDataContract.AusstVersAmt;
pEntity.AusweisGueltigVon = pDataContract.AusweisGueltigVon;
pEntity.AusweisGueltigBis = pDataContract.AusweisGueltigBis;
pEntity.AusweisUnbefristetGueltig = pDataContract.AusweisUnbefristetGueltig;
pEntity.AusweisAktenzeichen = pDataContract.AusweisAktenzeichen;
pEntity.BeiblattGueltigBis = pDataContract.BeiblattGueltigBis;
pEntity.GradDerBehinderung = pDataContract.GradDerBehinderung;
pEntity.BehinderungsartenListe = pDataContract.BehinderungsartenListe;
pEntity.MerkzeichenListe = pDataContract.MerkzeichenListe;
pEntity.Pflegegrad = pDataContract.Pflegegrad;
pEntity.VertretungGewuenscht = pDataContract.VertretungGewuenscht;
pEntity.AbWelchemKrankheitsTag = pDataContract.AbWelchemKrankheitsTag;
pEntity.VertretungDringendErforderlich = pDataContract.VertretungDringendErforderlich;
pEntity.Pflege = pDataContract.Pflege;
pEntity.Toilettengang = pDataContract.Toilettengang;
pEntity.Aggressiv = pDataContract.Aggressiv;
pEntity.Schutzstufe = pDataContract.Schutzstufe;
pEntity.Hygienebelehrung = pDataContract.Hygienebelehrung;
pEntity.Uebernahmeort = pDataContract.Uebernahmeort;
pEntity.Verhalten = pDataContract.Verhalten;
pEntity.Betreuungsbedarf = pDataContract.Betreuungsbedarf;
@@ -241,8 +241,8 @@ namespace BeWo.Service.DCEntityMapper
pEntity.TerminationReason = DAOFactory.GenericDAO.LoadByID<ValueListEntry>(pDataContract.TerminationReason.ValueListEntryOid.Value);
}
pEntity.DebitorNumber = pDataContract.DebitorNumber;
pEntity.CostCenter = pDataContract.CostCenter;
pEntity.DebitorNumber = pDataContract.DebitorNumber;
pEntity.CostCenter = pDataContract.CostCenter;
pEntity.IsAdvisedOrAttended = pDataContract.IsAdvisedOrAttended;
MapperFactory.PlacementDC_Placement.MergeWithEntitys(pDataContract.PlacementList, pEntity.PlacementList);
@@ -264,7 +264,7 @@ namespace BeWo.Service.DCEntityMapper
List<string> toAdd = pDataContract.ICD10DiagnosisCodes.Where(i => pEntity.Diagnosis2CustomerList.FirstOrDefault(e => e.ICD10DiagnosisCode.Equals(i)) == null).ToList();
toAdd.ForEach(i => pEntity.Diagnosis2CustomerList.Add(new Diagnosis2Customer {ICD10DiagnosisCode = i}));
toAdd.ForEach(i => pEntity.Diagnosis2CustomerList.Add(new Diagnosis2Customer { ICD10DiagnosisCode = i }));
}
pEntity.VarFieldValueList = MapperFactory.VarFieldDC_VarField.VarFieldMergeToEntity(pEntity.VarFieldValueList, pDataContract.CustomerVarFields, pEntity);
@@ -288,7 +288,7 @@ namespace BeWo.Service.DCEntityMapper
}
);
MapperFactory.ArbeitszeitDC_Arbeitszeit.MergeWithEntitys(pDataContract.Arbeitszeiten, pEntity.Arbeitszeiten);
MapperFactory.ArbeitszeitDC_Arbeitszeit.MergeWithEntitys(pDataContract.Arbeitszeiten, pEntity.Arbeitszeiten);
MapperFactory.CustomerVermittlungArbeitDC_CustomerVermittlungArbeit.MergeWithEntitys(pDataContract.CustomerVermittlungArbeitDC, pEntity.CustomerVermittlungArbeiten);
if (pEntity.CustomerVermittlungArbeiten is IList<CustomerVermittlungArbeit> lv && lv.Any())
@@ -347,5 +347,40 @@ namespace BeWo.Service.DCEntityMapper
return pDC.CustomerOid == pEntity.Oid;
}
public override Dictionary<string, object> ToJsonDictionary(CustomerDC c)
{
var jsonObject = new Dictionary<string, object>()
{
{"CustomerOid", c.CustomerOid },
{ "Fullname", $"{c.FirstName} {c.LastName}"},
{"Alias", c.CustomerAlias },
{ "Birthday", c.DateOfBirth },
{"Gender", c.Sex.ToString() },
{"Nationalität", c.Nationalitaet?.DisplayName },
{"IsMigrant", c.IsMigrant },
{"MigrationBackground", c.Migrationshintergrund },
{"Aufenthaltsstatus", c.AufenthaltsStatus?.DisplayName },
{"Familienstand", c.FamilyStatus.ToString() },
{"Beruf", c.Profession },
{"Kinder", c.Childs },
{"Eigenbeteiligung", c.EquityContribution },
{"Krankenkasse", c.HealthInsurance },
{"Versichertennummer", c.InsuranceNumber },
{"Versichertenstatus", c.VersichertenStatus },
{"Kommentar", c.Notice },
{"AdressLine1", c.AddressLine1 },
{"Street", c.Street },
{"PostalCode", c.PostalCode },
{"Town", c.Town },
{"DistanceInMeter", c.DistanceInMeter },
{"InvoiceAdressLine1", c.InvoiceAddressLine1 },
{"InvoiceStreet", c.InvoiceAddressStreet },
{"InvoicePostalCode", c.InvoiceAddressPostalCode },
{"InvoiceTown", c.InvoiceAddressTown }
};
return jsonObject;
}
}
}

View File

@@ -19,10 +19,5 @@ namespace BeWo.Service.DCEntityMapper
TDC MergeWithDC(TEntity pEntity, TDC pDataContract);
TEntity MergeWithEntity(TDC pDataContract, TEntity pEntity);
Dictionary<string, object> ToJsonDictionary(TDC pDC);
Dictionary<string, object> ToJsonDictionary(TEntity pEntity);
IList<Dictionary<string, object>> ToJsonDictionary(IList<TEntity> pEntities);
IList<Dictionary<string, object>> ToJsonDictionary(IList<TDC> pDCs);
}
}

View File

@@ -9,284 +9,285 @@ using BS.Shared.DataContracts;
namespace BeWo.Service.DCEntityMapper
{
public class ServiceRecordDC_ServiceRecord : AbstractIDCEntityMapper<ServiceRecord, ServiceRecordDC>
{
public override ServiceRecordDC MergeWithDC(ServiceRecord pEntity, ServiceRecordDC pDataContract)
{
pDataContract.ServiceRecordOid = pEntity.Oid;
pDataContract.ServiceRecordVersion = pEntity.Version;
pDataContract.Start = pEntity.Start;
pDataContract.End = pEntity.End;
pDataContract.Notice = pEntity.Notice;
pDataContract.Notice2 = pEntity.Notice2;
pDataContract.Notice3 = pEntity.Notice3;
pDataContract.Notice4 = pEntity.Notice4;
pDataContract.Notice5 = pEntity.Notice5;
pDataContract.RTFNotice1 = pEntity.RTFNotice1;
pDataContract.RTFNotice2 = pEntity.RTFNotice2;
pDataContract.RTFNotice3 = pEntity.RTFNotice3;
pDataContract.RTFNotice4 = pEntity.RTFNotice4;
pDataContract.RTFNotice5 = pEntity.RTFNotice5;
public class ServiceRecordDC_ServiceRecord : AbstractIDCEntityMapper<ServiceRecord, ServiceRecordDC>
{
public override ServiceRecordDC MergeWithDC(ServiceRecord pEntity, ServiceRecordDC pDataContract)
{
pDataContract.ServiceRecordOid = pEntity.Oid;
pDataContract.ServiceRecordVersion = pEntity.Version;
pDataContract.Start = pEntity.Start;
pDataContract.End = pEntity.End;
pDataContract.Notice = pEntity.Notice;
pDataContract.Notice2 = pEntity.Notice2;
pDataContract.Notice3 = pEntity.Notice3;
pDataContract.Notice4 = pEntity.Notice4;
pDataContract.Notice5 = pEntity.Notice5;
pDataContract.RTFNotice1 = pEntity.RTFNotice1;
pDataContract.RTFNotice2 = pEntity.RTFNotice2;
pDataContract.RTFNotice3 = pEntity.RTFNotice3;
pDataContract.RTFNotice4 = pEntity.RTFNotice4;
pDataContract.RTFNotice5 = pEntity.RTFNotice5;
pDataContract.DistanceInMeter = (int?)pEntity.DistanceInMeter;
pDataContract.DistanceInMeterDecimal = pEntity.DistanceInMeter;
pDataContract.Relevance = pEntity.Relevance;
pDataContract.SignatureOid = pEntity.SignatureOid;
pDataContract.ServiceRecordType = pEntity.ServiceRecordType ?? ServiceRecordTypeId.DefaultActivity;
pDataContract.Betrag = pEntity.Betrag;
pDataContract.DistanceInMeterDecimal = pEntity.DistanceInMeter;
pDataContract.Relevance = pEntity.Relevance;
pDataContract.SignatureOid = pEntity.SignatureOid;
pDataContract.ServiceRecordType = pEntity.ServiceRecordType ?? ServiceRecordTypeId.DefaultActivity;
pDataContract.Betrag = pEntity.Betrag;
if (pEntity.DurationInStunden != null)
{
pDataContract.DurationInStunden = pEntity.DurationInStunden;
}
else
{
pDataContract.DurationInStunden = ZeiterfassungsDauer.Minuten;
}
if (pEntity.DurationInStunden != null)
{
pDataContract.DurationInStunden = pEntity.DurationInStunden;
}
else
{
pDataContract.DurationInStunden = ZeiterfassungsDauer.Minuten;
}
if (pEntity.ServiceRecordFormat != null)
{
pDataContract.ServiceRecordFormat = pEntity.ServiceRecordFormat;
}
else
{
pDataContract.ServiceRecordFormat = ServiceRecordFormate.OriginaleZeiterfassung;
}
if (pEntity.ServiceRecordFormat != null)
{
pDataContract.ServiceRecordFormat = pEntity.ServiceRecordFormat;
}
else
{
pDataContract.ServiceRecordFormat = ServiceRecordFormate.OriginaleZeiterfassung;
}
if (pEntity.ServiceDescription != null)
{
pDataContract.ServiceDescription = MapperFactory.ServiceDescriptionDC_ServiceDescription.MapToNewDC(pEntity.ServiceDescription);
}
pDataContract.RoundedDuration = pEntity.RoundedDuration;
pDataContract.InsertedOn = pEntity.InsTs;
pDataContract.InsUser = pEntity.InsUser;
pDataContract.WohnheimbuchungsOid = pEntity.WohnheimbuchungsOid;
if (pEntity.Customer != null)
{
pDataContract.Customer = MapperFactory.CompactCustomerDC_Customer.MapToNewDC(pEntity.Customer);
}
if (pEntity.ServiceDescription != null)
{
pDataContract.ServiceDescription = MapperFactory.ServiceDescriptionDC_ServiceDescription.MapToNewDC(pEntity.ServiceDescription);
}
if (pEntity.Employee != null)
{
pDataContract.Employee = MapperFactory.CompactEmployeeDC_Employee.MapToNewDC(pEntity.Employee);
}
pDataContract.RoundedDuration = pEntity.RoundedDuration;
pDataContract.InsertedOn = pEntity.InsTs;
pDataContract.InsUser = pEntity.InsUser;
pDataContract.WohnheimbuchungsOid = pEntity.WohnheimbuchungsOid;
if (pEntity.SupportConcept != null)
{
pDataContract.SupportConcept = MapperFactory.CompactSupportConceptDC_SupportConcept.MapToNewDC(pEntity.SupportConcept);
}
if (pEntity.Customer != null)
{
pDataContract.Customer = MapperFactory.CompactCustomerDC_Customer.MapToNewDC(pEntity.Customer);
}
if (pEntity.CostBearer2SupportConcept != null)
{
pDataContract.CostBearer2SupportConceptOid = pEntity.CostBearer2SupportConcept.Oid.Value;
if (pEntity.CostBearer2SupportConcept.CostBearer.Organisation != null)
{
pDataContract.CostBearer = MapperFactory.CompactOrganisationDC_Organisation.MapToNewDC(pEntity.CostBearer2SupportConcept.CostBearer.Organisation);
}
}
if (pEntity.Employee != null)
{
pDataContract.Employee = MapperFactory.CompactEmployeeDC_Employee.MapToNewDC(pEntity.Employee);
}
var list = new List<ValueListEntryType>();
if (pEntity.SupportConcept != null)
{
pDataContract.SupportConcept = MapperFactory.CompactSupportConceptDC_SupportConcept.MapToNewDC(pEntity.SupportConcept);
}
if (pEntity.CostBearer2SupportConcept != null)
{
pDataContract.CostBearer2SupportConceptOid = pEntity.CostBearer2SupportConcept.Oid.Value;
if (pEntity.CostBearer2SupportConcept.CostBearer.Organisation != null)
{
pDataContract.CostBearer = MapperFactory.CompactOrganisationDC_Organisation.MapToNewDC(pEntity.CostBearer2SupportConcept.CostBearer.Organisation);
}
}
var list = new List<ValueListEntryType>();
list.Add(ValueListEntryType.SupportConceptGoalType);
list.Add(ValueListEntryType.SupportConceptGoalCategoryType);
list.Add(ValueListEntryType.SupportConceptIndividualGoalCategoryType);
list.Add(ValueListEntryType.SupportConceptIndividualGoalType);
pDataContract.Goals = new List<ValueListEntryDC>();
foreach (var v2o in pEntity.ValueList.FindByTypes(list))
{
var entryDc = MapperFactory.ValueListEntryDC_ValueListEntry.MapToNewDC(v2o.Entry);
entryDc.RatingTypeOid = v2o.RatingTypeOid;
pDataContract.Goals.Add(entryDc);
}
//pDataContract.Goals = MapperFactory.ValueListEntryDC_ValueListEntry.MapToNewDCs(pEntity.ValueList.FindByTypes(list).Select(e2o => e2o.Entry));
pDataContract.Goals = new List<ValueListEntryDC>();
foreach (var v2o in pEntity.ValueList.FindByTypes(list))
{
var entryDc = MapperFactory.ValueListEntryDC_ValueListEntry.MapToNewDC(v2o.Entry);
entryDc.RatingTypeOid = v2o.RatingTypeOid;
pDataContract.Goals.Add(entryDc);
}
//pDataContract.Goals = MapperFactory.ValueListEntryDC_ValueListEntry.MapToNewDCs(pEntity.ValueList.FindByTypes(list).Select(e2o => e2o.Entry));
pDataContract.GroupEmployeeCount = pEntity.GroupEmployeeCount;
pDataContract.GroupPersonCount = pEntity.GroupPersonCount;
pDataContract.GroupRoundedDuration = pEntity.GroupRoundedDuration;
pDataContract.GroupOid = pEntity.GroupOid;
if (!pEntity.GroupOid.HasValue && pEntity.GroupPersonCount.HasValue && pEntity.GroupEmployeeCount.HasValue &&
pEntity.GroupPersonCount.Value == 1 && pEntity.GroupEmployeeCount.Value == 1)
{
pDataContract.GroupEmployeeCount = null;
pDataContract.GroupPersonCount = null;
pDataContract.GroupRoundedDuration = null;
}
pDataContract.IP = pEntity.IP;
pDataContract.GroupEmployeeCount = pEntity.GroupEmployeeCount;
pDataContract.GroupPersonCount = pEntity.GroupPersonCount;
pDataContract.GroupRoundedDuration = pEntity.GroupRoundedDuration;
pDataContract.GroupOid = pEntity.GroupOid;
if (!pEntity.GroupOid.HasValue && pEntity.GroupPersonCount.HasValue && pEntity.GroupEmployeeCount.HasValue &&
pEntity.GroupPersonCount.Value == 1 && pEntity.GroupEmployeeCount.Value == 1)
{
pDataContract.GroupEmployeeCount = null;
pDataContract.GroupPersonCount = null;
pDataContract.GroupRoundedDuration = null;
}
pDataContract.IP = pEntity.IP;
pDataContract.IsCreatedInMobileClient = pEntity.IsCreatedInMobileClient;
if (pEntity.GroupOid.HasValue)
{
pDataContract.BackgroundColor = "#FFFDC784";
}
if (pEntity.GroupOid.HasValue)
{
pDataContract.BackgroundColor = "#FFFDC784";
}
if (pEntity.ServiceRecordType.HasValue && pEntity.ServiceRecordType.Value == ServiceRecordTypeId.Content)
{
pDataContract.BackgroundColor = "#FF78BFFF";
}
if (pEntity.ServiceRecordType.HasValue && pEntity.ServiceRecordType.Value == ServiceRecordTypeId.Content)
{
pDataContract.BackgroundColor = "#FF78BFFF";
}
return pDataContract;
}
return pDataContract;
}
public override ServiceRecord MergeWithEntity(ServiceRecordDC pDataContract, ServiceRecord pEntity)
{
ConcurrencyCheck(pDataContract.ServiceRecordVersion, pEntity);
public override ServiceRecord MergeWithEntity(ServiceRecordDC pDataContract, ServiceRecord pEntity)
{
ConcurrencyCheck(pDataContract.ServiceRecordVersion, pEntity);
pEntity.Oid = pDataContract.ServiceRecordOid;
pEntity.SignatureOid = pDataContract.SignatureOid;
pEntity.Oid = pDataContract.ServiceRecordOid;
pEntity.SignatureOid = pDataContract.SignatureOid;
pEntity.Notice = pDataContract.Notice;
pEntity.Notice2 = pDataContract.Notice2;
pEntity.Notice3 = pDataContract.Notice3;
pEntity.Notice4 = pDataContract.Notice4;
pEntity.Notice5 = pDataContract.Notice5;
pEntity.Notice = pDataContract.Notice;
pEntity.Notice2 = pDataContract.Notice2;
pEntity.Notice3 = pDataContract.Notice3;
pEntity.Notice4 = pDataContract.Notice4;
pEntity.Notice5 = pDataContract.Notice5;
pEntity.RTFNotice1 = pDataContract.RTFNotice1;
pEntity.RTFNotice2 = pDataContract.RTFNotice2;
pEntity.RTFNotice3 = pDataContract.RTFNotice3;
pEntity.RTFNotice4 = pDataContract.RTFNotice4;
pEntity.RTFNotice5 = pDataContract.RTFNotice5;
pEntity.RTFNotice1 = pDataContract.RTFNotice1;
pEntity.RTFNotice2 = pDataContract.RTFNotice2;
pEntity.RTFNotice3 = pDataContract.RTFNotice3;
pEntity.RTFNotice4 = pDataContract.RTFNotice4;
pEntity.RTFNotice5 = pDataContract.RTFNotice5;
pEntity.Start = pDataContract.Start;
pEntity.End = pDataContract.End;
pEntity.RoundedDuration = pDataContract.RoundedDuration;
if (pDataContract.DistanceInMeter.HasValue)
{
//Um alte Versionen zu unterstützen. In neuen Client Versionen ist DistanceInMeter null;
pEntity.DistanceInMeter = pDataContract.DistanceInMeter;
}
else
{
pEntity.DistanceInMeter = pDataContract.DistanceInMeterDecimal;
}
pEntity.Start = pDataContract.Start;
pEntity.End = pDataContract.End;
pEntity.RoundedDuration = pDataContract.RoundedDuration;
if (pDataContract.DistanceInMeter.HasValue)
{
//Um alte Versionen zu unterstützen. In neuen Client Versionen ist DistanceInMeter null;
pEntity.DistanceInMeter = pDataContract.DistanceInMeter;
}
else
{
pEntity.DistanceInMeter = pDataContract.DistanceInMeterDecimal;
}
pEntity.Relevance = pDataContract.Relevance;
pEntity.WohnheimbuchungsOid = pDataContract.WohnheimbuchungsOid;
pEntity.GroupEmployeeCount = pDataContract.GroupEmployeeCount;
pEntity.GroupPersonCount = pDataContract.GroupPersonCount;
pEntity.GroupRoundedDuration = pDataContract.GroupRoundedDuration;
pEntity.ServiceRecordType = pDataContract.ServiceRecordType;
pEntity.WohnheimbuchungsOid = pDataContract.WohnheimbuchungsOid;
pEntity.GroupEmployeeCount = pDataContract.GroupEmployeeCount;
pEntity.GroupPersonCount = pDataContract.GroupPersonCount;
pEntity.GroupRoundedDuration = pDataContract.GroupRoundedDuration;
pEntity.ServiceRecordType = pDataContract.ServiceRecordType;
pEntity.DurationInStunden = pDataContract.DurationInStunden;
pEntity.DurationInStunden = pDataContract.DurationInStunden;
pEntity.ServiceRecordFormat = pDataContract.ServiceRecordFormat;
pEntity.ServiceRecordFormat = pDataContract.ServiceRecordFormat;
pEntity.IP = pDataContract.IP;
pEntity.IP = pDataContract.IP;
if (pEntity.ServiceDescription == null || pEntity.ServiceDescription.Oid != pDataContract.ServiceDescription.ServiceDescriptionOid)
{
pEntity.ServiceDescription = DAOFactory.GenericDAO.LoadByID<ServiceDescription>(pDataContract.ServiceDescription.ServiceDescriptionOid.Value);
}
if (pEntity.ServiceDescription == null || pEntity.ServiceDescription.Oid != pDataContract.ServiceDescription.ServiceDescriptionOid)
{
pEntity.ServiceDescription = DAOFactory.GenericDAO.LoadByID<ServiceDescription>(pDataContract.ServiceDescription.ServiceDescriptionOid.Value);
}
if (pEntity.Employee == null || pEntity.Employee.Oid != pDataContract.Employee.EmployeeOid)
{
pEntity.Employee = DAOFactory.GenericDAO.LoadByID<Employee>(pDataContract.Employee.EmployeeOid);
}
if (pEntity.Employee == null || pEntity.Employee.Oid != pDataContract.Employee.EmployeeOid)
{
pEntity.Employee = DAOFactory.GenericDAO.LoadByID<Employee>(pDataContract.Employee.EmployeeOid);
}
if (pDataContract.Customer == null)
{
pEntity.Customer = null;
}
else if (pEntity.Customer == null || pEntity.Customer.Oid != pDataContract.Customer.CustomerOid)
{
pEntity.Customer = DAOFactory.GenericDAO.LoadByID<Customer>(pDataContract.Customer.CustomerOid);
}
if (pDataContract.Customer == null)
{
pEntity.Customer = null;
}
else if (pEntity.Customer == null || pEntity.Customer.Oid != pDataContract.Customer.CustomerOid)
{
pEntity.Customer = DAOFactory.GenericDAO.LoadByID<Customer>(pDataContract.Customer.CustomerOid);
}
if (pDataContract.SupportConcept == null)
{
pEntity.SupportConcept = null;
}
else if (pEntity.SupportConcept == null || pEntity.SupportConcept.Oid != pDataContract.SupportConcept.SupportConceptOid)
{
pEntity.SupportConcept = DAOFactory.GenericDAO.LoadByID<SupportConcept>(pDataContract.SupportConcept.SupportConceptOid);
}
if (pDataContract.SupportConcept == null)
{
pEntity.SupportConcept = null;
}
else if (pEntity.SupportConcept == null || pEntity.SupportConcept.Oid != pDataContract.SupportConcept.SupportConceptOid)
{
pEntity.SupportConcept = DAOFactory.GenericDAO.LoadByID<SupportConcept>(pDataContract.SupportConcept.SupportConceptOid);
}
if (pDataContract.CostBearer == null)
{
pEntity.CostBearer2SupportConcept = null;
}
else if (pEntity.CostBearer2SupportConcept == null || pEntity.CostBearer2SupportConcept.CostBearer.Oid != pDataContract.CostBearer.CostBearerOid.Value)
{
pEntity.CostBearer2SupportConcept = pEntity.SupportConcept.CostBearer2SupportConceptList.Single(cb2sc => cb2sc.CostBearer.Oid == pDataContract.CostBearer.CostBearerOid);
}
else if (pEntity.CostBearer2SupportConceptOid != null && pDataContract.CostBearer2SupportConceptOid != null && pEntity.CostBearer2SupportConceptOid != pDataContract.CostBearer2SupportConceptOid)
{
pEntity.CostBearer2SupportConcept = DAOFactory.GenericDAO.LoadByID<CostBearer2SupportConcept>(pDataContract.CostBearer2SupportConceptOid.Value);
}
if (pDataContract.CostBearer == null)
{
pEntity.CostBearer2SupportConcept = null;
}
else if (pEntity.CostBearer2SupportConcept == null || pEntity.CostBearer2SupportConcept.CostBearer.Oid != pDataContract.CostBearer.CostBearerOid.Value)
{
pEntity.CostBearer2SupportConcept = pEntity.SupportConcept.CostBearer2SupportConceptList.Single(cb2sc => cb2sc.CostBearer.Oid == pDataContract.CostBearer.CostBearerOid);
}
else if (pEntity.CostBearer2SupportConceptOid != null && pDataContract.CostBearer2SupportConceptOid != null && pEntity.CostBearer2SupportConceptOid != pDataContract.CostBearer2SupportConceptOid)
{
pEntity.CostBearer2SupportConcept = DAOFactory.GenericDAO.LoadByID<CostBearer2SupportConcept>(pDataContract.CostBearer2SupportConceptOid.Value);
}
if (pDataContract.Goals == null)
{
pDataContract.Goals = new List<ValueListEntryDC>();
}
if (pDataContract.Goals == null)
{
pDataContract.Goals = new List<ValueListEntryDC>();
}
foreach (var v2o in pEntity.ValueList)
{
foreach (var entryDc in pDataContract.Goals)
{
if (entryDc.ValueListEntryOid.HasValue && entryDc.ValueListEntryOid == v2o.Entry.Oid)
{
v2o.RatingTypeOid = entryDc.RatingTypeOid;
}
}
}
foreach (var v2o in pEntity.ValueList)
{
foreach (var entryDc in pDataContract.Goals)
{
if (entryDc.ValueListEntryOid.HasValue && entryDc.ValueListEntryOid == v2o.Entry.Oid)
{
v2o.RatingTypeOid = entryDc.RatingTypeOid;
}
}
}
pEntity.IsCreatedInMobileClient = pDataContract.IsCreatedInMobileClient;
pEntity.Betrag = pDataContract.Betrag;
var globalGoalCats =
pEntity.IsCreatedInMobileClient = pDataContract.IsCreatedInMobileClient;
pEntity.Betrag = pDataContract.Betrag;
var globalGoalCats =
pDataContract.Goals.Where(g => g.Type == ValueListEntryType.SupportConceptGoalCategoryType).ToList();
var globalGoals =
pDataContract.Goals.Where(g => g.Type == ValueListEntryType.SupportConceptGoalType).ToList();
var globalGoals =
pDataContract.Goals.Where(g => g.Type == ValueListEntryType.SupportConceptGoalType).ToList();
var individualGoalCats =
pDataContract.Goals.Where(g => g.Type == ValueListEntryType.SupportConceptIndividualGoalCategoryType).ToList();
var individualGoals =
pDataContract.Goals.Where(g => g.Type == ValueListEntryType.SupportConceptIndividualGoalType).ToList();
var individualGoals =
pDataContract.Goals.Where(g => g.Type == ValueListEntryType.SupportConceptIndividualGoalType).ToList();
MapperFactory.ValueListEntryDC_ValueListEntry.MapValueEntryListBack2Entity(globalGoalCats, pEntity.ValueList, ValueListEntryType.SupportConceptGoalCategoryType, TableID.ServiceRecord, false);
//if (globalGoals.Count > 0)
MapperFactory.ValueListEntryDC_ValueListEntry.MapValueEntryListBack2Entity(globalGoals, pEntity.ValueList, ValueListEntryType.SupportConceptGoalType, TableID.ServiceRecord, false);
MapperFactory.ValueListEntryDC_ValueListEntry.MapValueEntryListBack2Entity(individualGoalCats, pEntity.ValueList, ValueListEntryType.SupportConceptIndividualGoalCategoryType, TableID.ServiceRecord, false);
//if (globalGoals.Count > 0)
MapperFactory.ValueListEntryDC_ValueListEntry.MapValueEntryListBack2Entity(globalGoals, pEntity.ValueList, ValueListEntryType.SupportConceptGoalType, TableID.ServiceRecord, false);
MapperFactory.ValueListEntryDC_ValueListEntry.MapValueEntryListBack2Entity(individualGoalCats, pEntity.ValueList, ValueListEntryType.SupportConceptIndividualGoalCategoryType, TableID.ServiceRecord, false);
//if (individualGoals.Count > 0)
MapperFactory.ValueListEntryDC_ValueListEntry.MapValueEntryListBack2Entity(individualGoals, pEntity.ValueList, ValueListEntryType.SupportConceptIndividualGoalType, TableID.ServiceRecord, false);
MapperFactory.ValueListEntryDC_ValueListEntry.MapValueEntryListBack2Entity(individualGoals, pEntity.ValueList, ValueListEntryType.SupportConceptIndividualGoalType, TableID.ServiceRecord, false);
return pEntity;
}
return pEntity;
}
protected override bool AreDCAndEntityEqual(ServiceRecordDC pDC, ServiceRecord pEntity)
{
if (pDC.ServiceRecordOid == null)
{
return false;
}
protected override bool AreDCAndEntityEqual(ServiceRecordDC pDC, ServiceRecord pEntity)
{
if (pDC.ServiceRecordOid == null)
{
return false;
}
return pDC.ServiceRecordOid == pEntity.Oid;
}
return pDC.ServiceRecordOid == pEntity.Oid;
}
public override Dictionary<string, object> ToJsonDictionary(ServiceRecordDC service_record)
{
var record_dict = new Dictionary<string, object>
{
{ "StartDate", service_record.Start },
{ "EndDate", service_record.End },
{ "Duration (Std)", service_record.DurationInStunden },
{ "ServiceCategory", service_record.ServiceDescription.Category.Name },
{ "ServiceDescription", service_record.ServiceDescription.Name },
{ "Documentation", service_record.Notice
+ "\n" + service_record.Notice2
+ "\n" + service_record.Notice3
+ "\n" + service_record.Notice4
+ "\n" + service_record.Notice5},
{ "Distance (Meter)", service_record.DistanceInMeter ?? 0 },
{ "InsertedOn", service_record.InsertedOn },
{ "Betrag", service_record.Betrag },
{ "InsertUser", service_record.InsUser },
{ "Employee", service_record.Employee }
};
{"ServiceRecordOid", service_record.ServiceRecordOid},
{ "StartDate", service_record.Start },
{ "EndDate", service_record.End },
{ "Duration (Std)", service_record.DurationInStunden },
{ "ServiceCategory", service_record.ServiceDescription.Category.Name },
{ "ServiceDescription", service_record.ServiceDescription.Name },
{ "Documentation", service_record.Notice
+ "\n" + service_record.Notice2
+ "\n" + service_record.Notice3
+ "\n" + service_record.Notice4
+ "\n" + service_record.Notice5},
{ "Distance (Meter)", service_record.DistanceInMeter ?? 0 },
{ "InsertedOn", service_record.InsertedOn },
{ "Betrag", service_record.Betrag },
{ "InsertUser", service_record.InsUser },
{ "Employee", service_record.Employee }
};
return record_dict;
}

View File

@@ -0,0 +1,18 @@
using BeWo.Data.Entities;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BeWo.Service.Interfaces
{
public interface IJsonMapper<TEntity, TDC>
where TDC : new() where TEntity : BeWoEntityBase, new()
{
Dictionary<string, object> ToJsonDictionary(TDC pDC);
Dictionary<string, object> ToJsonDictionary(TEntity pEntity);
IList<Dictionary<string, object>> ToJsonDictionary(IList<TEntity> pEntities);
IList<Dictionary<string, object>> ToJsonDictionary(IList<TDC> pDCs);
}
}

View File

@@ -230,6 +230,7 @@
<Compile Include="Core\DiamantExporter.cs" />
<Compile Include="Core\ExcelDownload.cs" />
<Compile Include="Core\FileAttachmentUtils.cs" />
<Compile Include="Core\MergedConfig.cs" />
<Compile Include="Core\ServiceLogic.cs" />
<Compile Include="Core\SettingsLogic.cs" />
<Compile Include="Core\Utils.cs" />
@@ -417,6 +418,7 @@
<Compile Include="Import\TextAbschnittReader.cs" />
<Compile Include="Import\TextAbschnitt.cs" />
<Compile Include="Import\Perseh\PersehReader.cs" />
<Compile Include="Interfaces\IJsonMapper.cs" />
<Compile Include="Invoicing\ApprovalPeriod.cs" />
<Compile Include="Invoicing\GeneralInvoiceCreation.cs" />
<Compile Include="Invoicing\SbdDefaultInvoiceCreation.cs" />
@@ -546,7 +548,7 @@
<Compile Include="ServiceImplementations\ValueListServiceImp.cs" />
<Compile Include="Configuration\AppSettings.cs" />
<Compile Include="ServiceProxy\OpenWebUIFacade.cs" />
<Compile Include="ServiceUtils\AiSystemBuilder.cs" />
<Compile Include="AI\AiPromptFactory.cs" />
<Compile Include="ServiceUtils\DistanceCalculator\AddressRouteManager.cs" />
<Compile Include="ServiceUtils\DistanceCalculator\AddressRouteMatrix.cs" />
<Compile Include="ServiceUtils\DistanceCalculator\GoogleDistanceMatrixAPI.cs" />

View File

@@ -17,32 +17,42 @@ namespace BeWo.Service.ServiceContracts
{
[FaultContract(typeof(BeWoFault))]
[OperationContract]
[RequirePermission(BS.Shared.UserRightType.AiModuleView)]
[RequirePermission(UserRightType.AiModuleView, UserRightType.AiModuleView2)]
AiConfigDC GetAiConfig();
[FaultContract(typeof(BeWoFault))]
[OperationContract]
[RequirePermission(BS.Shared.UserRightType.AiModuleView)]
[RequirePermission(UserRightType.AiModuleViewSetting)]
AiConfigDC UpdateAiConfig(AiConfigDC toUpdate);
[FaultContract(typeof(BeWoFault))]
[OperationContract]
[RequirePermission(BS.Shared.UserRightType.AiModuleView)]
[RequirePermission(UserRightType.AiModuleView, UserRightType.AiModuleView2)]
IEnumerable<AiModelDC> GetAiModels();
[FaultContract(typeof(BeWoFault))]
[OperationContract]
[RequirePermission(BS.Shared.UserRightType.AiModuleView)]
IEnumerable<AiConversationDC> GetAiConversations(int uicontext);
[RequirePermission(UserRightType.AiModuleView, UserRightType.AiModuleView2)]
IEnumerable<AiConversationDC> GetAiConversations(int uicontext, long? oid);
[FaultContract(typeof(BeWoFault))]
[OperationContract]
[RequirePermission(BS.Shared.UserRightType.AiModuleView)]
[RequirePermission(UserRightType.AiModuleChatAdd)]
AiConversationDC CreateAiConversation(AiConversationDC conversation, long modell_oid);
[FaultContract(typeof(BeWoFault))]
[OperationContract]
[RequirePermission(BS.Shared.UserRightType.AiModuleView)]
[RequirePermission(UserRightType.AiModuleChatClone)]
AiConversationDC CloneAiConversation(long conversation_oid, long? message_oid);
[FaultContract(typeof(BeWoFault))]
[OperationContract]
[RequirePermission(UserRightType.AiModuleChatDelete)]
void DeleteAiConversation(long conversation_oid);
[FaultContract(typeof(BeWoFault))]
[OperationContract]
[RequirePermission(UserRightType.AiModuleChatAdd)]
AiConversationMessageDC[] SendNewMessage(long conversation, string message);
}
}

View File

@@ -2,6 +2,7 @@
using BeWo.Data.Access;
using BeWo.Data.Entities;
using BeWo.Data.Security;
using BeWo.Service.AI;
using BeWo.Service.DCEntityMapper;
using BeWo.Service.ServiceContracts;
using BeWo.Service.ServiceProxy;
@@ -10,16 +11,20 @@ using BS.Shared;
using BS.Shared.DataContracts;
using BS.Shared.DataContracts.Feature.AI;
using BS.Shared.DataContracts.MikePHPContracts;
using DevExpress.Drawing.Internal.Interop;
using DevExpress.Entity.Model.Metadata;
using DevExpress.XtraCharts.Native;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.ExceptionServices;
using System.Security.Cryptography;
using System.ServiceModel;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Interop;
namespace BeWo.Service.ServiceImplementations
{
@@ -43,7 +48,6 @@ namespace BeWo.Service.ServiceImplementations
return config_dc;
}
public AiConfigDC UpdateAiConfig(AiConfigDC toUpdate)
{
if (toUpdate?.Oid is null)
@@ -67,22 +71,44 @@ namespace BeWo.Service.ServiceImplementations
return MapperFactory.AiModel.MapToNewDCs(models);
}
public IEnumerable<AiConversationDC> GetAiConversations(int uicontext)
public IEnumerable<AiConversationDC> GetAiConversations(int uicontext, long? oid)
{
// SearchDAO
var current_user = UserRightHelper.GetLoggedInUserWithOid();
var convs = DAOFactory.GenericDAO.GetAll<AiConversation>();
var filter = convs.Where(x => x.UIContext == uicontext && x.ApplicationUserOid == current_user.Oid);
var convs = DAOFactory.GenericDAO.GetAllActive<AiConversation>();
var filter = new List<AiConversation>();
foreach (var conv in convs)
{
if (conv.UIContext != uicontext)
continue;
if (conv.ApplicationUserOid != current_user.Oid)
continue;
if (oid is long ref_oid)
{
var first = conv.ContextBeWoObjects?.FirstOrDefault();
if (first is null)
continue;
if (first.Oid != ref_oid)
continue;
}
filter.Add(conv);
}
var dcs = MapperFactory.AiConversation.MapToNewDCs(filter);
return dcs;
}
public AiConversationDC CreateAiConversation(AiConversationDC conversation, long modell_oid)
{
var current_user = UserRightHelper.GetLoggedInUserWithOid();
var system_prompt = AiSystemBuilder.CreateSystemInstructions(conversation.UIContext, conversation.ContextBeWoObjects);
var system_prompt = AiPromptFactory.CreateSystemInstructions(conversation.UIContext, conversation.ContextBeWoObjects);
var conv = new AiConversation();
conv.Created = DateTime.Now;
@@ -108,6 +134,53 @@ namespace BeWo.Service.ServiceImplementations
return dc;
}
public AiConversationDC CloneAiConversation(long conversation_oid, long? last_message_oid)
{
var parent_conv = DAOFactory.GenericDAO.GetByID<AiConversation>(conversation_oid);
if (parent_conv is null)
throw new InvalidOperationException("conv_oid unknown");
var clone_conv = new AiConversation();
clone_conv.Created = DateTime.Now;
clone_conv.ContextBeWoObjects = parent_conv.ContextBeWoObjects.ToList();
clone_conv.Displayname = "Klon von " + parent_conv.Displayname;
clone_conv.Messages = new List<AiConversationMessage>();
clone_conv.Modell = parent_conv.Modell;
clone_conv.UIContext = parent_conv.UIContext;
clone_conv.Updated = DateTime.Now;
clone_conv.ApplicationUserOid = parent_conv.ApplicationUserOid;
foreach (var msg in parent_conv.Messages)
{
var clone_msg = new AiConversationMessage();
clone_msg.Created = msg.Created;
clone_msg.Message = msg.Message;
clone_msg.Role = msg.Role;
clone_msg.Duration = msg.Duration;
clone_msg.ModelName = msg.ModelName;
clone_conv.Messages.Add(clone_msg);
clone_msg.AiConversation = clone_conv;
if (msg.Oid == last_message_oid)
break;
}
DAOFactory.GenericDAO.Insert(clone_conv);
var dc = MapperFactory.AiConversation.MapToNewDC(clone_conv);
return dc;
}
public void DeleteAiConversation(long conversation_oid)
{
var conversation = DAOFactory.GenericDAO.LoadByID<AiConversation>(conversation_oid);
DAOFactory.GenericDAO.SetActivationType(conversation, ActivationTypeId.Deleted);
}
public AiConversationMessageDC[] SendNewMessage(long conversation, string message)
{
@@ -126,7 +199,7 @@ namespace BeWo.Service.ServiceImplementations
conv.Messages.Add(user_msg);
// Update DB Entity
DAOFactory.GenericDAO.Update(conv);
// DAOFactory.GenericDAO.Update(conv);
var conv_dc = MapperFactory.AiConversation.MapToNewDC(conv);
var user_msg_dc = MapperFactory.AiConversationMessage.MapToNewDC(user_msg);
@@ -175,6 +248,11 @@ namespace BeWo.Service.ServiceImplementations
if (models == null || !models.Any())
return null;
var llama = models.Where(x => x.ModelName.Contains("llama3.2"));
if(llama.Any())
return llama.First();
return models.First();
}
private IEnumerable<AiModel> getAiModels()
@@ -215,5 +293,6 @@ namespace BeWo.Service.ServiceImplementations
return models;
}
}
}

View File

@@ -110,7 +110,7 @@ namespace BeWo.Service.ServiceProxy
protected override string getKey()
{
var key = ConfigurationManager.AppSettings["OpenWebUIKey"];
var key = Core.MergedConfig.GetSetting("OpenWebUIKey");
if (string.IsNullOrEmpty(key))
throw new InvalidOperationException("OpenWebUIKey is missing");

View File

@@ -16,18 +16,21 @@ using System.Text;
using System.Threading.Tasks;
using System.Web;
namespace BeWo.Service.ServiceUtils
namespace BeWo.Service.AI
{
public static class AiSystemBuilder
public static class AiPromptFactory
{
public static string CreateSystemInstructions(int uicontext, Dictionary<TableID, long[]> bewoobjects)
{
var system_prompt = getSystemPrompt(2);
if (bewoobjects is null || bewoobjects.Count == 0)
return getSystemPrompt(3);
var data = getContextData(uicontext, bewoobjects);
var text = JsonConvert.SerializeObject(data);
var system_prompt = getSystemPrompt(2);
var result = system_prompt + text;
return result;
@@ -67,11 +70,11 @@ namespace BeWo.Service.ServiceUtils
{
switch (uicontext)
{
case 0: break;
case 0: return createSupportConceptNavigationContext(bewoobjects);
case 1: return createCustomerNavigationContext(bewoobjects);
case 2: return createPersonNavigationContext(bewoobjects);
case 3: return createEmployeeNavigationContext(bewoobjects);
case 4: break;
case 4: return createOrganisationNavigationContext(bewoobjects);
case 5: break;
case 6: break;
case 7: break;
@@ -87,11 +90,28 @@ namespace BeWo.Service.ServiceUtils
case 17: break;
case 18: break;
case 19: return createServiceRecordContext(bewoobjects);
case 20: return createCustomerContext(bewoobjects);
case 21: break;
case 22: break;
}
throw new NotImplementedException("UI Context unknown");
}
#region Navigation
private static Dictionary<string, object> createSupportConceptNavigationContext(Dictionary<TableID, long[]> bewoobjects)
{
var supports = LoadEntities(bewoobjects, TableID.SupportConcept, MapperFactory.CompactSupportConceptDC_SupportConcept);
var dict = new Dictionary<string, object>
{
{ "Aktuelle Ansicht", "Hilfeplan Navigation" },
{ "Aktueller Ansichtsfilter", "Funktion noch nicht verfügbar" },
{ "Hilfeplanliste", (object)supports ?? "keine Hilfepläne sichtbar" }
};
return dict;
}
private static Dictionary<string, object> createCustomerNavigationContext(Dictionary<TableID, long[]> bewoobjects)
{
var klienten = LoadEntities(bewoobjects, TableID.Customer, MapperFactory.CompactCustomerDC_Customer);
@@ -131,6 +151,30 @@ namespace BeWo.Service.ServiceUtils
return dict;
}
private static Dictionary<string, object> createOrganisationNavigationContext(Dictionary<TableID, long[]> bewoobjects)
{
Action<Organisation, CompactOrganisationDC> loadAddress = (entity, dc) =>
{
if (entity.Address != null)
{
dc.AddressLine1 = entity.Address.AddressLine1;
dc.Street = entity.Address.Street;
dc.PostalCode = entity.Address.PostalCode;
dc.Town = entity.Address.Town;
}
};
var orgas = LoadEntities(bewoobjects, TableID.Organisation, MapperFactory.CompactOrganisationDC_Organisation, loadAddress);
var dict = new Dictionary<string, object>
{
{ "Aktuelle Ansicht", "Organisation Navigation" },
{ "Aktueller Ansichtsfilter", "Funktion noch nicht verfügbar" },
{ "Organisationsliste", (object)orgas ?? "keine Organisationen sichtbar" }
};
return dict;
}
private static Dictionary<string, object> createServiceRecordContext(Dictionary<TableID, long[]> bewoobjects)
{
var customer = LoadEntity(bewoobjects, TableID.Customer, MapperFactory.CompactCustomerDC_Customer);
@@ -140,9 +184,9 @@ namespace BeWo.Service.ServiceUtils
var sub_dict = new Dictionary<string, object>()
{
{ "CustomerName Ansicht", customer },
{ "CostBearerName", costbearer },
{ "SupportConceptDuration", supportconcept }
{ "Klient", customer },
{ "Kostenträger", costbearer },
{ "Hilfeplan", supportconcept }
};
var dict = new Dictionary<string, object>
@@ -155,9 +199,28 @@ namespace BeWo.Service.ServiceUtils
return dict;
}
#endregion
#region SinglePage
private static Dictionary<string, object> createCustomerContext(Dictionary<TableID, long[]> bewoobjects)
{
var klient = LoadEntity(bewoobjects, TableID.Customer, MapperFactory.CustomerDC_Customer);
var dict = new Dictionary<string, object>
{
{ "Aktuelle Ansicht", "Klienten Daten" },
{ "Klient", klient }
};
return dict;
}
#endregion
#region LOAD Methods
private static object LoadProperty<TEntity, TDC>
(Dictionary<TableID, long[]> bewoobjects, TableID tid, IDCEntityMapper<TEntity, TDC> mapper, Func<TDC, object> getPropertyFunc)
(Dictionary<TableID, long[]> bewoobjects, TableID tid, AbstractIDCEntityMapper<TEntity, TDC> mapper, Func<TDC, object> getPropertyFunc)
where TDC : new() where TEntity : BeWoEntityBase, new()
{
if (!bewoobjects.TryGetValue(tid, out long[] oids) || (oids?.Length ?? 0) == 0)
@@ -171,7 +234,7 @@ namespace BeWo.Service.ServiceUtils
}
private static Dictionary<string, object> LoadEntity<TEntity, TDC>
(Dictionary<TableID, long[]> bewoobjects, TableID tid, IDCEntityMapper<TEntity, TDC> mapper)
(Dictionary<TableID, long[]> bewoobjects, TableID tid, AbstractIDCEntityMapper<TEntity, TDC> mapper)
where TDC : new() where TEntity : BeWoEntityBase, new()
{
if (!bewoobjects.TryGetValue(tid, out long[] oids) || (oids?.Length ?? 0) == 0)
@@ -184,18 +247,44 @@ namespace BeWo.Service.ServiceUtils
}
private static IList<Dictionary<string, object>> LoadEntities<TEntity, TDC>
(Dictionary<TableID, long[]> bewoobjects, TableID tid, IDCEntityMapper<TEntity, TDC> mapper)
(Dictionary<TableID, long[]> bewoobjects, TableID tid, AbstractIDCEntityMapper<TEntity, TDC> mapper)
where TDC : new() where TEntity : BeWoEntityBase, new()
{
if (!bewoobjects.TryGetValue(tid, out long[] oids) || (oids?.Length ?? 0) == 0)
return null;
var entities = DAOFactory.GenericDAO.GetByIDs<TEntity>(oids);
var dict = mapper.ToJsonDictionary(entities);
var dcs = mapper.MapToNewDCs(entities);
var dict = mapper.ToJsonDictionary(dcs);
return dict;
}
private static IList<Dictionary<string, object>> LoadEntities<TEntity, TDC>
(Dictionary<TableID, long[]> bewoobjects, TableID tid, AbstractIDCEntityMapper<TEntity, TDC> mapper, Action<TEntity, TDC> afterDC)
where TDC : new() where TEntity : BeWoEntityBase, new()
{
if (!bewoobjects.TryGetValue(tid, out long[] oids) || (oids?.Length ?? 0) == 0)
return null;
var entities = DAOFactory.GenericDAO.GetByIDs<TEntity>(oids);
var dcs = new List<TDC>();
foreach (var entity in entities)
{
var dc = mapper.MapToNewDC(entity);
afterDC(entity, dc);
dcs.Add(dc);
}
var dict = mapper.ToJsonDictionary(dcs);
return dict;
}
#endregion
private static string getSystemPrompt(int i)
{
var assembly = Assembly.GetExecutingAssembly();

View File

@@ -1 +1,8 @@
Lets count to infinity. You take my input, add 1 and just return the number. You do nothing more.
Du bist ein intelligenter Assistent.
Deine Aufgabe ist es, basierend auf einer Nutzeranfrage, den bereitgestellten Daten und dem bisherigen Chatverlauf eine klare und präzise Antwort zu generieren.
WICHTIG:
- Verwende ausschließlich die bereitgestellten Daten für deine Antwort.
- Falls die Daten nicht die benötigte Information enthalten, gib an, dass die Daten fehlen, anstatt zu raten.
- KEINE Erklärungen, KEIN Fließtext, KEINE zusätzlichen Notizen!
- Deine Antwort soll eine direkte und verständliche Antwort für den Nutzer sein.

View File

@@ -627,10 +627,12 @@ namespace BS.Shared
AiChatInZeiterfassung = 180000,
AiModuleView = 201000,
AiModuleView2 = 201004,
AiModuleChatAdd = 201001,
AiModuleChatEdit = 201002,
AiModuleChatDelete = 201003
AiModuleChatDelete = 201003,
AiModuleView2 = 201004,
AiModuleViewSetting = 201005,
AiModuleChatClone = 201006,
}
public enum PersonType

View File

@@ -639,7 +639,7 @@ namespace BS.Shared.Core
{
var dict = new Dictionary<UserRightType, String>();
var action_keywords = new string[] { "ansehen", "verwalten", "anlegen", "bearbeiten", "löschen", "senden" };
var action_keywords = new string[] { "ansehen", "verwalten", "anlegen", "bearbeiten", "löschen", "senden", "klonen" };
dict.Add(UserRightType.CreateAll, Translator.Translate("Alles anlegen"));
@@ -718,8 +718,10 @@ namespace BS.Shared.Core
dict.Add(UserRightType.AiModuleView, Translator.Translate($"Module AI {action_keywords[0]}"));
dict.Add(UserRightType.AiModuleView2, Translator.Translate($"Module AI 2 {action_keywords[0]}"));
dict.Add(UserRightType.AiModuleChatAdd, Translator.Translate($"Module AI-> Konversationen/Nachrichten {action_keywords[2]}"));
dict.Add(UserRightType.AiModuleChatClone, Translator.Translate($"Module AI-> Konversationen/Nachrichten {action_keywords[6]}"));
dict.Add(UserRightType.AiModuleChatEdit, Translator.Translate($"Module AI-> Konversationen/Nachrichten {action_keywords[3]}"));
dict.Add(UserRightType.AiModuleChatDelete, Translator.Translate($"Module AI-> Konversationen/Nachrichten {action_keywords[4]}"));
dict.Add(UserRightType.AiModuleViewSetting, Translator.Translate($"Module AI-> Einstellungen {action_keywords[0]}"));
dict.Add(UserRightType.PersonView_Create, Translator.Translate("Personen anlegen"));
dict.Add(UserRightType.PersonView_Delete, Translator.Translate("Personen löschen"));

View File

@@ -2,10 +2,6 @@
{
public static class SettingsKeys
{
// Modules
public static string ModuleAiEnabled => "ModuleAiEnabled";
public static string ShowExpiredSupportConcepts => "ShowExpiredSupportConcepts";
public static string ShowOnlyMySupportConcepts => "ShowOnlyMySupportConcepts";
public static string LastSelectedServiceRecordTimeInterval => "LastSelectedServiceRecordTimeInterval";
@@ -118,5 +114,10 @@
public static string ShowServicesOverviewHalfOrWholeMonth => "ShowServicesOverviewHalfOrWholeMonth";
public static string OpenReportInNewWindow => "OpenReportInNewWindow";
}
// Module Ai
public static string ModuleAiEnabled => "ModuleAiEnabled";
public static string ModuleAiSettingsEnabled => "ModuleAiSettingsEnabled";
}
}