Files
BeWoPlaner/BeWo/AI/View/AiChatView.xaml.cs
Rene Evertz 1b9efb8f79 Squashed commit of the following:
commit af28476b76
Merge: b76e16946 c3b6a1e9c
Author: Marcel Hirschle <marcel.hirschle@ownsoft.de>
Date:   Thu Jun 20 11:53:31 2024 +0200

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

    # Conflicts:
    #	ReportImp/VkmHamm/CustomerMitarbeiterstundenkontoBerechnung.cs

commit b76e169462
Author: Marcel Hirschle <marcel.hirschle@ownsoft.de>
Date:   Thu Jun 20 11:40:08 2024 +0200

    MH: vkm hamm stundenkonto

commit c3b6a1e9c0
Author: Christian <christian.baeurle@beyondsoft.de>
Date:   Thu Jun 20 10:58:05 2024 +0200

    Mergemarker entfernt

commit 5ff8fe343b
Merge: c1aa61f05 fc57725f4
Author: Christian <christian.baeurle@beyondsoft.de>
Date:   Thu Jun 20 10:52:16 2024 +0200

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

commit c1aa61f058
Merge: 12faccb71 1c0a94c60
Author: Christian <christian.baeurle@beyondsoft.de>
Date:   Thu Jun 20 10:51:59 2024 +0200

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

    # Conflicts:
    #	BeWo/ServiceProxy/Generated.cs
    #	Data/Security/UserRightHelper.cs
    #	Shared/BeWoEntityEnums.cs
    #	Shared/Core/EnumTranslations.cs

commit 12faccb71b
Author: Christian <christian.baeurle@beyondsoft.de>
Date:   Wed Jun 19 16:13:56 2024 +0200

    Perseh Hilfeplan Import + KI Prototyp,
2024-06-20 12:16:00 +02:00

75 lines
1.9 KiB
C#

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.IO;
using System.Linq;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Forms;
using System.Windows.Input;
using BeWo.Annotations;
using BeWo.Core;
using BeWo.ServiceProxy;
using BeWo.Validation;
using BeWo.View;
using BeWo.View.Controls;
using BeWo.ViewModel;
using BeWo.ViewModel.ListViewModel;
using BS.Shared;
using BS.Shared.Core;
using BS.Shared.DataContracts;
using BS.Shared.Extensions;
using BS.Shared.Translation;
using DevExpress.Utils;
using DevExpress.Xpf.Editors;
using DevExpress.Xpf.Grid;
using MessageBox = System.Windows.MessageBox;
namespace BeWo.AI.View
{
public partial class AiChatView : BeWoView
{
public event Action CloseButtonClicked;
private long cb2scOid;
private DateTime startDate;
private DateTime endDate;
public AiChatView(long c2sOid, DateTime start, DateTime end)
{
InitializeComponent();
this.cb2scOid = c2sOid;
this.startDate = start;
this.endDate = end;
}
private void ReloadViewModel(AiChatDC dc)
{
TextBoxErgebnis.Text = dc.Result;
}
private void btnSend_Click(object sender, RoutedEventArgs e)
{
var acdc = new AiChatDC();
acdc.Prompt = TextBoxAnfrage.Text;
ServiceFacade.DoOperationsServiceAsync(s => s.CreateAiQueryForServiceRecords(acdc, cb2scOid, startDate, endDate),
dc =>
{
this.Dispatch(delegate
{
ReloadViewModel(dc);
});
});
}
private void btnClose_Click(object sender, RoutedEventArgs e)
{
CloseButtonClicked?.Invoke();
}
}
}