MH: Datev-Schnittstelle für Leben und Wohnen Christian Wilke vorbereitet + XAMLManager eingefügt
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -492,3 +492,4 @@
|
||||
/ReportImp/KompassBeWoWesel/obj/Release
|
||||
/ReportImp/MobiloAmbulant/obj/Release
|
||||
/ReportImp/EmpathieFachassistenz/obj/Debug
|
||||
/ReportImp/LebenUndWohnenChristianWilke/obj/Debug
|
||||
|
||||
19
BeWo.sln
19
BeWo.sln
@@ -445,6 +445,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SkmLeverkusen", "ReportImp\
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EmpathieFachassistenz", "ReportImp\EmpathieFachassistenz\EmpathieFachassistenz.csproj", "{F618F17B-5905-4D09-A976-733011945A9B}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LebenUndWohnenChristianWilke", "ReportImp\LebenUndWohnenChristianWilke\LebenUndWohnenChristianWilke.csproj", "{48324B9E-4EC0-47B9-BBA7-6FD61384D25A}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|.NET = Debug|.NET
|
||||
@@ -3392,6 +3394,22 @@ Global
|
||||
{F618F17B-5905-4D09-A976-733011945A9B}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{F618F17B-5905-4D09-A976-733011945A9B}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{F618F17B-5905-4D09-A976-733011945A9B}.Release|x86.Build.0 = Release|Any CPU
|
||||
{48324B9E-4EC0-47B9-BBA7-6FD61384D25A}.Debug|.NET.ActiveCfg = Debug|Any CPU
|
||||
{48324B9E-4EC0-47B9-BBA7-6FD61384D25A}.Debug|.NET.Build.0 = Debug|Any CPU
|
||||
{48324B9E-4EC0-47B9-BBA7-6FD61384D25A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{48324B9E-4EC0-47B9-BBA7-6FD61384D25A}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{48324B9E-4EC0-47B9-BBA7-6FD61384D25A}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{48324B9E-4EC0-47B9-BBA7-6FD61384D25A}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{48324B9E-4EC0-47B9-BBA7-6FD61384D25A}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{48324B9E-4EC0-47B9-BBA7-6FD61384D25A}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{48324B9E-4EC0-47B9-BBA7-6FD61384D25A}.Release|.NET.ActiveCfg = Release|Any CPU
|
||||
{48324B9E-4EC0-47B9-BBA7-6FD61384D25A}.Release|.NET.Build.0 = Release|Any CPU
|
||||
{48324B9E-4EC0-47B9-BBA7-6FD61384D25A}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{48324B9E-4EC0-47B9-BBA7-6FD61384D25A}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{48324B9E-4EC0-47B9-BBA7-6FD61384D25A}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{48324B9E-4EC0-47B9-BBA7-6FD61384D25A}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{48324B9E-4EC0-47B9-BBA7-6FD61384D25A}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{48324B9E-4EC0-47B9-BBA7-6FD61384D25A}.Release|x86.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
@@ -3610,6 +3628,7 @@ Global
|
||||
{56602D65-47F7-4175-A065-A044FE7F6C81} = {D8A691C5-146D-4613-86CC-438F02FE9106}
|
||||
{E30D35E8-9B15-4345-B8B7-422415A659DA} = {D8A691C5-146D-4613-86CC-438F02FE9106}
|
||||
{F618F17B-5905-4D09-A976-733011945A9B} = {D8A691C5-146D-4613-86CC-438F02FE9106}
|
||||
{48324B9E-4EC0-47B9-BBA7-6FD61384D25A} = {D8A691C5-146D-4613-86CC-438F02FE9106}
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {FBE985BB-9F0F-4DBB-8F94-ABC37A803FF9}
|
||||
|
||||
@@ -15,13 +15,6 @@
|
||||
Height="Auto" Width="Auto" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Focusable="True">
|
||||
<localView:BeWoView.Resources>
|
||||
<ResourceDictionary>
|
||||
<ContextMenu x:Name="contextMenu_employee" x:Key="cm_employee" MenuItem.Click="contextMenu_Click" Opened="contextMenu_Opened">
|
||||
<MenuItem Header="Neu" >
|
||||
<MenuItem.Icon>
|
||||
<Image Source="..\Ressources\Icons\Search.png"/>
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
</ContextMenu>
|
||||
|
||||
<dxschint:ToolTipVisibilityToVisibilityConverter x:Key="ToolTipVisibilityConverter" />
|
||||
<dx:BooleanToVisibilityConverter x:Key="boolToVisibilityConverter" />
|
||||
@@ -680,35 +673,19 @@
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<CheckBox Content="{Binding Path=DetailDescription}" PreviewMouseRightButtonDown="CheckBox_PreviewMouseRightButtonDown" PreviewMouseLeftButtonDown="MitarbeiterListe_OnClick" Checked="ListItemCheckedEvent" Unchecked="ListItemCheckedEvent" VerticalAlignment="Center" FontSize="12" Foreground="#FFD2D2D2" FontFamily="Microsoft Sans Serif">
|
||||
<CheckBox Content="{Binding Path=DetailDescription}" PreviewMouseLeftButtonDown="MitarbeiterListe_OnClick" Checked="ListItemCheckedEvent" Unchecked="ListItemCheckedEvent" VerticalAlignment="Center" FontSize="11" Foreground="#FFD2D2D2" FontFamily="Microsoft Sans Serif">
|
||||
<CheckBox.IsChecked>
|
||||
<MultiBinding Converter="{StaticResource CheckBoxConverter}" ConverterParameter="Mitarbeiter">
|
||||
<Binding Path="EmployeeOid" Mode="OneWay" />
|
||||
<Binding Path="SelectedEmployees" Mode="TwoWay" UpdateSourceTrigger="PropertyChanged" RelativeSource="{RelativeSource FindAncestor, AncestorType={x:Type view:NewSchedulerView}}" />
|
||||
</MultiBinding>
|
||||
</CheckBox.IsChecked>
|
||||
|
||||
|
||||
</CheckBox>
|
||||
<!-- <controls:PopupNonTopmost Grid.Row="0" Topmost="False" x:Name="popup_infos_employee" Width="350" StaysOpen="True" Placement="MousePoint">
|
||||
<Border Background="White" Padding="3" BorderThickness="1" BorderBrush="Gray">
|
||||
<GroupBox x:Name="groupbox_employee_infos" Header="Infos" Style="{StaticResource ObjectEditGroupBox}">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Label VerticalAlignment="Center" Content="Infos anzeigen" />
|
||||
<Button Grid.Row="1" Grid.Column="0" HorizontalAlignment="Right" VerticalAlignment="Bottom" Height="25"
|
||||
Margin="3" Content="Speichern" x:Name="popup_button_infos_employee" Click="popup_button_infos_employee_Click" />
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
</Border>
|
||||
</controls:PopupNonTopmost> -->
|
||||
<Border Width="15" Height="15" Grid.Column="1" Background="{Binding Path=FilterableBrush}" CornerRadius="3" />
|
||||
<Button x:Name="btn_showEmployeeInformation" Width="15" Height="15" Grid.Column="2" Margin="5 0 5 0" Click="btn_showEmployeeInformation_Click" FontFamily="Microsoft Sans Serif" Content="i"/>
|
||||
</Grid>
|
||||
</Border>
|
||||
</Grid>
|
||||
@@ -805,6 +782,10 @@
|
||||
</Border>
|
||||
<Border x:Name="ItemContent" CornerRadius="5" MinHeight="25">
|
||||
<Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="5,3,5,3" OpacityMask="{x:Null}" SnapsToDevicePixels="True">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<CheckBox Content="{Binding Path=DetailDescription}" PreviewMouseDown="KlientenListe_OnClick" Checked="ListItemCheckedEvent" Unchecked="ListItemCheckedEvent" VerticalAlignment="Center" FontSize="12" Foreground="#FFD2D2D2" FontFamily="Microsoft Sans Serif">
|
||||
<CheckBox.IsChecked>
|
||||
<MultiBinding Converter="{StaticResource CheckBoxConverter}" ConverterParameter="Klienten">
|
||||
@@ -813,6 +794,8 @@
|
||||
</MultiBinding>
|
||||
</CheckBox.IsChecked>
|
||||
</CheckBox>
|
||||
|
||||
<Button x:Name="btn_showCustomerInformation" Width="15" Height="15" Grid.Column="1" Margin="5 0 5 0" Click="btn_showCustomerInformation_Click" FontFamily="Microsoft Sans Serif" Content="i"/>
|
||||
</Grid>
|
||||
</Border>
|
||||
</Grid>
|
||||
|
||||
@@ -2447,37 +2447,27 @@ namespace BeWo.Scheduler.View
|
||||
|
||||
}
|
||||
|
||||
private void contextMenu_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void contextMenu_Opened(object sender, RoutedEventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void ListView_PreviewMouseRightButtonDown(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
var datacontext = (ListView)sender;
|
||||
var selected = datacontext.SelectedItem;
|
||||
}
|
||||
|
||||
private void CheckBox_PreviewMouseRightButtonDown(object sender, MouseButtonEventArgs e)
|
||||
private void btn_showEmployeeInformation_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
var cb = (CheckBox)sender;
|
||||
var cb = (Button)sender;
|
||||
var datacontext = cb.DataContext;
|
||||
CompactEmployeeDC emp = (CompactEmployeeDC)datacontext;
|
||||
//popup_infos_employee.IsOpen = true; //Wird nicht gefunden
|
||||
|
||||
var control = new InformationView();
|
||||
control.InitView(emp);
|
||||
control.SetXaml(ServiceFacade.DoOperationsServiceSync(s => s.GetXAMLInformationStringForEmployee(emp.EmployeeOid)));
|
||||
|
||||
var beWoWindow = new BeWoWindow();
|
||||
|
||||
control.ButtonCloseClicked += () => beWoWindow.Close();
|
||||
|
||||
|
||||
beWoWindow.Height = 200;
|
||||
beWoWindow.Width = 500;
|
||||
beWoWindow.Width = 400;
|
||||
beWoWindow.WindowStartupLocation = WindowStartupLocation.CenterOwner;
|
||||
beWoWindow.GroupBoxContent = control;
|
||||
beWoWindow.Owner = BeWoApp.CurrentBeWo.MainWindow;
|
||||
@@ -2485,10 +2475,27 @@ namespace BeWo.Scheduler.View
|
||||
beWoWindow.ShowDialog();
|
||||
}
|
||||
|
||||
//private void popup_button_infos_employee_Click(object sender, RoutedEventArgs e)
|
||||
//{
|
||||
private void btn_showCustomerInformation_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
var cb = (Button)sender;
|
||||
var datacontext = cb.DataContext;
|
||||
CompactCustomerDC customer = (CompactCustomerDC)datacontext;
|
||||
|
||||
//}
|
||||
var control = new InformationView();
|
||||
control.SetXaml(ServiceFacade.DoOperationsServiceSync(s => s.GetXAMLInformationStringForCustomer(customer.CustomerOid)));
|
||||
|
||||
var beWoWindow = new BeWoWindow();
|
||||
|
||||
control.ButtonCloseClicked += () => beWoWindow.Close();
|
||||
|
||||
beWoWindow.Height = 200;
|
||||
beWoWindow.Width = 500;
|
||||
beWoWindow.WindowStartupLocation = WindowStartupLocation.CenterOwner;
|
||||
beWoWindow.GroupBoxContent = control;
|
||||
beWoWindow.Owner = BeWoApp.CurrentBeWo.MainWindow;
|
||||
beWoWindow.rootGroupBox.Header = "Infos zu " + customer.FirstName + " " + customer.LastName;
|
||||
beWoWindow.ShowDialog();
|
||||
}
|
||||
}
|
||||
|
||||
#region Converter
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -5,22 +5,19 @@
|
||||
Height="Auto" Width="Auto" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Focusable="True">
|
||||
|
||||
|
||||
<Grid Background="{StaticResource ObjectEditBackgroundBrush}">
|
||||
<Grid Background="{StaticResource ObjectEditBackgroundBrush}" x:Name="rootGrid">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<TextBox Background="Transparent"
|
||||
BorderThickness="0" IsReadOnly="True"
|
||||
x:Name="informationText" TextWrapping="Wrap" Margin="5" FontSize="14">Informationstext</TextBox>
|
||||
|
||||
<dxg:GridControl Grid.Row="0" Margin="2,3,5,5" x:Name="datagrid_employee_infos" SelectionMode="Row" >
|
||||
<dxg:GridControl.Columns>
|
||||
<dxg:GridColumn AllowEditing="False" FieldName="Key" Name="Key" />
|
||||
<dxg:GridColumn AllowEditing="False" FieldName="Value" Name="Value" Width="345"/>
|
||||
</dxg:GridControl.Columns>
|
||||
<dxg:GridControl.View>
|
||||
<dxg:TableView AutoWidth="false" ShowGroupPanel="False" ShowGroupedColumns="false" ShowTotalSummary="False" NavigationStyle="Cell"
|
||||
ShowHorizontalLines="False" ShowVerticalLines="False" ShowColumnHeaders="False" x:Name="tableview_employee_infos"/>
|
||||
</dxg:GridControl.View>
|
||||
</dxg:GridControl>
|
||||
<Button x:Name="button_close" Grid.Row="1" VerticalAlignment="Bottom" HorizontalAlignment="Right" Content="Schließen" Click="button_close_Click"
|
||||
Margin="0 0 5 5"/>
|
||||
</Grid>
|
||||
|
||||
@@ -27,6 +27,7 @@ using System.Linq;
|
||||
using DevExpress.Xpf.Grid;
|
||||
using System.Windows.Media.Imaging;
|
||||
using DevExpress.Utils;
|
||||
using System.Windows.Markup;
|
||||
|
||||
namespace BeWo.View.Detail
|
||||
{
|
||||
@@ -42,14 +43,31 @@ namespace BeWo.View.Detail
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public void InitView(CompactEmployeeDC employee)
|
||||
public void SetXaml(string xamlCode)
|
||||
{
|
||||
dict = ServiceFacade.DoOperationsServiceSync(s => s.GetAdditionalEmployeeInformationForScheduler(employee.EmployeeOid));
|
||||
var list = dict.ToList();
|
||||
list = list.OrderBy(l => l.Key).ToList();
|
||||
datagrid_employee_infos.ItemsSource = list;
|
||||
try
|
||||
{
|
||||
if (XamlReader.Parse(xamlCode) is UIElement element)
|
||||
{
|
||||
informationText.Visibility = Visibility.Collapsed;
|
||||
rootGrid.Children.Add(element);
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
//ignore
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
//public void InitView(CompactEmployeeDC employee)
|
||||
//{
|
||||
// dict = ServiceFacade.DoOperationsServiceSync(s => s.GetAdditionalEmployeeInformationForScheduler(employee.EmployeeOid));
|
||||
// var list = dict.ToList();
|
||||
// list = list.OrderBy(l => l.Key).ToList();
|
||||
// datagrid_employee_infos.ItemsSource = list;
|
||||
//}
|
||||
*/
|
||||
private void button_close_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
ButtonCloseClicked?.Invoke();
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<PropertyGroup>
|
||||
<NameOfLastUsedPublishProfile>BeWo2.0</NameOfLastUsedPublishProfile>
|
||||
<UseIISExpress>true</UseIISExpress>
|
||||
<LastActiveSolutionConfig>Release|Any CPU</LastActiveSolutionConfig>
|
||||
<LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
|
||||
<Use64BitIISExpress />
|
||||
<IISExpressSSLPort />
|
||||
<IISExpressAnonymousAuthentication />
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using BeWo.Service.Core;
|
||||
using BeWo.Service.Plugins;
|
||||
using BS.Shared.Core;
|
||||
using BS.Shared.DataContracts;
|
||||
using Utils = BS.Shared.Core.Utils;
|
||||
|
||||
namespace LebenUndWohnenChristianWilke.Export
|
||||
{
|
||||
public class CustomDataExporter : DataExporter
|
||||
{
|
||||
public override QueryDC CreateQuery(QueryDC query)
|
||||
{
|
||||
return DatevExporter.CreateQuery(query);
|
||||
}
|
||||
}
|
||||
}
|
||||
155
ReportImp/LebenUndWohnenChristianWilke/Export/DatevExporter.cs
Normal file
155
ReportImp/LebenUndWohnenChristianWilke/Export/DatevExporter.cs
Normal file
@@ -0,0 +1,155 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using BeWo.Data.Access;
|
||||
using BeWo.Data.Entities;
|
||||
using BeWo.Service.DCEntityMapper;
|
||||
using BS.Shared;
|
||||
using BS.Shared.DataContracts;
|
||||
using BS.Shared.Extensions;
|
||||
|
||||
namespace LebenUndWohnenChristianWilke.Export
|
||||
{
|
||||
public class DatevExporter
|
||||
{
|
||||
|
||||
public static QueryDC CreateQuery(QueryDC query)
|
||||
{
|
||||
DateTime dt = DateTime.Now;
|
||||
DateTime.TryParse(query.Parameter[0].Value.ToString(), out dt);
|
||||
|
||||
query.FileName = String.Format("DatevExport {0:MMMM} {0:yyyy}.csv", dt);
|
||||
query.QueryResult = GetAbrechnungenString(dt);
|
||||
|
||||
|
||||
return query;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public static String GetAbrechnungenString(DateTime date)
|
||||
{
|
||||
//Bereiche:
|
||||
//queryDc.Parameter[1].CustomValues.Add("Ambulant betreutes Wohnen");
|
||||
//queryDc.Parameter[1].CustomValues.Add("Begleitende Elternschaft");
|
||||
//queryDc.Parameter[1].CustomValues.Add("Einzelfallhilfe");
|
||||
//queryDc.Parameter[1].CustomValues.Add("Familien entlastender Dienst");
|
||||
//queryDc.Parameter[1].CustomValues.Add("Tagesstruktur");
|
||||
//queryDc.Parameter[1].CustomValues.Add("Wohnstätte");
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
sb.AppendLine("Debitor;Rechnungsnummer;Belegdatum;Umsatz;H;Konto;Kostenstelle;Buchungstext");
|
||||
|
||||
//sb.AppendLine("Betrag;Gegenkonto;Rechnungsnummer;Belegfeld 2;Belegdatum;Konto;Kostenstelle;Buchungstext");
|
||||
|
||||
var s = GetRechnungenString(date);
|
||||
if (!String.IsNullOrWhiteSpace(s))
|
||||
{
|
||||
sb.AppendLine(s);
|
||||
}
|
||||
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
private static String GetRechnungenString(DateTime date)
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
var sql = GetRechnungenSql(date);
|
||||
|
||||
var dt = ExecuteQuery(sql, date);
|
||||
|
||||
foreach (DataRow row in dt.Rows)
|
||||
{
|
||||
if (sb.Length > 0)
|
||||
{
|
||||
sb.AppendLine();
|
||||
}
|
||||
String debitor = "";
|
||||
var row1 = row[1].ToString();
|
||||
long? oid = ToNullableLong(row1);
|
||||
if (oid.HasValue)
|
||||
{
|
||||
var org = DAOFactory.GenericDAO.LoadByID<Organisation>(oid.Value);
|
||||
debitor = org.DebitorNumber;
|
||||
}
|
||||
sb.Append(debitor); // Gegenkonto
|
||||
sb.Append(";");
|
||||
sb.Append(String.Format("{0}", row[3])); // Rechnungsnummer
|
||||
sb.Append(";");
|
||||
|
||||
DateTime lastDate = new DateTime(date.Year, date.Month, 1);
|
||||
lastDate = lastDate.AddMonths(1).AddDays(-1);
|
||||
sb.Append(String.Format("{0:dd.MM.yyyy}", lastDate));
|
||||
sb.Append(";"); // Datum (Monatsletzter des Auswertedatums) (Belegdatum)
|
||||
sb.Append(String.Format("{0:0.00}", row[0])); // Betrag (Umsatz)
|
||||
sb.Append(";");
|
||||
sb.Append("H"); // Konto
|
||||
sb.Append(";");
|
||||
sb.Append("8000"); // Konto
|
||||
sb.Append(";");
|
||||
sb.Append(row[4].ToString()); //Kostenstelle
|
||||
sb.Append(";");
|
||||
sb.Append(row[7].ToString()); //Verwendungszweck
|
||||
sb.Append(";");
|
||||
}
|
||||
|
||||
|
||||
|
||||
return sb.ToString();
|
||||
}
|
||||
private static long? ToNullableLong(string s)
|
||||
{
|
||||
long l;
|
||||
if (long.TryParse(s, out l))
|
||||
return l;
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
private static String GetRechnungenSql(DateTime date)
|
||||
{
|
||||
String sql = @"
|
||||
select
|
||||
sip.Claim,
|
||||
c.DebitorNumber,
|
||||
ib.InvoiceDate,
|
||||
ib.invoicenumber,
|
||||
c.CostCenter,
|
||||
c2s.Oid,
|
||||
ib.InvoiceId,
|
||||
p.LastName
|
||||
from
|
||||
person p
|
||||
inner join customer c on c.personoid = p.oid
|
||||
inner join supportconcept sc on sc.customeroid = c.oid
|
||||
inner join costbearer2supportconcept c2s on c2s.supportconceptoid = sc.oid
|
||||
inner join invoicebase ib on ib.costbearer2supportconceptoid = c2s.oid
|
||||
inner join serviceinvoice si on si.invoicebaseoid = ib.oid
|
||||
inner join serviceinvoiceperiod sip on sip.serviceinvoiceoid = si.oid
|
||||
WHERE ib.`AccountingPeriodEnd` >= ':Monat_Start' AND ib.`AccountingPeriodEnd` <= ':Monat_End' and ib.IsActive = 1
|
||||
order by ib.invoicenumber
|
||||
";
|
||||
|
||||
return sql;
|
||||
}
|
||||
|
||||
public static DataTable ExecuteQuery(String sql, DateTime dt)
|
||||
{
|
||||
var newsql = sql;
|
||||
newsql = newsql.Replace(":Abrechnungsmonat", String.Format("{0:dd.MM.yyyy}", dt));
|
||||
newsql = newsql.Replace(":Belegnr", String.Format("{0:yyMM}", dt));
|
||||
newsql = newsql.Replace(":Monat_MM", String.Format("{0:MM}", dt));
|
||||
newsql = newsql.Replace(":Monat_Start", String.Format("{0:yyyy-MM}-01", dt));
|
||||
dt = dt.AddMonths(1);
|
||||
newsql = newsql.Replace(":Monat_End", String.Format("{0:yyyy-MM}-01", dt));
|
||||
|
||||
return DAOFactory.AdoDAO.ExecuteQuery(newsql).Tables[0];
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{48324B9E-4EC0-47B9-BBA7-6FD61384D25A}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>LebenUndWohnenChristianWilke</RootNamespace>
|
||||
<AssemblyName>6919016656_Reports</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<TargetFrameworkProfile />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>..\..\Host\bin\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>..\..\Host\bin\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="DevExpress.Data.v17.1, Version=17.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
|
||||
<Reference Include="DevExpress.Printing.v17.1.Core, Version=17.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
|
||||
<Reference Include="DevExpress.Utils.v17.1, Version=17.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
|
||||
<Reference Include="DevExpress.XtraPrinting.v17.1, Version=17.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
|
||||
<Reference Include="DevExpress.XtraReports.v17.1, Version=17.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Export\CustomDataExporter.cs" />
|
||||
<Compile Include="Export\DatevExporter.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\Data\Data.csproj">
|
||||
<Project>{B0D73E3D-4AE7-4024-93A6-DB1F46D7CCEE}</Project>
|
||||
<Name>Data</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\Report\Report.csproj">
|
||||
<Project>{40d8b312-ea64-49e3-a31a-5e57ed4d5654}</Project>
|
||||
<Name>Report</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\Service\Service.csproj">
|
||||
<Project>{094331c3-ecee-4c89-bbfd-4c9ded89f0ef}</Project>
|
||||
<Name>Service</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\Shared\Shared.csproj">
|
||||
<Project>{2f50b83d-a3f0-4ec4-979a-3f9b7e3d8ed4}</Project>
|
||||
<Name>Shared</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
||||
@@ -0,0 +1,36 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// Allgemeine Informationen über eine Assembly werden über die folgenden
|
||||
// Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern,
|
||||
// die einer Assembly zugeordnet sind.
|
||||
[assembly: AssemblyTitle("KundeXyz")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("KundeXyz")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2020")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Durch Festlegen von ComVisible auf FALSE werden die Typen in dieser Assembly
|
||||
// für COM-Komponenten unsichtbar. Wenn Sie auf einen Typ in dieser Assembly von
|
||||
// COM aus zugreifen müssen, sollten Sie das ComVisible-Attribut für diesen Typ auf "True" festlegen.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird
|
||||
[assembly: Guid("c1fed668-adb9-47e0-b589-1389618e1b6e")]
|
||||
|
||||
// Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten:
|
||||
//
|
||||
// Hauptversion
|
||||
// Nebenversion
|
||||
// Buildnummer
|
||||
// Revision
|
||||
//
|
||||
// Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden,
|
||||
// indem Sie "*" wie unten gezeigt eingeben:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
@@ -204,6 +204,7 @@ namespace LebenshilfeFrankfurtOder.Export
|
||||
|
||||
public static String GetMonatlicheRechnungenString(DateTime date, String rechnungId, String buchungstext, String konto, DateTime? minInsts)
|
||||
{
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
var sql = GetMonatlicheRechnungenSql(date, rechnungId, minInsts);
|
||||
|
||||
|
||||
@@ -211,7 +211,7 @@ namespace BeWo.Service.Plugins
|
||||
//t = "7185105541"; // Nous GmbH
|
||||
//t = "5022131330"; // Tabula Rasa
|
||||
//t = "4189934785"; // Landshuter Netzwerke
|
||||
t = "4290816992"; // BeWo Imflow
|
||||
//t = "4290816992"; // BeWo Imflow
|
||||
//t = "7584236951"; // Aachener Betreuungsbüro Kirschbaum und Manz GbR
|
||||
//t = "3678599942"; // VKM Rietberg
|
||||
//t = "4069072369"; // BeWo Dreilich&Pastor (Pastor)
|
||||
@@ -225,7 +225,7 @@ namespace BeWo.Service.Plugins
|
||||
//t = "7817461089"; // FAB e.V. (Familienarbeit und Beratung e.V.)
|
||||
//t = "5207911843"; // Pro Balance
|
||||
//t = "8619663355"; // HSH Cologne
|
||||
//t = "1652658918"; // LH Frankfurt Oder
|
||||
t = "1652658918"; // LH Frankfurt Oder
|
||||
//t = "7696927868"; // Kuhring Betreuung
|
||||
//t = "6251348980"; // BeWo Gün
|
||||
//t = "6782533512"; // LH Dorsten
|
||||
@@ -262,6 +262,7 @@ namespace BeWo.Service.Plugins
|
||||
//t = "2535794597"; // Mobilo Ambulant
|
||||
//t = "7114701269"; // Die Brücke Hilfe und Halt
|
||||
//t = "6447060239"; // Empathie Fachassistenz
|
||||
t = "6919016656"; // Leben und Wohnen Christian Wilke
|
||||
|
||||
return t;
|
||||
#else
|
||||
|
||||
@@ -410,6 +410,7 @@
|
||||
<Compile Include="UnitOfWork\HibernateSessionBehaviorExtension.cs" />
|
||||
<Compile Include="UnitOfWork\HibernateSessionContextInitializer.cs" />
|
||||
<Compile Include="Vorlagen\VorlagenManager.cs" />
|
||||
<Compile Include="XAMLInformation\InfoViaXAMLManager.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Data\Data.csproj">
|
||||
|
||||
@@ -1065,6 +1065,14 @@ namespace BeWo.Service.ServiceContracts
|
||||
[FaultContract(typeof(BeWoFault))]
|
||||
[OperationContract]
|
||||
Dictionary<string, string> GetAdditionalEmployeeInformationForScheduler(long empOid);
|
||||
|
||||
[FaultContract(typeof(BeWoFault))]
|
||||
[OperationContract]
|
||||
string GetXAMLInformationStringForEmployee(long empOid);
|
||||
|
||||
[FaultContract(typeof(BeWoFault))]
|
||||
[OperationContract]
|
||||
string GetXAMLInformationStringForCustomer(long customerOid);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -6614,7 +6614,29 @@ namespace BeWo.Service.ServiceImplementations
|
||||
|
||||
return dict;
|
||||
}
|
||||
|
||||
|
||||
public string GetXAMLInformationStringForEmployee(long empOid)
|
||||
{
|
||||
try
|
||||
{
|
||||
return XAMLInformation.InfoViaXAMLManager.GetXAMLInformationStringForEmployee(empOid, null);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
throw Utils.CreateBeWoFaultException(e);
|
||||
}
|
||||
}
|
||||
public string GetXAMLInformationStringForCustomer(long customerOid)
|
||||
{
|
||||
try
|
||||
{
|
||||
return XAMLInformation.InfoViaXAMLManager.GetXAMLInformationStringForCustomer(customerOid, null);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
throw Utils.CreateBeWoFaultException(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
227
Service/XAMLInformation/InfoViaXAMLManager.cs
Normal file
227
Service/XAMLInformation/InfoViaXAMLManager.cs
Normal file
@@ -0,0 +1,227 @@
|
||||
using BeWo.Data.Access;
|
||||
using BeWo.Data.Entities;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BeWo.Service.XAMLInformation
|
||||
{
|
||||
internal class InfoViaXAMLManager
|
||||
{
|
||||
public static string GetXAMLInformationStringForEmployee(long empOid, DateTime? datum)
|
||||
{
|
||||
var employee = DAOFactory.GenericDAO.GetByID<Employee>(empOid);
|
||||
string xamlstring = "";
|
||||
|
||||
#region Variablen setzen
|
||||
//Geburtstag
|
||||
var birthdayTimeAndDate = employee.Person.DateOfBirth.ToString().Split(' ');
|
||||
//Qualifiziert
|
||||
string qualifiziert = "nicht angegeben";
|
||||
if (employee.IsQualified != null)
|
||||
qualifiziert = ((bool)employee.IsQualified) ? "Ja" : "Nein";
|
||||
//Wöchentl. FLS
|
||||
string FLSWoche = "kein Vetrag angegeben";
|
||||
if(employee.LastContract!= null)
|
||||
{
|
||||
double d = (employee.LastContract.WeeklyFLS != null) ? Convert.ToDouble(employee.LastContract.WeeklyFLS.Value) : 0;
|
||||
FLSWoche = Math.Round(d, 2).ToString();
|
||||
}
|
||||
//Wöchentl. Stunden
|
||||
string stundenWoche = "kein Vetrag angegeben";
|
||||
if (employee.LastContract != null)
|
||||
{
|
||||
double d = (employee.LastContract.WeeklyTotalHours != null) ? Convert.ToDouble(employee.LastContract.WeeklyTotalHours.Value) : 0;
|
||||
stundenWoche = Math.Round(d, 2).ToString();
|
||||
}
|
||||
//Monatl. FLS
|
||||
string FLSMonat = "kein Vetrag angegeben";
|
||||
if (employee.LastContract != null)
|
||||
{
|
||||
double d = (employee.LastContract.MonthlyFLS != null) ? Convert.ToDouble(employee.LastContract.MonthlyFLS.Value) : 0;
|
||||
FLSMonat = Math.Round(d, 2).ToString();
|
||||
}
|
||||
//Monatl. Stunden
|
||||
string stundenMonat = "kein Vetrag angegeben";
|
||||
if (employee.LastContract != null)
|
||||
{
|
||||
double d = (employee.LastContract.MonthlyTotalHours != null) ? Convert.ToDouble(employee.LastContract.MonthlyTotalHours.Value) : 0;
|
||||
stundenMonat = Math.Round(d, 2).ToString();
|
||||
}
|
||||
//Vetragsart
|
||||
string vertragsart = "kein Vetrag angegeben";
|
||||
if (employee.LastContract != null)
|
||||
{
|
||||
if (employee.LastContract.EmploymentType != null)
|
||||
{
|
||||
vertragsart = employee.LastContract.EmploymentType.Name;
|
||||
}
|
||||
else
|
||||
vertragsart = "keine Vertragsart angegeben";
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
xamlstring =
|
||||
"<ScrollViewer xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation' VerticalScrollBarVisibility='Auto' HorizontalScrollBarVisibility='auto'>" +
|
||||
"<Grid xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'>" +
|
||||
"<Grid.RowDefinitions>" +
|
||||
"<RowDefinition Height=\"auto\"/>" +
|
||||
"<RowDefinition Height='auto'/>" +
|
||||
"<RowDefinition Height='auto'/>" +
|
||||
"<RowDefinition Height='auto'/>" +
|
||||
"<RowDefinition Height='auto'/>" +
|
||||
"<RowDefinition Height='auto'/>" +
|
||||
"<RowDefinition Height='auto'/>" +
|
||||
"<RowDefinition Height='auto'/>" +
|
||||
"<RowDefinition Height='auto'/>" +
|
||||
"</Grid.RowDefinitions>" +
|
||||
"<Grid.ColumnDefinitions>" +
|
||||
"<ColumnDefinition Width='auto'/>" +
|
||||
"<ColumnDefinition Width='*'/>" +
|
||||
"</Grid.ColumnDefinitions>" +
|
||||
"<Label xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation' Grid.Row='0' Grid.Column='0' Background='Transparent' " +
|
||||
"Margin='5' FontSize='14'>Vollständiger Name</Label>" +
|
||||
"<Label xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation' Grid.Row='0' Grid.Column='1' Background='Transparent' " +
|
||||
"Margin='5' FontSize='14'>" + employee.Person.FirstNameLastName + "</Label>" +
|
||||
|
||||
"<Label xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation' Grid.Row='1' Grid.Column='0' Background='Transparent' " +
|
||||
"Margin='5' FontSize='14'>Geburtstag</Label>" +
|
||||
"<Label xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation' Grid.Row='1' Grid.Column='1' Background='Transparent' " +
|
||||
"Margin='5' FontSize='14'>" + birthdayTimeAndDate[0] + "</Label>" +
|
||||
|
||||
"<Label xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation' Grid.Row='2' Grid.Column='0' Background='Transparent' " +
|
||||
"Margin='5' FontSize='14'>Qualifiziert</Label>" +
|
||||
"<Label xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation' Grid.Row='2' Grid.Column='1' Background='Transparent' " +
|
||||
"Margin='5' FontSize='14'>" + qualifiziert + "</Label>" +
|
||||
|
||||
"<Label xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation' Grid.Row='3' Grid.Column='0' Background='Transparent' " +
|
||||
"Margin='5' FontSize='14'>Mitarbeiternummer</Label>" +
|
||||
"<Label xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation' Grid.Row='3' Grid.Column='1' Background='Transparent' " +
|
||||
"Margin='5' FontSize='14'>" + employee.PersonnelNumber + "</Label>" +
|
||||
|
||||
"<Label xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation' Grid.Row='4' Grid.Column='0' Background='Transparent' " +
|
||||
"Margin='5' FontSize='14'>Vertragsart</Label>" +
|
||||
"<Label xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation' Grid.Row='4' Grid.Column='1' Background='Transparent' " +
|
||||
"Margin='5' FontSize='14'>" + vertragsart + "</Label>" +
|
||||
|
||||
"<Label xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation' Grid.Row='5' Grid.Column='0' Background='Transparent' " +
|
||||
"Margin='5' FontSize='14'>FLS pro Woche</Label>" +
|
||||
"<Label xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation' Grid.Row='5' Grid.Column='1' Background='Transparent' " +
|
||||
"Margin='5' FontSize='14'>" + FLSWoche + "</Label>" +
|
||||
|
||||
"<Label xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation' Grid.Row='6' Grid.Column='0' Background='Transparent' " +
|
||||
"Margin='5' FontSize='14'>Stunden pro Woche</Label>" +
|
||||
"<Label xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation' Grid.Row='6' Grid.Column='1' Background='Transparent' " +
|
||||
"Margin='5' FontSize='14'>" + stundenWoche + "</Label>" +
|
||||
|
||||
"<Label xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation' Grid.Row='7' Grid.Column='0' Background='Transparent' " +
|
||||
"Margin='5' FontSize='14'>FLS pro Monat</Label>" +
|
||||
"<Label xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation' Grid.Row='7' Grid.Column='1' Background='Transparent' " +
|
||||
"Margin='5' FontSize='14'>" + FLSMonat + "</Label>" +
|
||||
|
||||
"<Label xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation' Grid.Row='8' Grid.Column='0' Background='Transparent' " +
|
||||
"Margin='5' FontSize='14'>Stunden pro Monat</Label>" +
|
||||
"<Label xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation' Grid.Row='8' Grid.Column='1' Background='Transparent' " +
|
||||
"Margin='5' FontSize='14'>" + stundenMonat + "</Label>" +
|
||||
|
||||
"</Grid>" +
|
||||
"</ScrollViewer>";
|
||||
|
||||
return xamlstring;
|
||||
}
|
||||
|
||||
public static string GetXAMLInformationStringForCustomer(long customerOid, DateTime? datum)
|
||||
{
|
||||
var customer = DAOFactory.GenericDAO.GetByID<Customer>(customerOid);
|
||||
string xamlstring = "";
|
||||
|
||||
#region Variablen setzen
|
||||
|
||||
string ort = "";
|
||||
if (customer.Person.Address != null)
|
||||
{
|
||||
if (customer.Person.Address.PostalCode != null)
|
||||
ort += customer.Person.Address.PostalCode;
|
||||
if (customer.Person.Address.Town != null)
|
||||
ort += ort.Equals("") ? customer.Person.Address.Town : " " + customer.Person.Address.Town;
|
||||
}
|
||||
else
|
||||
ort += "keine Angabe";
|
||||
|
||||
#endregion
|
||||
|
||||
xamlstring =
|
||||
"<ScrollViewer xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation' VerticalScrollBarVisibility='Auto' HorizontalScrollBarVisibility='auto'>" +
|
||||
"<Grid xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'>" +
|
||||
"<Grid.RowDefinitions>" +
|
||||
"<RowDefinition Height=\"auto\"/>" +
|
||||
"<RowDefinition Height='auto'/>" +
|
||||
"<RowDefinition Height='auto'/>" +
|
||||
"<RowDefinition Height='auto'/>" +
|
||||
"<RowDefinition Height='auto'/>" +
|
||||
"<RowDefinition Height='auto'/>" +
|
||||
"<RowDefinition Height='auto'/>" +
|
||||
"<RowDefinition Height='auto'/>" +
|
||||
"<RowDefinition Height='auto'/>" +
|
||||
"<RowDefinition Height='auto'/>" +
|
||||
"<RowDefinition Height='auto'/>" +
|
||||
"</Grid.RowDefinitions>" +
|
||||
"<Grid.ColumnDefinitions>" +
|
||||
"<ColumnDefinition Width='auto'/>" +
|
||||
"<ColumnDefinition Width='*'/>" +
|
||||
"</Grid.ColumnDefinitions>" +
|
||||
|
||||
"<Label xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation' Grid.Row='0' Grid.Column='0' Background='Transparent' " +
|
||||
"Margin='5' FontSize='14'>Ansprechpartner</Label>" +
|
||||
"<Label xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation' Grid.Row='0' Grid.Column='1' Background='Transparent' " +
|
||||
"Margin='5' FontSize='14'>" + ((customer.Ansprechpartner != null) ? customer.Ansprechpartner.FirstNameLastName : "keine Angabe") + "</Label>" +
|
||||
|
||||
"<Label xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation' Grid.Row='1' Grid.Column='0' Background='Transparent' " +
|
||||
"Margin='5' FontSize='14'>Ausweis Aktenzeichen</Label>" +
|
||||
"<Label xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation' Grid.Row='1' Grid.Column='1' Background='Transparent' " +
|
||||
"Margin='5' FontSize='14'>" + ((customer.AusweisAktenzeichen != null) ? customer.AusweisAktenzeichen : "keine Angabe") + "</Label>" +
|
||||
|
||||
"<Label xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation' Grid.Row='2' Grid.Column='0' Background='Transparent' " +
|
||||
"Margin='5' FontSize='14'>Grad der Behinderung</Label>" +
|
||||
"<Label xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation' Grid.Row='2' Grid.Column='1' Background='Transparent' " +
|
||||
"Margin='5' FontSize='14'>" + ((customer.GradDerBehinderung != null) ? customer.GradDerBehinderung : "keine Angabe") + "</Label>" +
|
||||
|
||||
"<Label xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation' Grid.Row='3' Grid.Column='0' Background='Transparent' " +
|
||||
"Margin='5' FontSize='14'>Hygienebelehrung</Label>" +
|
||||
"<Label xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation' Grid.Row='3' Grid.Column='1' Background='Transparent' " +
|
||||
"Margin='5' FontSize='14'>" + ((customer.Hygienebelehrung) ? "Ja" : "Nein") + "</Label>" +
|
||||
|
||||
"<Label xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation' Grid.Row='4' Grid.Column='0' Background='Transparent' " +
|
||||
"Margin='5' FontSize='14'>Ort</Label>" +
|
||||
"<Label xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation' Grid.Row='4' Grid.Column='1' Background='Transparent' " +
|
||||
"Margin='5' FontSize='14'>" + ort + "</Label>" +
|
||||
|
||||
"<Label xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation' Grid.Row='5' Grid.Column='0' Background='Transparent' " +
|
||||
"Margin='5' FontSize='14'>Medikation</Label>" +
|
||||
"<Label xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation' Grid.Row='5' Grid.Column='1' Background='Transparent' " +
|
||||
"Margin='5' FontSize='14'>" + ((customer.Medication != null) ? customer.Medication : "keine Angabe") + "</Label>" +
|
||||
|
||||
"<Label xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation' Grid.Row='6' Grid.Column='0' Background='Transparent' " +
|
||||
"Margin='5' FontSize='14'>Schutzstufe</Label>" +
|
||||
"<Label xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation' Grid.Row='6' Grid.Column='1' Background='Transparent' " +
|
||||
"Margin='5' FontSize='14'>" + ((customer.Schutzstufe != null) ? customer.Schutzstufe : "keine") + "</Label>" +
|
||||
|
||||
"<Label xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation' Grid.Row='7' Grid.Column='0' Background='Transparent' " +
|
||||
"Margin='5' FontSize='14'>Vertretung dringend erforderlich</Label>" +
|
||||
"<Label xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation' Grid.Row='7' Grid.Column='1' Background='Transparent' " +
|
||||
"Margin='5' FontSize='14'>" + (customer.VertretungDringendErforderlich ? "Ja" : "Nein") + "</Label>" +
|
||||
|
||||
"<Label xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation' Grid.Row='8' Grid.Column='0' Background='Transparent' " +
|
||||
"Margin='5' FontSize='14'>Vertretung gewünscht</Label>" +
|
||||
"<Label xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation' Grid.Row='8' Grid.Column='1' Background='Transparent' " +
|
||||
"Margin='5' FontSize='14'>" + (customer.VertretungGewuenscht ? "Ja" : "Nein") + "</Label>" +
|
||||
"</Grid>" +
|
||||
"</ScrollViewer>";
|
||||
|
||||
return xamlstring;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user