Pdf Viewer
This commit is contained in:
@@ -121,6 +121,7 @@
|
||||
<Reference Include="DevExpress.Xpf.Grid.v23.2, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
|
||||
<Reference Include="DevExpress.Xpf.Layout.v23.2.Core, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
|
||||
<Reference Include="DevExpress.Xpf.LayoutControl.v23.2, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
|
||||
<Reference Include="DevExpress.Xpf.PdfViewer.v23.2, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
|
||||
<Reference Include="DevExpress.Xpf.PivotGrid.v23.2, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
|
||||
<Reference Include="DevExpress.Xpf.Controls.v23.2, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
|
||||
<Reference Include="DevExpress.Xpf.Printing.v23.2, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
|
||||
@@ -399,6 +400,10 @@
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="View\Controls\PdfViewer.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="View\Controls\Utils\ColorPicker.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
@@ -1320,6 +1325,9 @@
|
||||
<Compile Include="View\Controls\CustomerVermittlungArbeitControl.xaml.cs">
|
||||
<DependentUpon>CustomerVermittlungArbeitControl.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="View\Controls\PdfViewer.xaml.cs">
|
||||
<DependentUpon>PdfViewer.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="View\Controls\Utils\ColorPicker.xaml.cs">
|
||||
<DependentUpon>ColorPicker.xaml</DependentUpon>
|
||||
</Compile>
|
||||
|
||||
@@ -987,6 +987,11 @@ namespace BeWo
|
||||
MessageBox.Show(message, "Information", MessageBoxButton.OK, MessageBoxImage.Exclamation);
|
||||
}
|
||||
|
||||
public static void ShowErrorMessage(string message)
|
||||
{
|
||||
MessageBox.Show(message, "Fehler", MessageBoxButton.OK, MessageBoxImage.Warning);
|
||||
}
|
||||
|
||||
public static void ShowErrorMessage(Exception e)
|
||||
{
|
||||
if (e is FaultException<BeWoFault>)
|
||||
|
||||
@@ -2018,6 +2018,19 @@ 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();
|
||||
|
||||
@@ -10,7 +10,8 @@ namespace BeWo
|
||||
FeatureCustomerWohnhilfe,
|
||||
FeatureWohnheimWohneinheit,
|
||||
FeatureAuswertungenQuittierungsbelege,
|
||||
FeatureDakota
|
||||
FeatureDakota,
|
||||
FeatureXRechnung
|
||||
}
|
||||
|
||||
public class DebugConfig
|
||||
@@ -130,6 +131,15 @@ namespace BeWo
|
||||
Profilename = "5000000000"
|
||||
});
|
||||
|
||||
name2config.Add("FeatureXRechnung",
|
||||
new DebugConfig()
|
||||
{
|
||||
DebugConfigMode = DebugConfigMode.FeatureXRechnung,
|
||||
AutoLogin = true,
|
||||
SelectView = UIContext.Finance,
|
||||
SelectIndex = 7,
|
||||
});
|
||||
|
||||
return name2config;
|
||||
}
|
||||
#endif
|
||||
|
||||
16
BeWo/View/Controls/PdfViewer.xaml
Normal file
16
BeWo/View/Controls/PdfViewer.xaml
Normal file
@@ -0,0 +1,16 @@
|
||||
<UserControl
|
||||
x:Class="BeWo.View.Controls.PdfViewer"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:dxpdf="http://schemas.devexpress.com/winfx/2008/xaml/pdf"
|
||||
xmlns:local="clr-namespace:BeWo.View.Controls"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
x:Name="root"
|
||||
d:DesignHeight="450"
|
||||
d:DesignWidth="800"
|
||||
mc:Ignorable="d">
|
||||
<Grid>
|
||||
<dxpdf:PdfViewerControl x:Name="pdfviewer" DocumentSource="{Binding PdfData, ElementName=root}" />
|
||||
</Grid>
|
||||
</UserControl>
|
||||
41
BeWo/View/Controls/PdfViewer.xaml.cs
Normal file
41
BeWo/View/Controls/PdfViewer.xaml.cs
Normal file
@@ -0,0 +1,41 @@
|
||||
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.Controls
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaktionslogik für PdfViewerPopup.xaml
|
||||
/// </summary>
|
||||
public partial class PdfViewer : UserControl
|
||||
{
|
||||
/// <summary>
|
||||
/// Hier ein Memory Stream dran binden
|
||||
/// </summary>
|
||||
public object PdfData
|
||||
{
|
||||
get { return (object)GetValue(PdfDataProperty); }
|
||||
set { SetValue(PdfDataProperty, value); }
|
||||
}
|
||||
|
||||
// Using a DependencyProperty as the backing store for PdfData. This enables animation, styling, binding, etc...
|
||||
public static readonly DependencyProperty PdfDataProperty =
|
||||
DependencyProperty.Register("PdfData", typeof(object), typeof(PdfViewer), new PropertyMetadata(null));
|
||||
|
||||
public PdfViewer()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,157 +1,418 @@
|
||||
<localView:BeWoView x:Class="BeWo.View.Detail.Accounting.InvoiceOverview"
|
||||
xmlns:markup="clr-namespace:BeWo.MultiLanguage.Markup"
|
||||
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:localViewModel="clr-namespace:BeWo.ViewModel"
|
||||
xmlns:localViewDetail="clr-namespace:BeWo.View.Detail.Accounting"
|
||||
xmlns:val="clr-namespace:BeWo.Validation"
|
||||
xmlns:proxy="clr-namespace:BeWo.ServiceProxy"
|
||||
xmlns:uc="clr-namespace:BeWo.Controls;assembly=BeWo.Controls"
|
||||
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
|
||||
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
|
||||
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors" Height="Auto" Width="Auto" HorizontalAlignment="Stretch"
|
||||
xmlns:s="clr-namespace:System;assembly=mscorlib"
|
||||
xmlns:r="clr-namespace:BeWo.Security" VerticalAlignment="Stretch" Focusable="True"
|
||||
xmlns:Microsoft_Windows_Themes="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Classic">
|
||||
<localView:BeWoView
|
||||
x:Class="BeWo.View.Detail.Accounting.InvoiceOverview"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:Microsoft_Windows_Themes="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Classic"
|
||||
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
|
||||
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
|
||||
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
|
||||
xmlns:localView="clr-namespace:BeWo.View"
|
||||
xmlns:localViewDetail="clr-namespace:BeWo.View.Detail.Accounting"
|
||||
xmlns:localViewModel="clr-namespace:BeWo.ViewModel"
|
||||
xmlns:markup="clr-namespace:BeWo.MultiLanguage.Markup"
|
||||
xmlns:proxy="clr-namespace:BeWo.ServiceProxy"
|
||||
xmlns:r="clr-namespace:BeWo.Security"
|
||||
xmlns:s="clr-namespace:System;assembly=mscorlib"
|
||||
xmlns:uc="clr-namespace:BeWo.Controls;assembly=BeWo.Controls"
|
||||
xmlns:val="clr-namespace:BeWo.Validation"
|
||||
Width="Auto"
|
||||
Height="Auto"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Stretch"
|
||||
Focusable="True">
|
||||
|
||||
<Grid>
|
||||
|
||||
<GroupBox x:Name="groupbox_editArea" Grid.Row="0" Header="Rechnungsübersicht" Style="{DynamicResource ObjectEditGroupBox}">
|
||||
|
||||
<Grid Grid.IsSharedSizeScope="True" Margin="0,3,0,0">
|
||||
<GroupBox
|
||||
x:Name="groupbox_editArea"
|
||||
Grid.Row="0"
|
||||
Header="Rechnungsübersicht"
|
||||
Style="{DynamicResource ObjectEditGroupBox}">
|
||||
|
||||
<Grid Margin="0,3,0,0" Grid.IsSharedSizeScope="True">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<localView:YearMonthFilter Margin="3 0 0 3" VerticalAlignment="Bottom" HorizontalAlignment="Left" Grid.Column="0" x:Name="yearMonthFilter" FilterSpanChanged="YearMonthFilter_FilterSpanChanged" />
|
||||
<StackPanel Orientation="Vertical" Grid.Column="1" Margin="12,5,0,0" VerticalAlignment="Center" HorizontalAlignment="Left">
|
||||
<RadioButton x:Name="radioFilterByInvoiceDate" Content="Nach Rechnungsdatum filtern" IsChecked="True"/>
|
||||
<localView:YearMonthFilter
|
||||
x:Name="yearMonthFilter"
|
||||
Grid.Column="0"
|
||||
Margin="3,0,0,3"
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Bottom"
|
||||
FilterSpanChanged="YearMonthFilter_FilterSpanChanged" />
|
||||
<StackPanel
|
||||
Grid.Column="1"
|
||||
Margin="12,5,0,0"
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Center"
|
||||
Orientation="Vertical">
|
||||
<RadioButton
|
||||
x:Name="radioFilterByInvoiceDate"
|
||||
Content="Nach Rechnungsdatum filtern"
|
||||
IsChecked="True" />
|
||||
<RadioButton x:Name="radioFilterByAccountingDate" Content="Nach Abrechnungszeitraum filtern" />
|
||||
</StackPanel>
|
||||
|
||||
<Button x:Name="button_reload" Grid.Column="1" Content="Aktualisieren" Margin="250,0,0,5" Click="ReloadButton_OnClick" Height="24" HorizontalAlignment="Left" VerticalAlignment="Bottom" Width="80" />
|
||||
<Button
|
||||
x:Name="button_reload"
|
||||
Grid.Column="1"
|
||||
Width="80"
|
||||
Height="24"
|
||||
Margin="250,0,0,5"
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Bottom"
|
||||
Click="ReloadButton_OnClick"
|
||||
Content="Aktualisieren" />
|
||||
|
||||
|
||||
<dxg:GridControl Margin="3" Grid.ColumnSpan="4" Grid.Row="1" DataSource="{Binding VMList}" x:Name="datagrid_invoices" VerticalAlignment="Stretch" HorizontalAlignment="Stretch">
|
||||
<dxg:GridControl
|
||||
x:Name="datagrid_invoices"
|
||||
Grid.Row="1"
|
||||
Grid.ColumnSpan="4"
|
||||
Margin="3"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Stretch"
|
||||
DataSource="{Binding VMList}">
|
||||
<dxg:GridControl.Columns>
|
||||
<dxg:GridColumn x:Name="ColumnChecked" FieldName="IsChecked" Header=" " MinWidth="30"></dxg:GridColumn>
|
||||
<dxg:GridColumn x:Name="ColumnButtons" AllowEditing="False" MinWidth="90" FieldName="ReportLink" Header=" ">
|
||||
<dxg:GridColumn
|
||||
x:Name="ColumnChecked"
|
||||
MinWidth="30"
|
||||
FieldName="IsChecked"
|
||||
Header=" " />
|
||||
<dxg:GridColumn
|
||||
x:Name="ColumnButtons"
|
||||
MinWidth="90"
|
||||
AllowEditing="False"
|
||||
FieldName="ReportLink"
|
||||
Header=" ">
|
||||
<dxg:GridColumn.DisplayTemplate>
|
||||
<ControlTemplate>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Button Margin="1" ToolTip="Formular anzeigen" x:Name="btn_report" Height="20" Width="20" VerticalAlignment="Center">
|
||||
<Button
|
||||
x:Name="btn_report"
|
||||
Width="20"
|
||||
Height="20"
|
||||
Margin="1"
|
||||
VerticalAlignment="Center"
|
||||
ToolTip="Formular anzeigen">
|
||||
<TextBlock Padding="0">
|
||||
<Hyperlink TextDecorations="None" TargetName="_NewWindow" NavigateUri="{Binding DisplayText, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" RequestNavigate="Hyperlink_OnRequestNavigate">
|
||||
<TextBlock Padding="0" Text="¥" Foreground="#FFFFFF" FontSize="15" FontFamily="Webdings" Height="17" Width="16" VerticalAlignment="Center" HorizontalAlignment="Left" />
|
||||
</Hyperlink>
|
||||
</TextBlock>
|
||||
<Hyperlink
|
||||
NavigateUri="{Binding DisplayText, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}"
|
||||
RequestNavigate="Hyperlink_OnRequestNavigate"
|
||||
TextDecorations="None"
|
||||
TargetName="_NewWindow">
|
||||
<TextBlock
|
||||
Width="16"
|
||||
Height="17"
|
||||
Padding="0"
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Center"
|
||||
FontFamily="Webdings"
|
||||
FontSize="15"
|
||||
Foreground="#FFFFFF"
|
||||
Text="¥" />
|
||||
</Hyperlink>
|
||||
</TextBlock>
|
||||
</Button>
|
||||
<Button Click="btn_edit_Click" Content="@" Padding="0" Margin="1" ToolTip="Editieren" Foreground="#FFFFFF" FontSize="13" FontFamily="Webdings" x:Name="btn_edit" Height="20" Width="20" VerticalAlignment="Center" />
|
||||
<Button Click="btn_storno_Click" Content="S" Padding="0" Margin="1" ToolTip="Stornieren" Foreground="#FFFFFF" FontSize="13" x:Name="btn_storno" Height="20" Width="20" VerticalAlignment="Center" Initialized="btn_storno_Initialized"/>
|
||||
<Button Click="btn_delete_Click" Content="r" Padding="0" Margin="1" ToolTip="Löschen" Foreground="#FF0000" FontSize="13" FontFamily="Webdings" x:Name="btn_delete" Height="20" Width="20" VerticalAlignment="Center" />
|
||||
<Button
|
||||
x:Name="btn_edit"
|
||||
Width="20"
|
||||
Height="20"
|
||||
Margin="1"
|
||||
Padding="0"
|
||||
VerticalAlignment="Center"
|
||||
Click="btn_edit_Click"
|
||||
Content="@"
|
||||
FontFamily="Webdings"
|
||||
FontSize="13"
|
||||
Foreground="#FFFFFF"
|
||||
ToolTip="Editieren" />
|
||||
<Button
|
||||
x:Name="btn_storno"
|
||||
Width="20"
|
||||
Height="20"
|
||||
Margin="1"
|
||||
Padding="0"
|
||||
VerticalAlignment="Center"
|
||||
Click="btn_storno_Click"
|
||||
Content="S"
|
||||
FontSize="13"
|
||||
Foreground="#FFFFFF"
|
||||
Initialized="btn_storno_Initialized"
|
||||
ToolTip="Stornieren" />
|
||||
<Button
|
||||
x:Name="btn_delete"
|
||||
Width="20"
|
||||
Height="20"
|
||||
Margin="1"
|
||||
Padding="0"
|
||||
VerticalAlignment="Center"
|
||||
Click="btn_delete_Click"
|
||||
Content="r"
|
||||
FontFamily="Webdings"
|
||||
FontSize="13"
|
||||
Foreground="#FF0000"
|
||||
ToolTip="Löschen" />
|
||||
</StackPanel>
|
||||
</ControlTemplate>
|
||||
</dxg:GridColumn.DisplayTemplate>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn ReadOnly="True" AllowEditing="False" FieldName="TypeString" Header="Art der Rechnung" Width="150" />
|
||||
<dxg:GridColumn ReadOnly="True" AllowEditing="False" FieldName="CustomerName" Header="{markup:Translate Klient/in}" Width="100" />
|
||||
<dxg:GridColumn ReadOnly="True" AllowEditing="False" FieldName="AccountingPeriodString" SortFieldName="AccountingPeriodStart" Header="Zeitraum" Width="100" />
|
||||
<dxg:GridColumn ReadOnly="True" AllowEditing="False" FieldName="InvoiceNumber" Header="Nummer" SortOrder="Ascending" />
|
||||
<dxg:GridColumn ReadOnly="True" AllowEditing="False" FieldName="InvoiceDate" Header="Datum" EditSettings="{dxe:DateSettings DisplayFormat=d}" MinWidth="70" />
|
||||
<dxg:GridColumn ReadOnly="True" AllowEditing="False" FieldName="RecipientString" Header="{markup:Translate EmpfängerSingular}" />
|
||||
<dxg:GridColumn
|
||||
Width="150"
|
||||
AllowEditing="False"
|
||||
FieldName="TypeString"
|
||||
Header="Art der Rechnung"
|
||||
ReadOnly="True" />
|
||||
<dxg:GridColumn
|
||||
Width="100"
|
||||
AllowEditing="False"
|
||||
FieldName="CustomerName"
|
||||
Header="{markup:Translate Klient/in}"
|
||||
ReadOnly="True" />
|
||||
<dxg:GridColumn
|
||||
Width="100"
|
||||
AllowEditing="False"
|
||||
FieldName="AccountingPeriodString"
|
||||
Header="Zeitraum"
|
||||
ReadOnly="True"
|
||||
SortFieldName="AccountingPeriodStart" />
|
||||
<dxg:GridColumn
|
||||
AllowEditing="False"
|
||||
FieldName="InvoiceNumber"
|
||||
Header="Nummer"
|
||||
ReadOnly="True"
|
||||
SortOrder="Ascending" />
|
||||
<dxg:GridColumn
|
||||
MinWidth="70"
|
||||
AllowEditing="False"
|
||||
EditSettings="{dxe:DateSettings DisplayFormat=d}"
|
||||
FieldName="InvoiceDate"
|
||||
Header="Datum"
|
||||
ReadOnly="True" />
|
||||
<dxg:GridColumn
|
||||
AllowEditing="False"
|
||||
FieldName="RecipientString"
|
||||
Header="{markup:Translate EmpfängerSingular}"
|
||||
ReadOnly="True" />
|
||||
<!--<dxg:GridColumn FieldName="AccountingPeriodString" Header="Abrechnungszeitraum" />-->
|
||||
<dxg:GridColumn ReadOnly="True" AllowEditing="False" FieldName="TotalAmount" Header="Betrag" MinWidth="70">
|
||||
<dxg:GridColumn
|
||||
MinWidth="70"
|
||||
AllowEditing="False"
|
||||
FieldName="TotalAmount"
|
||||
Header="Betrag"
|
||||
ReadOnly="True">
|
||||
<!--<dxg:GridColumn.CellStyle>
|
||||
<Style TargetType="dxg:LightweightCellEditor">
|
||||
<Setter Property="TextBlock.FontWeight" Value="Bold"/>
|
||||
</Style>
|
||||
</dxg:GridColumn.CellStyle>-->
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:TextEditSettings DisplayFormat="c" Mask="c" MaskType="Numeric"></dxe:TextEditSettings>
|
||||
<dxe:TextEditSettings
|
||||
DisplayFormat="c"
|
||||
Mask="c"
|
||||
MaskType="Numeric" />
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn ReadOnly="True" AllowEditing="False" FieldName="Notice" Header="Bemerkung" MinWidth="200" >
|
||||
<dxg:GridColumn
|
||||
MinWidth="200"
|
||||
AllowEditing="False"
|
||||
FieldName="Notice"
|
||||
Header="Bemerkung"
|
||||
ReadOnly="True">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:TextEditSettings TextWrapping="Wrap" />
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
|
||||
<dxg:GridColumn x:Name="ReviewedColumn" FieldName="IsReviewed" Header="Geprüft"></dxg:GridColumn>
|
||||
<dxg:GridColumn x:Name="SentColumn" FieldName="IsSent" Header="Versendet"></dxg:GridColumn>
|
||||
<dxg:GridColumn x:Name="ExportColumn" FieldName="IsExported" Header="Exportiert"></dxg:GridColumn>
|
||||
<dxg:GridColumn x:Name="PaidColumn" FieldName="IsPaid" Header="Bezahlt"></dxg:GridColumn>
|
||||
<dxg:GridColumn ReadOnly="False" AllowEditing="True" FieldName="PartialPayment" Header="Teilzahlung" MinWidth="200" >
|
||||
<dxg:GridColumn
|
||||
x:Name="ReviewedColumn"
|
||||
FieldName="IsReviewed"
|
||||
Header="Geprüft" />
|
||||
<dxg:GridColumn
|
||||
x:Name="SentColumn"
|
||||
FieldName="IsSent"
|
||||
Header="Versendet" />
|
||||
<dxg:GridColumn
|
||||
x:Name="ExportColumn"
|
||||
FieldName="IsExported"
|
||||
Header="Exportiert" />
|
||||
<dxg:GridColumn
|
||||
x:Name="PaidColumn"
|
||||
FieldName="IsPaid"
|
||||
Header="Bezahlt" />
|
||||
<dxg:GridColumn
|
||||
MinWidth="200"
|
||||
AllowEditing="True"
|
||||
FieldName="PartialPayment"
|
||||
Header="Teilzahlung"
|
||||
ReadOnly="False">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:TextEditSettings TextWrapping="Wrap" />
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
</dxg:GridControl.Columns>
|
||||
<dxg:GridControl.View>
|
||||
<dxg:TableView NavigationStyle="Cell" Loaded="gridView_Loaded" x:Name="gridView" BestFitMode="Smart"
|
||||
AllowBestFit="True" ShowGroupPanel="False" ScrollingMode="Smart" SnapsToDevicePixels="True"
|
||||
CellValueChanging="gridView_CellValueChanging" CellValueChanged="gridView_CellValueChanged" CustomRowAppearance="TableView_OnCustomRowAppearance"
|
||||
Margin="3,22,3,3" />
|
||||
<dxg:TableView
|
||||
x:Name="gridView"
|
||||
Margin="3,22,3,3"
|
||||
AllowBestFit="True"
|
||||
BestFitMode="Smart"
|
||||
CellValueChanged="gridView_CellValueChanged"
|
||||
CellValueChanging="gridView_CellValueChanging"
|
||||
CustomRowAppearance="TableView_OnCustomRowAppearance"
|
||||
Loaded="gridView_Loaded"
|
||||
NavigationStyle="Cell"
|
||||
ScrollingMode="Smart"
|
||||
ShowGroupPanel="False"
|
||||
SnapsToDevicePixels="True" />
|
||||
</dxg:GridControl.View>
|
||||
</dxg:GridControl>
|
||||
|
||||
<Grid Grid.Row="1" Grid.ColumnSpan="4" HorizontalAlignment="Stretch" VerticalAlignment="Top" Margin="5,2,5,0">
|
||||
<Grid
|
||||
Grid.Row="1"
|
||||
Grid.ColumnSpan="4"
|
||||
Margin="5,2,5,0"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Top">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Label FontSize="14" Foreground="{StaticResource GridPrintMenuLightBrush}" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="10 0 0 0" Content="{Binding FilterResultAmountSum, Converter={StaticResource StringFormatConverter}, ConverterParameter='{}Summe aller Rechnungen: {0:c}'}" />
|
||||
<Label FontSize="14" Foreground="{StaticResource GridPrintMenuLightBrush}" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="0 0 0 0" Content=" | " />
|
||||
<Label FontSize="14" x:Name="lblAmoutNotPaid" Foreground="{StaticResource GridPrintMenuLightBrush}" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="0 0 0 0" Content="{Binding FilterResultAmountNotPaidSum, Converter={StaticResource StringFormatConverter}, ConverterParameter='{}Summe der noch offenen Rechnungen: {0:c}'}" />
|
||||
<Label
|
||||
Margin="10,0,0,0"
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Center"
|
||||
Content="{Binding FilterResultAmountSum, Converter={StaticResource StringFormatConverter}, ConverterParameter='{}Summe aller Rechnungen: {0:c}'}"
|
||||
FontSize="14"
|
||||
Foreground="{StaticResource GridPrintMenuLightBrush}" />
|
||||
<Label
|
||||
Margin="0,0,0,0"
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Center"
|
||||
Content=" | "
|
||||
FontSize="14"
|
||||
Foreground="{StaticResource GridPrintMenuLightBrush}" />
|
||||
<Label
|
||||
x:Name="lblAmoutNotPaid"
|
||||
Margin="0,0,0,0"
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Center"
|
||||
Content="{Binding FilterResultAmountNotPaidSum, Converter={StaticResource StringFormatConverter}, ConverterParameter='{}Summe der noch offenen Rechnungen: {0:c}'}"
|
||||
FontSize="14"
|
||||
Foreground="{StaticResource GridPrintMenuLightBrush}" />
|
||||
</StackPanel>
|
||||
<TextBlock Grid.Column="1" x:Name="textblock_link_pdfexport" VerticalAlignment="Center" Margin="5,0,5,0" FontSize="14">
|
||||
<Hyperlink x:Name="linkPdfExport" TargetName="newWindow" Foreground="{StaticResource GridPrintMenuLightBrush}" RequestNavigate="linkPdfExport_RequestNavigate">
|
||||
<Run Text="Drucken" />
|
||||
</Hyperlink>
|
||||
<TextBlock
|
||||
x:Name="textblock_link_pdfexport"
|
||||
Grid.Column="1"
|
||||
Margin="5,0,5,0"
|
||||
VerticalAlignment="Center"
|
||||
FontSize="14">
|
||||
<Hyperlink
|
||||
x:Name="linkPdfExport"
|
||||
Foreground="{StaticResource GridPrintMenuLightBrush}"
|
||||
RequestNavigate="linkPdfExport_RequestNavigate"
|
||||
TargetName="newWindow">
|
||||
<Run Text="Drucken" />
|
||||
</Hyperlink>
|
||||
</TextBlock>
|
||||
<TextBlock Grid.Column="2" x:Name="textblock_link" VerticalAlignment="Center" Margin="5,0,5,0" FontSize="14">
|
||||
<Hyperlink x:Name="linkExcelExport" TargetName="newWindow" Foreground="{StaticResource GridPrintMenuLightBrush}" RequestNavigate="linkExcelExport_RequestNavigate">
|
||||
<Run Text="Excel Export" />
|
||||
</Hyperlink>
|
||||
<TextBlock
|
||||
x:Name="textblock_link"
|
||||
Grid.Column="2"
|
||||
Margin="5,0,5,0"
|
||||
VerticalAlignment="Center"
|
||||
FontSize="14">
|
||||
<Hyperlink
|
||||
x:Name="linkExcelExport"
|
||||
Foreground="{StaticResource GridPrintMenuLightBrush}"
|
||||
RequestNavigate="linkExcelExport_RequestNavigate"
|
||||
TargetName="newWindow">
|
||||
<Run Text="Excel Export" />
|
||||
</Hyperlink>
|
||||
</TextBlock>
|
||||
|
||||
|
||||
</Grid>
|
||||
<StackPanel Grid.Row="2" Orientation="Horizontal">
|
||||
<Button Margin="10 3 0 0"
|
||||
Name="button_checkAllLeistungen" Click="button_checkAll_Click"
|
||||
HorizontalAlignment="Left">Alle auswählen</Button>
|
||||
<Button Margin="10 3 0 0"
|
||||
Name="button_uncheckAllLeistungen" Click="button_uncheckAll_Click"
|
||||
HorizontalAlignment="Left">Alle abwählen</Button>
|
||||
<Button
|
||||
Name="button_checkAllLeistungen"
|
||||
Margin="10,3,0,0"
|
||||
HorizontalAlignment="Left"
|
||||
Click="button_checkAll_Click">
|
||||
Alle auswählen
|
||||
</Button>
|
||||
<Button
|
||||
Name="button_uncheckAllLeistungen"
|
||||
Margin="10,3,0,0"
|
||||
HorizontalAlignment="Left"
|
||||
Click="button_uncheckAll_Click">
|
||||
Alle abwählen
|
||||
</Button>
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Grid.Row="2" Orientation="Horizontal" Grid.Column="1" Grid.ColumnSpan="3" >
|
||||
<Button Margin="10 3 0 0"
|
||||
Name="button_aufklappenAllLeistungen" Click="button_printInvoices_Click"
|
||||
HorizontalAlignment="Left">Ausgewählte drucken</Button>
|
||||
<Button Margin="10 3 0 0"
|
||||
Name="button_reviewAllLeistungen" Click="button_reviewInvoices_Click"
|
||||
HorizontalAlignment="Left" ToolTip="Ausgewählte Rechnungen auf geprüft setzen">Geprüft setzen</Button>
|
||||
<Button Margin="10,3,0,0"
|
||||
Name="button_sentAllLeistungen" Click="button_sentInvoices_Click"
|
||||
HorizontalAlignment="Left" Height="Auto" ToolTip="Ausgewählte Rechnungen auf versendet setzen">Versendet setzen</Button>
|
||||
<Button Margin="10 3 0 0"
|
||||
Name="button_exportAllLeistungen" Click="button_exportedInvoices_Click"
|
||||
HorizontalAlignment="Left" ToolTip="Ausgewählte Rechnungen auf exportiert setzen">Exportiert setzen</Button>
|
||||
<Button Margin="10 3 0 0"
|
||||
Name="button_paidAllLeistungen" Click="button_paidInvoices_Click"
|
||||
HorizontalAlignment="Left" ToolTip="Ausgewählte Rechnungen auf bezahlt setzen">Bezahlt setzen</Button>
|
||||
<StackPanel
|
||||
Grid.Row="2"
|
||||
Grid.Column="1"
|
||||
Grid.ColumnSpan="3"
|
||||
Orientation="Horizontal">
|
||||
<Button
|
||||
Name="button_aufklappenAllLeistungen"
|
||||
Margin="10,3,0,0"
|
||||
HorizontalAlignment="Left"
|
||||
Click="button_printInvoices_Click">
|
||||
Ausgewählte drucken
|
||||
</Button>
|
||||
<Button
|
||||
Name="button_reviewAllLeistungen"
|
||||
Margin="10,3,0,0"
|
||||
HorizontalAlignment="Left"
|
||||
Click="button_reviewInvoices_Click"
|
||||
ToolTip="Ausgewählte Rechnungen auf geprüft setzen">
|
||||
Geprüft setzen
|
||||
</Button>
|
||||
<Button
|
||||
Name="button_sentAllLeistungen"
|
||||
Height="Auto"
|
||||
Margin="10,3,0,0"
|
||||
HorizontalAlignment="Left"
|
||||
Click="button_sentInvoices_Click"
|
||||
ToolTip="Ausgewählte Rechnungen auf versendet setzen">
|
||||
Versendet setzen
|
||||
</Button>
|
||||
<Button
|
||||
Name="button_exportAllLeistungen"
|
||||
Margin="10,3,0,0"
|
||||
HorizontalAlignment="Left"
|
||||
Click="button_exportedInvoices_Click"
|
||||
ToolTip="Ausgewählte Rechnungen auf exportiert setzen">
|
||||
Exportiert setzen
|
||||
</Button>
|
||||
<Button
|
||||
Name="button_paidAllLeistungen"
|
||||
Margin="10,3,0,0"
|
||||
HorizontalAlignment="Left"
|
||||
Click="button_paidInvoices_Click"
|
||||
ToolTip="Ausgewählte Rechnungen auf bezahlt setzen">
|
||||
Bezahlt setzen
|
||||
</Button>
|
||||
<Button
|
||||
Name="button_eRechnung"
|
||||
Margin="20,3,0,0"
|
||||
HorizontalAlignment="Left"
|
||||
Click="button_eRechnung_Click"
|
||||
ToolTip="Ausgewählte Rechnungen eRechnung erstellen">
|
||||
eRechnung erstellen
|
||||
</Button>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
|
||||
@@ -10,6 +10,7 @@ using System.Windows.Navigation;
|
||||
using System.Windows.Threading;
|
||||
using BeWo.Core;
|
||||
using BeWo.ServiceProxy;
|
||||
using BeWo.View.Controls;
|
||||
using BeWo.ViewModel;
|
||||
using BeWo.ViewModel.ListViewModel;
|
||||
|
||||
@@ -21,6 +22,7 @@ using BS.Shared.Translation;
|
||||
using DevExpress.Xpf.Editors;
|
||||
using DevExpress.Xpf.Grid;
|
||||
using Microsoft.Win32;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace BeWo.View.Detail.Accounting
|
||||
{
|
||||
@@ -624,5 +626,16 @@ namespace BeWo.View.Detail.Accounting
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
private void button_eRechnung_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
var res = ServiceFacade.DoAccountingServiceSync(x => x.GetXRechnung(null));
|
||||
|
||||
if (res.HasErrors)
|
||||
BeWoApp.ShowErrorMessage("Fehler: " + res.ResponseString);
|
||||
else
|
||||
BeWoUtils.ShowPdfWindow(res.ResponseBytes);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -30,6 +30,8 @@ using BS.Shared.AppSender;
|
||||
using BeWo.Data.Security;
|
||||
using BeWo.Data.Models.XRechnung;
|
||||
using BS.Shared.DataContracts.Invoicing.XRechnung;
|
||||
using BeWo.Service.ServiceUtils.XRechnung;
|
||||
using System.IO;
|
||||
|
||||
namespace BeWo.Service.ServiceImplementations
|
||||
{
|
||||
@@ -750,7 +752,21 @@ namespace BeWo.Service.ServiceImplementations
|
||||
|
||||
public XRechnungResponse GetXRechnung(XRechnungRequest req)
|
||||
{
|
||||
return null;
|
||||
try
|
||||
{
|
||||
var str = File.ReadAllText(@"C:\dev\invoicetest.json", System.Text.Encoding.UTF8);
|
||||
var xrec = JsonConvert.DeserializeObject<XRechnung>(str);
|
||||
|
||||
var url = "https://app5.bewoplaner.de/service/DownloadFile.aspx?key=jhkf4589141324h6543958";
|
||||
|
||||
var response = XRechnungSender.Send(xrec, url);
|
||||
|
||||
return response;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
throw Utils.CreateBeWoFaultException(e);
|
||||
}
|
||||
}
|
||||
|
||||
#region GKV
|
||||
|
||||
@@ -8,7 +8,7 @@ using System.Threading.Tasks;
|
||||
namespace BS.Shared.DataContracts
|
||||
{
|
||||
[DataContract]
|
||||
public abstract class AppResponseDC
|
||||
public abstract class AppResponseDC : IDataContract
|
||||
{
|
||||
[DataMember] public bool Success { get; set; }
|
||||
[DataMember] public string Message { get; set; }
|
||||
|
||||
@@ -3,6 +3,7 @@ using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
@@ -10,9 +11,8 @@ namespace BS.Shared.DataContracts.Invoicing.XRechnung
|
||||
{
|
||||
public class XRechnungRequest : OwnSoftRequest
|
||||
{
|
||||
public string XRechnung { get; set; }
|
||||
|
||||
public string Url { get; set; }
|
||||
[DataMember] public string XRechnung { get; set; }
|
||||
[DataMember] public string Url { get; set; }
|
||||
|
||||
public void SetXRechnung(object obj)
|
||||
{
|
||||
|
||||
@@ -3,6 +3,7 @@ using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
@@ -10,13 +11,18 @@ namespace BS.Shared.DataContracts.Invoicing.XRechnung
|
||||
{
|
||||
public class XRechnungResponse : OwnSoftResponse
|
||||
{
|
||||
public byte[] ResponseBytes { get; set; }
|
||||
public string ResponseString { get; set; }
|
||||
public List<string> Errors { get; set; }
|
||||
[DataMember] public byte[] ResponseBytes { get; set; }
|
||||
[DataMember] public string ResponseString { get; set; }
|
||||
[DataMember] public List<string> Errors { get; set; }
|
||||
|
||||
public bool HasErrors => Errors is object && Errors.Any();
|
||||
|
||||
private XRechnungResponse(byte[] res_bytes)
|
||||
private XRechnungResponse()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private XRechnungResponse(byte[] res_bytes) : this()
|
||||
{
|
||||
ResponseBytes = res_bytes;
|
||||
}
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BS.Shared.DataContracts
|
||||
{
|
||||
public class OwnSoftRequest
|
||||
[DataContract]
|
||||
public class OwnSoftRequest : IDataContract
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BS.Shared.DataContracts
|
||||
{
|
||||
public class OwnSoftResponse
|
||||
[DataContract]
|
||||
public class OwnSoftResponse : IDataContract
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user