Prompt Result Fenster
+ Info nur bei Selected + Welche DCs sollen gespeichert werden
This commit is contained in:
@@ -142,10 +142,14 @@
|
||||
<Compile Include="ViewModel\View\Administration\AiPromptbausteinPromptViewModel.cs" />
|
||||
<Compile Include="ViewModel\View\Administration\AiPromptbausteinTreeViewModel.cs" />
|
||||
<Compile Include="ViewModel\View\AI\AiConversationChatViewModel.cs" />
|
||||
<Compile Include="ViewModel\View\AI\AiPromptbausteinActionResultViewModel.cs" />
|
||||
<Compile Include="ViewModel\View\AI\AiPromptbausteinSelectionViewModel.cs" />
|
||||
<Compile Include="ViewModel\View\DialogViewModel.cs" />
|
||||
<Compile Include="ViewModel\View\Dialogs\GkvAbrechnungDialogViewModel.cs" />
|
||||
<Compile Include="ViewModel\View\Gkv\GkvAbrechnungDialogViewModel.cs" />
|
||||
<Compile Include="ViewModel\View\WindowViewModel.cs" />
|
||||
<Compile Include="View\Detail\AI\AiPromptbausteinActionResultView.xaml.cs">
|
||||
<DependentUpon>AiPromptbausteinActionResultView.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="View\Detail\AI\AiPromptbausteinPromptView.xaml.cs">
|
||||
<DependentUpon>AiPromptbausteinPromptView.xaml</DependentUpon>
|
||||
</Compile>
|
||||
@@ -217,6 +221,10 @@
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="View\Detail\AI\AiPromptbausteinActionResultView.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="View\Detail\AI\AiPromptbausteinPromptView.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
|
||||
@@ -4,7 +4,6 @@ using BeWo.View.Windows;
|
||||
using BeWo.ViewModel;
|
||||
using BeWo.ViewModel.View.Administration;
|
||||
using BeWo.ViewModel.View.AI;
|
||||
using BeWo.ViewModel.View.Dialogs;
|
||||
using BS.Shared;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@@ -23,6 +22,7 @@ using BeWo.ViewModel.View;
|
||||
using System.Windows.Controls.Primitives;
|
||||
using static DevExpress.XtraPrinting.Native.ExportOptionsPropertiesNames;
|
||||
using DevExpress.Mvvm.Native;
|
||||
using BeWo.ViewModel.View.Gkv;
|
||||
|
||||
namespace BeWo.Services
|
||||
{
|
||||
@@ -64,6 +64,10 @@ namespace BeWo.Services
|
||||
{
|
||||
ShowAiPromptbausteinPromptPopup(viewModel4);
|
||||
}
|
||||
else if(windowViewModel is AiPromptbausteinActionResultViewModel viewModel5)
|
||||
{
|
||||
ShowAiPromptbausteinActionResultPopup(viewModel5);
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new NotImplementedException($"type not implemented: {typeof(T)}");
|
||||
@@ -121,6 +125,16 @@ namespace BeWo.Services
|
||||
};
|
||||
Show("KI Promptbaustein Prompt", control, viewModel, options);
|
||||
}
|
||||
public void ShowAiPromptbausteinActionResultPopup(AiPromptbausteinActionResultViewModel viewModel)
|
||||
{
|
||||
var control = new AiPromptbausteinActionResultView(viewModel);
|
||||
var options = new BeWoWindowOptions()
|
||||
{
|
||||
Height = 400,
|
||||
Width = 600
|
||||
};
|
||||
Show("KI Promptbaustein Ergebnis", control, viewModel, options);
|
||||
}
|
||||
|
||||
|
||||
public void ShowGkvAbrechnungDetailWindow(GkvAbrechnungDialogViewModel vm)
|
||||
|
||||
@@ -3,7 +3,7 @@ using BeWo.ViewModel.Light;
|
||||
using BeWo.ViewModel.View;
|
||||
using BeWo.ViewModel.View.Administration;
|
||||
using BeWo.ViewModel.View.AI;
|
||||
using BeWo.ViewModel.View.Dialogs;
|
||||
using BeWo.ViewModel.View.Gkv;
|
||||
using BS.Shared;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
44
BeWo/View/Detail/AI/AiPromptbausteinActionResultView.xaml
Normal file
44
BeWo/View/Detail/AI/AiPromptbausteinActionResultView.xaml
Normal file
@@ -0,0 +1,44 @@
|
||||
<UserControl
|
||||
x:Class="BeWo.View.Detail.AI.AiPromptbausteinActionResultView"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:ai="clr-namespace:BeWo.ViewModel.View.AI"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:BeWo.View.Detail.AI"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
d:DataContext="{d:DesignInstance Type=ai:AiPromptbausteinActionResultViewModel}"
|
||||
d:DesignHeight="600"
|
||||
d:DesignWidth="400"
|
||||
mc:Ignorable="d">
|
||||
<UserControl.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="..\..\..\Styles\ModernOrangeBlack.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
</ResourceDictionary>
|
||||
</UserControl.Resources>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<TextBox
|
||||
Height="auto"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Stretch" Text="{Binding Result}" TextWrapping="Wrap">
|
||||
|
||||
</TextBox>
|
||||
<StackPanel
|
||||
Grid.Row="1"
|
||||
HorizontalAlignment="Right"
|
||||
Orientation="Horizontal">
|
||||
<Button Command="{Binding CancelCommand}">Abrechen</Button>
|
||||
<Button Command="{Binding RetryCommand}">Nochmal versuchen</Button>
|
||||
<Button Command="{Binding AcceptCommand}">Anfügen</Button>
|
||||
<Button Command="{Binding ReplaceCommand}">Ersetzen</Button>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
33
BeWo/View/Detail/AI/AiPromptbausteinActionResultView.xaml.cs
Normal file
33
BeWo/View/Detail/AI/AiPromptbausteinActionResultView.xaml.cs
Normal file
@@ -0,0 +1,33 @@
|
||||
using BeWo.ViewModel.View.AI;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
|
||||
namespace BeWo.View.Detail.AI
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaktionslogik für AiPromptbausteinActionResultView.xaml
|
||||
/// </summary>
|
||||
public partial class AiPromptbausteinActionResultView : UserControl
|
||||
{
|
||||
public AiPromptbausteinActionResultViewModel ViewModel { get; set; }
|
||||
|
||||
public AiPromptbausteinActionResultView( AiPromptbausteinActionResultViewModel viewModel = null)
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
DataContext = ViewModel = viewModel;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -24,7 +24,9 @@
|
||||
<Style
|
||||
x:Key="PromptListBoxItem"
|
||||
BasedOn="{StaticResource PhotoListBoxItem}"
|
||||
TargetType="ListBoxItem" />
|
||||
TargetType="ListBoxItem" >
|
||||
<Setter Property="IsSelected" Value="{Binding IsSelected}"/>
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
</view:BeWoView.Resources>
|
||||
<GroupBox Style="{StaticResource ObjectEditGroupBox}">
|
||||
|
||||
@@ -20,7 +20,7 @@ using BeWo.ViewModel;
|
||||
using BeWo.ViewModel.Light;
|
||||
using BeWo.ViewModel.ListViewModel;
|
||||
using BeWo.ViewModel.ListViewModel.Light;
|
||||
using BeWo.ViewModel.View.Dialogs;
|
||||
using BeWo.ViewModel.View.Gkv;
|
||||
using BS.Shared;
|
||||
using BS.Shared.AppSender;
|
||||
using BS.Shared.Core;
|
||||
|
||||
@@ -113,6 +113,7 @@ namespace BeWo.ViewModel
|
||||
public AiPromptbausteinFolderVM Parent { get; set; }
|
||||
|
||||
public FontWeight FontWeight => !IsNew && ParentFolderOid is null ? FontWeights.SemiBold : FontWeights.Medium;
|
||||
public bool HasSubFolders => SubFolders is object && SubFolders.Count > 0;
|
||||
public string Displayname
|
||||
{
|
||||
get
|
||||
|
||||
@@ -19,6 +19,7 @@ namespace BeWo.ViewModel
|
||||
private bool _ShowPromptByTenant;
|
||||
private bool _IsOwnsoftPrompt;
|
||||
private string _OwnsoftRefLink;
|
||||
private bool _IsSelected;
|
||||
|
||||
public AiPromptbausteinPromptVM(AiPromptbausteinPromptDC dc) : base(dc, dc.Oid)
|
||||
{
|
||||
@@ -97,9 +98,15 @@ namespace BeWo.ViewModel
|
||||
set => DataContract.CanEdit = value;
|
||||
}
|
||||
|
||||
public bool IsSelected
|
||||
{
|
||||
get => _IsSelected;
|
||||
set => SetProperty(ref _IsSelected, value, nameof(IsInfoVisible));
|
||||
}
|
||||
|
||||
public bool IsInfoVisible
|
||||
{
|
||||
get => IsOwnsoftPrompt && !string.IsNullOrWhiteSpace(OwnsoftRefLink);
|
||||
get => IsOwnsoftPrompt && !string.IsNullOrWhiteSpace(OwnsoftRefLink) && IsSelected;
|
||||
}
|
||||
|
||||
protected override void InitByDataContract(AiPromptbausteinPromptDC pDataContract)
|
||||
|
||||
@@ -17,5 +17,22 @@ namespace BeWo.ViewModel.ListViewModel
|
||||
vm.Parent = parent;
|
||||
}
|
||||
}
|
||||
|
||||
public bool ContainsDirtyObject()
|
||||
{
|
||||
if (IsDirty)
|
||||
return true;
|
||||
|
||||
foreach (var vm in VMList)
|
||||
{
|
||||
if (vm.SubFolders is object && vm.SubFolders.ContainsDirtyObject())
|
||||
return true;
|
||||
|
||||
if (vm.SubPrompts is object && vm.SubPrompts.IsDirty)
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -193,7 +193,12 @@ namespace BeWo.ViewModel.ListViewModel
|
||||
public string AktuellerDokutext
|
||||
{
|
||||
get => PrototypeVM.Notice;
|
||||
set => PrototypeVM.Notice = value;
|
||||
set
|
||||
{
|
||||
PrototypeVM.Notice = value;
|
||||
FirePropertyChanged(nameof(IsRedoButtonVisible));
|
||||
FirePropertyChanged(nameof(IsUndoButtonVisible));
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsAiButtonVisible => SelectedCustomerNode is object;
|
||||
@@ -240,28 +245,69 @@ namespace BeWo.ViewModel.ListViewModel
|
||||
ServiceFacade.DoAiEnhancedServiceAsnyc(x => x.ExecuteAiFunctionServiceRecordDocumentation(req),
|
||||
callback =>
|
||||
{
|
||||
var sb = new StringBuilder();
|
||||
var viewModel = new AiPromptbausteinActionResultViewModel();
|
||||
|
||||
sb.AppendLine("AI Antwort:");
|
||||
sb.AppendLine(callback.Result);
|
||||
viewModel.Result = callback.Result;
|
||||
|
||||
sb.AppendLine();
|
||||
sb.AppendLine("Original:");
|
||||
sb.AppendLine(AktuellerDokutext);
|
||||
|
||||
var str = sb.ToString();
|
||||
var idx = _AiActionHistoryIndex;
|
||||
var count = _AiActionHistory.Count;
|
||||
|
||||
if(count - 1 > idx)
|
||||
viewModel.Accept_Button_Clicked += (s, e) =>
|
||||
{
|
||||
_AiActionHistory.RemoveRange(idx, count - idx);
|
||||
}
|
||||
var sb = new StringBuilder();
|
||||
|
||||
_AiActionHistory.Add(str);
|
||||
_AiActionHistoryIndex++;
|
||||
sb.AppendLine("AI Antwort:");
|
||||
sb.AppendLine(viewModel.Result);
|
||||
|
||||
AktuellerDokutext = str;
|
||||
sb.AppendLine();
|
||||
sb.AppendLine("Original:");
|
||||
sb.AppendLine(AktuellerDokutext);
|
||||
|
||||
var str = sb.ToString();
|
||||
var idx = _AiActionHistoryIndex;
|
||||
var count = _AiActionHistory.Count;
|
||||
|
||||
if (count - 1 > idx)
|
||||
{
|
||||
_AiActionHistory.RemoveRange(idx + 1, count - idx - 1);
|
||||
}
|
||||
|
||||
if(AktuellerDokutext != _AiActionHistory[_AiActionHistoryIndex])
|
||||
{
|
||||
_AiActionHistory.Add(AktuellerDokutext);
|
||||
_AiActionHistoryIndex++;
|
||||
}
|
||||
|
||||
_AiActionHistory.Add(str);
|
||||
_AiActionHistoryIndex++;
|
||||
|
||||
AktuellerDokutext = str;
|
||||
};
|
||||
viewModel.Replace_Button_Clicked += (s, e) =>
|
||||
{
|
||||
var str = viewModel.Result;
|
||||
var idx = _AiActionHistoryIndex;
|
||||
var count = _AiActionHistory.Count;
|
||||
|
||||
if (count - 1 > idx)
|
||||
{
|
||||
_AiActionHistory.RemoveRange(idx + 1, count - idx - 1);
|
||||
}
|
||||
|
||||
if (AktuellerDokutext != _AiActionHistory[_AiActionHistoryIndex])
|
||||
{
|
||||
_AiActionHistory.Add(AktuellerDokutext);
|
||||
_AiActionHistoryIndex++;
|
||||
}
|
||||
|
||||
_AiActionHistory.Add(str);
|
||||
_AiActionHistoryIndex++;
|
||||
|
||||
AktuellerDokutext = str;
|
||||
};
|
||||
viewModel.Retry_Button_Clicked += (s, e) =>
|
||||
{
|
||||
PromptAccepted(sender, prompt);
|
||||
};
|
||||
|
||||
BeWoApp.MainControl.WindowService.Show(viewModel);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
@@ -8,7 +8,6 @@ using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using BeWo.ViewModel.ListViewModel;
|
||||
using BeWo.ViewModel.View.Dialogs;
|
||||
using System.Windows.Input;
|
||||
using BS.Shared.Core;
|
||||
using DevExpress.Mvvm;
|
||||
|
||||
@@ -0,0 +1,79 @@
|
||||
using DevExpress.Mvvm;
|
||||
using DevExpress.XtraBars.Docking2010.Views.WindowsUI;
|
||||
using DevExpress.XtraRichEdit.Commands;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BeWo.ViewModel.View.AI
|
||||
{
|
||||
public class AiPromptbausteinActionResultViewModel : DialogViewModel
|
||||
{
|
||||
public event EventHandler Accept_Button_Clicked;
|
||||
public event EventHandler Cancel_Button_Clicked;
|
||||
public event EventHandler Retry_Button_Clicked;
|
||||
public event EventHandler Replace_Button_Clicked;
|
||||
|
||||
public AiPromptbausteinActionResultViewModel() : base()
|
||||
{
|
||||
AcceptCommand = new DelegateCommand(Accept, canAccept, false);
|
||||
CancelCommand = new DelegateCommand(Cancel, canCancel, false);
|
||||
RetryCommand = new DelegateCommand(Retry, canRetry, false);
|
||||
ReplaceCommand = new DelegateCommand(Replace, canReplace, false);
|
||||
}
|
||||
|
||||
public DelegateCommand AcceptCommand { get; set; }
|
||||
public DelegateCommand CancelCommand { get; set; }
|
||||
public DelegateCommand RetryCommand { get; set; }
|
||||
public DelegateCommand ReplaceCommand { get; set; }
|
||||
|
||||
public string Result { get; set; }
|
||||
|
||||
public void Accept()
|
||||
{
|
||||
Close();
|
||||
Accept_Button_Clicked?.Invoke(this, EventArgs.Empty);
|
||||
}
|
||||
|
||||
public void Cancel()
|
||||
{
|
||||
Close();
|
||||
Cancel_Button_Clicked?.Invoke(this, EventArgs.Empty);
|
||||
}
|
||||
|
||||
public void Retry()
|
||||
{
|
||||
Close();
|
||||
Retry_Button_Clicked?.Invoke(this, EventArgs.Empty);
|
||||
}
|
||||
|
||||
public void Replace()
|
||||
{
|
||||
Close();
|
||||
Replace_Button_Clicked?.Invoke(this, EventArgs.Empty);
|
||||
}
|
||||
|
||||
private bool canAccept()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
private bool canCancel()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
private bool canRetry()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
private bool canReplace()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,6 @@
|
||||
using BeWo.ServiceProxy;
|
||||
using BeWo.Services;
|
||||
using BeWo.ViewModel.ListViewModel;
|
||||
using BeWo.ViewModel.View.Dialogs;
|
||||
using BS.Shared;
|
||||
using BS.Shared.Extensions.CustomInterfaces;
|
||||
using DevExpress.Mvvm;
|
||||
|
||||
@@ -11,6 +11,7 @@ using DevExpress.Xpf.Layout.Core;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Runtime.Remoting.Metadata.W3cXsd2001;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
@@ -85,14 +86,13 @@ namespace BeWo.ViewModel.View.Administration
|
||||
{
|
||||
get
|
||||
{
|
||||
return false;
|
||||
return Folders?.ContainsDirtyObject() ?? false;
|
||||
}
|
||||
}
|
||||
public bool HasCopiedFolder => CopiedFolder is object;
|
||||
public bool HasCopiedPrompt => CopiedPrompt is object;
|
||||
public CompactEmployeeDC CurrentEmployee => BeWoApp.CompactLoggedOnEmployee;
|
||||
|
||||
|
||||
public void UpdateFolderCommands()
|
||||
{
|
||||
OpenAddFolderDialogCommand.RaiseCanExecuteChanged();
|
||||
@@ -112,7 +112,41 @@ namespace BeWo.ViewModel.View.Administration
|
||||
|
||||
public void SaveVMList()
|
||||
{
|
||||
if (!IsDirty)
|
||||
return;
|
||||
|
||||
// DFS -> 1. Sobald Knoten gefunden wird mit IsNew=true: Teilbaum als neu markieren
|
||||
// 2. Sobald Knoten gefunden wird mit IsNew=false && IsDirty=true: Knoten als update markieren
|
||||
// 3. Checken, welche Knoten gelöscht wurden
|
||||
|
||||
var toadd_folder = new List<AiPromptbausteinFolderVM>();
|
||||
var toadd_prompts = new List<AiPromptbausteinPromptDC>();
|
||||
var toupdate_folder = new List<AiPromptbausteinFolderVM>();
|
||||
var toupdate_prompt = new List<AiPromptbausteinPromptDC>();
|
||||
DFS_Search_AddUpdate(Folders, ref toadd_folder, ref toadd_prompts, ref toupdate_folder, ref toupdate_prompt);
|
||||
|
||||
var todelete_folder = new List<AiPromptbausteinFolderDC>();
|
||||
var todelete_prompt = new List<AiPromptbausteinPromptDC>();
|
||||
DFS_Search_Delete(Folders, ref todelete_folder, ref todelete_prompt);
|
||||
|
||||
var toadd_folder_dcs = toadd_folder.Select(x => x.CommitToDataContract());
|
||||
var toupdate_folder_dcs = toupdate_folder.Select(x => x.CommitToDataContract());
|
||||
|
||||
var actions = new List<Action<IAiEnhancedService>>();
|
||||
|
||||
//if (toadd_dcs.Any())
|
||||
// actions.Add(x => x.CreateAiPromptbausteineTree(toadd_dcs.ToList()));
|
||||
|
||||
//if (toupdate_dcs.Any())
|
||||
// actions.Add(x => x.UpdateAiPromptbausteineTree(toupdate_dcs.ToList()));
|
||||
|
||||
//if (todelete.Any())
|
||||
// actions.Add(x => x.DeleteAiPromptbausteineTree(todelete.ToDictionary(x1 => x1.Oid.Value, x2 => x2.Version.Value)));
|
||||
|
||||
ServiceFacade.DoMultipleAiEnhancedServicesAsync(actions, () =>
|
||||
{
|
||||
ReloadVMList();
|
||||
});
|
||||
}
|
||||
internal void ReloadVMList()
|
||||
{
|
||||
@@ -127,6 +161,50 @@ namespace BeWo.ViewModel.View.Administration
|
||||
|
||||
}
|
||||
|
||||
void DFS_Search_AddUpdate(AiPromptbausteinFolderListVM folders, ref List<AiPromptbausteinFolderVM> toadd_Folder, ref List<AiPromptbausteinPromptDC> toadd_Prompts, ref List<AiPromptbausteinFolderVM> toupdate_Folder, ref List<AiPromptbausteinPromptDC> toupdate_Prompt)
|
||||
{
|
||||
foreach (var node in folders.VMList)
|
||||
{
|
||||
if (node.IsNew)
|
||||
{
|
||||
toadd_Folder.Add(node);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (node.IsDirty)
|
||||
toupdate_Folder.Add(node);
|
||||
|
||||
if (node.HasSubFolders)
|
||||
DFS_Search_AddUpdate(node.SubFolders, ref toadd_Folder, ref toadd_Prompts, ref toupdate_Folder, ref toupdate_Prompt);
|
||||
|
||||
if (node.SubPrompts.AddedCount > 0)
|
||||
toadd_Prompts.AddRange(node.SubPrompts.CommitAdded());
|
||||
|
||||
if (node.SubPrompts.ChangedCount > 0)
|
||||
toupdate_Prompt.AddRange(node.SubPrompts.CommitChanged());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void DFS_Search_Delete(AiPromptbausteinFolderListVM folders, ref List<AiPromptbausteinFolderDC> todelete_Folder, ref List<AiPromptbausteinPromptDC> todelete_Prompt)
|
||||
{
|
||||
foreach (var node_dc in folders.DCBackup)
|
||||
{
|
||||
if (folders.VMList.FirstOrDefault(vm => vm.DataContract == node_dc) is AiPromptbausteinFolderVM node_vm)
|
||||
{
|
||||
if (node_vm.SubFolders.DCBackup is object && node_vm.SubFolders.DCBackup.Count > 0)
|
||||
DFS_Search_Delete(node_vm.SubFolders, ref todelete_Folder, ref todelete_Prompt);
|
||||
|
||||
if (node_vm.SubPrompts.RemovedCount > 0)
|
||||
todelete_Prompt.AddRange(node_vm.SubPrompts.GetRemoved());
|
||||
}
|
||||
else
|
||||
{
|
||||
todelete_Folder.Add(node_dc);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void OpenAddFolderDialog()
|
||||
{
|
||||
var sel_folder = SelectedFolder;
|
||||
@@ -274,6 +352,7 @@ namespace BeWo.ViewModel.View.Administration
|
||||
|
||||
folder.SubPrompts.VMList.Remove(SelectedPrompt);
|
||||
}
|
||||
|
||||
bool canOpenAddPromptDialog()
|
||||
{
|
||||
return SelectedFolder?.CanAdd ?? false;
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using BeWo.ViewModel.ListViewModel;
|
||||
using BeWo.ViewModel.View.Dialogs;
|
||||
using DevExpress.Mvvm;
|
||||
using DevExpress.Xpf.Docking;
|
||||
using System;
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using BeWo.ViewModel.View.Dialogs;
|
||||
using DevExpress.DataProcessing.InMemoryDataProcessor;
|
||||
using DevExpress.DataProcessing.InMemoryDataProcessor;
|
||||
using DevExpress.Mvvm;
|
||||
using DevExpress.Mvvm.POCO;
|
||||
using DevExpress.XtraBars.Docking2010.Views.WindowsUI;
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using BeWo.ViewModel.View.Dialogs;
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
@@ -5,7 +5,7 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BeWo.ViewModel.View.Dialogs
|
||||
namespace BeWo.ViewModel.View.Gkv
|
||||
{
|
||||
public class GkvAbrechnungDialogViewModel : DialogViewModel
|
||||
{
|
||||
Reference in New Issue
Block a user