zwischenstand blablacar
This commit is contained in:
@@ -1203,9 +1203,12 @@
|
||||
<Compile Include="ViewModel\AdditionalServiceGroupOfPeopleVM.cs" />
|
||||
<Compile Include="ViewModel\AdditionalServiceRegionVM.cs" />
|
||||
<Compile Include="ViewModel\AdditionalServiceVM.cs" />
|
||||
<Compile Include="ViewModel\AiConversationMessageVM.cs" />
|
||||
<Compile Include="ViewModel\AiConversationVM.cs" />
|
||||
<Compile Include="ViewModel\BaseVM.cs" />
|
||||
<Compile Include="ViewModel\CustomerVermittlungArbeitVM.cs" />
|
||||
<Compile Include="ViewModel\ListViewModel\AbstractListVM.cs" />
|
||||
<Compile Include="ViewModel\ListViewModel\AiConversationListVM.cs" />
|
||||
<Compile Include="ViewModel\ListViewModel\CustomerVermittlungArbeitListVM.cs" />
|
||||
<Compile Include="ViewModel\Wohnhilfe\CustomerWohnhilfeBereichBundVM.cs" />
|
||||
<Compile Include="ViewModel\Wohnhilfe\CustomerWohnhilfeBereichEinkommenUndArbeitVM.cs" />
|
||||
|
||||
@@ -145,7 +145,7 @@ namespace BeWo
|
||||
{
|
||||
DebugConfigMode = DebugConfigMode.FeatureAiModule,
|
||||
AutoLogin = true,
|
||||
//SelectView = UIContext.Finance,
|
||||
SelectView = UIContext.AiConversation,
|
||||
//SelectIndex = 8,
|
||||
//DefaultLoginUsername = "m1",
|
||||
//DefaultLoginPassword = "bewobewo",
|
||||
|
||||
@@ -9,34 +9,47 @@
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace BeWo.ServiceProxy
|
||||
{
|
||||
{
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
|
||||
[System.ServiceModel.ServiceContractAttribute(ConfigurationName="BeWo.ServiceProxy.IOperationsEnhancedService")]
|
||||
public interface IOperationsEnhancedService
|
||||
{
|
||||
|
||||
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsEnhancedService/Method1", ReplyAction="http://tempuri.org/IOperationsEnhancedService/Method1Response")]
|
||||
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsEnhancedService/Method1BeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BeWo.ServiceProxy.BeWoFault))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BeWo.ServiceProxy.BeWoFaultType))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.AiModelDC>))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.AiModelDC))]
|
||||
object Method1(object input, object input2);
|
||||
|
||||
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsEnhancedService/Method2", ReplyAction="http://tempuri.org/IOperationsEnhancedService/Method2Response")]
|
||||
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsEnhancedService/Method2BeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BeWo.ServiceProxy.BeWoFault))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BeWo.ServiceProxy.BeWoFaultType))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.AiModelDC>))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.AiModelDC))]
|
||||
object Method2(object input, object input2);
|
||||
|
||||
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsEnhancedService/Method3", ReplyAction="http://tempuri.org/IOperationsEnhancedService/Method3Response")]
|
||||
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsEnhancedService/Method3BeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BeWo.ServiceProxy.BeWoFault))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BeWo.ServiceProxy.BeWoFaultType))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.AiModelDC>))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.AiModelDC))]
|
||||
object Method3(object input, object input2);
|
||||
|
||||
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsEnhancedService/Method4", ReplyAction="http://tempuri.org/IOperationsEnhancedService/Method4Response")]
|
||||
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsEnhancedService/Method4BeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BeWo.ServiceProxy.BeWoFault))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BeWo.ServiceProxy.BeWoFaultType))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.AiModelDC>))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.AiModelDC))]
|
||||
object Method4(object input, object input2);
|
||||
|
||||
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsEnhancedService/GetAiModels", ReplyAction="http://tempuri.org/IOperationsEnhancedService/GetAiModelsResponse")]
|
||||
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsEnhancedService/GetAiModelsBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
|
||||
System.Collections.Generic.List<BS.Shared.DataContracts.AiModelDC> GetAiModels();
|
||||
}
|
||||
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
|
||||
@@ -92,5 +105,10 @@ namespace BeWo.ServiceProxy
|
||||
{
|
||||
return base.Channel.Method4(input, input2);
|
||||
}
|
||||
|
||||
public System.Collections.Generic.List<BS.Shared.DataContracts.AiModelDC> GetAiModels()
|
||||
{
|
||||
return base.Channel.GetAiModels();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,6 +15,7 @@ using BS.Shared;
|
||||
using BS.Shared.DataContracts;
|
||||
using BS.Shared.DataContracts.Compact;
|
||||
using DevExpress.CodeParser;
|
||||
using DevExpress.Export.Xl;
|
||||
|
||||
namespace BeWo.ServiceProxy
|
||||
{
|
||||
@@ -77,10 +78,10 @@ namespace BeWo.ServiceProxy
|
||||
=> DoSync<OperationsEnhancedServiceClient, IOperationsEnhancedService>(pAction);
|
||||
public static void DoOperationsEnhancedServiceSnyc<T>(Func<IOperationsEnhancedService, T> pFunc)
|
||||
=> DoSync<OperationsEnhancedServiceClient, IOperationsEnhancedService, T>(pFunc);
|
||||
public static void DoOperationsEnhancedServiceAsnyc(Action<IOperationsEnhancedService> pAction, Action pCallback = null, bool showWaitDialog = true)
|
||||
=> DoAsync<OperationsEnhancedServiceClient, IOperationsEnhancedService>(pAction, pCallback, showWaitDialog);
|
||||
public static void DoOperationsEnhancedServiceAsnyc<T>(Func<IOperationsEnhancedService, T> pFunc, Action<T> pCallback = null, bool showWaitDialog = true)
|
||||
=> DoAsync<OperationsEnhancedServiceClient, IOperationsEnhancedService, T>(pFunc, pCallback, showWaitDialog);
|
||||
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 DoAccountingServiceAsync<T>(Func<IAccountingService, T> pFunc, Action<T> pCallBack, bool showWaitDialog)
|
||||
{
|
||||
@@ -295,14 +296,7 @@ namespace BeWo.ServiceProxy
|
||||
}
|
||||
public static void DoGkvAccountingServiceAsyncGUI<T>(Func<IGkvAccountingService, T> pFunc, Action<T> pCallBack, Dispatcher dispatcher)
|
||||
{
|
||||
Action<T> action = (t) => dispatcher.BeginInvoke(
|
||||
DispatcherPriority.Normal,
|
||||
(Action)delegate
|
||||
{
|
||||
pCallBack(t);
|
||||
});
|
||||
|
||||
DoAsync<GkvAccountingServiceClient, IGkvAccountingService, T>(pFunc, action, true);
|
||||
DoAsync<GkvAccountingServiceClient, IGkvAccountingService, T>(pFunc, pCallBack, true, dispatcher);
|
||||
}
|
||||
|
||||
public static void DoGkvAccountingServiceAsync(Action<IGkvAccountingService> pAction)
|
||||
@@ -685,6 +679,25 @@ 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)
|
||||
where TClient : ClientBase<TInterface>, TInterface, new()
|
||||
where TInterface : class
|
||||
{
|
||||
Action<T> action = pCallback;
|
||||
|
||||
if (dispatcher != null)
|
||||
{
|
||||
action = (t) => dispatcher.BeginInvoke(
|
||||
DispatcherPriority.Normal,
|
||||
(Action)delegate
|
||||
{
|
||||
pCallback(t);
|
||||
});
|
||||
}
|
||||
|
||||
DoAsync<TClient, TInterface, T>(pFunc, action, showWaitDialog);
|
||||
}
|
||||
|
||||
private static void DoAsync<TClient, TInterface, T>(Func<TInterface, T> pFunc, Action<T> pCallback, Action pErrorCallback, bool showWaitDialog)
|
||||
where TClient : ClientBase<TInterface>, TInterface, new()
|
||||
where TInterface : class
|
||||
@@ -756,6 +769,25 @@ namespace BeWo.ServiceProxy
|
||||
DoAsync<TClient, TInterface>(pAction, null, showWaitDialog);
|
||||
}
|
||||
|
||||
private static void DoAsync<TClient, TInterface>(Action<TInterface> pAction, Action pCallback, bool showWaitDialog, Dispatcher dispatcher)
|
||||
where TClient : ClientBase<TInterface>, TInterface, new()
|
||||
where TInterface : class
|
||||
{
|
||||
Action action = pCallback;
|
||||
|
||||
if(dispatcher != null)
|
||||
{
|
||||
action = () => dispatcher.BeginInvoke(
|
||||
DispatcherPriority.Normal,
|
||||
(Action)delegate
|
||||
{
|
||||
pCallback();
|
||||
});
|
||||
}
|
||||
|
||||
DoAsync<TClient, TInterface>(pAction, action, showWaitDialog);
|
||||
}
|
||||
|
||||
// private static void DoAsync<TClient, TInterface>(Action<TInterface> pAction, Action pCallback, bool )
|
||||
// void with callback
|
||||
private static void DoAsync<TClient, TInterface>(Action<TInterface> pAction, Action pCallback, bool showWaitDialog)
|
||||
|
||||
@@ -94,7 +94,7 @@
|
||||
<GradientStop Offset="0.546" Color="#FFFBC15C" />
|
||||
</LinearGradientBrush>
|
||||
|
||||
<SolidColorBrush x:Key="ModuleAiChatTabItem" Color="#FFFFFFBF"/>
|
||||
<SolidColorBrush x:Key="ModuleAiChatPrimaryColor" Color="#FFCECF7F"/>
|
||||
<SolidColorBrush x:Key="ModuleAiChatTabItem" Color="#FFFFFFBF" />
|
||||
<SolidColorBrush x:Key="ModuleAiChatPrimaryColor" Color="#FFCECF7F" />
|
||||
<!-- Endregion -->
|
||||
</ResourceDictionary>
|
||||
@@ -1,17 +1,22 @@
|
||||
<view:BeWoView x:Class="BeWo.View.BargeldkassenView"
|
||||
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:view="clr-namespace:BeWo.View"
|
||||
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
|
||||
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
|
||||
xmlns:validation="clr-namespace:BeWo.Validation"
|
||||
xmlns:core="clr-namespace:BS.Shared.Core;assembly=BS.Shared"
|
||||
xmlns:controls="clr-namespace:BeWo.View.Controls"
|
||||
xmlns:t="clr-namespace:BeWo.MultiLanguage.Markup"
|
||||
Height="Auto" Width="Auto" HorizontalAlignment="Stretch"
|
||||
mc:Ignorable="d" VerticalAlignment="Stretch" Focusable="True">
|
||||
<view:BeWoView
|
||||
x:Class="BeWo.View.BargeldkassenView"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:controls="clr-namespace:BeWo.View.Controls"
|
||||
xmlns:core="clr-namespace:BS.Shared.Core;assembly=BS.Shared"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
|
||||
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:t="clr-namespace:BeWo.MultiLanguage.Markup"
|
||||
xmlns:validation="clr-namespace:BeWo.Validation"
|
||||
xmlns:view="clr-namespace:BeWo.View"
|
||||
Width="Auto"
|
||||
Height="Auto"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Stretch"
|
||||
Focusable="True"
|
||||
mc:Ignorable="d">
|
||||
<view:BeWoView.Resources>
|
||||
<Style x:Key="bargeldkassenListBoxItemStyle" TargetType="{x:Type ListBoxItem}">
|
||||
<Setter Property="Background" Value="#00FFFFFF" />
|
||||
@@ -21,15 +26,20 @@
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type ListBoxItem}">
|
||||
<Border x:Name="Bd" SnapsToDevicePixels="True" Background="{TemplateBinding Background}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}">
|
||||
<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
||||
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
|
||||
Content="{TemplateBinding Content}"
|
||||
ContentStringFormat="{TemplateBinding ContentStringFormat}"
|
||||
ContentTemplate="{TemplateBinding ContentTemplate}" />
|
||||
<Border
|
||||
x:Name="Bd"
|
||||
Padding="{TemplateBinding Padding}"
|
||||
Background="{TemplateBinding Background}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
SnapsToDevicePixels="True">
|
||||
<ContentPresenter
|
||||
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
||||
Content="{TemplateBinding Content}"
|
||||
ContentStringFormat="{TemplateBinding ContentStringFormat}"
|
||||
ContentTemplate="{TemplateBinding ContentTemplate}"
|
||||
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsEnabled" Value="False">
|
||||
@@ -40,7 +50,7 @@
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
|
||||
<Style x:Key="HyperlinkStyle" TargetType="{x:Type Hyperlink}">
|
||||
<Setter Property="Foreground" Value="#FF2B508B" />
|
||||
<!--<Style.Triggers>
|
||||
@@ -53,18 +63,29 @@
|
||||
<GroupBox Header="Bargeldkassen" Style="{StaticResource ObjectEditGroupBox}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Button Content="Neue Kasse hinzufügen" Margin="3" Click="ButtonOpenAddBargeldkasseClick" IsEnabled="{Binding Path=DarfBargeldTransaktionAnlegen, RelativeSource={RelativeSource AncestorType={x:Type view:BargeldkassenView}}}" />
|
||||
<Button
|
||||
Margin="3"
|
||||
Click="ButtonOpenAddBargeldkasseClick"
|
||||
Content="Neue Kasse hinzufügen"
|
||||
IsEnabled="{Binding Path=DarfBargeldTransaktionAnlegen, RelativeSource={RelativeSource AncestorType={x:Type view:BargeldkassenView}}}" />
|
||||
<controls:PopupNonTopmost x:Name="popup_newBargeldkasse">
|
||||
<Border Background="White" Padding="3" BorderThickness="1" BorderBrush="Gray">
|
||||
<GroupBox x:Name="groupbox_newBargeldkasse" Header="Neue Kasse hinzufügen" Style="{DynamicResource ObjectEditGroupBox}">
|
||||
<Border
|
||||
Padding="3"
|
||||
Background="White"
|
||||
BorderBrush="Gray"
|
||||
BorderThickness="1">
|
||||
<GroupBox
|
||||
x:Name="groupbox_newBargeldkasse"
|
||||
Header="Neue Kasse hinzufügen"
|
||||
Style="{DynamicResource ObjectEditGroupBox}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
@@ -76,25 +97,75 @@
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Label Grid.Column="0" Grid.Row="0" Content="Kassenname" VerticalAlignment="Center" />
|
||||
<TextBox Grid.Column="1" Grid.Row="0" VerticalAlignment="Center" Height="23" Margin="3,0,3,3" Text="{validation:ValidationBinding Path=NewVM.Kassenname}" />
|
||||
|
||||
<Label Grid.Column="0" Grid.Row="1" Content="Auszahlungsintervall" VerticalAlignment="Center" />
|
||||
<dxe:ComboBoxEdit Grid.Column="1" Grid.Row="1" VerticalAlignment="Center" Height="23" HorizontalAlignment="Left" Width="150" IsTextEditable="False"
|
||||
Margin="3,0,3,3" IsEnabled="{Binding Path=DarfBargeldtransaktionenBearbeiten, RelativeSource={RelativeSource AncestorType={x:Type view:BargeldkassenView}}}"
|
||||
ItemsSource="{Binding Path=Values, Source={x:Static core:DisplayEnum.Auszahlungsintervall}}" EditValue="{validation:ValidationBinding Path=NewVM.Auszahlungsintervall}" />
|
||||
|
||||
<Label Grid.Column="0" Grid.Row="2" Content="Anfangsbestand" VerticalAlignment="Center" />
|
||||
<dxe:TextEdit Grid.Column="1" Grid.Row="2" MaskType="Numeric" Mask="########0.00" MaskUseAsDisplayFormat="True" Height="23" Margin="3"
|
||||
EditValue="{validation:ValidationBinding Path=NewVM.Anfangsbestand}"/>
|
||||
|
||||
<StackPanel Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="3" Orientation="Horizontal" HorizontalAlignment="Right">
|
||||
<Button Click="ButtonAddBargeldkasseClick" Content="Hinzufügen" Height="25"
|
||||
FontWeight="Normal" Margin="3" VerticalAlignment="Center" HorizontalAlignment="Right" />
|
||||
|
||||
<Button HorizontalAlignment="Right" VerticalAlignment="Center" Height="25"
|
||||
Margin="3" Content="Abbrechen" Click="ButtonCancelAddBargeldkasseClick" />
|
||||
<Label
|
||||
Grid.Row="0"
|
||||
Grid.Column="0"
|
||||
VerticalAlignment="Center"
|
||||
Content="Kassenname" />
|
||||
<TextBox
|
||||
Grid.Row="0"
|
||||
Grid.Column="1"
|
||||
Height="23"
|
||||
Margin="3,0,3,3"
|
||||
VerticalAlignment="Center"
|
||||
Text="{validation:ValidationBinding Path=NewVM.Kassenname}" />
|
||||
|
||||
<Label
|
||||
Grid.Row="1"
|
||||
Grid.Column="0"
|
||||
VerticalAlignment="Center"
|
||||
Content="Auszahlungsintervall" />
|
||||
<dxe:ComboBoxEdit
|
||||
Grid.Row="1"
|
||||
Grid.Column="1"
|
||||
Width="150"
|
||||
Height="23"
|
||||
Margin="3,0,3,3"
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Center"
|
||||
EditValue="{validation:ValidationBinding Path=NewVM.Auszahlungsintervall}"
|
||||
IsEnabled="{Binding Path=DarfBargeldtransaktionenBearbeiten, RelativeSource={RelativeSource AncestorType={x:Type view:BargeldkassenView}}}"
|
||||
IsTextEditable="False"
|
||||
ItemsSource="{Binding Path=Values, Source={x:Static core:DisplayEnum.Auszahlungsintervall}}" />
|
||||
|
||||
<Label
|
||||
Grid.Row="2"
|
||||
Grid.Column="0"
|
||||
VerticalAlignment="Center"
|
||||
Content="Anfangsbestand" />
|
||||
<dxe:TextEdit
|
||||
Grid.Row="2"
|
||||
Grid.Column="1"
|
||||
Height="23"
|
||||
Margin="3"
|
||||
EditValue="{validation:ValidationBinding Path=NewVM.Anfangsbestand}"
|
||||
Mask="########0.00"
|
||||
MaskType="Numeric"
|
||||
MaskUseAsDisplayFormat="True" />
|
||||
|
||||
<StackPanel
|
||||
Grid.Row="3"
|
||||
Grid.Column="0"
|
||||
Grid.ColumnSpan="2"
|
||||
HorizontalAlignment="Right"
|
||||
Orientation="Horizontal">
|
||||
<Button
|
||||
Height="25"
|
||||
Margin="3"
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Center"
|
||||
Click="ButtonAddBargeldkasseClick"
|
||||
Content="Hinzufügen"
|
||||
FontWeight="Normal" />
|
||||
|
||||
<Button
|
||||
Height="25"
|
||||
Margin="3"
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Center"
|
||||
Click="ButtonCancelAddBargeldkasseClick"
|
||||
Content="Abbrechen" />
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
@@ -102,8 +173,15 @@
|
||||
</controls:PopupNonTopmost>
|
||||
<!--<Button Content="Neue Zahlung hinzufügen" Margin="3" Click="ButtonOpenAddBargeldtransaktionClick" IsEnabled="{Binding Path=DarfBargeldTransaktionAnlegen, RelativeSource={RelativeSource AncestorType={x:Type view:BargeldkassenView}}}" />-->
|
||||
<controls:PopupNonTopmost x:Name="popup_newBargeldtransaktion" Placement="MousePoint">
|
||||
<Border Background="White" Padding="3" BorderThickness="1" BorderBrush="Gray">
|
||||
<GroupBox x:Name="groupbox_newBargeldtransaktion" Header="Neue Zahlung zu einer Kasse hinzufügen" Style="{DynamicResource ObjectEditGroupBox}">
|
||||
<Border
|
||||
Padding="3"
|
||||
Background="White"
|
||||
BorderBrush="Gray"
|
||||
BorderThickness="1">
|
||||
<GroupBox
|
||||
x:Name="groupbox_newBargeldtransaktion"
|
||||
Header="Neue Zahlung zu einer Kasse hinzufügen"
|
||||
Style="{DynamicResource ObjectEditGroupBox}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
@@ -117,100 +195,239 @@
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<!-- RelativeSource={RelativeSource AncestorType={x:Type view:BargeldkassenView}} -->
|
||||
<!-- RelativeSource={RelativeSource AncestorType={x:Type view:BargeldkassenView}} -->
|
||||
<!--<Label Grid.Column="0" Grid.Row="0" Content="Kasse" VerticalAlignment="Center" />
|
||||
<dxe:ComboBoxEdit Grid.Column="1" Grid.Row="0" VerticalAlignment="Center" Height="23" Margin="3,0,3,3" ItemsSource="{Binding VMList}" Width="150" x:Name="NewTransaktionKassenCB"
|
||||
<dxe:ComboBoxEdit Grid.Column="1" Grid.Row="0" VerticalAlignment="Center" Height="23" Margin="3,0,3,3" ItemsSource="{Binding VMList}" Width="150" x:Name="NewTransaktionKassenCB"
|
||||
EditValue="{validation:ValidationBinding Path=SelectedBargeldkasse, UpdateSourceTrigger=PropertyChanged, RelativeSource={RelativeSource AncestorType={x:Type view:BargeldkassenView}}}" />-->
|
||||
|
||||
<Label Grid.Column="0" Grid.Row="0" Content="Datum" VerticalAlignment="Center" />
|
||||
<dxe:DateEdit Grid.Column="1" Grid.Row="0" MaskType="DateTimeAdvancingCaret"
|
||||
EditValue="{validation:ValidationBinding Path=NewBargeldtransaktion.Zahlungsdatum, UpdateSourceTrigger=PropertyChanged, RelativeSource={RelativeSource AncestorType={x:Type view:BargeldkassenView}}}" Height="23" Margin="3" x:Name="NewTransaktionDatumDateEdit" />
|
||||
<Label
|
||||
Grid.Row="0"
|
||||
Grid.Column="0"
|
||||
VerticalAlignment="Center"
|
||||
Content="Datum" />
|
||||
<dxe:DateEdit
|
||||
x:Name="NewTransaktionDatumDateEdit"
|
||||
Grid.Row="0"
|
||||
Grid.Column="1"
|
||||
Height="23"
|
||||
Margin="3"
|
||||
EditValue="{validation:ValidationBinding Path=NewBargeldtransaktion.Zahlungsdatum,
|
||||
UpdateSourceTrigger=PropertyChanged,
|
||||
RelativeSource={RelativeSource AncestorType={x:Type view:BargeldkassenView}}}"
|
||||
MaskType="DateTimeAdvancingCaret" />
|
||||
|
||||
<Label Grid.Column="0" Grid.Row="1" Content="Art" VerticalAlignment="Center" />
|
||||
<dxe:ComboBoxEdit Grid.Column="1" Grid.Row="1" Height="23" IsTextEditable="False" Margin="3,0,3,3"
|
||||
ItemsSource="{Binding Path=Values, Source={x:Static core:DisplayEnum.Zahlungstyp}}" x:Name="NewTransaktionZahlungstypComboBoxEdit"
|
||||
EditValue="{validation:ValidationBinding Path=NewBargeldtransaktion.Zahlungstyp, UpdateSourceTrigger=PropertyChanged, RelativeSource={RelativeSource AncestorType={x:Type view:BargeldkassenView}}}" />
|
||||
<Label
|
||||
Grid.Row="1"
|
||||
Grid.Column="0"
|
||||
VerticalAlignment="Center"
|
||||
Content="Art" />
|
||||
<dxe:ComboBoxEdit
|
||||
x:Name="NewTransaktionZahlungstypComboBoxEdit"
|
||||
Grid.Row="1"
|
||||
Grid.Column="1"
|
||||
Height="23"
|
||||
Margin="3,0,3,3"
|
||||
EditValue="{validation:ValidationBinding Path=NewBargeldtransaktion.Zahlungstyp,
|
||||
UpdateSourceTrigger=PropertyChanged,
|
||||
RelativeSource={RelativeSource AncestorType={x:Type view:BargeldkassenView}}}"
|
||||
IsTextEditable="False"
|
||||
ItemsSource="{Binding Path=Values, Source={x:Static core:DisplayEnum.Zahlungstyp}}" />
|
||||
|
||||
<Label Grid.Column="0" Grid.Row="2" Content="Betrag" VerticalAlignment="Center" />
|
||||
<dxe:TextEdit Grid.Column="1" Grid.Row="2" MaskType="Numeric" Mask="########0.00" MaskUseAsDisplayFormat="True" Height="23" Margin="3" x:Name="NewTransaktionBetragTextEdit"
|
||||
EditValue="{validation:ValidationBinding Path=NewBargeldtransaktion.Betrag, UpdateSourceTrigger=PropertyChanged, RelativeSource={RelativeSource AncestorType={x:Type view:BargeldkassenView}}}" />
|
||||
<Label Grid.Column="0" Grid.Row="3" Content="{t:Translate Belegnummer}" VerticalAlignment="Center" />
|
||||
<dxe:TextEdit Grid.Column="1" Grid.Row="3" Height="23" Margin="3" x:Name="NewTransaktionBelegnummerTextEdit"
|
||||
EditValue="{validation:ValidationBinding Path=NewBargeldtransaktion.Belegnummer, UpdateSourceTrigger=PropertyChanged, RelativeSource={RelativeSource AncestorType={x:Type view:BargeldkassenView}}}" />
|
||||
<Label
|
||||
Grid.Row="2"
|
||||
Grid.Column="0"
|
||||
VerticalAlignment="Center"
|
||||
Content="Betrag" />
|
||||
<dxe:TextEdit
|
||||
x:Name="NewTransaktionBetragTextEdit"
|
||||
Grid.Row="2"
|
||||
Grid.Column="1"
|
||||
Height="23"
|
||||
Margin="3"
|
||||
EditValue="{validation:ValidationBinding Path=NewBargeldtransaktion.Betrag,
|
||||
UpdateSourceTrigger=PropertyChanged,
|
||||
RelativeSource={RelativeSource AncestorType={x:Type view:BargeldkassenView}}}"
|
||||
Mask="########0.00"
|
||||
MaskType="Numeric"
|
||||
MaskUseAsDisplayFormat="True" />
|
||||
<Label
|
||||
Grid.Row="3"
|
||||
Grid.Column="0"
|
||||
VerticalAlignment="Center"
|
||||
Content="{t:Translate Belegnummer}" />
|
||||
<dxe:TextEdit
|
||||
x:Name="NewTransaktionBelegnummerTextEdit"
|
||||
Grid.Row="3"
|
||||
Grid.Column="1"
|
||||
Height="23"
|
||||
Margin="3"
|
||||
EditValue="{validation:ValidationBinding Path=NewBargeldtransaktion.Belegnummer,
|
||||
UpdateSourceTrigger=PropertyChanged,
|
||||
RelativeSource={RelativeSource AncestorType={x:Type view:BargeldkassenView}}}" />
|
||||
|
||||
<Label Grid.Column="0" Grid.Row="4" Content="Notiz" VerticalAlignment="Center" />
|
||||
<TextBox Grid.Column="1" Grid.Row="4" VerticalAlignment="Center" Height="60" Margin="3,0,3,3"
|
||||
ScrollViewer.CanContentScroll="False" VerticalScrollBarVisibility="Auto"
|
||||
HorizontalScrollBarVisibility="Hidden" TextWrapping="Wrap" AcceptsReturn="True"
|
||||
AutoWordSelection="True" Language="de-DE" SpellCheck.IsEnabled="True"
|
||||
x:Name="NewTransaktionNotizTextBox"
|
||||
Text="{Binding Path=NewBargeldtransaktion.Notice, UpdateSourceTrigger=PropertyChanged, RelativeSource={RelativeSource AncestorType={x:Type view:BargeldkassenView}}}"/>
|
||||
<Label
|
||||
Grid.Row="4"
|
||||
Grid.Column="0"
|
||||
VerticalAlignment="Center"
|
||||
Content="Notiz" />
|
||||
<TextBox
|
||||
x:Name="NewTransaktionNotizTextBox"
|
||||
Grid.Row="4"
|
||||
Grid.Column="1"
|
||||
Height="60"
|
||||
Margin="3,0,3,3"
|
||||
VerticalAlignment="Center"
|
||||
AcceptsReturn="True"
|
||||
AutoWordSelection="True"
|
||||
HorizontalScrollBarVisibility="Hidden"
|
||||
Language="de-DE"
|
||||
ScrollViewer.CanContentScroll="False"
|
||||
SpellCheck.IsEnabled="True"
|
||||
Text="{Binding Path=NewBargeldtransaktion.Notice, UpdateSourceTrigger=PropertyChanged, RelativeSource={RelativeSource AncestorType={x:Type view:BargeldkassenView}}}"
|
||||
TextWrapping="Wrap"
|
||||
VerticalScrollBarVisibility="Auto" />
|
||||
|
||||
<StackPanel Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="5" Orientation="Horizontal" HorizontalAlignment="Right">
|
||||
<Button Click="ButtonAddBargeldtransaktionClick" Content="Hinzufügen" Height="25"
|
||||
FontWeight="Normal" Margin="3" VerticalAlignment="Center" HorizontalAlignment="Right" />
|
||||
<Button HorizontalAlignment="Right" VerticalAlignment="Center" Height="25"
|
||||
Margin="3" Content="Abbrechen" Click="ButtonCancelAddBargeldtransaktionClick" />
|
||||
<StackPanel
|
||||
Grid.Row="5"
|
||||
Grid.Column="0"
|
||||
Grid.ColumnSpan="2"
|
||||
HorizontalAlignment="Right"
|
||||
Orientation="Horizontal">
|
||||
<Button
|
||||
Height="25"
|
||||
Margin="3"
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Center"
|
||||
Click="ButtonAddBargeldtransaktionClick"
|
||||
Content="Hinzufügen"
|
||||
FontWeight="Normal" />
|
||||
<Button
|
||||
Height="25"
|
||||
Margin="3"
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Center"
|
||||
Click="ButtonCancelAddBargeldtransaktionClick"
|
||||
Content="Abbrechen" />
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
</Border>
|
||||
</controls:PopupNonTopmost>
|
||||
</StackPanel>
|
||||
<StackPanel Grid.Row="0" Grid.Column="1" Orientation="Horizontal" VerticalAlignment="Stretch">
|
||||
<StackPanel
|
||||
Grid.Row="0"
|
||||
Grid.Column="1"
|
||||
VerticalAlignment="Stretch"
|
||||
Orientation="Horizontal">
|
||||
<Label Content="Sortierung" />
|
||||
<ComboBox Height="23" x:Name="SortComboBox" Margin="3" VerticalAlignment="Top" MinWidth="180" SelectionChanged="SortComboBox_SelectionChanged"/>
|
||||
<ComboBox
|
||||
x:Name="SortComboBox"
|
||||
Height="23"
|
||||
MinWidth="180"
|
||||
Margin="3"
|
||||
VerticalAlignment="Top"
|
||||
SelectionChanged="SortComboBox_SelectionChanged" />
|
||||
</StackPanel>
|
||||
<TabControl Grid.Row="1" Grid.ColumnSpan="2" Margin="5" ItemsSource="{Binding VMList}" x:Name="tabcontrol_bargeldkassen" Visibility="{Binding VMList.Count, Converter={StaticResource CollectionCountToVisibilityConverter}}">
|
||||
<TabControl
|
||||
x:Name="tabcontrol_bargeldkassen"
|
||||
Grid.Row="1"
|
||||
Grid.ColumnSpan="2"
|
||||
Margin="5"
|
||||
ItemsSource="{Binding VMList}"
|
||||
Visibility="{Binding VMList.Count, Converter={StaticResource CollectionCountToVisibilityConverter}}">
|
||||
<TabControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Label Content="{Binding Kassenname}" />
|
||||
<Button VerticalAlignment="Center" Height="20"
|
||||
ToolTip="Bargeldkasse umbenennen"
|
||||
Margin="3" Content="!" FontFamily="Wingdings"
|
||||
IsEnabled="{Binding Path=DarfBargeldtransaktionenBearbeiten, RelativeSource={RelativeSource AncestorType={x:Type view:BargeldkassenView}}}"
|
||||
Click="KassennamenChangeButtonClick">
|
||||
<Button
|
||||
Height="20"
|
||||
Margin="3"
|
||||
VerticalAlignment="Center"
|
||||
Click="KassennamenChangeButtonClick"
|
||||
Content="!"
|
||||
FontFamily="Wingdings"
|
||||
IsEnabled="{Binding Path=DarfBargeldtransaktionenBearbeiten, RelativeSource={RelativeSource AncestorType={x:Type view:BargeldkassenView}}}"
|
||||
ToolTip="Bargeldkasse umbenennen">
|
||||
<Button.Visibility>
|
||||
<MultiBinding Converter="{StaticResource BoolVisibilityMultiConverter }">
|
||||
<MultiBinding Converter="{StaticResource BoolVisibilityMultiConverter}">
|
||||
<Binding Path="IsSelected" RelativeSource="{RelativeSource AncestorType={x:Type TabItem}}" />
|
||||
</MultiBinding>
|
||||
</Button.Visibility>
|
||||
</Button>
|
||||
<controls:PopupNonTopmost x:Name="popup_kassennamenEdit">
|
||||
<Border Background="White" Padding="3" BorderThickness="1" BorderBrush="Gray">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Label Grid.Row="0" Grid.Column="0" Content="Name"/>
|
||||
<TextBox Grid.Row="0" Grid.Column="1" Grid.ColumnSpan="3" MinWidth="200" Height="23" Margin="3" Text="{validation:ValidationBinding Path=Kassenname, UpdateSourceTrigger=PropertyChanged}" />
|
||||
<Label Grid.Row="1" Grid.Column="0" Content="Anfangsbestand"/>
|
||||
<dxe:TextEdit Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="3" MaskType="Numeric" Mask="########0.00" MaskUseAsDisplayFormat="True" Height="23" Margin="3"
|
||||
EditValue="{validation:ValidationBinding Path=Anfangsbestand, UpdateSourceTrigger=PropertyChanged}"/>
|
||||
<Button Grid.Row="2" Grid.Column="2" Content="Speichern" Margin="3" Click="KassennamenChangeSaveButtonClick" />
|
||||
<Button Grid.Row="2" Grid.Column="3" Content="Abbrechen" Margin="3" Click="KassennamenChangeCancelButtonClick" />
|
||||
</Grid>
|
||||
<Border
|
||||
Padding="3"
|
||||
Background="White"
|
||||
BorderBrush="Gray"
|
||||
BorderThickness="1">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Label
|
||||
Grid.Row="0"
|
||||
Grid.Column="0"
|
||||
Content="Name" />
|
||||
<TextBox
|
||||
Grid.Row="0"
|
||||
Grid.Column="1"
|
||||
Grid.ColumnSpan="3"
|
||||
Height="23"
|
||||
MinWidth="200"
|
||||
Margin="3"
|
||||
Text="{validation:ValidationBinding Path=Kassenname,
|
||||
UpdateSourceTrigger=PropertyChanged}" />
|
||||
<Label
|
||||
Grid.Row="1"
|
||||
Grid.Column="0"
|
||||
Content="Anfangsbestand" />
|
||||
<dxe:TextEdit
|
||||
Grid.Row="1"
|
||||
Grid.Column="1"
|
||||
Grid.ColumnSpan="3"
|
||||
Height="23"
|
||||
Margin="3"
|
||||
EditValue="{validation:ValidationBinding Path=Anfangsbestand,
|
||||
UpdateSourceTrigger=PropertyChanged}"
|
||||
Mask="########0.00"
|
||||
MaskType="Numeric"
|
||||
MaskUseAsDisplayFormat="True" />
|
||||
<Button
|
||||
Grid.Row="2"
|
||||
Grid.Column="2"
|
||||
Margin="3"
|
||||
Click="KassennamenChangeSaveButtonClick"
|
||||
Content="Speichern" />
|
||||
<Button
|
||||
Grid.Row="2"
|
||||
Grid.Column="3"
|
||||
Margin="3"
|
||||
Click="KassennamenChangeCancelButtonClick"
|
||||
Content="Abbrechen" />
|
||||
</Grid>
|
||||
</Border>
|
||||
</controls:PopupNonTopmost>
|
||||
<Button VerticalAlignment="Center" Height="20"
|
||||
Click="BtnDeleteBargeldkasseClick"
|
||||
Tag="{Binding}"
|
||||
ToolTip="Bargeldkasse entfernen"
|
||||
Style="{DynamicResource CloseButtonStyle}" Margin="3" >
|
||||
<Button
|
||||
Height="20"
|
||||
Margin="3"
|
||||
VerticalAlignment="Center"
|
||||
Click="BtnDeleteBargeldkasseClick"
|
||||
Style="{DynamicResource CloseButtonStyle}"
|
||||
Tag="{Binding}"
|
||||
ToolTip="Bargeldkasse entfernen">
|
||||
<Button.Visibility>
|
||||
<MultiBinding Converter="{StaticResource BoolVisibilityMultiConverter }">
|
||||
<MultiBinding Converter="{StaticResource BoolVisibilityMultiConverter}">
|
||||
<Binding Path="IsSelected" RelativeSource="{RelativeSource AncestorType={x:Type TabItem}}" />
|
||||
<Binding Path="DarfBargeldTransaktionLoeschen" RelativeSource="{RelativeSource AncestorType={x:Type view:BargeldkassenView}}" />
|
||||
<Binding Path="DarfBargeldTransaktionLoeschen" RelativeSource="{RelativeSource AncestorType={x:Type view:BargeldkassenView}}" />
|
||||
</MultiBinding>
|
||||
</Button.Visibility>
|
||||
</Button>
|
||||
@@ -232,17 +449,41 @@
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
|
||||
<Button Grid.Row="0" Grid.Column="0" Content="Neue Zahlung hinzufügen" Margin="3" Tag="{Binding}" Click="ButtonOpenAddBargeldtransaktionClick" IsEnabled="{Binding Path=DarfBargeldTransaktionAnlegen, RelativeSource={RelativeSource AncestorType={x:Type view:BargeldkassenView}}}" />
|
||||
|
||||
|
||||
<Label Grid.Row="0" Grid.Column="1" Content="Anfangsbestand" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="3"/>
|
||||
<dxe:TextEdit Grid.Row="0" Grid.Column="2" MaskType="Numeric" Mask="c" MaskUseAsDisplayFormat="True" Height="23" Margin="3" EditMode="InplaceInactive"
|
||||
EditValue="{Binding Path=Anfangsbestand, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}" VerticalAlignment="Center" HorizontalContentAlignment="Left" FontWeight="Bold" />
|
||||
|
||||
<Button
|
||||
Grid.Row="0"
|
||||
Grid.Column="0"
|
||||
Margin="3"
|
||||
Click="ButtonOpenAddBargeldtransaktionClick"
|
||||
Content="Neue Zahlung hinzufügen"
|
||||
IsEnabled="{Binding Path=DarfBargeldTransaktionAnlegen, RelativeSource={RelativeSource AncestorType={x:Type view:BargeldkassenView}}}"
|
||||
Tag="{Binding}" />
|
||||
|
||||
|
||||
<Label
|
||||
Grid.Row="0"
|
||||
Grid.Column="1"
|
||||
Margin="3"
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Center"
|
||||
Content="Anfangsbestand" />
|
||||
<dxe:TextEdit
|
||||
Grid.Row="0"
|
||||
Grid.Column="2"
|
||||
Height="23"
|
||||
Margin="3"
|
||||
VerticalAlignment="Center"
|
||||
HorizontalContentAlignment="Left"
|
||||
EditMode="InplaceInactive"
|
||||
EditValue="{Binding Path=Anfangsbestand, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}"
|
||||
FontWeight="Bold"
|
||||
Mask="c"
|
||||
MaskType="Numeric"
|
||||
MaskUseAsDisplayFormat="True" />
|
||||
|
||||
<!--<Label VerticalAlignment="Center">Auszahlungsintervall</Label>
|
||||
<dxe:ComboBoxEdit VerticalAlignment="Center" Height="23" HorizontalAlignment="Left" Width="100" IsTextEditable="False" Margin="3,0,3,3"
|
||||
@@ -252,84 +493,213 @@
|
||||
EditValueChanged="AuszahlungsIntervallCBEditValueChanged"/>-->
|
||||
|
||||
|
||||
<StackPanel Grid.Row="0" Grid.Column="7" Grid.ColumnSpan="2" Orientation="Horizontal" HorizontalAlignment="Left">
|
||||
<Label Grid.Row="0" Grid.Column="3" Content="Startdatum" VerticalAlignment="Center"/>
|
||||
<dxe:DateEdit Grid.Row="0" Grid.Column="4" x:Name="KassenBuchStartCB" MaskType="DateTimeAdvancingCaret" Height="23" Margin="3" EditValue="{Binding Path=PreselectedStartDate, RelativeSource={RelativeSource AncestorType={x:Type view:BargeldkassenView}}, Mode=OneWay}" AllowNullInput="False" />
|
||||
<StackPanel
|
||||
Grid.Row="0"
|
||||
Grid.Column="7"
|
||||
Grid.ColumnSpan="2"
|
||||
HorizontalAlignment="Left"
|
||||
Orientation="Horizontal">
|
||||
<Label
|
||||
Grid.Row="0"
|
||||
Grid.Column="3"
|
||||
VerticalAlignment="Center"
|
||||
Content="Startdatum" />
|
||||
<dxe:DateEdit
|
||||
x:Name="KassenBuchStartCB"
|
||||
Grid.Row="0"
|
||||
Grid.Column="4"
|
||||
Height="23"
|
||||
Margin="3"
|
||||
AllowNullInput="False"
|
||||
EditValue="{Binding Path=PreselectedStartDate, RelativeSource={RelativeSource AncestorType={x:Type view:BargeldkassenView}}, Mode=OneWay}"
|
||||
MaskType="DateTimeAdvancingCaret" />
|
||||
|
||||
<Label Grid.Row="0" Grid.Column="5" Content="Enddatum" VerticalAlignment="Center"/>
|
||||
<dxe:DateEdit Grid.Row="0" Grid.Column="6" x:Name="KassenBuchEndCB" MaskType="DateTimeAdvancingCaret" Height="23" Margin="3" EditValue="{Binding Path=PreselectedEndDate, RelativeSource={RelativeSource AncestorType={x:Type view:BargeldkassenView}}, Mode=OneWay}" AllowNullInput="False"/>
|
||||
<Label
|
||||
Grid.Row="0"
|
||||
Grid.Column="5"
|
||||
VerticalAlignment="Center"
|
||||
Content="Enddatum" />
|
||||
<dxe:DateEdit
|
||||
x:Name="KassenBuchEndCB"
|
||||
Grid.Row="0"
|
||||
Grid.Column="6"
|
||||
Height="23"
|
||||
Margin="3"
|
||||
AllowNullInput="False"
|
||||
EditValue="{Binding Path=PreselectedEndDate, RelativeSource={RelativeSource AncestorType={x:Type view:BargeldkassenView}}, Mode=OneWay}"
|
||||
MaskType="DateTimeAdvancingCaret" />
|
||||
|
||||
|
||||
<!--<uc:NullItemComboBox x:Name="KassenbuchMonatsCB" Margin="3" ItemsSource="{Binding Path=MonatsComboBoxSource, RelativeSource={RelativeSource AncestorType={x:Type view:BargeldkassenView}}}"
|
||||
<!--<uc:NullItemComboBox x:Name="KassenbuchMonatsCB" Margin="3" ItemsSource="{Binding Path=MonatsComboBoxSource, RelativeSource={RelativeSource AncestorType={x:Type view:BargeldkassenView}}}"
|
||||
SelectedItem="{Binding Path=PreselectedMonth, RelativeSource={RelativeSource AncestorType={x:Type view:BargeldkassenView}}, Mode=OneWay}"/>
|
||||
|
||||
|
||||
<uc:NullItemComboBox x:Name="KassenbuchJahresCB" Margin="3" ItemsSource="{Binding Path=JahresComboBoxSource, RelativeSource={RelativeSource AncestorType={x:Type view:BargeldkassenView}}}"
|
||||
SelectedItem="{Binding Path=PreselectedYear, RelativeSource={RelativeSource AncestorType={x:Type view:BargeldkassenView}}, Mode=OneWay}"/>-->
|
||||
|
||||
<TextBlock Grid.Row="0" Margin="3" FontSize="14" VerticalAlignment="Center" PreviewMouseLeftButtonDown="KlassenbuchLinkOnPreviewMouseLeftButtonDown" Tag="{Binding}" IsEnabled="{Binding Path=Bargeldtransaktionen.VMList.Count, Converter={StaticResource CollectionCountToBoolConverter}, UpdateSourceTrigger=PropertyChanged}">
|
||||
<Hyperlink x:Name="LinkKassenbuchDrucken" TargetName="_NewWindow" Style="{StaticResource HyperlinkStyle}">
|
||||
<Run Text="Kassenbuch drucken" />
|
||||
</Hyperlink>
|
||||
</TextBlock>
|
||||
<TextBlock
|
||||
Grid.Row="0"
|
||||
Margin="3"
|
||||
VerticalAlignment="Center"
|
||||
FontSize="14"
|
||||
IsEnabled="{Binding Path=Bargeldtransaktionen.VMList.Count, Converter={StaticResource CollectionCountToBoolConverter}, UpdateSourceTrigger=PropertyChanged}"
|
||||
PreviewMouseLeftButtonDown="KlassenbuchLinkOnPreviewMouseLeftButtonDown"
|
||||
Tag="{Binding}">
|
||||
<Hyperlink
|
||||
x:Name="LinkKassenbuchDrucken"
|
||||
Style="{StaticResource HyperlinkStyle}"
|
||||
TargetName="_NewWindow">
|
||||
<Run Text="Kassenbuch drucken" />
|
||||
</Hyperlink>
|
||||
</TextBlock>
|
||||
</StackPanel>
|
||||
|
||||
|
||||
|
||||
<GroupBox Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="10" x:Name="BlubbTest" Style="{StaticResource ObjectEditGroupBox}">
|
||||
|
||||
<GroupBox
|
||||
x:Name="BlubbTest"
|
||||
Grid.Row="1"
|
||||
Grid.Column="0"
|
||||
Grid.ColumnSpan="10"
|
||||
Style="{StaticResource ObjectEditGroupBox}">
|
||||
<GroupBox.Header>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock FontSize="16" Foreground="{StaticResource TabItemHotTextBrush}" FontFamily="Microsoft Sans Serif" Text="Ein- und Auszahlungen" Margin="3,5,3,3"/>
|
||||
<Label Content="Saldo" VerticalAlignment="Center" Margin="3,3,3,3"/>
|
||||
<dxe:TextEdit MaskType="Numeric" Mask="c" MaskUseAsDisplayFormat="True" Height="23" Margin="3,3,3,3" EditMode="InplaceInactive"
|
||||
EditValue="{Binding Path=Kassenbestand, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}" VerticalAlignment="Center" FontWeight="Bold" />
|
||||
<Label Content="Stichtag" VerticalAlignment="Center" Margin="3,3,3,3"/>
|
||||
<dxe:DateEdit MaskType="DateTimeAdvancingCaret" Height="23" Width="100" Margin="3" EditValue="{Binding Path=Stichtag, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" AllowNullInput="True"/>
|
||||
<TextBlock
|
||||
Margin="3,5,3,3"
|
||||
FontFamily="Microsoft Sans Serif"
|
||||
FontSize="16"
|
||||
Foreground="{StaticResource TabItemHotTextBrush}"
|
||||
Text="Ein- und Auszahlungen" />
|
||||
<Label
|
||||
Margin="3,3,3,3"
|
||||
VerticalAlignment="Center"
|
||||
Content="Saldo" />
|
||||
<dxe:TextEdit
|
||||
Height="23"
|
||||
Margin="3,3,3,3"
|
||||
VerticalAlignment="Center"
|
||||
EditMode="InplaceInactive"
|
||||
EditValue="{Binding Path=Kassenbestand, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}"
|
||||
FontWeight="Bold"
|
||||
Mask="c"
|
||||
MaskType="Numeric"
|
||||
MaskUseAsDisplayFormat="True" />
|
||||
<Label
|
||||
Margin="3,3,3,3"
|
||||
VerticalAlignment="Center"
|
||||
Content="Stichtag" />
|
||||
<dxe:DateEdit
|
||||
Width="100"
|
||||
Height="23"
|
||||
Margin="3"
|
||||
AllowNullInput="True"
|
||||
EditValue="{Binding Path=Stichtag, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||
MaskType="DateTimeAdvancingCaret" />
|
||||
</StackPanel>
|
||||
</GroupBox.Header>
|
||||
<dxg:GridControl Name="grid_bargeldtransaktionen" Tag="{Binding}" MaxWidth="{Binding ElementName=BlubbTest, Path=ActualWidth}" ItemsSource="{Binding Path=Bargeldtransaktionen.VMList}" CustomColumnSort="GridBargeldtransaktionenOnCustomColumnSort">
|
||||
<dxg:GridControl
|
||||
Name="grid_bargeldtransaktionen"
|
||||
MaxWidth="{Binding ElementName=BlubbTest, Path=ActualWidth}"
|
||||
CustomColumnSort="GridBargeldtransaktionenOnCustomColumnSort"
|
||||
ItemsSource="{Binding Path=Bargeldtransaktionen.VMList}"
|
||||
Tag="{Binding}">
|
||||
<dxg:GridControl.Columns>
|
||||
<dxg:GridColumn Header="" FixedWidth="True" Width="24" ReadOnly="True" Visible="{Binding Path=DarfBargeldtransaktionenBearbeiten, RelativeSource={RelativeSource AncestorType={x:Type view:BargeldkassenView}}}">
|
||||
<dxg:GridColumn
|
||||
Width="24"
|
||||
FixedWidth="True"
|
||||
Header=""
|
||||
ReadOnly="True"
|
||||
Visible="{Binding Path=DarfBargeldtransaktionenBearbeiten, RelativeSource={RelativeSource AncestorType={x:Type view:BargeldkassenView}}}">
|
||||
<dxg:GridColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<Button Content="r" Tag="{Binding}" Click="ButtonBargeldtransaktionDeleteClick" FontFamily="Webdings" Width="18" Height="18" VerticalAlignment="Center" IsEnabled="{Binding Path=DarfBargeldTransaktionLoeschen, RelativeSource={RelativeSource AncestorType={x:Type view:BargeldkassenView}}}" />
|
||||
<Button
|
||||
Width="18"
|
||||
Height="18"
|
||||
VerticalAlignment="Center"
|
||||
Click="ButtonBargeldtransaktionDeleteClick"
|
||||
Content="r"
|
||||
FontFamily="Webdings"
|
||||
IsEnabled="{Binding Path=DarfBargeldTransaktionLoeschen, RelativeSource={RelativeSource AncestorType={x:Type view:BargeldkassenView}}}"
|
||||
Tag="{Binding}" />
|
||||
</DataTemplate>
|
||||
</dxg:GridColumn.CellTemplate>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn Header="Datum" FixedWidth="True" SortOrder="Descending" FieldName="Zahlungsdatum" EditSettings="{dxe:DateSettings DisplayFormat=d}" AllowEditing="{Binding Path=BargeldtransaktionenBearbeitenAlsDefaultBooelan, RelativeSource={RelativeSource AncestorType={x:Type view:BargeldkassenView}}}" />
|
||||
<dxg:GridColumn Header="Art" FixedWidth="True" FieldName="Zahlungstyp" AllowEditing="{Binding Path=BargeldtransaktionenBearbeitenAlsDefaultBooelan, RelativeSource={RelativeSource AncestorType={x:Type view:BargeldkassenView}}}">
|
||||
<dxg:GridColumn
|
||||
AllowEditing="{Binding Path=BargeldtransaktionenBearbeitenAlsDefaultBooelan, RelativeSource={RelativeSource AncestorType={x:Type view:BargeldkassenView}}}"
|
||||
EditSettings="{dxe:DateSettings DisplayFormat=d}"
|
||||
FieldName="Zahlungsdatum"
|
||||
FixedWidth="True"
|
||||
Header="Datum"
|
||||
SortOrder="Descending" />
|
||||
<dxg:GridColumn
|
||||
AllowEditing="{Binding Path=BargeldtransaktionenBearbeitenAlsDefaultBooelan, RelativeSource={RelativeSource AncestorType={x:Type view:BargeldkassenView}}}"
|
||||
FieldName="Zahlungstyp"
|
||||
FixedWidth="True"
|
||||
Header="Art">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:ComboBoxEditSettings ItemsSource="{Binding Path=Values, Source={x:Static core:DisplayEnum.Zahlungstyp}}" IsTextEditable="False" />
|
||||
<dxe:ComboBoxEditSettings IsTextEditable="False" ItemsSource="{Binding Path=Values, Source={x:Static core:DisplayEnum.Zahlungstyp}}" />
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn Header="Betrag" FixedWidth="True" FieldName="Betrag" AllowEditing="{Binding Path=BargeldtransaktionenBearbeitenAlsDefaultBooelan, RelativeSource={RelativeSource AncestorType={x:Type view:BargeldkassenView}}}">
|
||||
<dxg:GridColumn
|
||||
AllowEditing="{Binding Path=BargeldtransaktionenBearbeitenAlsDefaultBooelan, RelativeSource={RelativeSource AncestorType={x:Type view:BargeldkassenView}}}"
|
||||
FieldName="Betrag"
|
||||
FixedWidth="True"
|
||||
Header="Betrag">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:TextEditSettings MaskType="Numeric" Mask="c" MaskUseAsDisplayFormat="True" />
|
||||
<dxe:TextEditSettings
|
||||
Mask="c"
|
||||
MaskType="Numeric"
|
||||
MaskUseAsDisplayFormat="True" />
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn Header="{t:Translate Belegnummer}" FixedWidth="True" FieldName="Belegnummer" AllowEditing="{Binding Path=BargeldtransaktionenBearbeitenAlsDefaultBooelan, RelativeSource={RelativeSource AncestorType={x:Type view:BargeldkassenView}}}">
|
||||
<dxg:GridColumn
|
||||
AllowEditing="{Binding Path=BargeldtransaktionenBearbeitenAlsDefaultBooelan, RelativeSource={RelativeSource AncestorType={x:Type view:BargeldkassenView}}}"
|
||||
FieldName="Belegnummer"
|
||||
FixedWidth="True"
|
||||
Header="{t:Translate Belegnummer}">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:TextEditSettings />
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn Header="Angelegt von" FixedWidth="True" FieldName="InsUser" AllowEditing="False">
|
||||
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn Header="Notiz" FieldName="Notice" AllowEditing="{Binding Path=BargeldtransaktionenBearbeitenAlsDefaultBooelan, RelativeSource={RelativeSource AncestorType={x:Type view:BargeldkassenView}}}"/>
|
||||
|
||||
<dxg:GridColumn FieldName="X" Header="Drucken" ReadOnly="True">
|
||||
<dxg:GridColumn
|
||||
AllowEditing="False"
|
||||
FieldName="InsUser"
|
||||
FixedWidth="True"
|
||||
Header="Angelegt von" />
|
||||
<dxg:GridColumn
|
||||
AllowEditing="{Binding Path=BargeldtransaktionenBearbeitenAlsDefaultBooelan, RelativeSource={RelativeSource AncestorType={x:Type view:BargeldkassenView}}}"
|
||||
FieldName="Notice"
|
||||
Header="Notiz" />
|
||||
|
||||
<dxg:GridColumn
|
||||
FieldName="X"
|
||||
Header="Drucken"
|
||||
ReadOnly="True">
|
||||
<dxg:GridColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock x:Name="textblock_link_pdfexport" VerticalAlignment="Center" Margin="3,0,0,0">
|
||||
<Hyperlink x:Name="LinkZahlungsbelegDrucken" Click="LinkZahlungsbelegDruckenClick" TargetName="_NewWindow" Foreground="#FF2B508B">
|
||||
<Run Text="Zahlungsbeleg drucken" />
|
||||
</Hyperlink>
|
||||
<TextBlock
|
||||
x:Name="textblock_link_pdfexport"
|
||||
Margin="3,0,0,0"
|
||||
VerticalAlignment="Center">
|
||||
<Hyperlink
|
||||
x:Name="LinkZahlungsbelegDrucken"
|
||||
Click="LinkZahlungsbelegDruckenClick"
|
||||
Foreground="#FF2B508B"
|
||||
TargetName="_NewWindow">
|
||||
<Run Text="Zahlungsbeleg drucken" />
|
||||
</Hyperlink>
|
||||
</TextBlock>
|
||||
</DataTemplate>
|
||||
</dxg:GridColumn.CellTemplate>
|
||||
</dxg:GridColumn>
|
||||
</dxg:GridControl.Columns>
|
||||
<dxg:GridControl.View>
|
||||
<dxg:TableView NavigationStyle="Cell" Margin="2,2,2,2" AutoWidth="True" ShowGroupPanel="False" ShowGroupedColumns="False" ShowTotalSummary="False" />
|
||||
<dxg:TableView
|
||||
Margin="2,2,2,2"
|
||||
AutoWidth="True"
|
||||
NavigationStyle="Cell"
|
||||
ShowGroupPanel="False"
|
||||
ShowGroupedColumns="False"
|
||||
ShowTotalSummary="False" />
|
||||
</dxg:GridControl.View>
|
||||
</dxg:GridControl>
|
||||
</GroupBox>
|
||||
|
||||
@@ -3,21 +3,25 @@
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:core="clr-namespace:BS.Shared.Core;assembly=BS.Shared"
|
||||
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
|
||||
xmlns:dxa="http://schemas.devexpress.com/winfx/2008/xaml/accordion"
|
||||
xmlns:listviewmodel="clr-namespace:BeWo.ViewModel.ListViewModel"
|
||||
xmlns:localView="clr-namespace:BeWo.View"
|
||||
xmlns:markup="clr-namespace:BeWo.MultiLanguage.Markup"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:t="clr-namespace:BeWo.MultiLanguage.Markup"
|
||||
xmlns:uc="clr-namespace:BeWo.Controls;assembly=BeWo.Controls"
|
||||
xmlns:viewmodel="clr-namespace:BeWo.ViewModel"
|
||||
Width="Auto"
|
||||
Height="Auto"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Stretch"
|
||||
Focusable="True"
|
||||
d:DataContext="{d:DesignInstance Type=listviewmodel:AiConversationListVM}"
|
||||
d:DesignHeight="300"
|
||||
d:DesignWidth="600"
|
||||
Focusable="True"
|
||||
Loaded="BeWoView_Loaded"
|
||||
mc:Ignorable="d">
|
||||
<localView:BeWoView.Resources>
|
||||
<ResourceDictionary>
|
||||
@@ -26,6 +30,9 @@
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
</ResourceDictionary>
|
||||
</localView:BeWoView.Resources>
|
||||
<localView:BeWoView.DataContext>
|
||||
<listviewmodel:AiConversationListVM />
|
||||
</localView:BeWoView.DataContext>
|
||||
<Grid>
|
||||
<uc:ShadowChrome>
|
||||
<GroupBox Style="{StaticResource MainContentGroupBoxStyle}">
|
||||
@@ -59,38 +66,41 @@
|
||||
Text="Ai Konversationen" />
|
||||
</StackPanel>
|
||||
</GroupBox.Header>
|
||||
<GroupBox Style="{StaticResource ModuleAiNavigationStyle}" >
|
||||
<GroupBox Style="{StaticResource ModuleAiNavigationStyle}">
|
||||
<GroupBox.Header>
|
||||
<StackPanel Orientation="Horizontal" Grid.Row="0" Margin="3">
|
||||
<StackPanel
|
||||
Grid.Row="0"
|
||||
Margin="3"
|
||||
Orientation="Horizontal">
|
||||
<Label
|
||||
Margin="0,-3,0,0"
|
||||
Content="Suche"
|
||||
FontSize="14"
|
||||
Foreground="#FFFFFFFF" />
|
||||
Margin="0,-4,0,0"
|
||||
Content="Suche"
|
||||
FontSize="14"
|
||||
Foreground="#FFFFFFFF" />
|
||||
<TextBox
|
||||
x:Name="textbox_search"
|
||||
Width="300"
|
||||
Height="20"
|
||||
MinWidth="90"
|
||||
Margin="3,-5,0,0"
|
||||
BorderThickness="0,0,0,0"
|
||||
TabIndex="0"
|
||||
Template="{DynamicResource SearchTextBoxTemplate}" />
|
||||
x:Name="textbox_search"
|
||||
Width="300"
|
||||
Height="20"
|
||||
MinWidth="90"
|
||||
Margin="3,-5,0,0"
|
||||
BorderThickness="0,0,0,0"
|
||||
TabIndex="0"
|
||||
Template="{DynamicResource SearchTextBoxTemplate}" />
|
||||
<Button
|
||||
x:Name="ReloadButton"
|
||||
Width="36"
|
||||
Height="24"
|
||||
Margin="5,-3,0,0"
|
||||
Click="ReloadButton_OnClick"
|
||||
ToolTip="Liste aktualisieren">
|
||||
x:Name="ReloadButton"
|
||||
Width="36"
|
||||
Height="24"
|
||||
Margin="5,-5,0,0"
|
||||
Click="ReloadButton_OnClick"
|
||||
ToolTip="Liste aktualisieren">
|
||||
<Button.Template>
|
||||
<ControlTemplate TargetType="{x:Type Button}">
|
||||
<Grid>
|
||||
<Image x:Name="imgDisabled" Source="..\..\Ressources\Icons\SymbolRefresh32Disabled.png" />
|
||||
<Image
|
||||
x:Name="imgEnabled"
|
||||
Opacity="0"
|
||||
Source="..\..\Ressources\Icons\SymbolRefresh32.png" />
|
||||
x:Name="imgEnabled"
|
||||
Opacity="0"
|
||||
Source="..\..\Ressources\Icons\SymbolRefresh32.png" />
|
||||
</Grid>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="true">
|
||||
@@ -102,58 +112,145 @@ ToolTip="Liste aktualisieren">
|
||||
</Button>
|
||||
</StackPanel>
|
||||
</GroupBox.Header>
|
||||
|
||||
|
||||
<Grid Margin="0,0,0,0">
|
||||
<Grid.Background>
|
||||
<LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
|
||||
<GradientStop Offset="0" Color="#FFFFC48A" />
|
||||
<GradientStop Offset="1" Color="#FFFF7830" />
|
||||
</LinearGradientBrush>
|
||||
</Grid.Background>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
|
||||
|
||||
<Border
|
||||
Grid.Row="2"
|
||||
Height="40"
|
||||
Margin="0,0,0,0"
|
||||
VerticalAlignment="Stretch">
|
||||
<Grid>
|
||||
<Rectangle Fill="#FF000000">
|
||||
<Rectangle.OpacityMask>
|
||||
<LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
|
||||
<GradientStop Offset="0" Color="#19000000" />
|
||||
<GradientStop Offset="1" Color="#33FFFFFF" />
|
||||
</LinearGradientBrush>
|
||||
</Rectangle.OpacityMask>
|
||||
</Rectangle>
|
||||
<StackPanel
|
||||
Height="Auto"
|
||||
Margin="0,5,5,0"
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Center"
|
||||
Orientation="Horizontal">
|
||||
<Button
|
||||
x:Name="btnClose"
|
||||
Height="25"
|
||||
Visibility="Visible"
|
||||
Margin="0,0,0,0"
|
||||
Command="ApplicationCommands.Close"
|
||||
Content="Schließen"
|
||||
Style="{StaticResource NavigationToolbarButtonStyle}"
|
||||
FontWeight="Medium"/>
|
||||
</StackPanel>
|
||||
<Grid Margin="0,0,0,0">
|
||||
<Grid.Background>
|
||||
<LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
|
||||
<GradientStop Offset="0" Color="#FFFFC48A" />
|
||||
<GradientStop Offset="1" Color="#FFFF7830" />
|
||||
</LinearGradientBrush>
|
||||
</Grid.Background>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid Grid.Row="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" MinWidth="50" />
|
||||
<ColumnDefinition Width="3*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<DockPanel>
|
||||
<ListView
|
||||
x:Name="listbox_conversations"
|
||||
Background="Transparent"
|
||||
ItemsSource="{Binding VMList}">
|
||||
<ListView.ItemTemplate>
|
||||
<DataTemplate x:Name="conversation_datatemplate" DataType="viewmodel:AiConversationVM">
|
||||
<TextBlock Text="{Binding Json}" />
|
||||
</DataTemplate>
|
||||
</ListView.ItemTemplate>
|
||||
</ListView>
|
||||
</DockPanel>
|
||||
|
||||
|
||||
|
||||
</Grid>
|
||||
</Border>
|
||||
<Border
|
||||
Grid.Row="2"
|
||||
Height="40"
|
||||
Margin="0,0,0,0"
|
||||
VerticalAlignment="Stretch">
|
||||
<Grid>
|
||||
<Rectangle Fill="#FF000000">
|
||||
<Rectangle.OpacityMask>
|
||||
<LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
|
||||
<GradientStop Offset="0" Color="#19000000" />
|
||||
<GradientStop Offset="1" Color="#33FFFFFF" />
|
||||
</LinearGradientBrush>
|
||||
</Rectangle.OpacityMask>
|
||||
</Rectangle>
|
||||
<StackPanel
|
||||
Height="Auto"
|
||||
Margin="5,5,5,0"
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Center"
|
||||
Orientation="Horizontal">
|
||||
<Button
|
||||
x:Name="btnNew"
|
||||
Height="25"
|
||||
Margin="0,0,0,0"
|
||||
Command=""
|
||||
Content="Neuer Chat"
|
||||
FontWeight="Medium"
|
||||
Style="{StaticResource NavigationToolbarButtonStyle}"
|
||||
Visibility="Visible" />
|
||||
<Button
|
||||
x:Name="btnSettings"
|
||||
Height="25"
|
||||
Margin="5,0,0,0"
|
||||
Command="{Binding OpenAiSettingCommand, RelativeSource={RelativeSource AncestorType={x:Type localView:BeWoView}, Mode=FindAncestor}}"
|
||||
Content="Einstellungen"
|
||||
FontWeight="Medium"
|
||||
Style="{StaticResource NavigationToolbarButtonStyle}"
|
||||
Visibility="Visible" />
|
||||
</StackPanel>
|
||||
<StackPanel
|
||||
Height="Auto"
|
||||
Margin="5,5,5,0"
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Center"
|
||||
Orientation="Horizontal">
|
||||
<Button
|
||||
x:Name="btnClose"
|
||||
Height="25"
|
||||
Margin="0,0,0,0"
|
||||
Command="ApplicationCommands.Close"
|
||||
Content="Schließen"
|
||||
FontWeight="Medium"
|
||||
Style="{StaticResource NavigationToolbarButtonStyle}"
|
||||
Visibility="Visible" />
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Border>
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
</GroupBox>
|
||||
</uc:ShadowChrome>
|
||||
<Popup
|
||||
x:Name="popup_newview"
|
||||
Width="200"
|
||||
Height="200"
|
||||
StaysOpen="True">
|
||||
<Grid Margin="5">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="auto" />
|
||||
<ColumnDefinition Width="auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="auto" />
|
||||
<RowDefinition Height="auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<Label>Kontext</Label>
|
||||
<ComboBox Grid.Column="1" />
|
||||
</Grid>
|
||||
</Popup>
|
||||
<Popup
|
||||
x:Name="popup_settings"
|
||||
Width="auto"
|
||||
Height="auto"
|
||||
Placement="Center"
|
||||
StaysOpen="False">
|
||||
<Grid Margin="5" Background="Orange">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="auto" />
|
||||
<ColumnDefinition Width="auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="auto" />
|
||||
<RowDefinition Height="auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<Label>Modell:</Label>
|
||||
<ComboBox
|
||||
Grid.Column="1"
|
||||
ItemsSource="{Binding Models}"
|
||||
SelectedItem="{Binding SelectedModel, Mode=TwoWay}" />
|
||||
</Grid>
|
||||
</Popup>
|
||||
</Grid>
|
||||
</localView:BeWoView>
|
||||
@@ -1,5 +1,11 @@
|
||||
using System;
|
||||
using BeWo.ServiceProxy;
|
||||
using BeWo.ViewModel.ListViewModel;
|
||||
using BS.Shared.DataContracts;
|
||||
using BS.Shared.Extensions;
|
||||
using DevExpress.Mvvm;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
@@ -20,14 +26,52 @@ namespace BeWo.View.Master
|
||||
/// </summary>
|
||||
public partial class AiConversationView : BeWoView
|
||||
{
|
||||
private bool models_loaded = false;
|
||||
|
||||
public AiConversationView()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
RequestNewConversationCommand = new DelegateCommand(RequestNewConversation);
|
||||
OpenAiSettingCommand = new DelegateCommand(OpenAiSetting);
|
||||
}
|
||||
|
||||
private void ReloadButton_OnClick(object sender, RoutedEventArgs e)
|
||||
{
|
||||
public AiConversationListVM ViewModel
|
||||
{
|
||||
get => DataContext as AiConversationListVM;
|
||||
set => DataContext = value;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
public DelegateCommand RequestNewConversationCommand { get; set; }
|
||||
public DelegateCommand OpenAiSettingCommand { get; set; }
|
||||
|
||||
private void BeWoView_Loaded(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (models_loaded) return;
|
||||
|
||||
models_loaded = true;
|
||||
|
||||
ServiceFacade.DoOperationsEnhancedServiceAsnyc(x => x.GetAiModels(), (x) => { ViewModel.Models.MakeEqualTo(x); }, true, this);
|
||||
}
|
||||
|
||||
private void ReloadButton_OnClick(object sender, RoutedEventArgs e)
|
||||
{
|
||||
ServiceFacade.DoOperationsEnhancedServiceAsnyc(x => x.GetAiModels(), (x) => { ViewModel.Models.MakeEqualTo(x); }, true, this);
|
||||
}
|
||||
|
||||
|
||||
public void RequestNewConversation()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void OpenAiSetting()
|
||||
{
|
||||
ServiceFacade.DoOperationsEnhancedServiceAsnyc(x => x.GetAiModels(), (x) =>
|
||||
{
|
||||
ViewModel.Models.MakeEqualTo(x);
|
||||
popup_settings.IsOpen = true;
|
||||
}, true, this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
<localView:BeWoView x:Class="BeWo.View.Navigation.CustomerNavigationView"
|
||||
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:markup="clr-namespace:BeWo.MultiLanguage.Markup"
|
||||
Loaded="OnLoaded">
|
||||
<Grid>
|
||||
<Grid.Resources>
|
||||
<localView:BeWoView
|
||||
x:Class="BeWo.View.Navigation.CustomerNavigationView"
|
||||
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:markup="clr-namespace:BeWo.MultiLanguage.Markup"
|
||||
Loaded="OnLoaded">
|
||||
<Grid>
|
||||
<Grid.Resources>
|
||||
<Style x:Key="CustomerDetailStyle" TargetType="{x:Type ListBoxItem}">
|
||||
<Setter Property="HorizontalContentAlignment" Value="{Binding Path=HorizontalContentAlignment, RelativeSource={RelativeSource AncestorLevel=1, AncestorType={x:Type ItemsControl}, Mode=FindAncestor}}" />
|
||||
<Setter Property="VerticalContentAlignment" Value="{Binding Path=VerticalContentAlignment, RelativeSource={RelativeSource AncestorLevel=1, AncestorType={x:Type ItemsControl}, Mode=FindAncestor}}" />
|
||||
@@ -15,92 +16,216 @@
|
||||
<Setter.Value>
|
||||
<ControlTemplate>
|
||||
<Grid>
|
||||
<Border 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
|
||||
x:Name="ItemBorder"
|
||||
MinHeight="30"
|
||||
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>
|
||||
<Border x:Name="ItemContent" CornerRadius="5" MinHeight="30">
|
||||
<Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="5,3,5,3" OpacityMask="{x:Null}" SnapsToDevicePixels="True">
|
||||
<Border
|
||||
x:Name="ItemContent"
|
||||
MinHeight="30"
|
||||
CornerRadius="5">
|
||||
<Grid
|
||||
Margin="5,3,5,3"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Stretch"
|
||||
OpacityMask="{x:Null}"
|
||||
SnapsToDevicePixels="True">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" SharedSizeGroup="CustomerDetailColumn" />
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" SharedSizeGroup="CustomerDetailColumn" />
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
<Image Grid.RowSpan="2" Source="..\..\Ressources\Icons\UserHomeMaleDisabled.png" Margin="0,0,5,0" Height="30" VerticalAlignment="Center" HorizontalAlignment="Stretch" Width="Auto" RenderTransformOrigin="0.5,0.5" Grid.Row="0" />
|
||||
<StackPanel Grid.Row="0" Grid.Column="1" Orientation="Horizontal">
|
||||
<TextBlock x:Name="txtDetail1" Text="{Binding Path=SimpleDescription}" FontSize="14" Foreground="#FFD2D2D2" FontFamily="Microsoft Sans Serif" />
|
||||
<TextBlock x:Name="txtDetail2" Text="{Binding Path=DateOfBirthString}" Margin="6,0,0,0" FontSize="14" Foreground="#FFD2D2D2" FontFamily="Microsoft Sans Serif" />
|
||||
<TextBlock x:Name="txtDetailTeams" Text="{Binding Path=Teams}" Margin="0,0,6,0" FontSize="14" Foreground="#FFD2D2D2" FontFamily="Microsoft Sans Serif" />
|
||||
<Image
|
||||
Grid.Row="0"
|
||||
Grid.RowSpan="2"
|
||||
Width="Auto"
|
||||
Height="30"
|
||||
Margin="0,0,5,0"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Center"
|
||||
RenderTransformOrigin="0.5,0.5"
|
||||
Source="..\..\Ressources\Icons\UserHomeMaleDisabled.png" />
|
||||
<StackPanel
|
||||
Grid.Row="0"
|
||||
Grid.Column="1"
|
||||
Orientation="Horizontal">
|
||||
<TextBlock
|
||||
x:Name="txtDetail1"
|
||||
FontFamily="Microsoft Sans Serif"
|
||||
FontSize="14"
|
||||
Foreground="#FFD2D2D2"
|
||||
Text="{Binding Path=SimpleDescription}" />
|
||||
<TextBlock
|
||||
x:Name="txtDetail2"
|
||||
Margin="6,0,0,0"
|
||||
FontFamily="Microsoft Sans Serif"
|
||||
FontSize="14"
|
||||
Foreground="#FFD2D2D2"
|
||||
Text="{Binding Path=DateOfBirthString}" />
|
||||
<TextBlock
|
||||
x:Name="txtDetailTeams"
|
||||
Margin="0,0,6,0"
|
||||
FontFamily="Microsoft Sans Serif"
|
||||
FontSize="14"
|
||||
Foreground="#FFD2D2D2"
|
||||
Text="{Binding Path=Teams}" />
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Grid.Column="1" Grid.Row="1" Orientation="Horizontal">
|
||||
<TextBlock x:Name="txtDetail3" Text="{Binding Path=AddressString}" FontSize="12" Foreground="#FFA0A0A0" FontFamily="Microsoft Sans Serif" />
|
||||
</StackPanel>
|
||||
<TextBlock Grid.Row="0" Grid.Column="2" x:Name="txtDetail4" Text="{Binding Path=CurrentEmployeeRole}" Margin="16,0,0,0" FontSize="14" Foreground="#FFD2D2D2" FontFamily="Microsoft Sans Serif" />
|
||||
<TextBlock Grid.Column="2" Grid.Row="1" x:Name="txtDetail5" Text="{Binding Path=MainAttendant}" Margin="16,0,0,0" FontSize="14" Foreground="#FFA0A0A0" FontFamily="Microsoft Sans Serif" />
|
||||
|
||||
<!--Image x:Name="imgArchiv" Grid.Row="0" Grid.Column="2" Visibility="Collapsed" Grid.RowSpan="2" Source="..\Ressources\Icons\Archiv.png" Margin="0,0,5,0" Height="30" VerticalAlignment="Center" HorizontalAlignment="Stretch" Width="Auto" RenderTransformOrigin="0.5,0.5" /-->
|
||||
<TextBlock VerticalAlignment="Center" Grid.Column="4" Grid.Row="0" Grid.RowSpan="2" Margin="0,0,3,0" Visibility="{Binding Path=IsDeleted, Converter={StaticResource AnonymizationRight2VisibilityConverter}, ConverterParameter=Customer}">
|
||||
<Hyperlink TargetName="_NewWindow" Foreground="#FFF97E7B" Click="Hyperlink_Anonymize_Click" Tag="{Binding}">Anonymisieren</Hyperlink>
|
||||
<StackPanel
|
||||
Grid.Row="1"
|
||||
Grid.Column="1"
|
||||
Orientation="Horizontal">
|
||||
<TextBlock
|
||||
x:Name="txtDetail3"
|
||||
FontFamily="Microsoft Sans Serif"
|
||||
FontSize="12"
|
||||
Foreground="#FFA0A0A0"
|
||||
Text="{Binding Path=AddressString}" />
|
||||
</StackPanel>
|
||||
<TextBlock
|
||||
x:Name="txtDetail4"
|
||||
Grid.Row="0"
|
||||
Grid.Column="2"
|
||||
Margin="16,0,0,0"
|
||||
FontFamily="Microsoft Sans Serif"
|
||||
FontSize="14"
|
||||
Foreground="#FFD2D2D2"
|
||||
Text="{Binding Path=CurrentEmployeeRole}" />
|
||||
<TextBlock
|
||||
x:Name="txtDetail5"
|
||||
Grid.Row="1"
|
||||
Grid.Column="2"
|
||||
Margin="16,0,0,0"
|
||||
FontFamily="Microsoft Sans Serif"
|
||||
FontSize="14"
|
||||
Foreground="#FFA0A0A0"
|
||||
Text="{Binding Path=MainAttendant}" />
|
||||
|
||||
<!-- Image x:Name="imgArchiv" Grid.Row="0" Grid.Column="2" Visibility="Collapsed" Grid.RowSpan="2" Source="..\Ressources\Icons\Archiv.png" Margin="0,0,5,0" Height="30" VerticalAlignment="Center" HorizontalAlignment="Stretch" Width="Auto" RenderTransformOrigin="0.5,0.5" / -->
|
||||
<TextBlock
|
||||
Grid.Row="0"
|
||||
Grid.RowSpan="2"
|
||||
Grid.Column="4"
|
||||
Margin="0,0,3,0"
|
||||
VerticalAlignment="Center"
|
||||
Visibility="{Binding Path=IsDeleted, Converter={StaticResource AnonymizationRight2VisibilityConverter}, ConverterParameter=Customer}">
|
||||
<Hyperlink
|
||||
Click="Hyperlink_Anonymize_Click"
|
||||
Foreground="#FFF97E7B"
|
||||
Tag="{Binding}"
|
||||
TargetName="_NewWindow">
|
||||
Anonymisieren
|
||||
</Hyperlink>
|
||||
</TextBlock>
|
||||
<TextBlock VerticalAlignment="Center" Grid.Column="5" Grid.Row="0" Grid.RowSpan="2" Margin="0,0,3,0" Visibility="{Binding Path=IsDeleted, Converter={StaticResource DeleteForGoodRight2VisibilityConverter}, ConverterParameter=Customer}">
|
||||
<Hyperlink TargetName="_NewWindow" Foreground="#FFF97E7B" Click="Hyperlink_Delete_For_Good_Click" Tag="{Binding}">Endgültig löschen</Hyperlink>
|
||||
<TextBlock
|
||||
Grid.Row="0"
|
||||
Grid.RowSpan="2"
|
||||
Grid.Column="5"
|
||||
Margin="0,0,3,0"
|
||||
VerticalAlignment="Center"
|
||||
Visibility="{Binding Path=IsDeleted, Converter={StaticResource DeleteForGoodRight2VisibilityConverter}, ConverterParameter=Customer}">
|
||||
<Hyperlink
|
||||
Click="Hyperlink_Delete_For_Good_Click"
|
||||
Foreground="#FFF97E7B"
|
||||
Tag="{Binding}"
|
||||
TargetName="_NewWindow">
|
||||
Endgültig löschen
|
||||
</Hyperlink>
|
||||
</TextBlock>
|
||||
<TextBlock VerticalAlignment="Center" Grid.Column="3" Grid.Row="0" Grid.RowSpan="2" Margin="0,0,3,0" Visibility="{Binding Path=IsDeleted, Converter={StaticResource ReactivationRight2VisibilityConverter}, ConverterParameter=Customer}">
|
||||
<Hyperlink TargetName="_NewWindow" Foreground="#FFFFFFFF" Click="Hyperlink_Reaktivieren_Click" Tag="{Binding}">Reaktivieren</Hyperlink>
|
||||
</TextBlock>
|
||||
<TextBlock VerticalAlignment="Center" Grid.Column="3" Grid.Row="0" Grid.RowSpan="2" Margin="0,0,3,0" Visibility="{Binding Path=IsArchived, Converter={StaticResource ArchiveRight2VisibilityConverter}, ConverterParameter=Customer}">
|
||||
<Hyperlink TargetName="_NewWindow" Foreground="#FFFFFFFF" Click="Hyperlink_AusArchivHolen_Click" Tag="{Binding}">Aus Archiv holen</Hyperlink>
|
||||
</TextBlock>
|
||||
<TextBlock VerticalAlignment="Center" Grid.Column="6" Grid.Row="0" Grid.RowSpan="2">
|
||||
<Hyperlink TargetName="_NewWindow" Foreground="#FFFFFFFF" NavigateUri="{Binding Converter={StaticResource CustomerDCPrintURLConverter}}" RequestNavigate="Hyperlink_OnRequestNavigate" Tag="{Binding}">Drucken</Hyperlink>
|
||||
<TextBlock
|
||||
Grid.Row="0"
|
||||
Grid.RowSpan="2"
|
||||
Grid.Column="3"
|
||||
Margin="0,0,3,0"
|
||||
VerticalAlignment="Center"
|
||||
Visibility="{Binding Path=IsDeleted, Converter={StaticResource ReactivationRight2VisibilityConverter}, ConverterParameter=Customer}">
|
||||
<Hyperlink
|
||||
Click="Hyperlink_Reaktivieren_Click"
|
||||
Foreground="#FFFFFFFF"
|
||||
Tag="{Binding}"
|
||||
TargetName="_NewWindow">
|
||||
Reaktivieren
|
||||
</Hyperlink>
|
||||
</TextBlock>
|
||||
<TextBlock
|
||||
Grid.Row="0"
|
||||
Grid.RowSpan="2"
|
||||
Grid.Column="3"
|
||||
Margin="0,0,3,0"
|
||||
VerticalAlignment="Center"
|
||||
Visibility="{Binding Path=IsArchived, Converter={StaticResource ArchiveRight2VisibilityConverter}, ConverterParameter=Customer}">
|
||||
<Hyperlink
|
||||
Click="Hyperlink_AusArchivHolen_Click"
|
||||
Foreground="#FFFFFFFF"
|
||||
Tag="{Binding}"
|
||||
TargetName="_NewWindow">
|
||||
Aus Archiv holen
|
||||
</Hyperlink>
|
||||
</TextBlock>
|
||||
<TextBlock
|
||||
Grid.Row="0"
|
||||
Grid.RowSpan="2"
|
||||
Grid.Column="6"
|
||||
VerticalAlignment="Center">
|
||||
<Hyperlink
|
||||
Foreground="#FFFFFFFF"
|
||||
NavigateUri="{Binding Converter={StaticResource CustomerDCPrintURLConverter}}"
|
||||
RequestNavigate="Hyperlink_OnRequestNavigate"
|
||||
Tag="{Binding}"
|
||||
TargetName="_NewWindow">
|
||||
Drucken
|
||||
</Hyperlink>
|
||||
</TextBlock>
|
||||
</Grid>
|
||||
</Border>
|
||||
</Grid>
|
||||
<ControlTemplate.Triggers>
|
||||
<DataTrigger Binding="{Binding Path=IsArchived}" Value="True">
|
||||
<Setter Property="Foreground" TargetName="txtDetail1" Value="#FF808080" />
|
||||
<Setter Property="Foreground" TargetName="txtDetail2" Value="#FF808080" />
|
||||
<Setter Property="Foreground" TargetName="txtDetail3" Value="#FF808080" />
|
||||
<Setter Property="Foreground" TargetName="txtDetail4" Value="#FF808080" />
|
||||
<Setter Property="Foreground" TargetName="txtDetail5" Value="#FF808080" />
|
||||
<Setter TargetName="txtDetail1" Property="Foreground" Value="#FF808080" />
|
||||
<Setter TargetName="txtDetail2" Property="Foreground" Value="#FF808080" />
|
||||
<Setter TargetName="txtDetail3" Property="Foreground" Value="#FF808080" />
|
||||
<Setter TargetName="txtDetail4" Property="Foreground" Value="#FF808080" />
|
||||
<Setter TargetName="txtDetail5" Property="Foreground" Value="#FF808080" />
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding Path=IsDeleted}" Value="True">
|
||||
<Setter Property="Foreground" TargetName="txtDetail1" Value="#FFF97E7B" />
|
||||
<Setter Property="Foreground" TargetName="txtDetail2" Value="#FFF97E7B" />
|
||||
<Setter Property="Foreground" TargetName="txtDetail3" Value="#FFF97E7B" />
|
||||
<Setter Property="Foreground" TargetName="txtDetail4" Value="#FFF97E7B" />
|
||||
<Setter Property="Foreground" TargetName="txtDetail5" Value="#FFF97E7B" />
|
||||
</DataTrigger>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Setter Property="OpacityMask" TargetName="ItemBorder">
|
||||
<DataTrigger Binding="{Binding Path=IsDeleted}" Value="True">
|
||||
<Setter TargetName="txtDetail1" Property="Foreground" Value="#FFF97E7B" />
|
||||
<Setter TargetName="txtDetail2" Property="Foreground" Value="#FFF97E7B" />
|
||||
<Setter TargetName="txtDetail3" Property="Foreground" Value="#FFF97E7B" />
|
||||
<Setter TargetName="txtDetail4" Property="Foreground" Value="#FFF97E7B" />
|
||||
<Setter TargetName="txtDetail5" Property="Foreground" Value="#FFF97E7B" />
|
||||
</DataTrigger>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<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>
|
||||
@@ -110,11 +235,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>
|
||||
@@ -124,60 +249,92 @@
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
<DataTemplate x:Key="CustomerDetailInfoTemplate">
|
||||
<StackPanel>
|
||||
<TextBlock Margin="5" FontSize="14" Foreground="#FFD2D2D2" TextWrapping="Wrap" FontFamily="Microsoft Sans Serif" Text="{Binding CurrentSupportConcept}" />
|
||||
<ListView ItemsSource="{Binding SupportConceptInfos}" Margin="10 5 5 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">
|
||||
<TextBlock Text="{Binding CostBearer, Converter={StaticResource StringFormatConverter}, ConverterParameter={markup:Translate Kostenträger: \{0\}}}" FontSize="14" Foreground="#FFD2D2D2" FontFamily="Microsoft Sans Serif" />
|
||||
<TextBlock FontSize="12" Foreground="#FFD2D2D2" FontFamily="Microsoft Sans Serif" Margin="5 5 0 0" Text="{Binding ApprovedHours, Converter={StaticResource StringFormatConverter}, ConverterParameter=Genehmigte FLS: \{0:0.##\}}" />
|
||||
<TextBlock FontSize="12" Foreground="#FFD2D2D2" FontFamily="Microsoft Sans Serif" Margin="5 2 0 0" Text="{Binding RecordedHours, Converter={StaticResource StringFormatConverter}, ConverterParameter=Geleistete FLS: \{0:0.##\}}" />
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ListView.ItemTemplate>
|
||||
</ListView>
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
</Grid.Resources>
|
||||
<localNavView:MainNavigationView OpenMailMergeWindow="MainNavigationView_OnOpenMailMergeWindow"
|
||||
x:Name="mainNavigationView"
|
||||
MainGroupHeader="{markup:Translate Klienten}"
|
||||
CreateNewObject="mainNavigationView_CreateNewObject"
|
||||
OpenObject="mainNavigationView_OpenObject"
|
||||
DeleteObject="mainNavigationView_DeleteObject"
|
||||
ArchiveObject="mainNavigationView_ArchiveObject"
|
||||
OpenAiChat="MainNavigationView_OpenAiChat"
|
||||
ExcelExport="mainNavigationView_ExcelExport"
|
||||
Print="mainNavigationView_Print"
|
||||
DeleteDemands="DeleteAll, CustomerView_Delete"
|
||||
CreateDemands="CreateAll, CustomerView_Create"
|
||||
ShowDetailsPanel="True"
|
||||
DetailPanelItemTemplate="{StaticResource CustomerDetailInfoTemplate}"
|
||||
ContentGroupStyle="{StaticResource CustomerNavigationStyle}"
|
||||
MainListItemStyle="{StaticResource CustomerDetailStyle}"
|
||||
HistoryListItemStyle="{StaticResource SearchSimpleStyle}"
|
||||
OnReloadData="MainNavigationView_OnReloadData"/>
|
||||
<DataTemplate x:Key="CustomerDetailInfoTemplate">
|
||||
<StackPanel>
|
||||
<TextBlock
|
||||
Margin="5"
|
||||
FontFamily="Microsoft Sans Serif"
|
||||
FontSize="14"
|
||||
Foreground="#FFD2D2D2"
|
||||
Text="{Binding CurrentSupportConcept}"
|
||||
TextWrapping="Wrap" />
|
||||
<ListView
|
||||
Margin="10,5,5,5"
|
||||
HorizontalAlignment="Stretch"
|
||||
HorizontalContentAlignment="Stretch"
|
||||
Background="{x:Null}"
|
||||
BorderBrush="{x:Null}"
|
||||
ItemsSource="{Binding SupportConceptInfos}">
|
||||
<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
|
||||
FontFamily="Microsoft Sans Serif"
|
||||
FontSize="14"
|
||||
Foreground="#FFD2D2D2"
|
||||
Text="{Binding CostBearer, Converter={StaticResource StringFormatConverter}, ConverterParameter={markup:Translate Kostenträger: \{0\}}}" />
|
||||
<TextBlock
|
||||
Margin="5,5,0,0"
|
||||
FontFamily="Microsoft Sans Serif"
|
||||
FontSize="12"
|
||||
Foreground="#FFD2D2D2"
|
||||
Text="{Binding ApprovedHours, Converter={StaticResource StringFormatConverter}, ConverterParameter=Genehmigte FLS: \{0:0.##\}}" />
|
||||
<TextBlock
|
||||
Margin="5,2,0,0"
|
||||
FontFamily="Microsoft Sans Serif"
|
||||
FontSize="12"
|
||||
Foreground="#FFD2D2D2"
|
||||
Text="{Binding RecordedHours, Converter={StaticResource StringFormatConverter}, ConverterParameter=Geleistete FLS: \{0:0.##\}}" />
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ListView.ItemTemplate>
|
||||
</ListView>
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
</Grid.Resources>
|
||||
<localNavView:MainNavigationView
|
||||
x:Name="mainNavigationView"
|
||||
ArchiveObject="mainNavigationView_ArchiveObject"
|
||||
ContentGroupStyle="{StaticResource CustomerNavigationStyle}"
|
||||
CreateDemands="CreateAll, CustomerView_Create"
|
||||
CreateNewObject="mainNavigationView_CreateNewObject"
|
||||
DeleteDemands="DeleteAll, CustomerView_Delete"
|
||||
DeleteObject="mainNavigationView_DeleteObject"
|
||||
DetailPanelItemTemplate="{StaticResource CustomerDetailInfoTemplate}"
|
||||
ExcelExport="mainNavigationView_ExcelExport"
|
||||
HistoryListItemStyle="{StaticResource SearchSimpleStyle}"
|
||||
MainGroupHeader="{markup:Translate Klienten}"
|
||||
MainListItemStyle="{StaticResource CustomerDetailStyle}"
|
||||
OnReloadData="MainNavigationView_OnReloadData"
|
||||
OpenAiChat="MainNavigationView_OpenAiChat"
|
||||
OpenMailMergeWindow="MainNavigationView_OnOpenMailMergeWindow"
|
||||
OpenObject="mainNavigationView_OpenObject"
|
||||
Print="mainNavigationView_Print"
|
||||
ShowDetailsPanel="True" />
|
||||
|
||||
</Grid>
|
||||
</Grid>
|
||||
</localView:BeWoView>
|
||||
111
BeWo/ViewModel/AiConversationMessageVM.cs
Normal file
111
BeWo/ViewModel/AiConversationMessageVM.cs
Normal file
@@ -0,0 +1,111 @@
|
||||
using System;
|
||||
|
||||
using BS.Shared;
|
||||
using BS.Shared.DataContracts;
|
||||
|
||||
namespace BeWo.ViewModel
|
||||
{
|
||||
public class AiConversationMessageVM : AbstractDCMapperVM<AiConversationMessageDC>
|
||||
{
|
||||
private long? _Oid;
|
||||
private string _Context;
|
||||
private string _Prompt;
|
||||
private string _Model;
|
||||
private string _Result;
|
||||
|
||||
public AiConversationMessageVM(AiConversationMessageDC dc) : base(dc, dc.Oid is null)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public long? Oid
|
||||
{
|
||||
get { return _Oid; }
|
||||
set
|
||||
{
|
||||
if (!AreDifferent(_Oid, value))
|
||||
return;
|
||||
|
||||
_Oid = value;
|
||||
StoreDirtyInformation(AreDifferent(DataContract.Oid, value), nameof(Oid));
|
||||
FirePropertyChanged(nameof(Oid));
|
||||
}
|
||||
}
|
||||
|
||||
public string Context
|
||||
{
|
||||
get { return _Context; }
|
||||
set
|
||||
{
|
||||
if (!AreDifferent(_Context, value))
|
||||
return;
|
||||
|
||||
_Context = value;
|
||||
StoreDirtyInformation(AreDifferent(DataContract.Context, value), nameof(Context));
|
||||
FirePropertyChanged(nameof(Context));
|
||||
}
|
||||
}
|
||||
|
||||
public string Prompt
|
||||
{
|
||||
get { return _Prompt; }
|
||||
set
|
||||
{
|
||||
if (!AreDifferent(_Prompt, value))
|
||||
return;
|
||||
|
||||
_Prompt = value;
|
||||
StoreDirtyInformation(AreDifferent(DataContract.Prompt, value), nameof(Prompt));
|
||||
FirePropertyChanged(nameof(Prompt));
|
||||
}
|
||||
}
|
||||
|
||||
public string Model
|
||||
{
|
||||
get { return _Model; }
|
||||
set
|
||||
{
|
||||
if (!AreDifferent(_Model, value))
|
||||
return;
|
||||
|
||||
_Model = value;
|
||||
StoreDirtyInformation(AreDifferent(DataContract.Model, value), nameof(Model));
|
||||
FirePropertyChanged(nameof(Model));
|
||||
}
|
||||
}
|
||||
|
||||
public string Result
|
||||
{
|
||||
get { return _Result; }
|
||||
set
|
||||
{
|
||||
if (!AreDifferent(_Result, value))
|
||||
return;
|
||||
|
||||
_Result = value;
|
||||
StoreDirtyInformation(AreDifferent(DataContract.Result, value), nameof(Result));
|
||||
FirePropertyChanged(nameof(Result));
|
||||
}
|
||||
}
|
||||
|
||||
protected override void InitByDataContract(AiConversationMessageDC pDataContract)
|
||||
{
|
||||
_Oid = pDataContract.Oid;
|
||||
_Context = pDataContract.Context;
|
||||
_Prompt = pDataContract.Prompt;
|
||||
_Model = pDataContract.Model;
|
||||
_Result = pDataContract.Result;
|
||||
}
|
||||
|
||||
protected override AiConversationMessageDC MapToDataContract(AiConversationMessageDC pDataContract, bool doCommit)
|
||||
{
|
||||
pDataContract.Oid = _Oid;
|
||||
pDataContract.Context = _Context;
|
||||
pDataContract.Prompt = _Prompt;
|
||||
pDataContract.Model = _Model;
|
||||
pDataContract.Result = _Result;
|
||||
|
||||
return pDataContract;
|
||||
}
|
||||
}
|
||||
}
|
||||
147
BeWo/ViewModel/AiConversationVM.cs
Normal file
147
BeWo/ViewModel/AiConversationVM.cs
Normal file
@@ -0,0 +1,147 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using BeWo.ViewModel.ListViewModel;
|
||||
using BS.Shared;
|
||||
using BS.Shared.DataContracts;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace BeWo.ViewModel
|
||||
{
|
||||
[JsonObject(MemberSerialization.OptIn)]
|
||||
public class AiConversationVM : AbstractDCMapperVM<AiConversationDC>
|
||||
{
|
||||
private string _Displayname;
|
||||
private DateTime _Created;
|
||||
private string _Modell;
|
||||
private string _View;
|
||||
private AiSettingDC _Setting;
|
||||
private ObservableCollection<AiConversationMessageDC> _Messages;
|
||||
|
||||
public AiConversationVM() : this(new AiConversationDC()) { }
|
||||
public AiConversationVM(AiConversationDC dc) : base(dc, dc.Oid is null)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public string Json
|
||||
{
|
||||
get => JsonConvert.SerializeObject(this, Formatting.Indented);
|
||||
}
|
||||
|
||||
[JsonProperty]
|
||||
public string Displayname
|
||||
{
|
||||
get { return _Displayname; }
|
||||
set
|
||||
{
|
||||
if (!AreDifferent(_Displayname, value))
|
||||
return;
|
||||
|
||||
_Displayname = value;
|
||||
StoreDirtyInformation(AreDifferent(DataContract.Displayname, value), nameof(Displayname));
|
||||
FirePropertyChanged(nameof(Displayname));
|
||||
FirePropertyChanged(nameof(Json));
|
||||
}
|
||||
}
|
||||
|
||||
[JsonProperty]
|
||||
public DateTime Created
|
||||
{
|
||||
get { return _Created; }
|
||||
set
|
||||
{
|
||||
if (!AreDifferent(_Created, value))
|
||||
return;
|
||||
|
||||
_Created = value;
|
||||
StoreDirtyInformation(AreDifferent(DataContract.Created, value), nameof(Created));
|
||||
FirePropertyChanged(nameof(Created));
|
||||
}
|
||||
}
|
||||
|
||||
[JsonProperty]
|
||||
public string Modell
|
||||
{
|
||||
get { return _Modell; }
|
||||
set
|
||||
{
|
||||
if (!AreDifferent(_Modell, value))
|
||||
return;
|
||||
|
||||
_Modell = value;
|
||||
StoreDirtyInformation(AreDifferent(DataContract.Modell, value), nameof(Modell));
|
||||
FirePropertyChanged(nameof(Modell));
|
||||
}
|
||||
}
|
||||
|
||||
public string View
|
||||
{
|
||||
get { return _View; }
|
||||
set
|
||||
{
|
||||
if (!AreDifferent(_View, value))
|
||||
return;
|
||||
|
||||
_View = value;
|
||||
StoreDirtyInformation(AreDifferent(DataContract.View, value), nameof(View));
|
||||
FirePropertyChanged(nameof(View));
|
||||
}
|
||||
}
|
||||
|
||||
public AiSettingDC Setting
|
||||
{
|
||||
get { return _Setting; }
|
||||
set
|
||||
{
|
||||
if (!AreDifferent(_Setting, value))
|
||||
return;
|
||||
|
||||
_Setting = value;
|
||||
StoreDirtyInformation(AreDifferent(DataContract.Setting, value), nameof(Setting));
|
||||
FirePropertyChanged(nameof(Setting));
|
||||
}
|
||||
}
|
||||
|
||||
public ObservableCollection<AiConversationMessageDC> Messages
|
||||
{
|
||||
get { return _Messages; }
|
||||
set
|
||||
{
|
||||
if (!AreDifferent(_Messages, value))
|
||||
return;
|
||||
|
||||
_Messages = value;
|
||||
StoreDirtyInformation(AreDifferent(DataContract.Messages, value), nameof(Messages));
|
||||
FirePropertyChanged(nameof(Messages));
|
||||
}
|
||||
}
|
||||
|
||||
protected override void InitByDataContract(AiConversationDC pDataContract)
|
||||
{
|
||||
_Displayname = pDataContract.Displayname;
|
||||
_Created = pDataContract.Created;
|
||||
_Modell = pDataContract.Modell;
|
||||
_View = pDataContract.View;
|
||||
_Setting = pDataContract.Setting;
|
||||
|
||||
if (pDataContract.Messages is object)
|
||||
_Messages = new ObservableCollection<AiConversationMessageDC>(pDataContract.Messages);
|
||||
else
|
||||
_Messages = new ObservableCollection<AiConversationMessageDC>();
|
||||
}
|
||||
|
||||
protected override AiConversationDC MapToDataContract(AiConversationDC pDataContract, bool doCommit)
|
||||
{
|
||||
pDataContract.Displayname = _Displayname;
|
||||
pDataContract.Created = _Created;
|
||||
pDataContract.Modell = _Modell;
|
||||
pDataContract.View = _View;
|
||||
pDataContract.Setting = _Setting;
|
||||
pDataContract.Messages = _Messages.ToList();
|
||||
|
||||
return pDataContract;
|
||||
}
|
||||
}
|
||||
}
|
||||
47
BeWo/ViewModel/ListViewModel/AiConversationListVM.cs
Normal file
47
BeWo/ViewModel/ListViewModel/AiConversationListVM.cs
Normal file
@@ -0,0 +1,47 @@
|
||||
using BeWo.ServiceProxy;
|
||||
using BS.Shared.DataContracts;
|
||||
using BS.Shared.Extensions;
|
||||
using ChatController.Utilities.Extensions;
|
||||
using DevExpress.Mvvm;
|
||||
using DevExpress.XtraPrinting.Native;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Threading;
|
||||
|
||||
namespace BeWo.ViewModel.ListViewModel
|
||||
{
|
||||
public class AiConversationListVM : AbstractDCListMapperVM<AiConversationDC, AiConversationVM>
|
||||
{
|
||||
private AiModelDC _SelectedModel;
|
||||
|
||||
public AiConversationListVM() : this(null)
|
||||
{
|
||||
VMList.Add(new AiConversationVM()
|
||||
{
|
||||
Created = DateTime.Now,
|
||||
Displayname = "Chat1"
|
||||
});
|
||||
}
|
||||
public AiConversationListVM(List<AiConversationDC> pDCs) : base(pDCs)
|
||||
{
|
||||
Models = new ObservableSortCollection<AiModelDC>();
|
||||
}
|
||||
|
||||
public ObservableCollection<AiModelDC> Models { get; set; }
|
||||
public AiModelDC SelectedModel {
|
||||
get { return _SelectedModel; }
|
||||
set
|
||||
{
|
||||
if (_SelectedModel == value)
|
||||
return;
|
||||
|
||||
_SelectedModel = value;
|
||||
FirePropertyChanged(nameof(SelectedModel));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -538,11 +538,13 @@
|
||||
<Compile Include="ServiceImplementations\UserServiceImp.cs" />
|
||||
<Compile Include="ServiceImplementations\ValueListServiceImp.cs" />
|
||||
<Compile Include="Configuration\AppSettings.cs" />
|
||||
<Compile Include="ServiceProxy\MikePHPScriptFacade.cs" />
|
||||
<Compile Include="ServiceUtils\DistanceCalculator\AddressRouteManager.cs" />
|
||||
<Compile Include="ServiceUtils\DistanceCalculator\AddressRouteMatrix.cs" />
|
||||
<Compile Include="ServiceUtils\DistanceCalculator\GoogleDistanceMatrixAPI.cs" />
|
||||
<Compile Include="ServiceUtils\DistanceCalculator\IDistanceAPI.cs" />
|
||||
<Compile Include="ServiceUtils\DistanceCalculator\OpenrouteServiceAPI.cs" />
|
||||
<Compile Include="ServiceProxy\ServiceFacade.cs" />
|
||||
<Compile Include="ServiceUtils\ServiceTranslator.cs" />
|
||||
<Compile Include="ServiceUtils\ServiceHelper.cs" />
|
||||
<Compile Include="ServiceUtils\UriTemplateResolver.cs" />
|
||||
|
||||
@@ -26,6 +26,10 @@ namespace BeWo.Service.ServiceContracts
|
||||
[FaultContract(typeof(BeWoFault))]
|
||||
[OperationContract]
|
||||
object Method4(object input, object input2);
|
||||
|
||||
[FaultContract(typeof(BeWoFault))]
|
||||
[OperationContract]
|
||||
List<AiModelDC> GetAiModels();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
using BeWo.Service.ServiceContracts;
|
||||
using BeWo.Service.ServiceProxy;
|
||||
using BS.Shared.DataContracts;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
@@ -13,6 +15,22 @@ namespace BeWo.Service.ServiceImplementations
|
||||
{
|
||||
public object Method1(object input, object input2)
|
||||
{
|
||||
if(input is int i)
|
||||
{
|
||||
if(i == 1)
|
||||
{
|
||||
return new AiSettingDC();
|
||||
}
|
||||
if(i == 2)
|
||||
{
|
||||
return new List<AiConversationDC>();
|
||||
}
|
||||
if (i == 3)
|
||||
{
|
||||
return ServiceFacade.MikePHPScriptFacade.GetAiModelle();
|
||||
}
|
||||
}
|
||||
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
@@ -30,5 +48,10 @@ namespace BeWo.Service.ServiceImplementations
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public List<AiModelDC> GetAiModels()
|
||||
{
|
||||
return ServiceFacade.MikePHPScriptFacade.GetAiModelle();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
34
Service/ServiceProxy/MikePHPScriptFacade.cs
Normal file
34
Service/ServiceProxy/MikePHPScriptFacade.cs
Normal file
@@ -0,0 +1,34 @@
|
||||
using BS.Shared.Core;
|
||||
using BS.Shared.DataContracts;
|
||||
using DevExpress.DataAccess.Native.EntityFramework;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BeWo.Service.ServiceProxy
|
||||
{
|
||||
public class MikePHPScriptFacade : WebClientFacade
|
||||
{
|
||||
public List<AiModelDC> GetAiModelle()
|
||||
{
|
||||
var url = "https://ai1.ownsoft.de/osaimodels.php?show";
|
||||
var dictList = SendGet<List<Dictionary<string, int>>>(url);
|
||||
|
||||
var rtn = new List<AiModelDC>();
|
||||
|
||||
foreach (var item in dictList)
|
||||
{
|
||||
foreach (var kvp in item)
|
||||
{
|
||||
rtn.Add(new AiModelDC(kvp.Key, kvp.Value));
|
||||
}
|
||||
}
|
||||
|
||||
return rtn;
|
||||
}
|
||||
}
|
||||
}
|
||||
15
Service/ServiceProxy/ServiceFacade.cs
Normal file
15
Service/ServiceProxy/ServiceFacade.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BeWo.Service.ServiceProxy
|
||||
{
|
||||
public static class ServiceFacade
|
||||
{
|
||||
private static readonly Lazy<MikePHPScriptFacade> _MikePHPScriptFacade = new Lazy<MikePHPScriptFacade>(() => new MikePHPScriptFacade());
|
||||
|
||||
public static MikePHPScriptFacade MikePHPScriptFacade => _MikePHPScriptFacade.Value;
|
||||
}
|
||||
}
|
||||
126
Shared/Core/WebClientFacade.cs
Normal file
126
Shared/Core/WebClientFacade.cs
Normal file
@@ -0,0 +1,126 @@
|
||||
using DevExpress.DataAccess.Native.EntityFramework;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Security.Policy;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BS.Shared.Core
|
||||
{
|
||||
public class WebClientFacade
|
||||
{
|
||||
//
|
||||
// GET
|
||||
//
|
||||
protected TRes SendGet<TRes>(string url)
|
||||
=> Get<TRes>(url);
|
||||
protected Task<TRes> SendGetAsync<TRes>(string url)
|
||||
=> GetAsync<TRes>(url);
|
||||
|
||||
//
|
||||
// POST
|
||||
//
|
||||
protected TRes SendPost<TReq, TRes>(string url, TReq req)
|
||||
=> Send<TReq, TRes>(url, "POST", req);
|
||||
public Task<TRes> SendPostAsync<TReq, TRes>(string url, TReq req)
|
||||
=> SendAsync<TReq, TRes>(url, "POST", req);
|
||||
|
||||
|
||||
#region private
|
||||
//
|
||||
// Requests
|
||||
//
|
||||
private TRes Get<TRes>(string url)
|
||||
{
|
||||
string response = Get(url);
|
||||
|
||||
return deserialize<TRes>(response);
|
||||
}
|
||||
private TRes Send<TReq, TRes>(string url, string method, TReq req)
|
||||
{
|
||||
string dataString = serialize(req);
|
||||
|
||||
string response = Send(url, method, dataString);
|
||||
|
||||
return deserialize<TRes>(response);
|
||||
}
|
||||
private async Task<TRes> GetAsync<TRes>(string url)
|
||||
{
|
||||
string response = await GetAsync(url);
|
||||
|
||||
return deserialize<TRes>(response);
|
||||
}
|
||||
private async Task<TRes> SendAsync<TReq, TRes>(string url, string method, TReq req)
|
||||
{
|
||||
string dataString = serialize(req);
|
||||
|
||||
string response = await SendAsync(url, method, method);
|
||||
|
||||
return deserialize<TRes>(response);
|
||||
}
|
||||
|
||||
//
|
||||
// String
|
||||
//
|
||||
private string Get(string url)
|
||||
=> exec(client => client.DownloadString(url));
|
||||
private string Send(string url, string method, string dataString)
|
||||
=> exec(client => client.UploadString(url, method, dataString));
|
||||
private async Task<string> GetAsync(string url)
|
||||
=> await execasync(client => client.DownloadStringTaskAsync(url));
|
||||
private async Task<string> SendAsync(string url, string method, string dataString)
|
||||
=> await execasync(client => client.UploadStringTaskAsync(url, method, dataString));
|
||||
|
||||
//
|
||||
// Base
|
||||
//
|
||||
private string exec(Func<WebClient, string> action)
|
||||
{
|
||||
string response;
|
||||
|
||||
using (WebClient client = new WebClient())
|
||||
{
|
||||
client.Encoding = Encoding.UTF8;
|
||||
|
||||
client.Headers.Add(HttpRequestHeader.ContentType, "application/json");
|
||||
|
||||
response = action(client);
|
||||
}
|
||||
|
||||
return response;
|
||||
}
|
||||
private async Task<string> execasync(Func<WebClient, Task<string>> action)
|
||||
{
|
||||
string response;
|
||||
|
||||
using (WebClient client = new WebClient())
|
||||
{
|
||||
client.Encoding = Encoding.UTF8;
|
||||
|
||||
client.Headers.Add(HttpRequestHeader.ContentType, "application/json");
|
||||
|
||||
response = await action(client);
|
||||
}
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
private T deserialize<T>(string input)
|
||||
{
|
||||
if(string.IsNullOrEmpty(input))
|
||||
return default(T);
|
||||
|
||||
return JsonConvert.DeserializeObject<T>(input);
|
||||
}
|
||||
private string serialize<T>(T input)
|
||||
{
|
||||
if(input is T)
|
||||
return JsonConvert.SerializeObject(input);
|
||||
return string.Empty;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
23
Shared/DataContracts/AiConversationDC.cs
Normal file
23
Shared/DataContracts/AiConversationDC.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BS.Shared.DataContracts
|
||||
{
|
||||
[DataContract]
|
||||
public class AiConversationDC : IDataContract
|
||||
{
|
||||
[DataMember] public long? Oid { get; set; }
|
||||
[DataMember] public long Version { get; set; }
|
||||
[DataMember] public string Displayname { get; set; }
|
||||
[DataMember] public DateTime Created { get; set; }
|
||||
[DataMember] public string Modell { get; set; }
|
||||
[DataMember] public string View { get; set; }
|
||||
|
||||
[DataMember] public AiSettingDC Setting { get; set; }
|
||||
[DataMember] public List<AiConversationMessageDC> Messages { get; set; }
|
||||
}
|
||||
}
|
||||
19
Shared/DataContracts/AiConversationMessageDC.cs
Normal file
19
Shared/DataContracts/AiConversationMessageDC.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BS.Shared.DataContracts
|
||||
{
|
||||
[DataContract]
|
||||
public class AiConversationMessageDC : IDataContract
|
||||
{
|
||||
public long? Oid { get; set; }
|
||||
public string Model { get; set; }
|
||||
public string Context { get; set; }
|
||||
public string Prompt { get; set; }
|
||||
public string Result { get; set; }
|
||||
}
|
||||
}
|
||||
63
Shared/DataContracts/AiModelDC.cs
Normal file
63
Shared/DataContracts/AiModelDC.cs
Normal file
@@ -0,0 +1,63 @@
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BS.Shared.DataContracts
|
||||
{
|
||||
public class AiModelDC : IDataContract, IComparable<AiModelDC>
|
||||
{
|
||||
public AiModelDC()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public AiModelDC(string name, int value)
|
||||
{
|
||||
ModelName = name;
|
||||
Value = value;
|
||||
}
|
||||
|
||||
public string ModelName { get; set; }
|
||||
|
||||
public int Value { get; set; }
|
||||
|
||||
public int CompareTo(AiModelDC other)
|
||||
{
|
||||
if(other == null) return 1;
|
||||
|
||||
var comp = ModelName.CompareTo(other.ModelName);
|
||||
|
||||
if(comp != 0) return comp;
|
||||
|
||||
var comp2 = Value.CompareTo(other.Value);
|
||||
|
||||
return comp2;
|
||||
}
|
||||
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
return obj is AiModelDC dc &&
|
||||
ModelName == dc.ModelName &&
|
||||
Value == dc.Value;
|
||||
}
|
||||
|
||||
public override int GetHashCode()
|
||||
{
|
||||
unchecked
|
||||
{
|
||||
var result = 0;
|
||||
result = (result * 397) ^ ModelName.GetHashCode();
|
||||
result = (result * 397) ^ Value.GetHashCode();
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return $"{ModelName}:{Value}";
|
||||
}
|
||||
}
|
||||
}
|
||||
18
Shared/DataContracts/AiSettingDC.cs
Normal file
18
Shared/DataContracts/AiSettingDC.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BS.Shared.DataContracts
|
||||
{
|
||||
[DataContract]
|
||||
public class AiSettingDC : IDataContract
|
||||
{
|
||||
[DataMember] public long Oid { get; set; }
|
||||
[DataMember] public long Version { get; set; }
|
||||
|
||||
[DataMember] public string SelectedModel { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -16,6 +16,5 @@ namespace BS.Shared.DataContracts
|
||||
|
||||
[DataMember]
|
||||
public string Settings { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
@@ -168,10 +168,15 @@
|
||||
<Compile Include="Core\EventArgs.cs" />
|
||||
<Compile Include="Core\ObservableSortCollection.cs" />
|
||||
<Compile Include="Core\ValidatorExtended.cs" />
|
||||
<Compile Include="Core\WebClientFacade.cs" />
|
||||
<Compile Include="Core\WohnheimbuchungsIntervall.cs" />
|
||||
<Compile Include="DataContracts\AbsenceOverviewFilterDC.cs" />
|
||||
<Compile Include="DataContracts\AdminService\IAdminServiceDC.cs" />
|
||||
<Compile Include="DataContracts\AdminService\AdminServiceSumReqDC.cs" />
|
||||
<Compile Include="DataContracts\AiConversationDC.cs" />
|
||||
<Compile Include="DataContracts\AiConversationMessageDC.cs" />
|
||||
<Compile Include="DataContracts\AiModelDC.cs" />
|
||||
<Compile Include="DataContracts\AiSettingDC.cs" />
|
||||
<Compile Include="DataContracts\AiSettingsDC.cs" />
|
||||
<Compile Include="DataContracts\AiChatDC.cs" />
|
||||
<Compile Include="DataContracts\AbwesenheitsInformationDC.cs" />
|
||||
|
||||
Reference in New Issue
Block a user