diff --git a/BeWo/BeWo.csproj b/BeWo/BeWo.csproj
index e78c8d441..0efe14c8d 100644
--- a/BeWo/BeWo.csproj
+++ b/BeWo/BeWo.csproj
@@ -98,6 +98,7 @@
+
diff --git a/BeWo/Core/BeWoUtils.cs b/BeWo/Core/BeWoUtils.cs
index 4d8445804..6d7449602 100644
--- a/BeWo/Core/BeWoUtils.cs
+++ b/BeWo/Core/BeWoUtils.cs
@@ -2045,19 +2045,6 @@ namespace BeWo.Core
BeWoApp.MainControl.EndWaiting();
}
- public static void ShowPdfWindow(byte[] bytes)
- => ShowPdfWindow(new MemoryStream(bytes));
- public static void ShowPdfWindow(MemoryStream ms)
- {
- var control = new PdfViewer();
-
- control.PdfData = ms;
-
- var window = BeWoWindowBuilder.GetBeWoWindow("eRechnung", control);
-
- window.Show();
- }
-
public static PasswortSecurityStrength CheckPasswordSecurity(string paswd)
{
PasswortSicherheit pwS = new PasswortSicherheit();
diff --git a/BeWo/Scripts/ServiceReferences_AccountingEnhancedService.bat b/BeWo/Scripts/ServiceReferences_AccountingEnhancedService.bat
new file mode 100644
index 000000000..682fe6afe
--- /dev/null
+++ b/BeWo/Scripts/ServiceReferences_AccountingEnhancedService.bat
@@ -0,0 +1,33 @@
+..\svcutil.exe /noConfig /noLogo /edb /n:*,BeWo.ServiceProxy /out:..\ServiceProxy\GeneratedAccountingEnhancedService.cs /ct:System.Collections.Generic.List`1 /r:..\..\Shared\bin\Debug\BS.Shared.dll http://localhost:3777/Host/AccountingEnhancedService.svc?wsdl
+
+@echo off
+setlocal EnableDelayedExpansion
+
+set "input=..\ServiceProxy\GeneratedAccountingEnhancedService.cs"
+set "output=temp.txt"
+set /a start=12
+set /a end=162
+set /a line=0
+
+REM Zeilen zählen
+set /a total=0
+for /f "usebackq delims=" %%A in ("%input%") do (
+ set /a total+=1
+)
+
+REM Nur löschen, wenn genug Zeilen vorhanden
+if %total% leq %end% (
+ echo Datei hat nur %total% Zeilen – nichts wird gelöscht.
+ copy /y "%input%" "%input2%"
+ goto :eof
+)
+
+> "%output%" (
+ for /f "usebackq delims=" %%A in ("%input%") do (
+ set /a line+=1
+ if !line! lss %start% echo(%%A
+ if !line! gtr %end% echo(%%A
+ )
+)
+
+move /y "%output%" "%input%"
\ No newline at end of file
diff --git a/BeWo/Scripts/ServiceReferences_AccountingEnhancedService_Log.bat b/BeWo/Scripts/ServiceReferences_AccountingEnhancedService_Log.bat
new file mode 100644
index 000000000..8320ccf11
--- /dev/null
+++ b/BeWo/Scripts/ServiceReferences_AccountingEnhancedService_Log.bat
@@ -0,0 +1,23 @@
+@echo off
+REM Diese Batch-Datei führt eine andere Batch-Datei aus und schreibt das Ergebnis in eine Log-Datei
+
+REM Pfad zur anderen Batch-Datei
+set "SCRIPT_PATH=ServiceReferences_AccountingEnhancedService.bat"
+
+REM Pfad zur Log-Datei
+set "LOG_FILE=ServiceReferences_AccountingEnhancedService_Log.log.txt"
+
+REM Leere die Log-Datei vor dem Start
+echo. > %LOG_FILE%
+
+REM Führe die andere Batch-Datei aus und leite die Ausgabe in die Log-Datei um
+call %SCRIPT_PATH% >> %LOG_FILE% 2>&1
+
+REM Überprüfe, ob die Ausführung erfolgreich war
+if %errorlevel% equ 0 (
+ echo Die Ausführung von %SCRIPT_PATH% war erfolgreich. >> %LOG_FILE%
+) else (
+ echo Die Ausführung von %SCRIPT_PATH% ist fehlgeschlagen. >> %LOG_FILE%
+)
+
+echo Log wurde in %LOG_FILE% geschrieben.
\ No newline at end of file
diff --git a/BeWo/ServiceProxy/GeneratedAccountingEnhancedService.cs b/BeWo/ServiceProxy/GeneratedAccountingEnhancedService.cs
new file mode 100644
index 000000000..07417eeed
--- /dev/null
+++ b/BeWo/ServiceProxy/GeneratedAccountingEnhancedService.cs
@@ -0,0 +1,61 @@
+//------------------------------------------------------------------------------
+//
+// Dieser Code wurde von einem Tool generiert.
+// Laufzeitversion:4.0.30319.42000
+//
+// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
+// der Code erneut generiert wird.
+//
+//------------------------------------------------------------------------------
+namespace BeWo.ServiceProxy
+{
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
+ [System.ServiceModel.ServiceContractAttribute(ConfigurationName="BeWo.ServiceProxy.IAccountingEnhancedService")]
+ public interface IAccountingEnhancedService
+ {
+
+ [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IAccountingEnhancedService/CreateXRechnung", ReplyAction="http://tempuri.org/IAccountingEnhancedService/CreateXRechnungResponse")]
+ [System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IAccountingEnhancedService/CreateXRechnungBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
+ byte[] CreateXRechnung(long invoice_base_oid, int report_type, string report_url);
+ }
+
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
+ public interface IAccountingEnhancedServiceChannel : BeWo.ServiceProxy.IAccountingEnhancedService, System.ServiceModel.IClientChannel
+ {
+ }
+
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
+ public partial class AccountingEnhancedServiceClient : System.ServiceModel.ClientBase, BeWo.ServiceProxy.IAccountingEnhancedService
+ {
+
+ public AccountingEnhancedServiceClient()
+ {
+ }
+
+ public AccountingEnhancedServiceClient(string endpointConfigurationName) :
+ base(endpointConfigurationName)
+ {
+ }
+
+ public AccountingEnhancedServiceClient(string endpointConfigurationName, string remoteAddress) :
+ base(endpointConfigurationName, remoteAddress)
+ {
+ }
+
+ public AccountingEnhancedServiceClient(string endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) :
+ base(endpointConfigurationName, remoteAddress)
+ {
+ }
+
+ public AccountingEnhancedServiceClient(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) :
+ base(binding, remoteAddress)
+ {
+ }
+
+ public byte[] CreateXRechnung(long invoice_base_oid, int report_type, string report_url)
+ {
+ return base.Channel.CreateXRechnung(invoice_base_oid, report_type, report_url);
+ }
+ }
+}
diff --git a/BeWo/ServiceProxy/GeneratedOperationsEnhancedService.cs b/BeWo/ServiceProxy/GeneratedOperationsEnhancedService.cs
index 289c4c0ed..cee7970c8 100644
--- a/BeWo/ServiceProxy/GeneratedOperationsEnhancedService.cs
+++ b/BeWo/ServiceProxy/GeneratedOperationsEnhancedService.cs
@@ -20,9 +20,7 @@ namespace BeWo.ServiceProxy
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsEnhancedService/CreateXRechnung", ReplyAction="http://tempuri.org/IOperationsEnhancedService/CreateXRechnungResponse")]
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsEnhancedService/CreateXRechnungBeWoFaultFault", 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))]
- object CreateXRechnung(long invoice_base_oid, int report_type, string report_url);
+ byte[] CreateXRechnung(long invoice_base_oid, int report_type, string report_url);
}
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
@@ -64,7 +62,7 @@ namespace BeWo.ServiceProxy
base.Channel.HelloWorld();
}
- public object CreateXRechnung(long invoice_base_oid, int report_type, string report_url)
+ public byte[] CreateXRechnung(long invoice_base_oid, int report_type, string report_url)
{
return base.Channel.CreateXRechnung(invoice_base_oid, report_type, report_url);
}
diff --git a/BeWo/ServiceProxy/ServiceFacade.cs b/BeWo/ServiceProxy/ServiceFacade.cs
index 2c908ab63..f897f4ffc 100644
--- a/BeWo/ServiceProxy/ServiceFacade.cs
+++ b/BeWo/ServiceProxy/ServiceFacade.cs
@@ -65,7 +65,8 @@ namespace BeWo.ServiceProxy
{ typeof(IAccountingService), new EndpointAddress(_ServerName + "AccountingService.svc") },
{ typeof(IGkvAccountingService), new EndpointAddress(_ServerName + "GkvAccountingService.svc") },
{ typeof(IReportService), new EndpointAddress(_ServerName + "ReportService.svc") },
- { typeof(IAiEnhancedService), new EndpointAddress(_ServerName + "AiEnhancedService.svc") }
+ { typeof(IAiEnhancedService), new EndpointAddress(_ServerName + "AiEnhancedService.svc") },
+ { typeof(IAccountingEnhancedService), new EndpointAddress(_ServerName + "AccountingEnhancedService.svc") }
};
}
@@ -75,6 +76,17 @@ namespace BeWo.ServiceProxy
_ProxyCache = new Dictionary();
}
+ #region AccountingEnhancedService
+ public static void DoAccountingEnhancedServiceSnyc(Action pAction)
+ => DoSync(pAction);
+ public static T DoAccountingEnhancedServiceSnyc(Func pFunc)
+ => DoSync(pFunc);
+ public static void DoAccountingEnhancedServiceAsnyc(Action pAction, Action pCallback = null, Action pErrorCallback = null, bool showWaitDialog = true, UserControl caller = null)
+ => DoAsync(pAction, pCallback, pErrorCallback, showWaitDialog, caller?.Dispatcher);
+ public static void DoAccountingEnhancedServiceAsnyc(Func pFunc, Action pCallback = null, Action pErrorCallback = null, bool showWaitDialog = true, UserControl caller = null)
+ => DoAsync(pFunc, pCallback, pErrorCallback, showWaitDialog, caller?.Dispatcher);
+ #endregion
+
#region AiEnhancedService
public static void DoAiEnhancedServiceSnyc(Action pAction)
=> DoSync(pAction);
diff --git a/BeWo/Services/BeWoWindowFactory.cs b/BeWo/Services/BeWoWindowFactory.cs
index 53191d9c9..e2b29cead 100644
--- a/BeWo/Services/BeWoWindowFactory.cs
+++ b/BeWo/Services/BeWoWindowFactory.cs
@@ -9,17 +9,25 @@ using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
+using System.Windows.Controls.Primitives;
namespace BeWo.Services
{
internal class BeWoWindowFactory : IWindowFactory
{
- public AnimatedBeWoWindow GetAnimatedBeWoWindow(string title, Control control, double height, double width)
+ public AnimatedBeWoWindow GetAnimatedBeWoWindow(string title, Control control, double? height, double? width)
{
var beWoWindow = new AnimatedBeWoWindow();
- beWoWindow.Height = height;
- beWoWindow.Width = width;
+ if (height is double h)
+ beWoWindow.Height = h;
+ else
+ beWoWindow.Height = double.NaN;
+
+ if (width is double w)
+ beWoWindow.Width = w;
+ else
+ beWoWindow.Width = double.NaN;
beWoWindow.WindowStartupLocation = WindowStartupLocation.CenterOwner;
beWoWindow.Owner = BeWoApp.CurrentBeWo.MainWindow;
diff --git a/BeWo/Services/BeWoWindowService.cs b/BeWo/Services/BeWoWindowService.cs
index 261855418..8ce3a1e08 100644
--- a/BeWo/Services/BeWoWindowService.cs
+++ b/BeWo/Services/BeWoWindowService.cs
@@ -52,6 +52,13 @@ namespace BeWo.Services
height, width);
}
+ public void ShowERechnungWindow(MemoryStream pdf)
+ {
+ ShowWindowDialog(
+ "E-Rechnung",
+ cf => cf.GetPdfViewer(pdf));
+ }
+
public void ShowERechnungModalViewWindow(MemoryStream pdf)
{
ShowModalViewWindow(
@@ -67,6 +74,19 @@ namespace BeWo.Services
height, width);
}
+ public void ShowPdfViewerWindow(string title, MemoryStream pdf, double height = 900, double width = 600)
+ {
+ ShowWindowDialog(title,
+ cf => cf.GetPdfViewer(pdf),
+ height, width);
+ }
+
+ public void ShowPdfViewerModalViewWindow(string title, MemoryStream pdf)
+ {
+ ShowModalViewWindow(title,
+ cf => cf.GetPdfViewer(pdf));
+ }
+
public void ShowGkvAbrechnungDetailWindow(GkvAbrechnungVM vm, CancelEventHandler cancelEvent, double height, double width)
{
// Kleiner Hack
@@ -80,45 +100,31 @@ namespace BeWo.Services
private void ShowWindow(Func getTitle, Func getControl, double height, double width)
=> ShowWindow(getTitle(_windowFactory), getControl, height, width);
- private void ShowWindowDialog(Func getTitle, Func getControl, double height, double width)
+ private void ShowWindowDialog(Func getTitle, Func getControl, double? height = null, double? width = null)
=> ShowWindowDialog(getTitle(_windowFactory), getControl, height, width);
- private void ShowModalViewWindow(Func getTitle, Func getControl)
- => ShowModalViewWindow(getTitle(_windowFactory), getControl);
- private void ShowModalViewWindow(Func getTitle, Func getControl, double height, double width)
+ private void ShowModalViewWindow(Func getTitle, Func getControl, double? height = null, double? width = null)
=> ShowModalViewWindow(getTitle(_windowFactory), getControl, height, width);
- private void ShowWindow(string title, Func getControl, double height, double width)
+ private void ShowWindow(string title, Func getControl, double? height = null, double? width = null)
{
var control = getControl(_controlFactory);
var window = _windowFactory.GetAnimatedBeWoWindow(title, control, height, width);
window.Show();
}
- private void ShowWindowDialog(string title, Func getControl, double height, double width)
+ private void ShowWindowDialog(string title, Func getControl, double? height = null, double? width = null)
{
var control = getControl(_controlFactory);
var window = _windowFactory.GetAnimatedBeWoWindow(title, control, height, width);
window.ShowDialog();
}
- private void ShowModalViewWindow(string title, Func getControl)
- {
- var control = getControl(_controlFactory);
- var window = _windowFactory.GetGenericModalViewWindow(title, control);
- window.CommandBindings.Add(new CommandBinding(ApplicationCommands.Close, (s, e) => BeWoApp.MainControl.CloseCurrentPopUp()));
- BeWoApp.MainControl.ShowControlAsModalPopup(window);
- }
-
- private void ShowModalViewWindow(string title, Func getControl, double height, double width)
+ private void ShowModalViewWindow(string title, Func getControl, double? height = null, double? width = null)
{
var control = getControl(_controlFactory);
var window = _windowFactory.GetGenericModalViewWindow(title, control, height, width);
window.CommandBindings.Add(new CommandBinding(ApplicationCommands.Close, (s, e) => BeWoApp.MainControl.CloseCurrentPopUp()));
BeWoApp.MainControl.ShowControlAsModalPopup(window);
}
- public void ShowTest(string str)
- {
- throw new NotImplementedException();
- }
}
}
diff --git a/BeWo/Services/IWindowFactory.cs b/BeWo/Services/IWindowFactory.cs
index e5a11d74e..a17422464 100644
--- a/BeWo/Services/IWindowFactory.cs
+++ b/BeWo/Services/IWindowFactory.cs
@@ -13,7 +13,7 @@ namespace BeWo.Services
{
internal interface IWindowFactory
{
- AnimatedBeWoWindow GetAnimatedBeWoWindow(string title, Control control, double height, double width);
+ AnimatedBeWoWindow GetAnimatedBeWoWindow(string title, Control control, double? height = null, double? width = null);
Control GetGenericModalViewWindow(string title, Control control, double? height = null, double? width = null);
string GetAiTitle(UIContext context);
diff --git a/BeWo/Services/IWindowService.cs b/BeWo/Services/IWindowService.cs
index b2cd66951..2f3f500fd 100644
--- a/BeWo/Services/IWindowService.cs
+++ b/BeWo/Services/IWindowService.cs
@@ -14,13 +14,23 @@ namespace BeWo.Services
{
internal interface IWindowService
{
+ #region special
void ShowAiConversationWindow(UIContext uIContext, Dictionary bewoObjects, long? reference_oid = null, double height = 600, double width = 1200);
void ShowAiConversationModalViewWindow(UIContext uIContext, Dictionary bewoObjects, long? reference_oid = null, double height = 600, double width = 1200);
- void ShowERechnungModalViewWindow(MemoryStream pdf);
+ void ShowGkvAbrechnungDetailWindow(GkvAbrechnungVM vm, CancelEventHandler cancelEvent, double height = 900, double width = 600);
+ #endregion
+ #region base extended
+ void ShowERechnungWindow(MemoryStream pdf);
+ void ShowERechnungModalViewWindow(MemoryStream pdf);
+ #endregion
+
+ #region base
void ShowTextViewerWindow(string title, string text, double height = 900, double width = 600);
- void ShowGkvAbrechnungDetailWindow(GkvAbrechnungVM vm, CancelEventHandler cancelEvent, double height = 900, double width = 600);
+ void ShowPdfViewerWindow(string title, MemoryStream pdf, double height = 900, double width = 600);
+ void ShowPdfViewerModalViewWindow(string title, MemoryStream pdf);
+ #endregion
}
}
diff --git a/BeWo/View/Controls/TextViewer.xaml b/BeWo/View/Controls/TextViewer.xaml
index 7a994debb..4ff5787ea 100644
--- a/BeWo/View/Controls/TextViewer.xaml
+++ b/BeWo/View/Controls/TextViewer.xaml
@@ -27,7 +27,8 @@
BorderThickness="1"
Foreground="Black"
IsReadOnly="True"
- VerticalScrollBarVisibility="Auto" />
+ VerticalScrollBarVisibility="Auto"
+ HorizontalScrollBarVisibility="Auto"/>