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

This commit is contained in:
Lyndon
2019-08-08 14:48:02 +02:00
64 changed files with 4001 additions and 1575 deletions

1
.gitignore vendored
View File

@@ -377,3 +377,4 @@
/ReportImp/TabulaRasa/obj/Release
/ReportImp/KirschbaumManz/obj/Debug
/ReportImp/KirschbaumManz/obj/Release
/ReportImp/VkmRietberg/obj/Debug

View File

@@ -102,6 +102,7 @@
<Reference Include="DevExpress.RichEdit.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.Mvvm.v17.1, Version=17.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.Xpf.Accordion.v17.1, Version=17.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.Xpf.Core.v17.1, Version=17.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.Xpf.Charts.v17.1, Version=17.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.Xpf.Docking.v17.1, Version=17.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
@@ -282,6 +283,10 @@
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="View\Detail\Report\FlexibleReportEntryDetail.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="View\Detail\Report\FlexibleReportLayoutListControl.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
@@ -604,6 +609,7 @@
<Compile Include="Converter\AssessmentSheetHeaderToForegroundConverter.cs" />
<Compile Include="Converter\ClientType2VisibilityConverter.cs" />
<Compile Include="Converter\BoolVisibilityMultiConverter.cs" />
<Compile Include="Converter\NullableBoolToBoolConverter.cs" />
<Compile Include="Converter\ParticipationBrushConverter.cs" />
<Compile Include="Converter\ReactivationRight2VisibilityConverter.cs" />
<Compile Include="Converter\Rights2DefaultBooleanConverter.cs" />
@@ -820,6 +826,9 @@
<Compile Include="View\Detail\BudgetView.xaml.cs">
<DependentUpon>BudgetView.xaml</DependentUpon>
</Compile>
<Compile Include="View\Detail\Report\FlexibleReportEntryDetail.xaml.cs">
<DependentUpon>FlexibleReportEntryDetail.xaml</DependentUpon>
</Compile>
<Compile Include="View\Detail\Report\PivotGridReport.cs">
<SubType>Component</SubType>
</Compile>

View File

@@ -0,0 +1,22 @@
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BeWo.Converter
{
public class NullableBoolToBoolConverter : System.Windows.Data.IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
return false;
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
throw new NotImplementedException();
}
}
}

View File

@@ -1951,7 +1951,7 @@ namespace BeWo.Core
ThemeManager.SetTheme(window, Theme.Office2010Black);
}
ThemeManager.SetTheme(documentPreviewControl, Theme.Office2007Black);
//ThemeManager.SetTheme(documentPreviewControl, Theme.Office2007Black);
documentPreviewControl.DocumentSource = report;

View File

@@ -1115,7 +1115,7 @@ namespace BeWo
private void button_Support_Click(object sender, RoutedEventArgs e)
{
var mailButton = new Button
var mailButton = new Button
{
Content = "*",
FontFamily = new FontFamily("Wingdings"),
@@ -1199,12 +1199,35 @@ namespace BeWo
{
Foreground = Brushes.Black,
Margin = new Thickness(45, 5, 5, 5),
FontSize = 12
};
String linkText = "Teamviewer herunterladen";
String url = "https://get.teamviewer.com/dj5y4zy";
if (!String.IsNullOrWhiteSpace(BeWoApp.Mandator.SupportToolUrl))
{
url = BeWoApp.Mandator.SupportToolUrl;
if (BeWoApp.Mandator.SupportToolUrl.Contains("<") && BeWoApp.Mandator.SupportToolUrl.Contains(">") && BeWoApp.Mandator.SupportToolUrl.IndexOf("<") > 0)
{
linkText = BeWoApp.Mandator.SupportToolUrl.Substring(0, BeWoApp.Mandator.SupportToolUrl.IndexOf("<"));
url = BeWoApp.Mandator.SupportToolUrl.Substring(BeWoApp.Mandator.SupportToolUrl.IndexOf("<"));
url = url.Replace("<", "").Replace(">", "");
}
}
Hyperlink link = new Hyperlink();
link.Inlines.Add("Teamviewer herunterladen");
link.NavigateUri = new Uri(url);
link.TargetName = "newWindow";
link.Inlines.Add(linkText);
supportToolLink.Inlines.Add(link);
link.RequestNavigate += (s, e2) =>
{
System.Diagnostics.Process.Start(
new System.Diagnostics.ProcessStartInfo((s as Hyperlink).NavigateUri.ToString()));
};
BeWoWindow bewoWindow = BeWoWpfUtils.CreateBeWoPopupWindow(300, 1000, true);

View File

@@ -4,7 +4,7 @@ using System.Windows;
using BeWo.Core.Config;
using BeWo.MultiLanguage;
using BS.Shared.Translation;
using DevExpress.Xpf.Core;
namespace BeWo
{
@@ -16,6 +16,9 @@ namespace BeWo
public MainWindow()
{
InitializeComponent();
ApplicationThemeHelper.ApplicationThemeName = "Office2010Black";
ShowLoginControl();
}

View File

@@ -139,7 +139,7 @@ namespace BeWo.View.Detail
this.ViewModel.AddNewVMToList();
}
else {
MessageBox.Show("Es können maximal fünf Dokumentationstypen angelegt werden.", "Hinzufügen nicht möglich", MessageBoxButton.OK, MessageBoxImage.Information);
MessageBox.Show("Es können maximal fünf Dokumentationsfelder angelegt werden.", "Hinzufügen nicht möglich", MessageBoxButton.OK, MessageBoxImage.Information);
}
// grid.DataSource = null;

View File

@@ -0,0 +1,59 @@
<UserControl
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
Height="Auto" Width="Auto" HorizontalAlignment="Stretch"
VerticalAlignment="Stretch" Focusable="True"
xmlns:val="clr-namespace:BeWo.Validation"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
x:Class="BeWo.View.Detail.Report.FlexibleReportEntryDetail"
d:DesignHeight="500" d:DesignWidth="1000"
mc:Ignorable="d">
<Grid Background="{StaticResource ObjectEditBackgroundBrush}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<dxg:GridControl x:Name="DatagridRegions" Margin="10" Grid.Column="0" Grid.Row="0">
<dxg:GridControl.Columns>
<dxg:GridColumn FieldName="CustomerString" Header="Klient" Width="125" AllowEditing="False" />
<dxg:GridColumn FieldName="SupportConceptString" Header="Hilfeplan" Width="130" AllowEditing="False" />
<dxg:GridColumn FieldName="Organisation" Header="Kostenträger" Width="125" AllowEditing="False" />
<dxg:GridColumn x:Name="ColumnDauer" FieldName="IstStunden" Header="Dauer" Width="100" AllowEditing="False">
<dxg:GridColumn.EditSettings>
<dxe:DateEditSettings/>
</dxg:GridColumn.EditSettings>
</dxg:GridColumn>
<dxg:GridColumn FieldName="StartDatum" Header="Start" Width="125" AllowEditing="False">
<dxg:GridColumn.EditSettings>
<dxe:DateEditSettings DisplayFormat="dd.MM.yyyy HH:mm"/>
</dxg:GridColumn.EditSettings>
</dxg:GridColumn>
<dxg:GridColumn FieldName="EndDatum" Header="Ende" Width="125" AllowEditing="False" >
<dxg:GridColumn.EditSettings>
<dxe:DateEditSettings DisplayFormat="dd.MM.yyyy HH:mm"/>
</dxg:GridColumn.EditSettings>
</dxg:GridColumn>
<dxg:GridColumn FieldName="EmployeeString" Header="Mitarbeiter" Width="125" AllowEditing="False" />
<dxg:GridColumn FieldName="Team" Header="Team" Width="100" AllowEditing="False" />
<dxg:GridColumn x:Name="ColumnKilometer" FieldName="Kilometer" Header="Kilometer" Width="60" AllowEditing="False" >
<dxg:GridColumn.EditSettings>
<dxe:DateEditSettings/>
</dxg:GridColumn.EditSettings>
</dxg:GridColumn>
<dxg:GridColumn x:Name="ColumnNotice" FieldName="Notice" Visible="True" Header="Dokumentation" Width="200" AllowEditing="False" />
<dxg:GridColumn x:Name="ColumnNotice2" FieldName="Notice2" Visible="False" Width="75" AllowEditing="False" />
<dxg:GridColumn x:Name="ColumnNotice3" FieldName="Notice3" Visible="False" Width="75" AllowEditing="False" />
<dxg:GridColumn x:Name="ColumnNotice4" FieldName="Notice4" Visible="False" Width="50" AllowEditing="False" />
<dxg:GridColumn x:Name="ColumnNotice5" FieldName="Notice5" Visible="False" Width="50" AllowEditing="False" />
</dxg:GridControl.Columns>
<dxg:GridControl.View>
<dxg:TableView AutoWidth="true" ShowGroupPanel="False" ShowGroupedColumns="false" ShowTotalSummary="False" NavigationStyle="Cell"/>
</dxg:GridControl.View>
</dxg:GridControl>
</Grid>
</UserControl>

View File

@@ -0,0 +1,50 @@
using BeWo.Core;
using BeWo.ServiceProxy;
using BS.Shared.Extensions;
using DevExpress.Utils;
using DevExpress.XtraGrid.Views.Grid.ViewInfo;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using BS.Shared.DataContracts;
using DevExpress.Data;
using DevExpress.Xpf.Grid;
using DevExpress.Xpf.Scheduler.UI;
using static BeWo.View.Detail.Report.FlexibleReportView;
namespace BeWo.View.Detail.Report
{
public partial class FlexibleReportEntryDetail
{
#region Konstruktor
public FlexibleReportEntryDetail(List<FlexibleReportEntry> list, IReadOnlyList<ValueListEntryDC> docTypes)
{
InitializeComponent();
DatagridRegions.ItemsSource = list;
ColumnDauer.EditSettings.DisplayFormat = "{0:N2} Std.";
ColumnKilometer.EditSettings.DisplayFormat = "{0:N1} km";
var noticeColumns = new[] { ColumnNotice, ColumnNotice2, ColumnNotice3, ColumnNotice4, ColumnNotice5 };
for (var i = 0; i < docTypes.Count && i < noticeColumns.Length; i++)
{
noticeColumns[i].Header = docTypes[i].TypeDescription;
noticeColumns[i].Visible = true;
}
}
#endregion
#region Propeties
public List<FlexibleReportEntry> Entries { get; set; }
#endregion
}
}

View File

@@ -13,127 +13,166 @@
x:Class="BeWo.View.Detail.Report.FlexibleReportView"
Height="Auto" Width="Auto" HorizontalAlignment="Stretch"
VerticalAlignment="Stretch" Focusable="True">
<Grid>
<GroupBox Header="Flexibler Bericht" Style="{StaticResource ObjectEditGroupBox}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<!-- ############################################### Obere Zeile ###############################################-->
<Grid Grid.Row="0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Label Content="Startdatum:" Grid.Column="0" VerticalAlignment="Center" />
<dxe:DateEdit MaskType="DateTimeAdvancingCaret" Grid.Column="1" x:Name="datePickerStartDate" Width="120" HorizontalAlignment="Left" Margin="3,0,0,0"/>
<Label Content="Enddatum:" Grid.Column="2" VerticalAlignment="Center" />
<dxe:DateEdit MaskType="DateTimeAdvancingCaret" Grid.Column="3" x:Name="datePickerEndDate" HorizontalAlignment="Left" Width="120" Margin="3,0,0,0" />
<Button Content="Aktualisieren" Grid.Column="5" Margin="5,0,0,0" Click="buttonRefresh_Click" />
<Button Content="Ansicht speichern" Grid.Column="9" Margin="5,0,0,0" x:Name="ButtonLayoutSave" Click="ButtonLayoutSave_Click" />
<Button Content="Ansicht bearbeiten" Grid.Column="10" Margin="5,0,0,0" x:Name="ButtonLayoutEdit" Click="ButtonLayoutEdit_Click" />
<Button Content="Ansicht laden" Grid.Column="11" Margin="5,0,0,0" x:Name="ButtonLayoutLoad" Click="ButtonLayoutLoad_Click" />
<Button Content="Ansicht drucken" Grid.Column="12" Margin="5,0,0,0" x:Name="ButtonLayoutPrint" Click="ButtonLayoutPrint_Click" />
</Grid>
<!-- ############################################### Mittlere Zeile ###############################################-->
<Grid Grid.Row="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<CheckBox Content="Reduzierte Ansicht" Margin="5,5,0,0" Grid.Column="4" x:Name="checkReduzierteAnsicht"/>
<CheckBox Content="Differenz Balken einblenden" Grid.Column="7" Margin="5,5,0,0" x:Name="checkBoxDataPer" Checked="CheckDataBarPerChanged" Unchecked="CheckDataBarPerChanged"/>
<CheckBox Content="Prozentuale Abweichung Balken einblenden" Grid.Column="8" Margin="5,5,0,0" x:Name="checkBoxData" Checked="CheckDataBarChanged" Unchecked="CheckDataBarChanged"/>
<CheckBox Content="Graph einblenden" Grid.Column="9" Margin="5,5,0,0" x:Name="checkBoxChart" Checked="CheckChartChanged" Unchecked="CheckChartChanged"/>
</Grid>
<!-- ############################################### Untere Zeile ###############################################-->
<Grid Grid.Row="2">
<Grid.Resources>
</Grid.Resources>
<dxlc:LayoutControl x:Name="mainLayout" AllowItemSizing="True" Padding="12" Orientation="Vertical">
<dxlc:LayoutGroup dxlc:LayoutControl.AllowVerticalSizing="True" Margin="0,0,0,4">
<dxpg:PivotGridControl x:Name="myPivotGridControl" RowTreeWidth="225" Visibility="Visible" DataProcessingEngine="LegacyOptimized" Margin="0,10,0,0" dx:ThemeManager.ThemeName="Office2010Black" CustomCellDisplayText="GridControl_CustomCellDisplayText" CustomFieldValueCells="GridControl_CustomFieldValueCells"
ChartProvideDataByColumns="False" ChartSelectionOnly="True" ChartProvideColumnGrandTotals="True" ChartProvideRowGrandTotals="True" ChartDataProvideMode="UseCustomSettings" CustomValueAppearance="MyPivotGridControl_CustomValueAppearance" CustomCellAppearance="MyPivotGridControl_CustomCellAppearance">
<dxpg:PivotGridControl.Fields>
<dxpg:PivotGridField x:Name="FlexibleJahr" FieldName="Datum" Area="ColumnArea" Width="100" Caption="Jahr" AllowedAreas="ColumnArea,FilterArea" GroupInterval="DateYear" />
<dxpg:PivotGridField x:Name="FlexibleMonat" FieldName="Datum" Area="ColumnArea" Width="80" Caption="Monat" AllowedAreas="ColumnArea,FilterArea" GroupInterval="DateMonth" />
<dxpg:PivotGridField x:Name="FlexibleWeek" FieldName="Datum" Area="ColumnArea" Width="80" Caption="Woche" AllowedAreas="ColumnArea,FilterArea" GroupInterval="DateWeekOfYear" ValueFormat="KW {0}" />
<dxpg:PivotGridField x:Name="FlexibleTag" FieldName="Datum" Area="FilterArea" Width="40" Caption="Tag" AllowedAreas="ColumnArea,FilterArea" GroupInterval="DateDay" />
<dxpg:PivotGridField x:Name="FlexibleKlient" FieldName="CustomerString" Area="RowArea" Width="200" Caption="Klient" AllowedAreas="RowArea,FilterArea" AreaIndex="2" Height="21" SortOrder="Ascending" />
<dxpg:PivotGridField x:Name="FlexibleSupportConcept" FieldName="SupportConceptString" Area="FilterArea" Width="200" Caption="Hilfeplan" AllowedAreas="RowArea,FilterArea" />
<dxpg:PivotGridField x:Name="FlexibleMitarbeiter" FieldName="EmployeeString" Area="RowArea" Width="200" Caption="Mitarbeiter" AllowedAreas="RowArea,FilterArea" AreaIndex="1" />
<dxpg:PivotGridField x:Name="FlexibleTeam" FieldName="Team" Area="FilterArea" Width="200" Caption="Team" AllowedAreas="RowArea,FilterArea" />
<dxpg:PivotGridField x:Name="FlexibleLeistungskategorie" FieldName="Leistungskategorie" Area="FilterArea" Width="200" Caption="Leistungskategorie" AllowedAreas="RowArea,FilterArea" />
<dxpg:PivotGridField x:Name="FlexibleLeistung" FieldName="Leistung" Area="FilterArea" Width="200" Caption="Leistung" AllowedAreas="RowArea,FilterArea" />
<dxpg:PivotGridField x:Name="FlexibleOrganisation" FieldName="Organisation" Area="FilterArea" Width="200" Caption="Kostenträger" AllowedAreas="RowArea,FilterArea" />
<dxpg:PivotGridField x:Name="FlexibleAnzahlMinIst" FieldName="AnzahlMinutenIst" Area="FilterArea" Width="60" Caption="Ist Min." AllowedAreas="DataArea,FilterArea" />
<dxpg:PivotGridField x:Name="FlexibleAnzahlStdIst" FieldName="AnzahlStundenIst" Area="DataArea" Width="80" Caption="Ist Std." AllowedAreas="DataArea,FilterArea" />
<dxpg:PivotGridField x:Name="FlexibleAnzahlMinSoll" FieldName="AnzahlMinutenSoll" Area="FilterArea" Width="60" Caption="Soll Min." AllowedAreas="DataArea,FilterArea" />
<dxpg:PivotGridField x:Name="FlexibleAnzahlStdSoll" FieldName="AnzahlStundenSoll" Area="DataArea" Width="80" Caption="Soll Std." AllowedAreas="DataArea,FilterArea" />
<dxpg:PivotGridField x:Name="FlexibleGefahreneKilometer" FieldName="Kilometer" Area="FilterArea" Width="200" Caption="Gefahrene Kilometer" AllowedAreas="DataArea,FilterArea" />
<dxpg:PivotGridField x:Name="FlexibleBetrag" FieldName="Betrag" Area="FilterArea" Width="80" Caption="Betrag" AllowedAreas="DataArea,FilterArea" />
<dxpg:PivotGridField x:Name="FlexibleStundensatz" FieldName="Stundensatz" Area="FilterArea" Width="80" Caption="Stundensatz" AllowedAreas="DataArea,FilterArea" />
<dxpg:PivotGridField x:Name="FlexibleRundungspotenzial" FieldName="Rundungspotenzial" Area="FilterArea" Width="80" Caption="Rundungspotenzial" AllowedAreas="DataArea,FilterArea" />
<dxpg:PivotGridField x:Name="FlexibleDifferenzIstSollMin" FieldName="DifferenzIstSollMinuten" Area="FilterArea" Width="80" Caption="Differenz Min." AllowedAreas="DataArea,FilterArea" HideEmptyVariationItems="True" />
<dxpg:PivotGridField x:Name="FlexibleDifferenzIstSollStd" FieldName="DifferenzIstSollStunden" Area="DataArea" Width="80" Caption="Differenz Std." AllowedAreas="DataArea,FilterArea" HideEmptyVariationItems="True" />
<dxpg:PivotGridField x:Name="UFlexibleProzentualeAbweichung" UnboundFieldName="ProzAbweichung" Area="DataArea" Width="80" Caption="Prozentual Abweichung" AllowedAreas="DataArea,FilterArea" />
</dxpg:PivotGridControl.Fields>
</dxpg:PivotGridControl>
</dxlc:LayoutGroup>
<dxlc:LayoutGroup>
<dxc:ChartControl Name="ChartControl" DataSource="{Binding ElementName=myPivotGridControl, Path=ChartDataSource}" Visibility="Collapsed" dx:ThemeManager.ThemeName="Office2010Black" >
<dxc:ChartControl.CrosshairOptions>
<dxc:CrosshairOptions ShowArgumentLine="False"/>
</dxc:ChartControl.CrosshairOptions>
<dxc:ChartControl.Legend>
<dxc:Legend ReverseItems="True"/>
</dxc:ChartControl.Legend>
<dxc:XYDiagram2D>
<dxc:XYDiagram2D.AxisY>
<dxc:AxisY2D Visible="True"/>
</dxc:XYDiagram2D.AxisY>
<dxc:XYDiagram2D.AxisX>
<dxc:AxisX2D Visible="True"/>
</dxc:XYDiagram2D.AxisX>
</dxc:XYDiagram2D>
</dxc:ChartControl>
</dxlc:LayoutGroup>
</dxlc:LayoutControl>
</Grid>
</Grid>
</GroupBox>
</Grid>
<Grid>
<GroupBox Header="Flexibler Bericht" Style="{StaticResource ObjectEditGroupBox}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<!-- ############################################### Obere Zeile ###############################################-->
<Grid Grid.Row="0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Label Content="Startdatum:" Grid.Column="0" VerticalAlignment="Center" />
<dxe:DateEdit MaskType="DateTimeAdvancingCaret" Grid.Column="1" x:Name="datePickerStartDate" Width="120" HorizontalAlignment="Left" Margin="3,0,0,0"/>
<Label Content="Enddatum:" Grid.Column="2" VerticalAlignment="Center" />
<dxe:DateEdit MaskType="DateTimeAdvancingCaret" Grid.Column="3" x:Name="datePickerEndDate" HorizontalAlignment="Left" Width="120" Margin="3,0,0,0" />
<Button Content="Aktualisieren" Grid.Column="5" Margin="5,0,0,0" Click="buttonRefresh_Click" />
<Button Content="Optionen anzeigen" Grid.Column="9" Margin="5,0,0,0" x:Name="ButtonShowOptions" Click="ButtonShowOptions_Click" />
<Button Content="Ansicht speichern" Grid.Column="10" Margin="5,0,0,0" x:Name="ButtonLayoutSave" Click="ButtonLayoutSave_Click" />
<Button Content="Ansicht bearbeiten" Grid.Column="11" Margin="5,0,0,0" x:Name="ButtonLayoutEdit" Click="ButtonLayoutEdit_Click" />
<Button Content="Ansicht laden" Grid.Column="12" Margin="5,0,0,0" x:Name="ButtonLayoutLoad" Click="ButtonLayoutLoad_Click" />
<Button Content="Ansicht drucken" Grid.Column="13" Margin="5,0,0,0" x:Name="ButtonLayoutPrint" Click="ButtonLayoutPrint_Click" />
</Grid>
<!-- ############################################### Mittlere Zeile ###############################################-->
<Grid Grid.Row="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<CheckBox Content="Reduzierte Ansicht" Margin="5,5,0,0" Grid.Column="4" x:Name="checkReduzierteAnsicht"/>
<CheckBox Content="Differenz Balken einblenden" Grid.Column="7" Margin="5,5,0,0" x:Name="checkBoxDataPer" Checked="CheckDataBarPerChanged" Unchecked="CheckDataBarPerChanged"/>
<CheckBox Content="Prozentuale Abweichung Balken einblenden" Grid.Column="8" Margin="5,5,0,0" x:Name="checkBoxData" Checked="CheckDataBarChanged" Unchecked="CheckDataBarChanged"/>
<CheckBox Content="Graph einblenden" Grid.Column="9" Margin="5,5,0,0" x:Name="checkBoxChart" Checked="CheckChartChanged" Unchecked="CheckChartChanged"/>
</Grid>
<!-- ############################################### Untere Zeile ###############################################-->
<Grid Grid.Row="2">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<CheckBox Content="Hilfepläne" Grid.Column="0" Margin="5,5,0,0" x:Name="checkHilepläne"/>
<CheckBox Content="Klienten" Grid.Column="1" Margin="5,5,0,0" x:Name="checkKlienten"/>
<CheckBox Content="Mitarbeiter" Grid.Column="2" Margin="5,5,0,0" x:Name="checkMitarbeiter"/>
<CheckBox Content="Records" Grid.Column="3" Margin="5,5,0,0" x:Name="checkRecords"/>
<CheckBox Content="Betrag" Grid.Column="4" Margin="5,5,0,0" x:Name="checkBetrag"/>
<CheckBox Content="Kilometer" Grid.Column="5" Margin="5,5,0,0" x:Name="checkKilometer"/>
<CheckBox Content="Ist" Grid.Column="6" Margin="5,5,0,0" x:Name="checkIst"/>
<CheckBox Content="Soll" Grid.Column="7" Margin="5,5,0,0" x:Name="checkSoll"/>
</Grid>
<!-- ############################################### PivotGridControl ###############################################-->
<Grid Grid.Row="3">
<Grid.Resources>
</Grid.Resources>
<dxlc:LayoutControl x:Name="mainLayout" AllowItemSizing="True" Padding="12" Orientation="Vertical">
<dxlc:LayoutGroup x:Name="LayoutGroupPivotGrid" dxlc:LayoutControl.AllowVerticalSizing="True" Margin="0,0,0,4">
<dxpg:PivotGridControl x:Name="myPivotGridControl" RowTreeWidth="225" Visibility="Visible" DataProcessingEngine="LegacyOptimized" Margin="0,10,0,0" dx:ThemeManager.ThemeName="Office2010Black" CustomCellDisplayText="GridControl_CustomCellDisplayText" CustomFieldValueCells="GridControl_CustomFieldValueCells"
ChartProvideDataByColumns="False" ChartSelectionOnly="True" ChartProvideColumnGrandTotals="False" ChartProvideRowGrandTotals="True" ChartDataProvideMode="UseCustomSettings" CustomValueAppearance="MyPivotGridControl_CustomValueAppearance" CustomCellAppearance="MyPivotGridControl_CustomCellAppearance"
CustomGroupInterval="MyPivotGridControl_CustomGroupInterval" CustomFieldSort="MyPivotGridControl_CustomFieldSort" CellDoubleClick="MyPivotGridControl_CellDoubleClick">
<dxpg:PivotGridControl.ExcelFieldListState>
<dx:DefaultColumnChooserState Size="400,550" />
</dxpg:PivotGridControl.ExcelFieldListState>
<dxpg:PivotGridControl.Fields>
<dxpg:PivotGridField x:Name="FlexibleJahr" FieldName="StartDatum" Area="ColumnArea" Width="100" Caption="Jahr" AllowedAreas="ColumnArea,FilterArea" DisplayFolder="Spalten" Visible="False" GroupInterval="DateYear" />
<dxpg:PivotGridField x:Name="FlexibleMonat" FieldName="StartDatum" Area="ColumnArea" Width="80" Caption="Monat" AllowedAreas="ColumnArea,FilterArea" DisplayFolder="Spalten" GroupInterval="DateMonth" />
<dxpg:PivotGridField x:Name="FlexibleWeek" FieldName="StartDatum" Area="ColumnArea" Width="80" Caption="Woche" AllowedAreas="ColumnArea,FilterArea" DisplayFolder="Spalten" GroupInterval="DateWeekOfYear" ValueFormat="KW {0}" />
<dxpg:PivotGridField x:Name="FlexibleDatum" FieldName="StartDatum" Area="FilterArea" Width="100" Caption="Datum" AllowedAreas="ColumnArea,FilterArea" DisplayFolder="Spalten" Visible="False" GroupInterval="Custom" />
<dxpg:PivotGridField x:Name="FlexibleQuarter" FieldName="StartDatum" Area="FilterArea" Width="100" Caption="Quartal" AllowedAreas="ColumnArea,FilterArea" DisplayFolder="Spalten" Visible="False" GroupInterval="DateQuarter" />
<dxpg:PivotGridField x:Name="FlexibleTag" FieldName="StartDatum" Area="FilterArea" Width="40" Caption="Tag" AllowedAreas="ColumnArea,FilterArea" DisplayFolder="Spalten" Visible="False" GroupInterval="DateDay" />
<dxpg:PivotGridField x:Name="FlexibleTagYear" FieldName="StartDatum" Area="FilterArea" Width="40" Caption="Tag Jahr" AllowedAreas="ColumnArea,FilterArea" DisplayFolder="Spalten" Visible="False" GroupInterval="DateDayOfYear" />
<dxpg:PivotGridField x:Name="FlexibleKlient" FieldName="CustomerString" Area="RowArea" Width="200" Caption="Klient" AllowedAreas="RowArea,FilterArea" DisplayFolder="Zeilen" AreaIndex="2" Height="21" SortOrder="Ascending" />
<dxpg:PivotGridField x:Name="FlexibleSupportConcept" FieldName="SupportConceptString" Area="FilterArea" Width="200" Caption="Hilfeplan" AllowedAreas="RowArea,FilterArea" DisplayFolder="Zeilen" Visible="False" />
<dxpg:PivotGridField x:Name="FlexibleMitarbeiter" FieldName="EmployeeString" Area="RowArea" Width="200" Caption="Mitarbeiter" AllowedAreas="RowArea,FilterArea" DisplayFolder="Zeilen" AreaIndex="1" />
<dxpg:PivotGridField x:Name="FlexibleTeam" FieldName="Team" Area="FilterArea" Width="200" Caption="Team" AllowedAreas="RowArea,FilterArea" DisplayFolder="Zeilen" Visible="False" />
<dxpg:PivotGridField x:Name="FlexibleLeistungskategorie" FieldName="Leistungskategorie" Area="FilterArea" Width="200" Caption="Leistungskategorie" AllowedAreas="RowArea,FilterArea" DisplayFolder="Zeilen" Visible="False" />
<dxpg:PivotGridField x:Name="FlexibleLeistung" FieldName="Leistung" Area="FilterArea" Width="200" Caption="Leistung" AllowedAreas="RowArea,FilterArea" DisplayFolder="Zeilen" Visible="False" />
<dxpg:PivotGridField x:Name="FlexibleOrganisation" FieldName="Organisation" Area="FilterArea" Width="200" Caption="Kostenträger" AllowedAreas="RowArea,FilterArea" DisplayFolder="Zeilen" Visible="False" />
<dxpg:PivotGridField x:Name="FlexibleAnzahlMinIst" FieldName="IstMinuten" Area="FilterArea" Width="60" Caption="Ist Min." AllowedAreas="DataArea,FilterArea" DisplayFolder="Data" Visible="False" />
<dxpg:PivotGridField x:Name="FlexibleAnzahlStdIst" FieldName="IstStunden" Area="DataArea" Width="80" Caption="Ist Std." AllowedAreas="DataArea,FilterArea" DisplayFolder="Data" />
<dxpg:PivotGridField x:Name="FlexibleAnzahlMinSoll" FieldName="SollMinuten" Area="FilterArea" Width="60" Caption="Soll Min." AllowedAreas="DataArea,FilterArea" DisplayFolder="Data" Visible="False" />
<dxpg:PivotGridField x:Name="FlexibleAnzahlStdSoll" FieldName="SollStunden" Area="DataArea" Width="80" Caption="Soll Std." AllowedAreas="DataArea,FilterArea" DisplayFolder="Data" />
<dxpg:PivotGridField x:Name="FlexibleGefahreneKilometer" FieldName="Kilometer" Area="FilterArea" Width="200" Caption="Gefahrene Kilometer" AllowedAreas="DataArea,FilterArea" DisplayFolder="Data" Visible="False" />
<dxpg:PivotGridField x:Name="FlexibleBetrag" FieldName="Betrag" Area="FilterArea" Width="80" Caption="Betrag" AllowedAreas="DataArea,FilterArea" DisplayFolder="Data" Visible="False" />
<dxpg:PivotGridField x:Name="FlexibleStundensatz" FieldName="Stundensatz" Area="FilterArea" Width="80" Caption="Stundensatz" AllowedAreas="DataArea,FilterArea" DisplayFolder="Data" Visible="False" />
<dxpg:PivotGridField x:Name="FlexibleRundungspotenzial" FieldName="Rundungspotenzial" Area="FilterArea" Width="80" Caption="Rundungspotenzial" AllowedAreas="DataArea,FilterArea" DisplayFolder="Data" Visible="False" />
<dxpg:PivotGridField x:Name="FlexibleDifferenzIstSollMin" FieldName="DifferenzIstSollMinuten" Area="FilterArea" Width="80" Caption="Differenz Min." AllowedAreas="DataArea,FilterArea" DisplayFolder="Data" Visible="False" HideEmptyVariationItems="True" />
<dxpg:PivotGridField x:Name="FlexibleDifferenzIstSollStd" FieldName="DifferenzIstSollStunden" Area="DataArea" Width="80" Caption="Differenz Std." AllowedAreas="DataArea,FilterArea" DisplayFolder="Data" Visible="False" HideEmptyVariationItems="True" />
<dxpg:PivotGridField x:Name="UFlexibleProzentualeAbweichung" UnboundFieldName="ProzAbweichung" Area="DataArea" Width="80" Caption="Prozentual Abweichung" AllowedAreas="DataArea,FilterArea" DisplayFolder="Data"/>
</dxpg:PivotGridControl.Fields>
</dxpg:PivotGridControl>
</dxlc:LayoutGroup>
<!-- ############################################### ChartControl ###############################################-->
<dxlc:LayoutGroup x:Name="LayoutGroupPivotChart">
<dxc:ChartControl Name="ChartControl" DataSource="{Binding ElementName=myPivotGridControl, Path=ChartDataSource}" Visibility="Collapsed" dx:ThemeManager.ThemeName="Office2010Black" >
<dxc:ChartControl.CrosshairOptions>
<dxc:CrosshairOptions ShowArgumentLine="False"/>
</dxc:ChartControl.CrosshairOptions>
<dxc:ChartControl.Legend>
<dxc:Legend ReverseItems="True"/>
</dxc:ChartControl.Legend>
<dxc:XYDiagram2D>
<dxc:XYDiagram2D.AxisY>
<dxc:AxisY2D Visible="True"/>
</dxc:XYDiagram2D.AxisY>
<dxc:XYDiagram2D.AxisX>
<dxc:AxisX2D Visible="True"/>
</dxc:XYDiagram2D.AxisX>
</dxc:XYDiagram2D>
</dxc:ChartControl>
</dxlc:LayoutGroup>
</dxlc:LayoutControl>
</Grid>
</Grid>
</GroupBox>
</Grid>
</localView:BeWoView>

View File

@@ -28,6 +28,10 @@ using MessageBox = System.Windows.MessageBox;
using BeWo.Data.Access;
using DevExpress.XtraReports.UI;
using DevExpress.Data.PivotGrid;
using System.Windows.Media;
using BeWo.Core.Service;
using DevExpress.Utils.Gesture;
using DevExpress.Xpf.Core.Native;
namespace BeWo.View.Detail.Report
{
@@ -60,22 +64,32 @@ namespace BeWo.View.Detail.Report
FlexibleGefahreneKilometer.CellFormat = "{0:N0}";
FlexibleRundungspotenzial.CellFormat = "{0:N0}";
UFlexibleProzentualeAbweichung.UnboundExpressionMode = FieldUnboundExpressionMode.UseAggregateFunctions;
UFlexibleProzentualeAbweichung.UnboundType = FieldUnboundColumnType.Decimal;
UFlexibleProzentualeAbweichung.CellFormat = "{0:P2}";
UFlexibleProzentualeAbweichung.UnboundExpression = string.Format("SUM([{0}]) / SUM([{1}])", FlexibleAnzahlStdIst.ExpressionFieldName, FlexibleAnzahlStdSoll.ExpressionFieldName);
UFlexibleProzentualeAbweichung.SummaryType = FieldSummaryType.Average;
FlexibleStundensatz.SummaryType = FieldSummaryType.Average;
FlexibleGefahreneKilometer.CellFormat = "{0:N0}";
FlexibleKlient.TotalValueFormat = "{0}";
FlexibleMitarbeiter.TotalValueFormat = "{0}";
FlexibleLeistung.TotalValueFormat = "{0}";
FlexibleLeistungskategorie.TotalValueFormat = "{0}";
FlexibleQuarter.ValueFormat = "{0}. Quartal";
datePickerStartDate.DateTime = new DateTime(DateTime.Now.Year, DateTime.Now.Month, 1);
datePickerEndDate.DateTime = new DateTime(DateTime.Now.Year, DateTime.Now.Month, 1).AddMonths(1).AddDays(-1);
UFlexibleProzentualeAbweichung.UnboundExpressionMode = FieldUnboundExpressionMode.UseAggregateFunctions;
UFlexibleProzentualeAbweichung.UnboundType = FieldUnboundColumnType.Decimal;
UFlexibleProzentualeAbweichung.CellFormat = "{0:P2}";
UFlexibleProzentualeAbweichung.UnboundExpression = $"SUM([{FlexibleAnzahlStdIst.ExpressionFieldName}]) / SUM([{FlexibleAnzahlStdSoll.ExpressionFieldName}])";
UFlexibleProzentualeAbweichung.SummaryType = FieldSummaryType.Average;
FlexibleStundensatz.SummaryType = FieldSummaryType.Average;
FlexibleDatum.SortMode = FieldSortMode.Custom;
datePickerEndDate.AllowNullInput = false;
datePickerStartDate.AllowNullInput = false;
var i = new DateTime(DateTime.Now.Year, DateTime.Now.Month, 1);
datePickerStartDate.DateTime = i;
datePickerEndDate.DateTime = i.AddMonths(1).AddDays(-1);
datePickerStartDate.DateTime = new DateTime(2019, 7, 1);
datePickerEndDate.DateTime = new DateTime(2019, 8, 1).AddDays(-1);
myPivotGridControl.PrintColumnHeaders = false;
myPivotGridControl.PrintRowHeaders = false;
@@ -83,6 +97,26 @@ namespace BeWo.View.Detail.Report
myPivotGridControl.PrintDataHeaders = false;
myPivotGridControl.PrintUnusedFilterFields = false;
myPivotGridControl.PrintHeadersOnEveryPage = false;
myPivotGridControl.AllowCustomizationForm = true;
myPivotGridControl.FieldListIncludeVisibleFields = true;
myPivotGridControl.GroupFieldsInFieldList = true;
checkBetrag.IsChecked = true;
checkHilepläne.IsChecked = true;
checkIst.IsChecked = true;
checkKilometer.IsChecked = true;
checkKlienten.IsChecked = true;
checkMitarbeiter.IsChecked = true;
checkRecords.IsChecked = true;
checkSoll.IsChecked = true;
LayoutGroupPivotChart.IsCollapsible = true;
LayoutGroupPivotChart.Visibility = Visibility.Collapsed;
DocTypes = Cache.GetInstance().GetAllValueListEntrysByTypeSync(ValueListEntryType.DocumentType);
DocTypes.Sort((a, b) => a.ValueListEntryOid.Value.CompareTo(b.ValueListEntryOid.Value));
}
#endregion
@@ -93,36 +127,39 @@ namespace BeWo.View.Detail.Report
{
StartDatum = datePickerStartDate.DateTime,
EndDatum = datePickerEndDate.DateTime,
ReduzierteAnsicht = checkReduzierteAnsicht.IsChecked.Value
ReduzierteAnsicht = checkReduzierteAnsicht.IsChecked,
AlleHilfeplaneAnzeigen = checkHilepläne.IsChecked,
AlleKlientenAnzeigen = checkKlienten.IsChecked,
AlleMitarbeiterAnzeigen = checkMitarbeiter.IsChecked,
AlleServiceBerichteAnzeigen = checkRecords.IsChecked,
BetragAnzeigen = checkBetrag.IsChecked,
GefahreneKilometerAnzeigen = checkKilometer.IsChecked,
IstAnzeigen = checkIst.IsChecked,
SollAnzeigen = checkSoll.IsChecked
};
ServiceFacade.DoOperationsServiceAsync(
s => s.GetFlexibleReportResult(filter),
r =>
r => this.Dispatch(delegate
{
this.Dispatch(delegate
{
var liste = new List<FlexibleReportEntry>();
var liste = new List<FlexibleReportEntry>();
if (r.Entries != null)
foreach (var item in r.Entries)
{
liste.Add(FlexibleReportEntry.InitByFlexibleReportEntryDC(item));
}
if (r.Entries != null) liste.AddRange(r.Entries.Select(FlexibleReportEntry.InitByFlexibleReportEntryDC));
if (r.Dummies != null)
foreach (var item in r.Dummies)
{
liste.AddRange(FlexibleReportEntry.InitByFlexibleReportDummyDC(item));
}
if (r.Dummies != null)
foreach (var item in r.Dummies)
liste.AddRange(FlexibleReportEntry.InitByFlexibleReportDummyDC(item));
if (r.Employees != null)
liste.AddRange(FlexibleReportEntry.InitByFlexibleReportEmployeeDictornary(r.Employees, filter.StartDatum));
if (r.Employees != null)
liste.AddRange(FlexibleReportEntry.InitByFlexibleReportDictornary(r.Employees, filter.StartDatum, filter.EndDatum, filter.ReduzierteAnsicht.HasValue && filter.ReduzierteAnsicht.Value, true));
myPivotGridControl.DataSource = liste;
checkBoxChart.IsEnabled = true;
});
});
if (r.Customers != null)
liste.AddRange(FlexibleReportEntry.InitByFlexibleReportDictornary(r.Customers, filter.StartDatum, filter.EndDatum, filter.ReduzierteAnsicht.HasValue && filter.ReduzierteAnsicht.Value, false));
myPivotGridControl.DataSource = liste;
checkBoxChart.IsEnabled = true;
}));
}
private void GridControl_CustomCellDisplayText(object sender, PivotCellDisplayTextEventArgs e)
@@ -135,7 +172,7 @@ namespace BeWo.View.Detail.Report
}
}
if (e.Value != null && decimal.TryParse(e.Value.ToString(), out decimal d) && d == 0)
if (e.Value != null && decimal.TryParse(e.Value.ToString(), out decimal d) && d == 0)
e.DisplayText = "";
if (e.DisplayText == "Fehler")
e.DisplayText = "";
@@ -143,7 +180,7 @@ namespace BeWo.View.Detail.Report
private void GridControl_CustomFieldValueCells(object sender, PivotCustomFieldValueCellsEventArgs e)
{
PivotGridControl pivot = (PivotGridControl)sender;
var pivot = (PivotGridControl)sender;
if (pivot.DataSource == null)
return;
@@ -172,30 +209,35 @@ namespace BeWo.View.Detail.Report
private void CheckChartChanged(object sender, RoutedEventArgs e)
{
if (myPivotGridControl.DataSource != null)
if (myPivotGridControl.DataSource == null) return;
if (!checkBoxChart.IsChecked.HasValue) return;
ChartControl.Visibility = checkBoxChart.IsChecked.Value ? Visibility.Visible : Visibility.Collapsed;
LayoutGroupPivotChart.Visibility = checkBoxChart.IsChecked.Value ? Visibility.Visible : Visibility.Collapsed;
if (ChartControl.Visibility == Visibility.Visible)
{
ChartControl.Visibility = checkBoxChart.IsChecked.Value ? Visibility.Visible : Visibility.Collapsed;
if (ChartControl.Visibility == Visibility.Visible)
{
InitChart();
}
InitChart();
}
else
{
LayoutGroupPivotGrid.Height = double.NaN;
}
}
private void CheckDataBarChanged(object sender, RoutedEventArgs e)
{
if (myPivotGridControl.DataSource != null)
{
var conditions = CreateDataBarConditions(_Columns, _Rows, _DataDiff, "GreenSolidDataBar");
if (!checkBoxData.IsChecked.HasValue) return;
if (myPivotGridControl.DataSource == null) return;
if (checkBoxData.IsChecked.Value)
{
myPivotGridControl.FormatConditions.AddRange(conditions);
}
else
{
myPivotGridControl.FormatConditions.RemoveRange(conditions);
}
var conditions = CreateDataBarConditions(_Columns, _Rows, _DataDiff, "GreenSolidDataBar");
if (checkBoxData.IsChecked.Value)
{
myPivotGridControl.FormatConditions.AddRange(conditions);
}
else
{
myPivotGridControl.FormatConditions.RemoveRange(conditions);
}
}
@@ -204,25 +246,20 @@ namespace BeWo.View.Detail.Report
var control = new FlexibleReportLayoutSaveControl();
var beWoWindow = new BeWoWindow();
control.CancelButtonClicked += delegate
{
beWoWindow.Close();
};
control.CancelButtonClicked += () => beWoWindow.Close();
control.SaveButtonClicked += delegate
{
var liste = new List<FlexibleReportLayout>();
ServiceFacade.DoOperationsServiceAsync(
s => s.GetFlexibleReportLayouts(),
r =>
r => this.Dispatch(delegate
{
this.Dispatch(delegate
foreach (var item in r)
{
foreach (var item in r)
{
liste.Add(FlexibleReportLayout.InitByFlexibleReportLayoutDC(item));
}
});
});
liste.Add(FlexibleReportLayout.InitByFlexibleReportLayoutDC(item));
}
}));
if (string.IsNullOrWhiteSpace(control.LayoutName))
{
@@ -259,9 +296,17 @@ namespace BeWo.View.Detail.Report
private void ButtonLayoutLoad_Click(object sender, RoutedEventArgs e)
{
var control = new FlexibleReportLayoutListControl();
var beWoWindow = new BeWoWindow();
var beWoWindow = new BeWoWindow
{
rootGroupBox = {Header = "Layout Laden"},
Height = 500,
Width = 500,
WindowStartupLocation = WindowStartupLocation.CenterOwner,
GroupBoxContent = control,
Owner = BeWoApp.CurrentBeWo.MainWindow
};
beWoWindow.rootGroupBox.Header = "Layout Laden";
control.DatagridRegions.Columns.Remove(control.LayoutDeleteColumn);
control.LayoutNameColumn.ReadOnly = true;
control.ActionButton.Content = "Laden";
@@ -277,10 +322,7 @@ namespace BeWo.View.Detail.Report
beWoWindow.Close();
};
control.CancelButtonClicked += delegate
{
beWoWindow.Close();
};
control.CancelButtonClicked += () => beWoWindow.Close();
control.MouseDoubleClick += delegate
{
@@ -292,22 +334,24 @@ namespace BeWo.View.Detail.Report
LayoutString = control.SelectedLayout.LayoutString;
beWoWindow.Close();
};
beWoWindow.Height = 500;
beWoWindow.Width = 500;
beWoWindow.WindowStartupLocation = WindowStartupLocation.CenterOwner;
beWoWindow.GroupBoxContent = control;
beWoWindow.Owner = BeWoApp.CurrentBeWo.MainWindow;
beWoWindow.ShowDialog();
}
private void ButtonLayoutEdit_Click(object sender, RoutedEventArgs e)
{
var control = new FlexibleReportLayoutListControl();
var beWoWindow = new BeWoWindow();
var beWoWindow = new BeWoWindow
{
rootGroupBox = {Header = "Layout(s) bearbeiten"},
Height = 500,
Width = 500,
WindowStartupLocation = WindowStartupLocation.CenterOwner,
GroupBoxContent = control,
Owner = BeWoApp.CurrentBeWo.MainWindow
};
beWoWindow.rootGroupBox.Header = "Layout(s) bearbeiten";
control.ActionButton.Content = "Speichern";
control.ActionButtonClicked += delegate
{
@@ -321,123 +365,128 @@ namespace BeWo.View.Detail.Report
control.CancelButtonClicked += delegate
{
if (control.IsDirty)
if (!control.IsDirty) return;
var result = MessageBox.Show("Möchten Sie die Änderung(en) verwerfen?", "BeWoPlaner", MessageBoxButton.YesNoCancel, MessageBoxImage.Question);
switch (result)
{
var result = MessageBox.Show("Möchten Sie die Änderung(en) verwerfen?", "BeWoPlaner", MessageBoxButton.YesNoCancel, MessageBoxImage.Question);
switch (result)
{
case MessageBoxResult.None:
return;
case MessageBoxResult.Cancel:
return;
case MessageBoxResult.Yes:
control.Save();
beWoWindow.Close();
break;
case MessageBoxResult.No:
beWoWindow.Close();
break;
default:
return;
}
return;
case MessageBoxResult.None:
return;
case MessageBoxResult.Cancel:
return;
case MessageBoxResult.Yes:
control.Save();
beWoWindow.Close();
break;
case MessageBoxResult.No:
beWoWindow.Close();
break;
case MessageBoxResult.OK:
return;
default:
return;
}
};
beWoWindow.Height = 500;
beWoWindow.Width = 500;
beWoWindow.WindowStartupLocation = WindowStartupLocation.CenterOwner;
beWoWindow.GroupBoxContent = control;
beWoWindow.Owner = BeWoApp.CurrentBeWo.MainWindow;
beWoWindow.ShowDialog();
}
private void MyPivotGridControl_CustomCellAppearance(object sender, PivotCustomCellAppearanceEventArgs e)
{
if (e.ColumnValueType == FieldValueType.Total || e.RowValueType == FieldValueType.Total)
e.Background = e.Selected
? new SolidColorBrush(Color.FromArgb(180, 193, 180, 120))
: new SolidColorBrush(Color.FromArgb(60, 150, 150, 150));
if (e.ColumnValueType == FieldValueType.GrandTotal || e.RowValueType == FieldValueType.GrandTotal)
e.Background = e.Selected
? new SolidColorBrush(Color.FromArgb(180, 191, 168, 66))
: new SolidColorBrush(Color.FromArgb(60, 120, 120, 120));
}
private void CheckDataBarPerChanged(object sender, RoutedEventArgs e)
{
if (myPivotGridControl.DataSource != null)
{
var conditions = CreateDataBarConditions(_Columns, _Rows, _DataPer, "BlueSolidDataBar", 0, 1);
if (myPivotGridControl.DataSource == null) return;
if (!checkBoxDataPer.IsChecked.HasValue) return;
if (checkBoxDataPer.IsChecked.Value)
{
myPivotGridControl.FormatConditions.AddRange(conditions);
}
else
{
myPivotGridControl.FormatConditions.RemoveRange(conditions);
}
var conditions = CreateDataBarConditions(_Columns, _Rows, _DataPer, "BlueSolidDataBar", 0, 1);
if (checkBoxDataPer.IsChecked.Value)
{
myPivotGridControl.FormatConditions.AddRange(conditions);
}
else
{
myPivotGridControl.FormatConditions.RemoveRange(conditions);
}
}
private void ButtonLayoutPrint_Click(object sender, RoutedEventArgs e)
{
var report = new PivotGridReport();
var reportPivotGrid = (XRPivotGrid)report.FindControl("xrPivotGrid1", true);
myPivotGridControl.ShowPrintPreviewDialog(Window.GetWindow(this));
}
private void MyPivotGridControl_CustomGroupInterval(object sender, PivotCustomGroupIntervalEventArgs e)
{
e.GroupValue = ((DateTime)e.Value).ToString("ddd, dd.MM.yyyy");
}
myPivotGridControl.SavePivotGridToFile(@"D:\icf\test.dat");
reportPivotGrid.DataSource = new PivotFileDataSource(@"D:\icf\test.dat");
private void MyPivotGridControl_CustomFieldSort(object sender, PivotCustomFieldSortEventArgs e)
{
if (e.Field != FlexibleDatum) return;
if (e.Value1 == null || e.Value2 == null)
return;
reportPivotGrid.Fields.Clear();
foreach (var item in myPivotGridControl.Fields)
DateTime d1 = Convert.ToDateTime(e.Value1.ToString().Split(' ')[1]);
DateTime d2 = Convert.ToDateTime(e.Value2.ToString().Split(' ')[1]);
if (d1 > d2)
e.Result = 1;
else if (d1 == d2)
e.Result = 0;
else
e.Result = -1;
e.Handled = true;
}
private void ButtonShowOptions_Click(object sender, RoutedEventArgs e)
{
myPivotGridControl.IsFieldListVisible = true;
}
private void MyPivotGridControl_CellDoubleClick(object sender, PivotCellEventArgs e)
{
var selectedEntries = e.CreateDrillDownDataSource()
.Cast<PivotDrillDownDataRow>()
.Select(row => ActualFlexibleReportEntries[row.ListSourceRowIndex])
.Where(item => item.Type == FlexibleReportEntryType.ServiceRecordEntry)
.ToList();
if(selectedEntries.Count > 0)
{
if (item.Area != FieldArea.FilterArea)
var beWoWindow = new BeWoWindow
{
var field = new DevExpress.XtraReports.UI.PivotGrid.XRPivotGridField();
field.Area = GetArea(item.Area);
field.Caption = item.Caption;
field.Name = item.Name;
field.FieldName = item.FieldName;
field.GroupInterval = GetGroupInterval(item.GroupInterval);
field.AreaIndex = item.AreaIndex;
field.Width = (int)item.Width;
field.ValueFormat.FormatString = item.ValueFormat;
field.CellFormat.FormatType = DevExpress.Utils.FormatType.Custom;
field.CellFormat.FormatString = item.CellFormat;
field.SortOrder = (DevExpress.XtraPivotGrid.PivotSortOrder)((int)item.SortOrder);
field.SortMode = (DevExpress.XtraPivotGrid.PivotSortMode)((int)item.SortMode);
Height = 500,
Width = 1500,
WindowStartupLocation = WindowStartupLocation.CenterOwner,
GroupBoxContent = new FlexibleReportEntryDetail(selectedEntries, DocTypes),
Owner = BeWoApp.CurrentBeWo.MainWindow,
rootGroupBox = {Header = "Eintrag Details"}
};
if (item.UnboundType != FieldUnboundColumnType.Bound)
{
field.UnboundType = DevExpress.Data.UnboundColumnType.Decimal;
field.UnboundExpression = item.UnboundExpression;
field.UnboundExpressionMode = DevExpress.XtraPivotGrid.UnboundExpressionMode.UseAggregateFunctions;
field.SummaryType = PivotSummaryType.Average;
}
reportPivotGrid.Fields.Add(field);
}
beWoWindow.ShowDialog();
}
else
{
MessageBox.Show("Hier befindet sich keine Zeiterfassung!", "BeWoPlaner", MessageBoxButton.OK, MessageBoxImage.Stop);
}
reportPivotGrid.OptionsView.ShowDataHeaders = false;
reportPivotGrid.OptionsView.ShowColumnHeaders = false;
reportPivotGrid.BestFit();
report.CreateDocument();
var documentPreviewControl = new DocumentPreviewControl { CommandBarStyle = DevExpress.Xpf.DocumentViewer.CommandBarStyle.Bars };
documentPreviewControl.Loaded += BeWoUtils.CustomizeReportPreviewToolBar;
var window = new BeWoWindow { GroupBoxContent = documentPreviewControl, Owner = BeWoApp.CurrentBeWo.MainWindow };
ThemeManager.SetTheme(window, Theme.Office2010Black);
ThemeManager.SetTheme(documentPreviewControl, Theme.Office2007Black);
documentPreviewControl.DocumentSource = report;
window.rootGroupBox.Header = "Druckvorschau";
window.Title = "Druckvorschau";
window.Show();
documentPreviewControl.Visibility = Visibility.Visible;
}
#endregion
#region Proterties
public List<ValueListEntryDC> DocTypes { get; set; }
public string LayoutString
{
get
@@ -456,12 +505,15 @@ namespace BeWo.View.Detail.Report
}
}
}
public List<FlexibleReportEntry> ActualFlexibleReportEntries => myPivotGridControl?.DataSource as List<FlexibleReportEntry>;
#endregion
#region Methoden
private void InitChart()
{
ChartControl.Diagram = ChartFactory.GenerateDiagram(typeof(BarStackedSeries2D), false);
ChartControl.Diagram = ChartFactory.GenerateDiagram(typeof(AreaSeries2D), false);
}
private IEnumerable<DataBarFormatCondition> CreateDataBarConditions(List<string> columns, List<string> rows, List<string> datas, string formatName)
@@ -510,7 +562,6 @@ namespace BeWo.View.Detail.Report
}
}
private DevExpress.XtraPivotGrid.PivotGroupInterval GetGroupInterval(FieldGroupInterval groupInterval)
{
switch (groupInterval)
@@ -548,6 +599,8 @@ namespace BeWo.View.Detail.Report
#region Classes
public class FlexibleReportEntry
{
public long? ServiceRecordOid { get; set; }
public long? CustomerOid { get; set; }
public string CustomerString { get; set; }
@@ -566,15 +619,13 @@ namespace BeWo.View.Detail.Report
public string Leistung { get; set; }
public decimal AnzahlMinutenIst { get; set; }
public decimal? IstMinuten { get; set; }
public decimal AnzahlStundenIst { get { return AnzahlMinutenIst / 60; } }
public decimal? SollMinuten { get; set; }
public decimal? AnzahlMinutenSoll { get; set; }
public DateTime StartDatum { get; set; }
public decimal? AnzahlStundenSoll { get { return AnzahlMinutenSoll / 60; } }
public DateTime Datum { get; set; }
public DateTime EndDatum { get; set; }
public FlexibleReportEntryType Type { get; set; }
@@ -586,46 +637,56 @@ namespace BeWo.View.Detail.Report
public decimal Rundungspotenzial { get; set; }
public decimal? DifferenzIstSollMinuten { get { return AnzahlMinutenIst - AnzahlMinutenSoll; } }
public decimal? DifferenzIstSollStunden { get { return DifferenzIstSollMinuten / 60; } }
public string Organisation { get; set; }
public string Notice { get; set; }
public string Notice2 { get; set; }
public string Notice3 { get; set; }
public string Notice4 { get; set; }
public string Notice5 { get; set; }
public decimal? IstStunden => IstMinuten / 60;
public decimal? SollStunden => SollMinuten / 60;
public decimal DifferenzIstSollMinuten => (IstMinuten ?? 0) - (SollMinuten ?? 0);
public decimal DifferenzIstSollStunden => DifferenzIstSollMinuten / 60;
public static FlexibleReportEntry InitByFlexibleReportEntryDC(FlexibleReportEntryDC entryDC)
{
var entry = new FlexibleReportEntry()
{
ServiceRecordOid = entryDC.ServiceRecordOid,
CustomerOid = entryDC.CustomerOid,
CustomerString = entryDC.CustomerString ?? "<Nicht angegeben>",
EmployeeOid = entryDC.EmployeeOid,
EmployeeString = entryDC.EmployeeString ?? "<Nicht angegeben>",
SupportConceptOid = entryDC.SupportConceptOid,
AnzahlMinutenIst = entryDC.AnzahlMinuten,
Datum = entryDC.StartDatum,
SupportConceptString = entryDC.SupportConceptString ?? "<Nicht angegeben>",
IstMinuten = entryDC.IstMinuten,
StartDatum = entryDC.StartDatum,
EndDatum = entryDC.EndDatum,
Leistung = entryDC.Leistung,
Leistungskategorie = entryDC.Leistungskategorie,
Team = entryDC.Team,
AnzahlMinutenSoll = entryDC.AnzahlMinutenSoll,
Type = entryDC.Type,
SollMinuten = entryDC.SollMinuten,
Type = FlexibleReportEntryType.ServiceRecordEntry,
Kilometer = entryDC.Kilometer,
Organisation = entryDC.Organisation,
Rundungspotenzial = entryDC.AnzahlMinuten - ((decimal)entryDC.EndDatum.Subtract(entryDC.StartDatum).TotalMinutes),
Rundungspotenzial = (entryDC.IstMinuten ?? 0) - ((decimal)entryDC.EndDatum.Subtract(entryDC.StartDatum).TotalMinutes),
Betrag = entryDC.Betrag,
Stundensatz = entryDC.Stundensatz
Stundensatz = entryDC.Stundensatz,
Notice = entryDC.Notice,
Notice2 = entryDC.Notice2,
Notice3 = entryDC.Notice3,
Notice4 = entryDC.Notice4,
Notice5 = entryDC.Notice5,
};
if (entryDC.Type == FlexibleReportEntryType.ServiceRecordEntry)
{
entry.CustomerString = entryDC.CustomerString == null ? "<Nicht angegeben>" : entryDC.CustomerString;
entry.EmployeeString = entryDC.EmployeeString == null ? "<Nicht angegeben>" : entryDC.EmployeeString;
entry.SupportConceptString = entryDC.SupportConceptString == null ? "<Nicht angegeben>" : entryDC.SupportConceptString;
}
else
{
entry.CustomerString = null;
entry.EmployeeString = null;
entry.SupportConceptString = null;
}
return entry;
}
@@ -637,12 +698,13 @@ namespace BeWo.View.Detail.Report
{
flexibleReports.Add(new FlexibleReportEntry()
{
AnzahlMinutenSoll = dummyDC.Soll,
AnzahlMinutenIst = 0m,
SollMinuten = dummyDC.Soll ?? 0,
IstMinuten = 0m,
Betrag = 0,
CustomerOid = dummyDC.CustomerOid,
CustomerString = dummyDC.CustomerString,
Datum = date,
StartDatum = date,
EndDatum = dummyDC.EndDate,
EmployeeOid = dummyDC.EmployeeOid,
EmployeeString = dummyDC.EmployeeString,
Kilometer = null,
@@ -654,30 +716,54 @@ namespace BeWo.View.Detail.Report
SupportConceptOid = dummyDC.SupportConceptOid,
SupportConceptString = dummyDC.SupportConceptString,
Team = null,
Type = dummyDC.EntryType
Type = FlexibleReportEntryType.SupportConceptEntry
});
}
return flexibleReports;
}
public static IList<FlexibleReportEntry> InitByFlexibleReportEmployeeDictornary(Dictionary<long, string> dic, DateTime date)
public static IList<FlexibleReportEntry> InitByFlexibleReportDictornary(Dictionary<long, string> dic, DateTime start, DateTime ende, bool reduziert, bool isEmployee)
{
var flexibleReports = new List<FlexibleReportEntry>();
foreach (var item in dic)
{
flexibleReports.Add(new FlexibleReportEntry()
for (var date = start; date <= ende; date = date.AddDays(1))
{
EmployeeOid = item.Key,
EmployeeString = item.Value,
Type = FlexibleReportEntryType.EmployeeNullEntry,
Datum = date
});
// isEmployee = true -> Employee
if (isEmployee)
flexibleReports.Add(new FlexibleReportEntry()
{
EmployeeOid = item.Key,
EmployeeString = item.Value,
Type = FlexibleReportEntryType.EmployeeNullEntry,
StartDatum = date,
EndDatum = date
});
// isEmployee = false -> Customer
else
flexibleReports.Add(new FlexibleReportEntry()
{
CustomerOid = item.Key,
CustomerString = item.Value,
Type = FlexibleReportEntryType.CustomerNullEntry,
StartDatum = date,
EndDatum = date
});
if (reduziert)
break;
}
}
return flexibleReports;
}
// Wurde eig nur zum Testen verwendet, kann bei Bedarf überschrieben werden
public override string ToString()
{
return StartDatum.ToShortTimeString();
}
}
public class FlexibleReportLayout
@@ -735,18 +821,18 @@ namespace BeWo.View.Detail.Report
{
Dictionary<Type, SeriesTypeDescriptor> seriesTypes = new Dictionary<Type, SeriesTypeDescriptor>();
seriesTypes.Add(typeof(AreaFullStackedSeries2D), new SeriesTypeDescriptor { DiagramType = XYDiagram2DType, DisplayText = "Area Full-Stacked Series 2D" });
seriesTypes.Add(typeof(AreaSeries2D), new SeriesTypeDescriptor { DiagramType = XYDiagram2DType, DisplayText="Area Series 2D" });
seriesTypes.Add(typeof(AreaStackedSeries2D), new SeriesTypeDescriptor { DiagramType = XYDiagram2DType, DisplayText="Area Stacked Series 2D" });
seriesTypes.Add(typeof(BarFullStackedSeries2D), new SeriesTypeDescriptor { DiagramType = XYDiagram2DType, DisplayText="Bar Full-Stacked Series 2D" });
seriesTypes.Add(typeof(BarStackedSeries2D), new SeriesTypeDescriptor { DiagramType = XYDiagram2DType, DisplayText="Bar Stacked Series 2D" });
seriesTypes.Add(typeof(LineSeries2D), new SeriesTypeDescriptor { DiagramType = XYDiagram2DType, DisplayText="Line Series 2D" });
seriesTypes.Add(typeof(AreaSeries2D), new SeriesTypeDescriptor { DiagramType = XYDiagram2DType, DisplayText = "Area Series 2D" });
seriesTypes.Add(typeof(AreaStackedSeries2D), new SeriesTypeDescriptor { DiagramType = XYDiagram2DType, DisplayText = "Area Stacked Series 2D" });
seriesTypes.Add(typeof(BarFullStackedSeries2D), new SeriesTypeDescriptor { DiagramType = XYDiagram2DType, DisplayText = "Bar Full-Stacked Series 2D" });
seriesTypes.Add(typeof(BarStackedSeries2D), new SeriesTypeDescriptor { DiagramType = XYDiagram2DType, DisplayText = "Bar Stacked Series 2D" });
seriesTypes.Add(typeof(LineSeries2D), new SeriesTypeDescriptor { DiagramType = XYDiagram2DType, DisplayText = "Line Series 2D" });
seriesTypes.Add(typeof(PointSeries2D), new SeriesTypeDescriptor { DiagramType = XYDiagram2DType, DisplayText = "Point Series 2D" });
seriesTypes.Add(typeof(AreaSeries3D), new SeriesTypeDescriptor { DiagramType = XYDiagram3DType, DisplayText="Area Series 3D" });
seriesTypes.Add(typeof(AreaStackedSeries3D), new SeriesTypeDescriptor { DiagramType = XYDiagram3DType, DisplayText="Area Stacked Series 3D" });
seriesTypes.Add(typeof(AreaFullStackedSeries3D), new SeriesTypeDescriptor { DiagramType = XYDiagram3DType, DisplayText="Area Full-Stacked Series 3D" });
seriesTypes.Add(typeof(BarSeries3D), new SeriesTypeDescriptor { DiagramType = XYDiagram3DType, DisplayText="Bar Series 3D" });
seriesTypes.Add(typeof(PointSeries3D), new SeriesTypeDescriptor { DiagramType = XYDiagram3DType, DisplayText="Point Series 3D" });
seriesTypes.Add(typeof(PieSeries3D), new SeriesTypeDescriptor { DiagramType = SimpleDiagram3DType, DisplayText="Pie Series 3D" });
seriesTypes.Add(typeof(AreaSeries3D), new SeriesTypeDescriptor { DiagramType = XYDiagram3DType, DisplayText = "Area Series 3D" });
seriesTypes.Add(typeof(AreaStackedSeries3D), new SeriesTypeDescriptor { DiagramType = XYDiagram3DType, DisplayText = "Area Stacked Series 3D" });
seriesTypes.Add(typeof(AreaFullStackedSeries3D), new SeriesTypeDescriptor { DiagramType = XYDiagram3DType, DisplayText = "Area Full-Stacked Series 3D" });
seriesTypes.Add(typeof(BarSeries3D), new SeriesTypeDescriptor { DiagramType = XYDiagram3DType, DisplayText = "Bar Series 3D" });
seriesTypes.Add(typeof(PointSeries3D), new SeriesTypeDescriptor { DiagramType = XYDiagram3DType, DisplayText = "Point Series 3D" });
seriesTypes.Add(typeof(PieSeries3D), new SeriesTypeDescriptor { DiagramType = SimpleDiagram3DType, DisplayText = "Pie Series 3D" });
seriesTypes.Add(typeof(PieSeries2D), new SeriesTypeDescriptor { DiagramType = SimpleDiagram2DType, DisplayText = "Pie Series 2D" });
return seriesTypes;
}

View File

@@ -16,6 +16,8 @@
xmlns:markup="clr-namespace:BeWo.MultiLanguage.Markup"
xmlns:viewModel="clr-namespace:BS.Shared.DataContracts;assembly=BS.Shared"
xmlns:drawing="http://schemas.devexpress.com/winfx/2008/xaml/scheduler/internal"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d"
Height="Auto" Width="Auto" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Focusable="True">
<localView:BeWoView.Resources>
<ResourceDictionary>
@@ -25,6 +27,8 @@
<view:ValueListEntryTypeToColorConverter x:Key="ValueListEntryTypeToColorConverter" />
<converter:CollectionCountToVisibilityConverter x:Key="CollectionCountToVisibilityConverter"/>
<converter:BoolVisibilityConverter x:Key="BoolVisibilityConverter"></converter:BoolVisibilityConverter>
<converter:NullableBoolToBoolConverter x:Key="NullableBoolToBoolConverter" />
<DataTemplate x:Key="DeleteBtnBetreuungsschluesselDataTemplate">
<Button Content="r" Click="DeleteBetreuungsschluesselButton_Click" Tag="{Binding}"
FontFamily="Webdings" Width="18" Height="18" VerticalAlignment="Center"
@@ -444,7 +448,7 @@
</Button>
</Grid>
</GroupBox.Header>
<ListView Name="listViewCostBearer" Grid.Row="1"
<ListView x:Name="listViewCostBearer" Grid.Row="1"
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
ItemsSource="{Binding ApprovalPeriodList.VMList}"
Background="Transparent" BorderBrush="Transparent"
@@ -462,7 +466,8 @@
<Grid Margin="3" Loaded="ListItemGrid_OnLoaded">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto" MinWidth="100" />
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto" MinWidth="100" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" MinWidth="100" />
<ColumnDefinition Width="Auto"/>
@@ -471,12 +476,14 @@
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="10" />
<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" />
<RowDefinition Height="Auto" />
<RowDefinition Height="0" />
@@ -536,122 +543,161 @@
BorderThickness="0 0 0 1" />
</Grid>
<TextBlock VerticalAlignment="Center"
Grid.Row="1" Grid.Column="0"
Margin="3"
Text="{Binding TranslatedServiceUnitName, Mode=OneWay, UpdateSourceTrigger=PropertyChanged, StringFormat={markup:Translate \{0\} genehmigt}}" />
<RadioButton x:Name="RadioButtonBudget"
Tag="{Binding}"
Grid.Row="1"
Grid.Column="0"
Content="Budget"
Margin="3 8 0 0"
Checked="RadioButton_Checked"
IsChecked="{Binding Path=IsBudget, Mode=OneWay}" />
<!-- <ComboBox x:Name="Combo_Budget2"
Margin="4" Grid.Row="1" Grid.ColumnSpan="4"
Height="23"
Grid.Column="1"
Tag="Budget"
IsEnabled="{Binding Path=IsBudget, Mode=OneWay}"/> -->
<uc:NullItemComboBox x:Name="Combo_Budget"
Margin="4" Grid.Row="1" Grid.ColumnSpan="4"
Height="23"
Grid.Column="1"
ItemsSource="{Binding Path=Budgets, UpdateSourceTrigger=PropertyChanged}"
SelectedValue="{Binding BudgetDC, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}"
IsEnabled="{Binding Path=IsBudget, UpdateSourceTrigger=PropertyChanged, Mode=OneWay}"
/>
<RadioButton x:Name="RadioButtonDirekt"
Tag="{Binding}"
Grid.Row="3"
Grid.Column="0"
Content="Direkt"
Checked="RadioButton_Checked"
Margin="3 8 0 0"
IsChecked="{Binding Path=IsDirekt, Mode=OneWay}"
/>
<TextBlock VerticalAlignment="Center"
Grid.Row="3" Grid.Column="1" Margin="3"
Text="{Binding TranslatedServiceUnitName, Mode=OneWay, UpdateSourceTrigger=PropertyChanged, StringFormat={markup:Translate \{0\} genehmigt}}"/>
<dxe:TextEdit MaskType="Numeric" Mask="########0.00" MaskUseAsDisplayFormat="True"
Grid.Row="1"
Grid.Row="3"
AllowNullInput="True"
Name="textbox_newCostBearerApprovedHours"
EditValue="{Binding Path=ApprovedBEPerInterval, UpdateSourceTrigger=PropertyChanged}"
Grid.Column="1"
Grid.Column="2"
Margin="3"
Height="23" />
Height="23"
IsEnabled="{Binding Path=IsDirekt, Mode=OneWay}"/>
<TextBlock VerticalAlignment="Center"
Margin="3"
Grid.Column="2" Text="pro"
Grid.Row="1" />
Grid.Column="3" Text="pro"
Grid.Row="3"/>
<ComboBox x:Name="combo_approvedIntervall"
Margin="3" Grid.Row="1"
Margin="4" Grid.Row="3"
ItemsSource="{x:Static core:EnumTranslations.SupportConceptApprovalInterval2Translations}"
SelectedValue="{Binding ApprovedBEInterval, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
SelectedValuePath="Key"
DisplayMemberPath="Value"
Height="23"
Grid.Column="3" />
Grid.Column="4"
IsEnabled="{Binding Path=IsDirekt, Mode=OneWay}"/>
<TextBlock VerticalAlignment="Center"
Margin="3"
Grid.Row="1"
Grid.Column="4" Text="{markup:Translate Übertragbar}" />
Grid.Row="3"
Grid.Column="5" Text="{markup:Translate Übertragbar}"/>
<CheckBox Height="23" Margin="3 8 0 0"
Grid.Column="5"
Grid.Row="1"
Grid.Column="6"
Grid.Row="3"
IsChecked="{Binding IsApprovedBEShifting, UpdateSourceTrigger=PropertyChanged}"
ToolTip="{markup:Translate Übertragung von Reststunden in den nachfolgenden Bewilligungsabschnitt möglich}" />
ToolTip="{markup:Translate Übertragung von Reststunden in den nachfolgenden Bewilligungsabschnitt möglich}"
IsEnabled="{Binding Path=IsDirekt, Mode=OneWay}" />
<TextBlock VerticalAlignment="Center"
Margin="3"
Grid.Row="2"
Grid.Column="0"
Text="{Binding TranslatedServiceUnitName, Mode=OneWay, UpdateSourceTrigger=PropertyChanged, StringFormat={markup:Translate \{0\} Gesamt}}" />
Grid.Row="4"
Grid.Column="1"
Text="{Binding TranslatedServiceUnitName, Mode=OneWay, UpdateSourceTrigger=PropertyChanged, StringFormat={markup:Translate \{0\} Gesamt}}"/>
<dxe:TextEdit MaskType="Numeric" Mask="########0.00" MaskUseAsDisplayFormat="True"
AllowNullInput="True"
Grid.Row="2" Grid.Column="1"
AllowNullInput="True"
Grid.Row="4" Grid.Column="2"
Name="textbox_newCostBearerApprovedFLSTotal"
EditValue="{Binding Path=ApprovedBETotal, UpdateSourceTrigger=PropertyChanged}"
Margin="3"
Height="23"/>
Height="23"
IsEnabled="{Binding Path=IsDirekt, Mode=OneWay}"/>
<TextBlock VerticalAlignment="Center"
Grid.Row="3" Grid.Column="0"
Margin="3"
Text="{markup:Translate Betrag pauschal}" />
Grid.Row="5" Grid.Column="1"
Margin="3"
Text="{markup:Translate Betrag pauschal}"/>
<dxe:TextEdit MaskType="Numeric" Mask="########0.00" MaskUseAsDisplayFormat="True"
AllowNullInput="True"
Name="textbox_newCostBearerApprovedAllowance"
Grid.Row="3"
Grid.Row="5"
EditValue="{Binding ApprovedFixedAmount, UpdateSourceTrigger=PropertyChanged}"
Grid.Column="1"
Grid.Column="2"
Margin="3"
Height="23"/>
Height="23"
IsEnabled="{Binding Path=IsDirekt, Mode=OneWay}"/>
<TextBlock VerticalAlignment="Center"
Margin="3"
Grid.Row="3"
Grid.Column="2" Text="pro"
/>
Grid.Row="5"
Grid.Column="3" Text="pro"/>
<ComboBox x:Name="combo_approvedAllowanceIntervall"
ItemsSource="{x:Static core:EnumTranslations.SupportConceptApprovalInterval2Translations}"
SelectedValuePath="Key"
SelectedValue="{Binding ApprovedFixedAmountInterval, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
DisplayMemberPath="Value"
Grid.Row="3" Margin="3" Height="23"
Grid.Column="3" />
Grid.Row="5" Margin="3" Height="23"
Grid.Column="4"
IsEnabled="{Binding Path=IsDirekt, Mode=OneWay}"/>
<TextBlock VerticalAlignment="Center"
Margin="3"
Grid.Row="3"
Grid.Column="4" Text="{markup:Translate Übertragbar}" />
Grid.Row="5"
Grid.Column="5" Text="{markup:Translate Übertragbar}" />
<CheckBox Height="23" Margin="3 8 0 0"
Grid.Row="3" Grid.Column="5"
Grid.Row="5" Grid.Column="6"
IsChecked="{Binding IsApprovedFixedAmountShifting, UpdateSourceTrigger=PropertyChanged}"
ToolTip="{markup:Translate Übertragung von Rest Budget in den nachfolgenden Bewilligungsabschnitt möglich}" />
ToolTip="{markup:Translate Übertragung von Rest Budget in den nachfolgenden Bewilligungsabschnitt möglich}"
IsEnabled="{Binding Path=IsDirekt, Mode=OneWay}"/>
<TextBlock VerticalAlignment="Center"
Margin="3"
Grid.Row="4"
Grid.Column="0"
Grid.Row="6"
Grid.Column="1"
Text="{markup:Translate Monatlicher Abschlag}" />
<dxe:TextEdit MaskType="Numeric" Mask="########0.00" MaskUseAsDisplayFormat="True"
AllowNullInput="True"
Grid.Row="4" Grid.Column="1"
Grid.Row="6" Grid.Column="2"
Name="textbox_monthlyAmount"
EditValue="{Binding Path=MonthlyPayment, UpdateSourceTrigger=PropertyChanged}"
Margin="3"
Height="23" />
Height="23"
IsEnabled="{Binding Path=IsDirekt, Mode=OneWay}"/>
<TextBlock VerticalAlignment="Center"
Grid.Column="0"
Grid.Row="5"
Grid.Column="1"
Grid.Row="7"
Margin="3"
Text="Max. Kontakte" x:Name="lblContactCountPerInterval" />
Text="Max. Kontakte" x:Name="lblContactCountPerInterval" Tag="Direkt"/>
<dxe:TextEdit MaskType="Numeric" Mask="########0.00" MaskUseAsDisplayFormat="True"
Grid.Row="5"
Grid.Row="7"
AllowNullInput="True"
Name="txtContactCountPerInterval"
EditValue="{Binding Path=ContactCountPerInterval, UpdateSourceTrigger=PropertyChanged}"
Grid.Column="1"
Grid.Column="2"
Margin="3"
Height="23" />
Height="23" Tag="Direkt"/>
<TextBlock VerticalAlignment="Center"
Margin="3"
Grid.Column="2" Text="pro"
Grid.Row="5" x:Name="lblContactCountInterval" />
Grid.Row="7" x:Name="lblContactCountInterval" Tag="Direkt"/>
<ComboBox x:Name="cboContactCountInterval"
Margin="3" Grid.Row="5"
Margin="3" Grid.Row="7"
ItemsSource="{x:Static core:EnumTranslations.SupportConceptApprovalInterval2Translations}"
SelectedValue="{Binding ContactCountInterval, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
SelectedValuePath="Key"
DisplayMemberPath="Value"
Height="23"
Grid.Column="3" />
<Button Grid.Row="6" Grid.Column="0" Height="25"
Grid.Column="4" Tag="Direkt"/>
<Button Grid.Row="7" Grid.Column="0" Height="25"
Grid.ColumnSpan="6"
Visibility="{Binding Path=SupportConceptApprovalEmployeeRelations.AddButtonVisibility}"
HorizontalAlignment="Left"

View File

@@ -40,7 +40,7 @@ namespace BeWo.View.Detail
#region Constants and Fields
private TreeViewItem _SelectedGoalTreeNode;
private PersonView _PersonModalPopUp;
private List<ServiceRecordDC> _ServiceRecords;
@@ -49,69 +49,69 @@ namespace BeWo.View.Detail
private bool employeeEditFlag;
private bool isChangingCostbearer;
private bool isChangingCostbearer;
private SupportConceptCostBearerRelVM supportConceptCostBearerRel2Change;
private SupportConceptCostBearerRelVM supportConceptCostBearerRel2Change;
private readonly SchedulerAppointmentDC taskToEdit;
#region Rechtebinding
public static bool IsAllowedToChangeCostbeaerer
{
get { return BeWoApp.LoggedOnUser.HasRight(UserRightType.CostbearerAllowChange); }
}
{
get { return BeWoApp.LoggedOnUser.HasRight(UserRightType.CostbearerAllowChange); }
}
public static bool IsAllowedToEditCostbearers
{
get { return BeWoApp.LoggedOnUser.HasRight(UserRightType.SupportConceptView_Edit); }
}
public static bool IsAllowedToEditCostbearers
{
get { return BeWoApp.LoggedOnUser.HasRight(UserRightType.SupportConceptView_Edit); }
}
public static bool IsAllowedToEditGoals
{
get { return BeWoApp.LoggedOnUser.HasRight(UserRightType.SupportConcept_AllowEditGoals); }
}
#endregion
public static bool IsAllowedToEditGoals
{
get { return BeWoApp.LoggedOnUser.HasRight(UserRightType.SupportConcept_AllowEditGoals); }
}
#endregion
#endregion
#endregion
#region Constructors and Destructors
#region Constructors and Destructors
public SupportConceptView(SupportConceptVM pViewModel)
public SupportConceptView(SupportConceptVM pViewModel)
{
InitializeComponent();
ViewModel = pViewModel;
if (!BeWoApp.LoggedOnUser.HasRight(UserRightType.SupportConceptView_AllowArchiving))
{
lblArchiviert.Visibility = Visibility.Hidden;
chkArchiviert.Visibility = Visibility.Hidden;
}
if (!BeWoApp.LoggedOnUser.HasRight(UserRightType.DocumentsAllowViewAll) && !BeWoApp.LoggedOnUser.HasRight(UserRightType.DokumenteHilfeplaene))
{
tabitem_documents.Visibility = Visibility.Collapsed;
}
if (!BeWoApp.LoggedOnUser.HasRight(UserRightType.SupportConceptView_Edit))
{
grid_details.IsEnabled = false;
button_addCostBearer.IsEnabled = false;
if (!BeWoApp.LoggedOnUser.HasRight(UserRightType.SupportConceptView_AllowArchiving))
{
lblArchiviert.Visibility = Visibility.Hidden;
chkArchiviert.Visibility = Visibility.Hidden;
}
if (!BeWoApp.LoggedOnUser.HasRight(UserRightType.DocumentsAllowViewAll) && !BeWoApp.LoggedOnUser.HasRight(UserRightType.DokumenteHilfeplaene))
{
tabitem_documents.Visibility = Visibility.Collapsed;
}
if (!BeWoApp.LoggedOnUser.HasRight(UserRightType.SupportConceptView_Edit))
{
grid_details.IsEnabled = false;
//tabitem_documents.IsEnabled = false;
button_addCostBearer.IsEnabled = false;
grid_serviceaccountings.IsEnabled = false;
//tabitem_documents.IsEnabled = false;
tabitem_grid_tasks.IsEnabled = false;
grid_serviceaccountings.IsEnabled = false;
if (BeWoApp.LoggedOnUser.HasRight(UserRightType.SupportConcept_AllowEditTasks))
{
tabitem_grid_tasks.IsEnabled = true;
tabitem_tasks.IsSelected = true;
}
if (BeWoApp.LoggedOnUser.HasRight(UserRightType.SupportConcept_AllowEditGoals))
{
tabitem_goals.IsSelected = true;
}
}
tabitem_grid_tasks.IsEnabled = false;
if (BeWoApp.LoggedOnUser.HasRight(UserRightType.SupportConcept_AllowEditTasks))
{
tabitem_grid_tasks.IsEnabled = true;
tabitem_tasks.IsSelected = true;
}
if (BeWoApp.LoggedOnUser.HasRight(UserRightType.SupportConcept_AllowEditGoals))
{
tabitem_goals.IsSelected = true;
}
}
if (pViewModel.VarFields == null || pViewModel.VarFields.VMList.Count == 0)
{
tabitem_varFields.Visibility = Visibility.Collapsed;
@@ -284,7 +284,7 @@ namespace BeWo.View.Detail
if (isAbsolute)
{
if (ap.ApprovedBEPerInterval.HasValue && summe > (ap.ApprovedBEPerInterval.Value*60))
if (ap.ApprovedBEPerInterval.HasValue && summe > (ap.ApprovedBEPerInterval.Value * 60))
{
MessageBox.Show($"Die Summe der Anteile liegt bei über {(ap.ApprovedBEPerInterval.Value * 60):0} Minuten. Speichern nicht möglich.", "Fehler", MessageBoxButton.OK, MessageBoxImage.Warning);
return;
@@ -322,7 +322,7 @@ namespace BeWo.View.Detail
{
var mbResult = MessageBox.Show(Translator.Translate("Es existiert mindestens eine Buchung außerhalb des Hilfeplanzeitraums.\nMöchten Sie trotzdem speichern?"), "Speichern", MessageBoxButton.YesNo, MessageBoxImage.Warning);
if(mbResult.Equals(MessageBoxResult.No))
if (mbResult.Equals(MessageBoxResult.No))
{
return;
}
@@ -380,7 +380,7 @@ namespace BeWo.View.Detail
private void Button_Loaded(object sender, RoutedEventArgs e)
{
var t = new DispatcherTimer(DispatcherPriority.Normal, Dispatcher) {Interval = TimeSpan.FromSeconds(.5)};
var t = new DispatcherTimer(DispatcherPriority.Normal, Dispatcher) { Interval = TimeSpan.FromSeconds(.5) };
t.Tick += delegate
{
((Button)sender).Click += add_edit_employee_Click;
@@ -399,40 +399,40 @@ namespace BeWo.View.Detail
return;
}
if (!isChangingCostbearer)
{
var newVm = ViewModel.CostBearerRelations.NewVM;
newVm.CostBearer = e.Data;
if (!isChangingCostbearer)
{
var newVm = ViewModel.CostBearerRelations.NewVM;
newVm.CostBearer = e.Data;
if (ViewModel.Customer != null && string.IsNullOrEmpty(newVm.CustomerReferenceNumber) &&
ViewModel.Customer.CostBearerReferenceNumbers.ContainsKey(e.Data.CostBearerOid.Value))
{
newVm.CustomerReferenceNumber = ViewModel.Customer.CostBearerReferenceNumbers[e.Data.CostBearerOid.Value];
}
if (ViewModel.Customer != null && string.IsNullOrEmpty(newVm.CustomerReferenceNumber) &&
ViewModel.Customer.CostBearerReferenceNumbers.ContainsKey(e.Data.CostBearerOid.Value))
{
newVm.CustomerReferenceNumber = ViewModel.Customer.CostBearerReferenceNumbers[e.Data.CostBearerOid.Value];
}
ViewModel.CostBearerRelations.AddNewVMToList();
tabcontrol_costbearers.SelectedIndex = tabcontrol_costbearers.Items.Count - 1;
ViewModel.CostBearerRelations.AddNewVMToList();
tabcontrol_costbearers.SelectedIndex = tabcontrol_costbearers.Items.Count - 1;
AddNewApprovalPeriod(newVm);
}
else
{
supportConceptCostBearerRel2Change.CostBearer = e.Data;
AddNewApprovalPeriod(newVm);
}
else
{
supportConceptCostBearerRel2Change.CostBearer = e.Data;
if (ViewModel.Customer != null && ViewModel.Customer.CostBearerReferenceNumbers.ContainsKey(e.Data.CostBearerOid.Value))
{
supportConceptCostBearerRel2Change.CustomerReferenceNumber = ViewModel.Customer.CostBearerReferenceNumbers[e.Data.CostBearerOid.Value];
}
else
{
supportConceptCostBearerRel2Change.CustomerReferenceNumber = null;
}
if (ViewModel.Customer != null && ViewModel.Customer.CostBearerReferenceNumbers.ContainsKey(e.Data.CostBearerOid.Value))
{
supportConceptCostBearerRel2Change.CustomerReferenceNumber = ViewModel.Customer.CostBearerReferenceNumbers[e.Data.CostBearerOid.Value];
}
else
{
supportConceptCostBearerRel2Change.CustomerReferenceNumber = null;
}
supportConceptCostBearerRel2Change.CostBearerContactPerson = null;
}
supportConceptCostBearerRel2Change.CostBearerContactPerson = null;
}
isChangingCostbearer = false;
supportConceptCostBearerRel2Change = null;
isChangingCostbearer = false;
supportConceptCostBearerRel2Change = null;
}
private void CustomerSearchView_CustomerSelected(object sender, EventArgs<CompactCustomerDC> e)
@@ -449,9 +449,9 @@ namespace BeWo.View.Detail
if (HasServiceRecords(ViewModel))
{
MessageBox.Show(Translator.Translate(
"Für diesen Klienten wurden bereits Leistungen hinterlegt. Sie müssen diese Leistungen erst löschen bevor Sie den Klient wechseln können."),
"Fehler",
MessageBoxButton.OK,
"Für diesen Klienten wurden bereits Leistungen hinterlegt. Sie müssen diese Leistungen erst löschen bevor Sie den Klient wechseln können."),
"Fehler",
MessageBoxButton.OK,
MessageBoxImage.Exclamation);
return;
}
@@ -473,11 +473,11 @@ namespace BeWo.View.Detail
}
else
{
if(employeeEditFlag)
if (employeeEditFlag)
{
var data = grid_tasks.View.FocusedRowData;
if(data?.RowHandle != null)
if (data?.RowHandle != null)
{
var vm = grid_tasks.GetRow(data.RowHandle.Value) as SchedulerAppointmentVM;
@@ -487,7 +487,7 @@ namespace BeWo.View.Detail
}
}
}
else if(!ViewModel.Tasks.NewVM.EmployeeList.Exists(i => i.Employee.EmployeeOid.Equals(e.Data.EmployeeOid)))
else if (!ViewModel.Tasks.NewVM.EmployeeList.Exists(i => i.Employee.EmployeeOid.Equals(e.Data.EmployeeOid)))
{
ViewModel.Tasks.NewVM.EmployeeList.Add(new Employee2SchedulerAppointmentDC { Employee = e.Data });
}
@@ -500,8 +500,8 @@ namespace BeWo.View.Detail
{
if (_ServiceRecords == null && ViewModel.Customer != null)
{
_ServiceRecords = ViewModel.IsArchived
? ServiceFacade.DoOperationsServiceSync(s => s.GetCustomerServiceRecords(ViewModel.Customer.CustomerOid, true))
_ServiceRecords = ViewModel.IsArchived
? ServiceFacade.DoOperationsServiceSync(s => s.GetCustomerServiceRecords(ViewModel.Customer.CustomerOid, true))
: ServiceFacade.DoOperationsServiceSync(s => s.GetCustomerServiceRecords(ViewModel.Customer.CustomerOid, false));
}
@@ -538,13 +538,13 @@ namespace BeWo.View.Detail
var newTasks = ViewModel.Tasks.CopyToDCList(true).Where(w => !w.SchedulerAppointmentOid.HasValue).ToList();
var updatedTasks = ViewModel.Tasks.VMList.Where(w => !w.IsNew && w.IsDirty).ToList();
var updatedTaskDCs = new List<SchedulerAppointmentDC>();
foreach(var t in updatedTasks)
foreach (var t in updatedTasks)
{
t.CommitToDataContract();
updatedTaskDCs.Add(t.DataContract);
}
ServiceFacade.DoResourceServiceAsync(s => s.DeleteSchedulerAppointments(_DeletedTasks.ToDictionary(d => d.SchedulerAppointmentOid.Value, d => d.NewSchedulerAppointmentVersion.Value)), () =>
{
ServiceFacade.DoResourceServiceAsync(s2 => s2.UpdateSchedulerAppointments(updatedTaskDCs), cb2 =>
@@ -580,7 +580,7 @@ namespace BeWo.View.Detail
private void add_edit_employee_Click(object sender, RoutedEventArgs e)
{
employeeEditFlag = true;
employeeEditFlag = true;
popup_employee.IsOpen = true;
}
@@ -605,9 +605,9 @@ namespace BeWo.View.Detail
if (HasServiceRecords(cbRelVM))
{
MessageBox.Show(Translator.Translate(
"Für diesen Kostenträger wurden bereits Leistungen hinterlegt. Sie müssen diese Leistungen erst löschen bevor Sie den Kostenträger entfernen können."),
"Löschen",
MessageBoxButton.OK,
"Für diesen Kostenträger wurden bereits Leistungen hinterlegt. Sie müssen diese Leistungen erst löschen bevor Sie den Kostenträger entfernen können."),
"Löschen",
MessageBoxButton.OK,
MessageBoxImage.Exclamation);
return;
}
@@ -623,37 +623,37 @@ namespace BeWo.View.Detail
private static void AddNewApprovalPeriod(SupportConceptCostBearerRelVM vm)
{
//var cbRelVM = this.tabcontrol_costbearers.SelectedItem as SupportConceptCostBearerRelVM;
//var actual = cbRelVM.ApprovalPeriodList.VMList.OrderByDescending(i => i.StartDate).FirstOrDefault();
//var actual = cbRelVM.ApprovalPeriodList.VMList.OrderByDescending(i => i.StartDate).FirstOrDefault();
//if (actual != null)
//{
// vm.ApprovalPeriodList.NewVM.StartDate = vm.StartDate;
// vm.ApprovalPeriodList.NewVM.EndDate = vm.EndDate;
// vm.ApprovalPeriodList.NewVM.ApprovedBEInterval = actual.ApprovedBEInterval;
// vm.ApprovalPeriodList.NewVM.ApprovedBEPerInterval = actual.ApprovedBEPerInterval;
// vm.ApprovalPeriodList.NewVM.ApprovedBETotal = actual.ApprovedBETotal;
// vm.ApprovalPeriodList.NewVM.ApprovedFixedAmount = actual.ApprovedFixedAmount;
// vm.ApprovalPeriodList.NewVM.ApprovedFixedAmountInterval = actual.ApprovedFixedAmountInterval;
// vm.ApprovalPeriodList.NewVM.IsApprovedBEShifting = actual.IsApprovedBEShifting;
// vm.ApprovalPeriodList.NewVM.IsApprovedFixedAmountShifting = actual.IsApprovedFixedAmountShifting;
// vm.ApprovalPeriodList.NewVM.MonthlyPayment = actual.MonthlyPayment;
// vm.ApprovalPeriodList.NewVM.ServiceUnitName = actual.ServiceUnitName;
//if (actual != null)
//{
// vm.ApprovalPeriodList.NewVM.StartDate = vm.StartDate;
// vm.ApprovalPeriodList.NewVM.EndDate = vm.EndDate;
// vm.ApprovalPeriodList.NewVM.ApprovedBEInterval = actual.ApprovedBEInterval;
// vm.ApprovalPeriodList.NewVM.ApprovedBEPerInterval = actual.ApprovedBEPerInterval;
// vm.ApprovalPeriodList.NewVM.ApprovedBETotal = actual.ApprovedBETotal;
// vm.ApprovalPeriodList.NewVM.ApprovedFixedAmount = actual.ApprovedFixedAmount;
// vm.ApprovalPeriodList.NewVM.ApprovedFixedAmountInterval = actual.ApprovedFixedAmountInterval;
// vm.ApprovalPeriodList.NewVM.IsApprovedBEShifting = actual.IsApprovedBEShifting;
// vm.ApprovalPeriodList.NewVM.IsApprovedFixedAmountShifting = actual.IsApprovedFixedAmountShifting;
// vm.ApprovalPeriodList.NewVM.MonthlyPayment = actual.MonthlyPayment;
// vm.ApprovalPeriodList.NewVM.ServiceUnitName = actual.ServiceUnitName;
// //actual.StartDate = DateTime.Now.Date.AddDays(1);
// //actual.EndDate = vm.ApprovedEndDate;
//}
//else
//{
vm.ApprovalPeriodList.NewVM.StartDate = vm.StartDate;
vm.ApprovalPeriodList.NewVM.EndDate = vm.EndDate;
vm.ApprovalPeriodList.NewVM.ApprovedBEInterval = SupportConceptApprovalInterval.Weekly;
vm.ApprovalPeriodList.NewVM.IsApprovedBEShifting = true;
vm.ApprovalPeriodList.NewVM.IsApprovedFixedAmountShifting = true;
// //actual.StartDate = DateTime.Now.Date.AddDays(1);
// //actual.EndDate = vm.ApprovedEndDate;
//}
//else
//{
vm.ApprovalPeriodList.NewVM.StartDate = vm.StartDate;
vm.ApprovalPeriodList.NewVM.EndDate = vm.EndDate;
vm.ApprovalPeriodList.NewVM.ApprovedBEInterval = SupportConceptApprovalInterval.Weekly;
vm.ApprovalPeriodList.NewVM.IsApprovedBEShifting = true;
vm.ApprovalPeriodList.NewVM.IsApprovedFixedAmountShifting = true;
if (vm.CostBearer != null)
{
vm.ApprovalPeriodList.NewVM.ServiceUnitName = vm.CostBearer.ServiceUnitName;
}
if (vm.CostBearer != null)
{
vm.ApprovalPeriodList.NewVM.ServiceUnitName = vm.CostBearer.ServiceUnitName;
}
//}
@@ -665,8 +665,6 @@ namespace BeWo.View.Detail
popup_costbearer.IsOpen = true;
}
private void Button_AddTask_Click(object sender, RoutedEventArgs e)
{
if (ValidationTrigger.Validate(groupbox_newTask) && ViewModel.DataContract.SupportConceptOid.HasValue)
@@ -679,7 +677,7 @@ namespace BeWo.View.Detail
ViewModel.Tasks.NewVM.IsTask = true;
ViewModel.Tasks.NewVM.AllDay = true;
if(ViewModel.Tasks.NewVM.DueDate == null)
if (ViewModel.Tasks.NewVM.DueDate == null)
{
ViewModel.Tasks.NewVM.Start = DateTime.Today;
ViewModel.Tasks.NewVM.End = new DateTime(9999, 12, 31, 0, 0, 0);
@@ -703,12 +701,12 @@ namespace BeWo.View.Detail
}
private readonly List<SchedulerAppointmentDC> _DeletedTasks = new List<SchedulerAppointmentDC>();
private void Button_RemoveTask_Click(object sender, RoutedEventArgs e)
{
var test = grid_tasks.GetCurrentValue<SchedulerAppointmentVM>();
if(test.DataContract?.SchedulerAppointmentOid != null)
if (test.DataContract?.SchedulerAppointmentOid != null)
{
_DeletedTasks.AddIfNotIn(test.CommitToDataContract());
}
@@ -724,7 +722,7 @@ namespace BeWo.View.Detail
if (data?.RowHandle != null)
{
var vm = grid_tasks.GetRow(data.RowHandle.Value) as SchedulerAppointmentVM;
vm?.EmployeeList.Remove((Employee2SchedulerAppointmentDC)((Button)sender).Tag);
}
}
@@ -734,7 +732,6 @@ namespace BeWo.View.Detail
ViewModel.Tasks.NewVM.EmployeeList.Remove((Employee2SchedulerAppointmentDC)((Button)sender).Tag);
}
private void personsearchview_CostBearerContactPersonSelected(object sender, EventArgs<CompactPersonDC> e)
{
popup_person.IsOpen = false;
@@ -960,16 +957,16 @@ namespace BeWo.View.Detail
var twi = e.OriginalSource as MenuItem;
var selectedItem = treeview_Goals.SelectedItem as SupportConceptGoalTreeItem;
if (twi.Header.Equals("Neues individuelles Ziel") || twi.Header.Equals("Neue individuelle Maßnahme"))
{
if (_SelectedGoalTreeNode != null)
{
_SelectedGoalTreeNode.ItemContainerGenerator.StatusChanged += GoalTreeItemContainerGenerator_StatusChanged;
if (_SelectedGoalTreeNode != null)
{
_SelectedGoalTreeNode.ItemContainerGenerator.StatusChanged += GoalTreeItemContainerGenerator_StatusChanged;
ViewModel.AddZielOrMassnahme(selectedItem, twi.Header.Equals("Neues individuelles Ziel"));
}
//EditItem(selectedItem);
}
//EditItem(selectedItem);
//if (this._SelectedTreeNode != null)
//{
// this._SelectedTreeNode.ItemContainerGenerator.StatusChanged +=
@@ -1014,12 +1011,12 @@ namespace BeWo.View.Detail
if (treeItem != null)
{
var textBox = BeWoWpfUtils.FindVisualChild<TextBox>(treeItem);
textBox.IsReadOnly = false;
textBox.Padding = new Thickness(1, 1, 1, 1);
var textBox = BeWoWpfUtils.FindVisualChild<TextBox>(treeItem);
textBox.IsReadOnly = false;
textBox.Padding = new Thickness(1, 1, 1, 1);
textBox.BorderThickness = new Thickness(1);
textBox.Background = Brushes.White;
textBox.Tag = tv.SelectedItem;
textBox.Background = Brushes.White;
textBox.Tag = tv.SelectedItem;
textBox.Focus();
textBox.SelectAll();
@@ -1094,7 +1091,7 @@ namespace BeWo.View.Detail
Cache.GetInstance().GetServiceCategoryDescriptionDict(
cb => cbo.Dispatch(delegate
{
cbo.ItemsSource = cb.Keys.Where(cat => cat.ScopeType == ScopeTypeId.Global).ToList();
cbo.ItemsSource = cb.Keys.Where(cat => cat.ScopeType == ScopeTypeId.Global).ToList();
}));
}
}
@@ -1102,7 +1099,7 @@ namespace BeWo.View.Detail
private void ButtonInfo_OnClick(object sender, RoutedEventArgs e)
{
var btn = sender as Button;
var bc = btn.TemplatedParent as ButtonContainer;
var bc = btn.TemplatedParent as ButtonContainer;
if (bc != null)
{
@@ -1130,7 +1127,7 @@ namespace BeWo.View.Detail
VMFactory.CreateEmployeeVMAsync(ViewModel.Originator.EmployeeOid,
cb => this.Dispatch(
() => BeWoUtils.OpenModalViewWindow<EmployeeVM, EmployeeDC, SupportConceptView>(cb, this,
() => BeWoUtils.OpenModalViewWindow<EmployeeVM, EmployeeDC, SupportConceptView>(cb, this,
() => this.Dispatch(() => BeWoUtils.UpdateAllViews(ViewModel.Originator)))));
}
@@ -1144,7 +1141,7 @@ namespace BeWo.View.Detail
VMFactory.CreateCustomerVMAsync(ViewModel.Customer.CustomerOid,
cb => this.Dispatch(
() => BeWoUtils.OpenModalViewWindow<CustomerVM, CustomerDC, SupportConceptView>(cb, this,
() => BeWoUtils.OpenModalViewWindow<CustomerVM, CustomerDC, SupportConceptView>(cb, this,
() => this.Dispatch(() => BeWoUtils.UpdateAllViews(ViewModel.Customer)))));
}
@@ -1159,7 +1156,7 @@ namespace BeWo.View.Detail
VMFactory.CreatePersonVMAsync(contactPerson.PersonOid,
cb => this.Dispatch(
() => BeWoUtils.OpenModalViewWindow<PersonVM, PersonDC, SupportConceptView>(cb, this,
() => BeWoUtils.OpenModalViewWindow<PersonVM, PersonDC, SupportConceptView>(cb, this,
() => this.Dispatch(() => BeWoUtils.UpdateAllViews(contactPerson)), personSavedOrUpdated: _PersonModalPopUp_PersonSavedOrUpdated)));
}
@@ -1180,10 +1177,10 @@ namespace BeWo.View.Detail
private void Control_OnPreviewMouseDoubleClick(object sender, MouseButtonEventArgs e)
{
var label = sender as Label;
var label = sender as Label;
var labelparent = label.Parent as StackPanel;
var btn = labelparent.Children[0] as Button;
var Employee = btn.Tag as CompactEmployeeDC;
var btn = labelparent.Children[0] as Button;
var Employee = btn.Tag as CompactEmployeeDC;
VMFactory.CreateEmployeeVMAsync(Employee.EmployeeOid,
cb => this.Dispatch(
@@ -1191,58 +1188,58 @@ namespace BeWo.View.Detail
() => this.Dispatch(() => BeWoUtils.UpdateAllViews(Employee)))));
}
private void ListItemGrid_OnLoaded(object sender, RoutedEventArgs e)
{
var grid = sender as Grid;
private void ListItemGrid_OnLoaded(object sender, RoutedEventArgs e)
{
var grid = sender as Grid;
var vm = grid.DataContext as SupportConceptApprovalPeriodVM;
if (vm != null && !SupportConceptApprovalPeriodVM.ShowContactCountFields)
{
grid.Children[grid.Children.Count - 2].Visibility = Visibility.Collapsed;
grid.Children[grid.Children.Count - 3].Visibility = Visibility.Collapsed;
var vm = grid.DataContext as SupportConceptApprovalPeriodVM;
if (vm != null && !SupportConceptApprovalPeriodVM.ShowContactCountFields)
{
grid.Children[grid.Children.Count - 2].Visibility = Visibility.Collapsed;
grid.Children[grid.Children.Count - 3].Visibility = Visibility.Collapsed;
grid.Children[grid.Children.Count - 4].Visibility = Visibility.Collapsed;
grid.Children[grid.Children.Count - 5].Visibility = Visibility.Collapsed;
}
var gridControl = new GridControl();
grid.Children[grid.Children.Count - 5].Visibility = Visibility.Collapsed;
}
var gridControl = new GridControl();
Grid.SetRow(gridControl, 7);
Grid.SetColumn(gridControl, 0);
Grid.SetColumnSpan(gridControl, 6);
gridControl.Margin = new Thickness(3d);
gridControl.Margin = new Thickness(3d);
var itemsSourceBinding = new Binding("SupportConceptApprovalEmployeeRelations.VMList") { Source = grid.DataContext };
gridControl.SetBinding(DataControlBase.ItemsSourceProperty, itemsSourceBinding);
gridControl.SetBinding(DataControlBase.ItemsSourceProperty, itemsSourceBinding);
var gridControlVisibilityBinding = new Binding("SupportConceptApprovalEmployeeRelations.GridVisibility") { UpdateSourceTrigger = UpdateSourceTrigger.PropertyChanged, Source = grid.DataContext };
gridControl.SetBinding(VisibilityProperty, gridControlVisibilityBinding);
gridControl.SetBinding(VisibilityProperty, gridControlVisibilityBinding);
gridControl.IsVisibleChanged += GridControl_IsVisibleChanged;
var deleteColumn = new GridColumn {Header = "", FixedWidth = true, Width = 24, ReadOnly = true, CellTemplate = (DataTemplate) Resources["DeleteBtnBetreuungsschluesselDataTemplate"]};
var deleteColumn = new GridColumn { Header = "", FixedWidth = true, Width = 24, ReadOnly = true, CellTemplate = (DataTemplate)Resources["DeleteBtnBetreuungsschluesselDataTemplate"] };
gridControl.Columns.Add(deleteColumn);
gridControl.Columns.Add(deleteColumn);
var employeeColumn = new GridColumn {Header = Translator.Translate("Mitarbeiter"), FieldName = "EmployeeString", AllowEditing = DefaultBoolean.False, Width = 250};
var employeeColumn = new GridColumn { Header = Translator.Translate("Mitarbeiter"), FieldName = "EmployeeString", AllowEditing = DefaultBoolean.False, Width = 250 };
var allowEditingBetreuungsschluesselColumn = BeWoApp.HasLoggedOnUserRight(new[] { UserRightType.EditAll, UserRightType.Betreuungsschluessel_Edit }) ? DefaultBoolean.True : DefaultBoolean.False;
var betreuungsschluesselColumn = new GridColumn { Name = "ColumnBSProzent", Header = "Anteil an der Betreuung", FieldName = "Betreuungsschluessel", AllowEditing = allowEditingBetreuungsschluesselColumn, Width = 170, EditSettings = new TextEditSettings { MaskUseAsDisplayFormat = true, MaskType = MaskType.Numeric, Mask = "########0.00" } };
//var betreuungsschluesselColumnAbsolut = new GridColumn { Name = "ColumnBSAbsolut", Header = "Betreuung in Minuten", FieldName = "Betreuungsschluessel", AllowEditing = allowEditingBetreuungsschluesselColumn, Width = 170, EditSettings = new TextEditSettings { MaskUseAsDisplayFormat = true, MaskType = MaskType.Numeric, Mask = "########0" } };
//betreuungsschluesselColumnAbsolut.Visible = false;
//betreuungsschluesselColumnAbsolut.Visible = false;
gridControl.Columns.Add(employeeColumn);
gridControl.Columns.Add(betreuungsschluesselColumn);
//gridControl.Columns.Add(betreuungsschluesselColumnAbsolut);
gridControl.View = new TableView {AutoWidth = false, ShowGroupPanel = false, ShowGroupedColumns = false, ShowTotalSummary = false, NavigationStyle = GridViewNavigationStyle.Cell};
gridControl.View = new TableView { AutoWidth = false, ShowGroupPanel = false, ShowGroupedColumns = false, ShowTotalSummary = false, NavigationStyle = GridViewNavigationStyle.Cell };
grid.Children.Add(gridControl);
}
grid.Children.Add(gridControl);
}
private void GridControl_IsVisibleChanged(object sender, DependencyPropertyChangedEventArgs e)
{
if ((bool) e.NewValue)
if ((bool)e.NewValue)
{
GridControl gc = sender as GridControl;
@@ -1256,7 +1253,7 @@ namespace BeWo.View.Detail
if (isAbsolute)
{
gc.Columns[2].Header = "Betreuung in Minuten";
((TextEditSettings) gc.Columns[2].EditSettings).Mask = "########0";
((TextEditSettings)gc.Columns[2].EditSettings).Mask = "########0";
}
else
{
@@ -1267,22 +1264,22 @@ namespace BeWo.View.Detail
}
private void ChangeCostbearerBtn_Click(object sender, RoutedEventArgs e)
{
supportConceptCostBearerRel2Change = (SupportConceptCostBearerRelVM) ((Button) sender).Tag;
isChangingCostbearer = true;
{
supportConceptCostBearerRel2Change = (SupportConceptCostBearerRelVM)((Button)sender).Tag;
isChangingCostbearer = true;
popup_costbearer.IsOpen = true;
}
popup_costbearer.IsOpen = true;
}
private void button_checkAllGoals_Click(object sender, RoutedEventArgs e)
{
CheckAllGoalTreeItems(true);
}
private void button_checkAllGoals_Click(object sender, RoutedEventArgs e)
{
CheckAllGoalTreeItems(true);
}
private void button_uncheckAllGoals_Click(object sender, RoutedEventArgs e)
{
CheckAllGoalTreeItems(false);
}
private void button_uncheckAllGoals_Click(object sender, RoutedEventArgs e)
{
CheckAllGoalTreeItems(false);
}
private void button_aufklappenAllGoals_Click(object sender, RoutedEventArgs e)
{
@@ -1293,7 +1290,7 @@ namespace BeWo.View.Detail
{
SwitchAllGoalTreeItems(false);
}
private void button_checkAllLeistungen_Click(object sender, RoutedEventArgs e)
{
CheckAllLeistungTreeItems(true);
@@ -1325,14 +1322,14 @@ namespace BeWo.View.Detail
}
private void SwitchAllLeistungTreeItems(bool check)
{
{
Style stylee = new Style
{
TargetType = typeof(TreeViewItem)
};
stylee.Setters.Add(new Setter(TreeViewItem.IsExpandedProperty,check));
treeview_serviceAccountings.ItemContainerStyle = stylee;
stylee.Setters.Add(new Setter(TreeViewItem.IsExpandedProperty, check));
treeview_serviceAccountings.ItemContainerStyle = stylee;
}
private void SwitchAllGoalTreeItems(bool check)
@@ -1346,48 +1343,45 @@ namespace BeWo.View.Detail
treeview_Goals.ItemContainerStyle = stylee;
}
private void CheckAllGoalTreeItems(bool check)
{
var allItems = treeview_Goals.ItemsSource as IList<SupportConceptGoalTreeItem>;
private void CheckAllGoalTreeItems(bool check)
{
var allItems = treeview_Goals.ItemsSource as IList<SupportConceptGoalTreeItem>;
foreach (var item in allItems)
{
item.IsChecked = check;
}
}
foreach (var item in allItems)
{
item.IsChecked = check;
}
}
private void button_openAddBetreuungsschluessel_Click(object sender, RoutedEventArgs e)
{
popup_newBetreuungsschluessel.IsOpen = true;
var btn = (Button) sender;
var grid = (Grid) btn.Parent;
var border = (Border) grid.Parent;
var contentPresenter = (ContentPresenter) border.TemplatedParent;
var btn = (Button)sender;
var grid = (Grid)btn.Parent;
var border = (Border)grid.Parent;
var contentPresenter = (ContentPresenter)border.TemplatedParent;
SelectedApprovalPeriodVM = (SupportConceptApprovalPeriodVM)contentPresenter.Content;
if (SelectedApprovalPeriodVM != null)
{
bool isabsolute = false;
if (SelectedApprovalPeriodVM != null)
{
bool isabsolute = false;
if (SelectedApprovalPeriodVM.SupportConceptApprovalEmployeeRelations.VMList.Count == 0)
{
RadioAbsolPro.Visibility = Visibility.Visible;
RadioProzent.IsChecked = true;
SelectedApprovalPeriodVM.SupportConceptApprovalEmployeeRelations.NewVM.Betreuungsschluessel = 100;
if (SelectedApprovalPeriodVM.SupportConceptApprovalEmployeeRelations.VMList.Count == 0)
{
RadioAbsolPro.Visibility = Visibility.Visible;
RadioProzent.IsChecked = true;
SelectedApprovalPeriodVM.SupportConceptApprovalEmployeeRelations.NewVM.Betreuungsschluessel = 100;
}
else
{
}
else
{
RadioAbsolPro.Visibility = Visibility.Collapsed;
if (SelectedApprovalPeriodVM.SupportConceptApprovalEmployeeRelations.VMList.Last().IsAbsolut)
{
isabsolute = true;
SelectedApprovalPeriodVM.SupportConceptApprovalEmployeeRelations.NewVM.IsAbsolut = true;
@@ -1399,21 +1393,21 @@ namespace BeWo.View.Detail
{
max = SelectedApprovalPeriodVM.ApprovedBEPerInterval.Value * 60;
editAbsolut.MaxValue = max;
}
}
var alt =
SelectedApprovalPeriodVM.SupportConceptApprovalEmployeeRelations.VMList.Sum(
s => s.Betreuungsschluessel);
if (alt > max)
alt = max;
var alt =
SelectedApprovalPeriodVM.SupportConceptApprovalEmployeeRelations.VMList.Sum(
s => s.Betreuungsschluessel);
if (alt > max)
alt = max;
SelectedApprovalPeriodVM.SupportConceptApprovalEmployeeRelations.NewVM.Betreuungsschluessel = (int)(max - alt);
}
else
{
}
else
{
SelectedApprovalPeriodVM.SupportConceptApprovalEmployeeRelations.NewVM.IsAbsolut = false;
var alt = SelectedApprovalPeriodVM.SupportConceptApprovalEmployeeRelations.VMList.Sum(s => s.Betreuungsschluessel);
@@ -1421,26 +1415,26 @@ namespace BeWo.View.Detail
if (alt > 100)
alt = 100;
SelectedApprovalPeriodVM.SupportConceptApprovalEmployeeRelations.NewVM.Betreuungsschluessel = 100 - alt;
}
}
if (isabsolute)
{
LabelProzentual.Visibility = Visibility.Collapsed;
LabelAbsolut.Visibility = Visibility.Visible;
}
}
if (isabsolute)
{
LabelProzentual.Visibility = Visibility.Collapsed;
LabelAbsolut.Visibility = Visibility.Visible;
editProzentual.Visibility = Visibility.Collapsed;
editAbsolut.Visibility = Visibility.Visible;
editProzentual.Visibility = Visibility.Collapsed;
editAbsolut.Visibility = Visibility.Visible;
}
else
{
LabelProzentual.Visibility = Visibility.Visible;
LabelAbsolut.Visibility = Visibility.Collapsed;
}
else
{
LabelProzentual.Visibility = Visibility.Visible;
LabelAbsolut.Visibility = Visibility.Collapsed;
editProzentual.Visibility = Visibility.Visible;
editAbsolut.Visibility = Visibility.Collapsed;
}
}
editProzentual.Visibility = Visibility.Visible;
editAbsolut.Visibility = Visibility.Collapsed;
}
}
}
private void button_addBetreuungsschluessel_Click(object sender, RoutedEventArgs e)
@@ -1470,9 +1464,9 @@ namespace BeWo.View.Detail
{
MessageBox.Show("Die Summe der Anteile liegt bei über 100%. Hinzufügen nicht möglich.", "Fehler", MessageBoxButton.OK, MessageBoxImage.Warning);
return;
}
}
}
SelectedApprovalPeriodVM.SupportConceptApprovalEmployeeRelations.AddNewVMToList();
}
@@ -1496,8 +1490,8 @@ namespace BeWo.View.Detail
private void Popupedit_betreuungsschluessel_OnPreviewMouseDoubleClick(object sender, MouseButtonEventArgs e)
{
if (!BeWoUtils.CheckPopupEditClickableSpace((PopUpEdit)sender, e) ||
SelectedApprovalPeriodVM.SupportConceptApprovalEmployeeRelations.NewVM.Employee == null ||
if (!BeWoUtils.CheckPopupEditClickableSpace((PopUpEdit)sender, e) ||
SelectedApprovalPeriodVM.SupportConceptApprovalEmployeeRelations.NewVM.Employee == null ||
!BeWoApp.LoggedOnUser.HasRight(UserRightType.EmployeeView_View))
{
return;
@@ -1534,8 +1528,8 @@ namespace BeWo.View.Detail
private void DeleteBetreuungsschluesselButton_Click(object sender, RoutedEventArgs e)
{
var btn = (Button) sender;
var currentObject = (SupportConceptApprovalPeriodEmployeeRelVM) ((EditGridCellData) btn.Tag).RowData.Row;
var btn = (Button)sender;
var currentObject = (SupportConceptApprovalPeriodEmployeeRelVM)((EditGridCellData)btn.Tag).RowData.Row;
var supportConceptCostBearerRel = ViewModel.CostBearerRelations.VMList.FirstOrDefault(f => f.ApprovalPeriodList.VMList.Any(a => a.SupportConceptApprovalEmployeeRelations.VMList.Contains(currentObject)));
var approvalPeriod = supportConceptCostBearerRel.ApprovalPeriodList.VMList.FirstOrDefault(f => f.SupportConceptApprovalEmployeeRelations.VMList.Contains(currentObject));
@@ -1560,17 +1554,13 @@ namespace BeWo.View.Detail
{
var cbRelVM = this.tabcontrol_costbearers.SelectedItem as SupportConceptCostBearerRelVM;
var actual = SelectedApprovalPeriodVM;
if (actual == null)
{
actual = cbRelVM.ApprovalPeriodList.VMList.OrderByDescending(i => i.StartDate).FirstOrDefault();
}
var actual = SelectedApprovalPeriodVM ?? cbRelVM.ApprovalPeriodList.VMList.OrderByDescending(i => i.StartDate).FirstOrDefault();
if (actual.ApprovedBEPerInterval.HasValue)
{
editAbsolut.MaxValue = actual.ApprovedBEPerInterval * 60;
}
SelectedApprovalPeriodVM.SupportConceptApprovalEmployeeRelations.NewVM.Betreuungsschluessel = editAbsolut.MaxValue ?? 0;
@@ -1585,7 +1575,7 @@ namespace BeWo.View.Detail
private void Tabitem_tasks_OnSelected(object sender, RoutedEventArgs e)
{
if(ViewModel.IsNew)
if (ViewModel.IsNew)
{
tabitem_grid_tasks.Visibility = Visibility.Collapsed;
@@ -1595,13 +1585,29 @@ namespace BeWo.View.Detail
tabitem_grid_tasks.Visibility = Visibility.Visible;
}
private void RadioButton_Checked(object sender, RoutedEventArgs e)
{
var check = (RadioButton)sender;
var selected = (SupportConceptApprovalPeriodVM)check.Tag;
switch (check.Name)
{
case "RadioButtonBudget":
selected.Bewilligungsart = Bewilligungsart.Budget;
break;
case "RadioButtonDirekt":
selected.Bewilligungsart = Bewilligungsart.Direkt;
break;
}
}
}
public class ValueListEntryTypeToColorConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
var type = (ValueListEntryType) value;
var type = (ValueListEntryType)value;
if (type.Equals(ValueListEntryType.SupportConceptIndividualGoalCategoryType) || type.Equals(ValueListEntryType.SupportConceptIndividualGoalType))
{

View File

@@ -1,15 +1,27 @@
using System.Collections.Generic;
using BS.Shared.Core;
using BS.Shared.DataContracts;
namespace BeWo.ViewModel.ListViewModel
{
public class SupportConceptApprovalPeriodListVM : AbstractDCListMapperVM<SupportConceptApprovalPeriodDC, SupportConceptApprovalPeriodVM>
{
private ObservableSortCollection<BudgetDC> _Budgets;
#region Constructors and Destructors
public SupportConceptApprovalPeriodListVM(List<SupportConceptApprovalPeriodDC> pDCs) : base(pDCs) {}
public SupportConceptApprovalPeriodListVM(List<SupportConceptApprovalPeriodDC> pDCs, ObservableSortCollection<BudgetDC> budgets) : base(pDCs)
{
_Budgets = budgets;
}
protected override SupportConceptApprovalPeriodVM CreateVM(SupportConceptApprovalPeriodDC pDC)
{
var vm = base.CreateVM(pDC);
vm.Budgets = _Budgets;
return vm;
}
#endregion
}
}

View File

@@ -1,13 +1,25 @@
using System.Collections.Generic;
using BS.Shared.Core;
using BS.Shared.DataContracts;
namespace BeWo.ViewModel.ListViewModel
{
public class SupportConceptCostBearerRelListVM : AbstractDCListMapperVM<SupportConceptCostBearerRelDC, SupportConceptCostBearerRelVM>
{
public SupportConceptCostBearerRelListVM(IEnumerable<SupportConceptCostBearerRelDC> pList) : base(pList)
private ObservableSortCollection<BudgetDC> _Budgets;
public SupportConceptCostBearerRelListVM(IEnumerable<SupportConceptCostBearerRelDC> pList, ObservableSortCollection<BudgetDC> budgets) : base(pList)
{
_Budgets = budgets;
}
protected override SupportConceptCostBearerRelVM CreateVM(SupportConceptCostBearerRelDC pDC)
{
var vm = base.CreateVM(pDC);
vm.Budgets = _Budgets;
return vm;
}
}
}

View File

@@ -4,6 +4,7 @@ using System.Collections.Generic;
using BeWo.ViewModel.ListViewModel;
using BS.Shared;
using BS.Shared.Core;
using BS.Shared.DataContracts;
namespace BeWo.ViewModel
@@ -12,45 +13,50 @@ namespace BeWo.ViewModel
{
#region Constants and Fields
public static string PropertyName_ApprovedBEInterval = "ApprovedBEInterval";
public static string PropertyName_ApprovedBEPerInterval = "ApprovedBEPerInterval";
public static string PropertyName_ContactCountInterval = "ContactCountInterval";
public static string PropertyName_ContactCountPerInterval = "ContactCountPerInterval";
public static string PropertyName_ApprovedBETotal = "ApprovedBETotal";
public static string PropertyName_ApprovedFixedAmount = "ApprovedFixedAmount";
public static string PropertyName_ApprovedFixedAmountInterval = "ApprovedFixedAmountInterval";
public static string PropertyName_EndDate = "EndDate";
public static string PropertyName_IsApprovedBEShifting = "IsApprovedBEShifting";
public static string PropertyName_IsApprovedFixedAmountShifting = "IsApprovedFixedAmountShifting";
public static string PropertyName_MonthlyPayment = "MonthlyPayment";
public static string PropertyName_ServiceUnitName = "ServiceUnitName";
public static string PropertyName_StartDate = "StartDate";
public static string PropertyName_Percentage = "Percentage";
public static string PropertyName_ServiceCategory = "ServiceCategory";
public static string PropertyName_ApprovedBEInterval = "ApprovedBEInterval";
public static string PropertyName_ApprovedBEPerInterval = "ApprovedBEPerInterval";
public static string PropertyName_ContactCountInterval = "ContactCountInterval";
public static string PropertyName_ContactCountPerInterval = "ContactCountPerInterval";
public static string PropertyName_ApprovedBETotal = "ApprovedBETotal";
public static string PropertyName_ApprovedFixedAmount = "ApprovedFixedAmount";
public static string PropertyName_ApprovedFixedAmountInterval = "ApprovedFixedAmountInterval";
public static string PropertyName_EndDate = "EndDate";
public static string PropertyName_IsApprovedBEShifting = "IsApprovedBEShifting";
public static string PropertyName_IsApprovedFixedAmountShifting = "IsApprovedFixedAmountShifting";
public static string PropertyName_MonthlyPayment = "MonthlyPayment";
public static string PropertyName_ServiceUnitName = "ServiceUnitName";
public static string PropertyName_StartDate = "StartDate";
public static string PropertyName_Percentage = "Percentage";
public static string PropertyName_ServiceCategory = "ServiceCategory";
public static string PropertyName_SupportConceptApprovalEmployeeRelations = "SupportConceptApprovalEmployeeRelations";
private SupportConceptApprovalInterval? _ApprovedBEInterval;
private decimal? _ApprovedBEPerInterval;
private SupportConceptApprovalInterval? _ContactCountInterval;
private decimal? _ContactCountPerInterval;
private decimal? _ApprovedBETotal;
private decimal? _ApprovedFixedAmount;
private SupportConceptApprovalInterval? _ApprovedFixedAmountInterval;
private DateTime? _EndDate;
private bool _IsApprovedBEShifting;
private bool _IsApprovedFixedAmountShifting;
private decimal? _MonthlyPayment;
private string _ServiceUnitName;
private DateTime? _StartDate;
private decimal? _Percentage;
private ServiceCategoryDC _ServiceCategory;
private SupportConceptApprovalInterval? _ApprovedBEInterval;
private decimal? _ApprovedBEPerInterval;
private SupportConceptApprovalInterval? _ContactCountInterval;
private decimal? _ContactCountPerInterval;
private decimal? _ApprovedBETotal;
private decimal? _ApprovedFixedAmount;
private SupportConceptApprovalInterval? _ApprovedFixedAmountInterval;
private DateTime? _EndDate;
private bool _IsApprovedBEShifting;
private bool _IsApprovedFixedAmountShifting;
private decimal? _MonthlyPayment;
private string _ServiceUnitName;
private DateTime? _StartDate;
private decimal? _Percentage;
private ServiceCategoryDC _ServiceCategory;
private SupportConceptApprovalPeriodEmployeeRelListVM _SupportConceptApprovalEmployeeRelations;
private BudgetDC _BudgetDC;
private Bewilligungsart _Bewilligungsart;
private ObservableSortCollection<BudgetDC> _Budgets;
#endregion
#region Constructors and Destructors
public SupportConceptApprovalPeriodVM(SupportConceptApprovalPeriodDC pdc) : base(pdc, !pdc.SupportConceptApprovalPeriodOid.HasValue) {}
public SupportConceptApprovalPeriodVM(SupportConceptApprovalPeriodDC pdc) : base(pdc, !pdc.SupportConceptApprovalPeriodOid.HasValue)
{
}
#endregion
@@ -92,41 +98,41 @@ namespace BeWo.ViewModel
}
}
public SupportConceptApprovalInterval? ContactCountInterval
{
get
{
return this._ContactCountInterval;
}
public SupportConceptApprovalInterval? ContactCountInterval
{
get
{
return this._ContactCountInterval;
}
set
{
if (this.AreDifferent(this._ContactCountInterval, value))
{
this._ContactCountInterval = value;
this.StoreDirtyInformation(this.AreDifferent(this.DataContract.ContactCountInterval, value), PropertyName_ContactCountInterval);
this.FirePropertyChanged(PropertyName_ContactCountInterval);
}
}
}
set
{
if (this.AreDifferent(this._ContactCountInterval, value))
{
this._ContactCountInterval = value;
this.StoreDirtyInformation(this.AreDifferent(this.DataContract.ContactCountInterval, value), PropertyName_ContactCountInterval);
this.FirePropertyChanged(PropertyName_ContactCountInterval);
}
}
}
public decimal? ContactCountPerInterval
{
get
{
return this._ContactCountPerInterval;
}
public decimal? ContactCountPerInterval
{
get
{
return this._ContactCountPerInterval;
}
set
{
if (this.AreDifferent(this._ContactCountPerInterval, value))
{
this._ContactCountPerInterval = value;
this.StoreDirtyInformation(this.AreDifferent(this.DataContract.ContactCountPerInterval, value), PropertyName_ContactCountPerInterval);
this.FirePropertyChanged(PropertyName_ContactCountPerInterval);
}
}
}
set
{
if (this.AreDifferent(this._ContactCountPerInterval, value))
{
this._ContactCountPerInterval = value;
this.StoreDirtyInformation(this.AreDifferent(this.DataContract.ContactCountPerInterval, value), PropertyName_ContactCountPerInterval);
this.FirePropertyChanged(PropertyName_ContactCountPerInterval);
}
}
}
public decimal? ApprovedBETotal
{
@@ -330,13 +336,13 @@ namespace BeWo.ViewModel
}
}
public static bool ShowContactCountFields
{
get
{
return BeWoApp.Mandator.BeWoClientType == 11;
}
}
public static bool ShowContactCountFields
{
get
{
return BeWoApp.Mandator.BeWoClientType == 11;
}
}
public SupportConceptApprovalPeriodEmployeeRelListVM SupportConceptApprovalEmployeeRelations
{
@@ -349,51 +355,103 @@ namespace BeWo.ViewModel
}
}
public BudgetDC BudgetDC
{
get { return _BudgetDC; }
set
{
if (this.AreDifferent(this._BudgetDC, value))
{
this._BudgetDC = value;
this.StoreDirtyInformation(this.AreDifferent(this.DataContract.BudgetDC, value), nameof(BudgetDC));
this.FirePropertyChanged(nameof(BudgetDC));
}
}
}
public Bewilligungsart Bewilligungsart
{
get { return _Bewilligungsart; }
set
{
if (this.AreDifferent(this._Bewilligungsart, value))
{
this._Bewilligungsart = value;
this.StoreDirtyInformation(this.AreDifferent(this.DataContract.Bewilligungsart, value), nameof(Bewilligungsart));
this.FirePropertyChanged(nameof(Bewilligungsart));
FirePropertyChanged(nameof(IsBudget));
FirePropertyChanged(nameof(IsDirekt));
}
}
}
public bool IsBudget
{
get
{
bool b = Bewilligungsart == Bewilligungsart.Budget;
return b;
}
}
public bool IsDirekt
{
get { return Bewilligungsart == Bewilligungsart.Direkt; }
}
public override bool IsDirty
{
get { return base.IsDirty || SupportConceptApprovalEmployeeRelations.IsDirty; }
}
public ObservableSortCollection<BudgetDC> Budgets { get; internal set; }
#endregion
#region Methods
protected override void InitByDataContract(SupportConceptApprovalPeriodDC pDataContract)
{
_ApprovedBEInterval = pDataContract.ApprovedBEInterval;
_ApprovedBETotal = pDataContract.ApprovedBETotal;
_ApprovedBEPerInterval = pDataContract.ApprovedBEPerInterval;
_ContactCountInterval = pDataContract.ContactCountInterval;
_ContactCountPerInterval = pDataContract.ContactCountPerInterval;
_ApprovedFixedAmount = pDataContract.ApprovedFixedAmount;
_ApprovedFixedAmountInterval = pDataContract.ApprovedFixedAmountInterval;
_EndDate = pDataContract.EndDate;
_IsApprovedBEShifting = pDataContract.IsApprovedBEShifting;
_ApprovedBEInterval = pDataContract.ApprovedBEInterval;
_ApprovedBETotal = pDataContract.ApprovedBETotal;
_ApprovedBEPerInterval = pDataContract.ApprovedBEPerInterval;
_ContactCountInterval = pDataContract.ContactCountInterval;
_ContactCountPerInterval = pDataContract.ContactCountPerInterval;
_ApprovedFixedAmount = pDataContract.ApprovedFixedAmount;
_ApprovedFixedAmountInterval = pDataContract.ApprovedFixedAmountInterval;
_EndDate = pDataContract.EndDate;
_IsApprovedBEShifting = pDataContract.IsApprovedBEShifting;
_IsApprovedFixedAmountShifting = pDataContract.IsApprovedFixedAmountShifting;
_MonthlyPayment = pDataContract.MonthlyPayment;
_StartDate = pDataContract.StartDate;
_Percentage = pDataContract.Percentage;
_ServiceCategory = pDataContract.ServiceCategory;
_MonthlyPayment = pDataContract.MonthlyPayment;
_StartDate = pDataContract.StartDate;
_Percentage = pDataContract.Percentage;
_ServiceCategory = pDataContract.ServiceCategory;
_BudgetDC = pDataContract.BudgetDC;
_Bewilligungsart = pDataContract.Bewilligungsart;
SupportConceptApprovalEmployeeRelations = VMFactory.CreateSupportConceptApprovalPeriodEmployeeRelListVM(pDataContract.SupportConceptApprovalPeriodEmployeeRelations ?? (pDataContract.SupportConceptApprovalPeriodEmployeeRelations = new List<SupportConceptApprovalPeriodEmployeeRelDC>()));
}
protected override SupportConceptApprovalPeriodDC MapToDataContract(SupportConceptApprovalPeriodDC pDataContract, bool doCommit)
{
pDataContract.ApprovedBEInterval = _ApprovedBEInterval;
pDataContract.ApprovedBETotal = _ApprovedBETotal;
pDataContract.ApprovedBEPerInterval = _ApprovedBEPerInterval;
pDataContract.ContactCountInterval = _ContactCountInterval;
pDataContract.ContactCountPerInterval = _ContactCountPerInterval;
pDataContract.ApprovedFixedAmount = _ApprovedFixedAmount;
pDataContract.ApprovedFixedAmountInterval = _ApprovedFixedAmountInterval;
pDataContract.EndDate = _EndDate;
pDataContract.IsApprovedBEShifting = _IsApprovedBEShifting;
pDataContract.ApprovedBEInterval = _ApprovedBEInterval;
pDataContract.ApprovedBETotal = _ApprovedBETotal;
pDataContract.ApprovedBEPerInterval = _ApprovedBEPerInterval;
pDataContract.ContactCountInterval = _ContactCountInterval;
pDataContract.ContactCountPerInterval = _ContactCountPerInterval;
pDataContract.ApprovedFixedAmount = _ApprovedFixedAmount;
pDataContract.ApprovedFixedAmountInterval = _ApprovedFixedAmountInterval;
pDataContract.EndDate = _EndDate;
pDataContract.IsApprovedBEShifting = _IsApprovedBEShifting;
pDataContract.IsApprovedFixedAmountShifting = _IsApprovedFixedAmountShifting;
pDataContract.MonthlyPayment = _MonthlyPayment;
pDataContract.StartDate = _StartDate;
pDataContract.Percentage = _Percentage;
pDataContract.ServiceCategory = _ServiceCategory;
pDataContract.MonthlyPayment = _MonthlyPayment;
pDataContract.StartDate = _StartDate;
pDataContract.Percentage = _Percentage;
pDataContract.ServiceCategory = _ServiceCategory;
pDataContract.BudgetDC = _BudgetDC;
pDataContract.Bewilligungsart = _Bewilligungsart;
pDataContract.SupportConceptApprovalPeriodEmployeeRelations = _SupportConceptApprovalEmployeeRelations.CopyToDCList(doCommit);

View File

@@ -1,10 +1,11 @@
using System;
using System.Collections.Generic;
using BeWo.Core;
using BeWo.Validation;
using BeWo.ViewModel.ListViewModel;
using BS.Shared;
using BS.Shared.Core;
using BS.Shared.DataContracts;
using BS.Shared.DataContracts.Compact;
using BS.Shared.Extensions;
@@ -72,13 +73,17 @@ namespace BeWo.ViewModel
private DateTime? _RequestedStartDate;
private ObservableSortCollection<BudgetDC> _Budgets;
#endregion
#region Constructors and Destructors
public SupportConceptCostBearerRelVM(SupportConceptCostBearerRelDC pDC)
: base(pDC, pDC.CostBearer2SupportConceptOid == null)
{}
{
//_Budgets = budgets;
}
#endregion
@@ -472,6 +477,20 @@ namespace BeWo.ViewModel
}
}
public ObservableSortCollection<BudgetDC> Budgets
{
get { return _Budgets; }
set
{
_Budgets = value;
foreach (var item in ApprovalPeriodList.VMList)
{
item.Budgets = value;
}
}
}
#endregion
#region Methods
@@ -540,7 +559,7 @@ namespace BeWo.ViewModel
protected override void InitByDataContract(SupportConceptCostBearerRelDC pDataContract)
{
this.ApprovalPeriodList = new SupportConceptApprovalPeriodListVM(pDataContract.ApprovalPeriodList);
this.ApprovalPeriodList = new SupportConceptApprovalPeriodListVM(pDataContract.ApprovalPeriodList, Budgets);
//if (!this.IsNew)
//{

View File

@@ -71,18 +71,26 @@ namespace BeWo.ViewModel
private List<ValueListEntryDC> Children2Delete;
private List<ValueListEntryDC> selectedGoals;
private ObservableSortCollection<BudgetDC> _Budgets;
public SupportConceptVM(
SupportConceptDC pDataContract,
List<ValueListEntryDC> pAllGoalCategories,
List<ValueListEntryDC> pAllGoals,
Dictionary<ServiceCategoryDC, List<ServiceDescriptionDC>> serviceCategoryDict)
: base(pDataContract, pDataContract.SupportConceptOid == null)
Dictionary<ServiceCategoryDC, List<ServiceDescriptionDC>> serviceCategoryDict,
List<BudgetDC> budgets)
{
IsNew = pDataContract.SupportConceptOid == null;
DataContract = pDataContract;
_Budgets = budgets.ToObservableSortCollection();
InitByDataContract(DataContract);
//InitGoalCategories(pAllGoalCategories, pAllGoals);
checkedStateChangedGoals = new List<ValueListEntryVM>();
InitServiceTrees(serviceCategoryDict);
InitCombinedGoalTree();
}
private void InitCombinedGoalTree()
@@ -893,7 +901,7 @@ namespace BeWo.ViewModel
}
});
VMFactory.CreateSupportConceptCostBearerRelVMAsync(pDataContract.CostBearerRelations ?? (pDataContract.CostBearerRelations = new List<SupportConceptCostBearerRelDC>()), cb => _CostBearerRelations = cb);
VMFactory.CreateSupportConceptCostBearerRelVMAsync(pDataContract.CostBearerRelations ?? (pDataContract.CostBearerRelations = new List<SupportConceptCostBearerRelDC>()), _Budgets, cb => _CostBearerRelations = cb);
_VarFields = new VarFieldListVM(pDataContract.VarFields);
}

View File

@@ -561,9 +561,9 @@ namespace BeWo.ViewModel
ServiceFacade.DoOperationsServiceAsync(s => s.GenerateInitialSettlementDC(pSupportConcept2CostBearerOid), r => pCallBack(new SettlementVM(r)));
}
public static void CreateSupportConceptCostBearerRelVMAsync(List<SupportConceptCostBearerRelDC> pList, Action<SupportConceptCostBearerRelListVM> pCallBack)
public static void CreateSupportConceptCostBearerRelVMAsync(List<SupportConceptCostBearerRelDC> pList, ObservableSortCollection<BudgetDC> budgets, Action<SupportConceptCostBearerRelListVM> pCallBack)
{
pCallBack(new SupportConceptCostBearerRelListVM(pList));
pCallBack(new SupportConceptCostBearerRelListVM(pList, budgets));
}
public static void CreateSupportConceptGoalListVMAsync(ValueListEntryType pType, ValueListEntryType pParentType, Action<SupportConceptGoalListVM> pCallBack)
@@ -589,16 +589,17 @@ namespace BeWo.ViewModel
r1 => Cache.GetInstance().GetAllValueListEntrysByTypeAsync(
ValueListEntryType.SupportConceptGoalType,
r2 => Cache.GetInstance().GetServiceCategoryDescriptionDict(
dict =>
{
var vm = new SupportConceptVM(dc, r1, r2, dict);
if (initOriginator)
dict => ServiceFacade.DoOperationsServiceAsync(s => s.GetAllBudgets(),
r3 =>
{
vm.Originator = BeWoApp.LoggedOnUser.Employee;
}
var vm = new SupportConceptVM(dc, r1, r2, dict, r3);
if (initOriginator)
{
vm.Originator = BeWoApp.LoggedOnUser.Employee;
}
pCallBack(vm);
})));
pCallBack(vm);
}))));
}
public static void CreateTeamVMAsync(Action<TeamVM> pCallBack)

View File

@@ -712,5 +712,25 @@ namespace BeWo.Data.Entities
public virtual bool Aggressiv { get; set; }
public virtual bool Hygienebelehrung { get; set; }
public virtual String Schutzstufe { get; set; }
public virtual string TeamSimpleString
{
get
{
if (Team2CustomerList == null)
return null;
string name = "";
foreach (var t2c in Team2CustomerList)
{
if (name.Length > 0)
name += ", ";
name = t2c.Team.Name;
}
return name;
}
}
}
}

View File

@@ -427,5 +427,10 @@ namespace BeWo.Data.Entities
}
}
public virtual IList<Image> Images { get; set; }
public virtual string LastNameFirstName
{
get { return string.Format("{0}, {1}", LastName, FirstName); }
}
}
}

View File

@@ -336,5 +336,10 @@ namespace BeWo.Data.Entities
}
}
}
public virtual string TimeSpanString
{
get { return string.Format("{0:dd.MM.yyyy} - {1:dd.MM.yyyy}", StartDate, EndDate); }
}
}
}

View File

@@ -7,19 +7,19 @@ namespace BeWo.Data.Entities
{
public class SupportConceptApprovalPeriod : BeWoEntityBase
{
public static string PropertyName_ApprovedBEInterval = "ApprovedBEInterval";
public static string PropertyName_ApprovedBEPerInterval = "ApprovedBEPerInterval";
public static string PropertyName_ContactCountInterval = "ContactCountInterval";
public static string PropertyName_ContactCountPerInterval = "ContactCountPerInterval";
public static string PropertyName_ApprovedBETotal = "ApprovedBETotal";
public static string PropertyName_ApprovedFixedAmount = "ApprovedFixedAmount";
public static string PropertyName_ApprovedFixedAmountInterval = "ApprovedFixedAmountInterval";
public static string PropertyName_CostBearer2SupportConcept = "CostBearer2SupportConcept";
public static string PropertyName_EndDate = "EndDate";
public static string PropertyName_IsApprovedBEShifting = "IsApprovedBEShifting";
public static string PropertyName_ApprovedBEInterval = "ApprovedBEInterval";
public static string PropertyName_ApprovedBEPerInterval = "ApprovedBEPerInterval";
public static string PropertyName_ContactCountInterval = "ContactCountInterval";
public static string PropertyName_ContactCountPerInterval = "ContactCountPerInterval";
public static string PropertyName_ApprovedBETotal = "ApprovedBETotal";
public static string PropertyName_ApprovedFixedAmount = "ApprovedFixedAmount";
public static string PropertyName_ApprovedFixedAmountInterval = "ApprovedFixedAmountInterval";
public static string PropertyName_CostBearer2SupportConcept = "CostBearer2SupportConcept";
public static string PropertyName_EndDate = "EndDate";
public static string PropertyName_IsApprovedBEShifting = "IsApprovedBEShifting";
public static string PropertyName_IsApprovedFixedAmountShifting = "IsApprovedFixedAmountShifting";
public static string PropertyName_MonthlyPayment = "MonthlyPayment";
public static string PropertyName_StartDate = "StartDate";
public static string PropertyName_MonthlyPayment = "MonthlyPayment";
public static string PropertyName_StartDate = "StartDate";
private IList<SupportConceptApprovalPeriod2Employee> _SupportConceptApprovalPeriod2Employee;
@@ -27,9 +27,9 @@ namespace BeWo.Data.Entities
private decimal? _ApprovedBEPerInterval;
private SupportConceptApprovalInterval? _ContactCountInterval;
private SupportConceptApprovalInterval? _ContactCountInterval;
private decimal? _ContactCountPerInterval;
private decimal? _ContactCountPerInterval;
private decimal? _ApprovedBETotal;
@@ -49,6 +49,11 @@ namespace BeWo.Data.Entities
private DateTime? _StartDate;
private Budget _Budget;
private Bewilligungsart _Bewilligungsart;
public SupportConceptApprovalPeriod()
{
this._Tid = TableID.SupportConceptApprovalPeriod;
@@ -102,37 +107,37 @@ namespace BeWo.Data.Entities
}
}
public virtual SupportConceptApprovalInterval? ContactCountInterval
{
get
{
return this._ContactCountInterval;
}
public virtual SupportConceptApprovalInterval? ContactCountInterval
{
get
{
return this._ContactCountInterval;
}
set
{
if (this.AreDifferent(this._ContactCountInterval, value))
{
this._ContactCountInterval = value;
}
}
}
set
{
if (this.AreDifferent(this._ContactCountInterval, value))
{
this._ContactCountInterval = value;
}
}
}
public virtual decimal? ContactCountPerInterval
{
get
{
return this._ContactCountPerInterval;
}
public virtual decimal? ContactCountPerInterval
{
get
{
return this._ContactCountPerInterval;
}
set
{
if (this.AreDifferent(this._ContactCountPerInterval, value))
{
this._ContactCountPerInterval = value;
}
}
}
set
{
if (this.AreDifferent(this._ContactCountPerInterval, value))
{
this._ContactCountPerInterval = value;
}
}
}
public virtual decimal? ApprovedFixedAmount
{
@@ -262,13 +267,48 @@ namespace BeWo.Data.Entities
}
}
public virtual Budget Budget
{
get
{
return _Budget;
}
set
{
if (AreDifferent(_Budget, value))
{
_Budget = value;
}
}
}
public virtual Bewilligungsart Bewilligungsart
{
get
{
return _Bewilligungsart;
}
set
{
if (AreDifferent(_Bewilligungsart, value))
{
_Bewilligungsart = value;
}
}
}
public virtual decimal? Percentage { get; set; }
public virtual ServiceCategory ServiceCategory { get; set; }
public virtual IList<SupportConceptApprovalPeriod2Employee> SupportConceptApprovalPeriod2Employee
{
get { return _SupportConceptApprovalPeriod2Employee ?? (_SupportConceptApprovalPeriod2Employee = new List<SupportConceptApprovalPeriod2Employee>()); }
get
{
return _SupportConceptApprovalPeriod2Employee ?? (_SupportConceptApprovalPeriod2Employee = new List<SupportConceptApprovalPeriod2Employee>());
}
set
{

View File

@@ -25,10 +25,13 @@
<property column="ApprovedBETotal" type="Decimal" name="ApprovedBETotal" />
<property column="ApprovedFixedAmount" type="Decimal" name="ApprovedFixedAmount" />
<property column="ApprovedFixedAmountInterval" type="BS.Shared.SupportConceptApprovalInterval, BS.Shared" name="ApprovedFixedAmountInterval" />
<property column="Bewilligungsart" type="BS.Shared.Bewilligungsart, BS.Shared" name="Bewilligungsart" />
<property name="Percentage" type="System.Decimal"/>
<many-to-one name="CostBearer2SupportConcept" column="CostBearer2SupportConceptOid" class="BeWo.Data.Entities.CostBearer2SupportConcept, BeWo.Data" cascade="none" />
<many-to-one name="ServiceCategory" column="ServiceCategoryOid" class="BeWo.Data.Entities.ServiceCategory, BeWo.Data" cascade="none" />
<many-to-one name="Budget" column="BudgetOid" class="BeWo.Data.Entities.Budget" cascade="none"/>
<bag name="SupportConceptApprovalPeriod2Employee" table="SupportConceptApprovalPeriod2Employee" generic="true" cascade="all-delete-orphan" batch-size="250">
<key column="SupportConceptApprovalPeriodOid" />
<one-to-many class="BeWo.Data.Entities.SupportConceptApprovalPeriod2Employee, BeWo.Data" />

View File

@@ -0,0 +1,11 @@
ALTER TABLE `bewodemo`.`supportconceptapprovalperiod`
ADD COLUMN `BudgetOid` BIGINT(19) NULL DEFAULT NULL AFTER `ContactCountInterval`,
ADD COLUMN `Bewilligungsart` INT(10) NOT NULL DEFAULT 0 AFTER `BudgetOid`,
ADD INDEX `FK_Budget_idx` (`BudgetOid` ASC) VISIBLE;
;
ALTER TABLE `bewodemo`.`supportconceptapprovalperiod`
ADD CONSTRAINT `FK_Budget`
FOREIGN KEY (`BudgetOid`)
REFERENCES `bewodemo`.`budget` (`Oid`)
ON DELETE RESTRICT
ON UPDATE RESTRICT;

View File

@@ -0,0 +1,2 @@
ALTER TABLE `supportconceptapprovalperiod`
ADD COLUMN `BudgetOid` BIGINT(19) NULL DEFAULT NULL;

View File

@@ -1275,7 +1275,7 @@ namespace BeWo.Report.ReportObjects
if (minuten > 0)
{
dd.SpecialHours = (decimal)(Math.Round(minuten, 0) / 60);
dd.SpecialHours += (decimal)(Math.Round(minuten, 0) / 60);
}
//DateTime dtEnd = sr.Start.Value.AddMinutes((double)duration);

View File

@@ -38,10 +38,11 @@ namespace BeWoImFlow.Alt
this.xrTableCell6 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableRow10 = new DevExpress.XtraReports.UI.XRTableRow();
this.xrTableCell20 = new DevExpress.XtraReports.UI.XRTableCell();
this.ruleRateFactorNull = new DevExpress.XtraReports.UI.FormattingRule();
this.xrTableCell7 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableRow11 = new DevExpress.XtraReports.UI.XRTableRow();
this.xrTableCell1 = new DevExpress.XtraReports.UI.XRTableCell();
this.cellGeleisteteStd = new DevExpress.XtraReports.UI.XRTableCell();
this.ruleRateFactorNull = new DevExpress.XtraReports.UI.FormattingRule();
this.xrLabel6 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel5 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel4 = new DevExpress.XtraReports.UI.XRLabel();
@@ -49,16 +50,21 @@ namespace BeWoImFlow.Alt
this.ReportFooter = new DevExpress.XtraReports.UI.ReportFooterBand();
this.xrLabel10 = new DevExpress.XtraReports.UI.XRLabel();
this.topMarginBand1 = new DevExpress.XtraReports.UI.TopMarginBand();
this.xrRichText2 = new DevExpress.XtraReports.UI.XRRichText();
this.xrRichText1 = new DevExpress.XtraReports.UI.XRRichText();
this.xrPictureBox1 = new DevExpress.XtraReports.UI.XRPictureBox();
this.bottomMarginBand1 = new DevExpress.XtraReports.UI.BottomMarginBand();
this.xrRichText3 = new DevExpress.XtraReports.UI.XRRichText();
this.xrLine1 = new DevExpress.XtraReports.UI.XRLine();
this.GroupHeader1 = new DevExpress.XtraReports.UI.GroupHeaderBand();
this.lblAdresse = new DevExpress.XtraReports.UI.XRLabel();
this.DetailReport = new DevExpress.XtraReports.UI.DetailReportBand();
this.Detail1 = new DevExpress.XtraReports.UI.DetailBand();
this.xrTable5 = new DevExpress.XtraReports.UI.XRTable();
this.xrTableRow15 = new DevExpress.XtraReports.UI.XRTableRow();
this.xrTableCell17 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell23 = new DevExpress.XtraReports.UI.XRTableCell();
this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components);
this.GroupFooter1 = new DevExpress.XtraReports.UI.GroupFooterBand();
this.xrTable4 = new DevExpress.XtraReports.UI.XRTable();
this.xrTableRow30 = new DevExpress.XtraReports.UI.XRTableRow();
@@ -79,19 +85,13 @@ namespace BeWoImFlow.Alt
this.xrTableRow36 = new DevExpress.XtraReports.UI.XRTableRow();
this.xrTableCell57 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell58 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrRichText1 = new DevExpress.XtraReports.UI.XRRichText();
this.xrRichText2 = new DevExpress.XtraReports.UI.XRRichText();
this.lblAdresse = new DevExpress.XtraReports.UI.XRLabel();
this.xrTableCell1 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrRichText3 = new DevExpress.XtraReports.UI.XRRichText();
this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components);
((System.ComponentModel.ISupportInitialize)(this.xrTable1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.xrTable5)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.xrTable4)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.xrRichText1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.xrRichText2)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.xrRichText1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.xrRichText3)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.xrTable5)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.xrTable4)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this)).BeginInit();
//
// Detail
@@ -177,12 +177,6 @@ namespace BeWoImFlow.Alt
this.xrTableCell20.Text = "Bewilligte FLS";
this.xrTableCell20.Weight = 0.27692307692307705D;
//
// ruleRateFactorNull
//
this.ruleRateFactorNull.Condition = "[RateFactorText2] == ?";
this.ruleRateFactorNull.Formatting.Visible = DevExpress.Utils.DefaultBoolean.False;
this.ruleRateFactorNull.Name = "ruleRateFactorNull";
//
// xrTableCell7
//
this.xrTableCell7.Name = "xrTableCell7";
@@ -203,6 +197,16 @@ namespace BeWoImFlow.Alt
this.xrTableRow11.Name = "xrTableRow11";
this.xrTableRow11.Weight = 0.14999999999999997D;
//
// xrTableCell1
//
this.xrTableCell1.Name = "xrTableCell1";
this.xrTableCell1.Padding = new DevExpress.XtraPrinting.PaddingInfo(4, 2, 0, 0, 100F);
this.xrTableCell1.StylePriority.UseBorderColor = false;
this.xrTableCell1.StylePriority.UseBorders = false;
this.xrTableCell1.StylePriority.UsePadding = false;
this.xrTableCell1.Text = "Geleistete FLS";
this.xrTableCell1.Weight = 0.27692307692307694D;
//
// cellGeleisteteStd
//
this.cellGeleisteteStd.Name = "cellGeleisteteStd";
@@ -212,6 +216,12 @@ namespace BeWoImFlow.Alt
this.cellGeleisteteStd.StylePriority.UsePadding = false;
this.cellGeleisteteStd.Weight = 0.30769230769230765D;
//
// ruleRateFactorNull
//
this.ruleRateFactorNull.Condition = "[RateFactorText2] == ?";
this.ruleRateFactorNull.Formatting.Visible = DevExpress.Utils.DefaultBoolean.False;
this.ruleRateFactorNull.Name = "ruleRateFactorNull";
//
// xrLabel6
//
this.xrLabel6.LocationFloat = new DevExpress.Utils.PointFloat(30.00005F, 207.6249F);
@@ -264,7 +274,7 @@ namespace BeWoImFlow.Alt
//
this.ReportFooter.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] {
this.xrLabel10});
this.ReportFooter.HeightF = 150F;
this.ReportFooter.HeightF = 94.27084F;
this.ReportFooter.KeepTogether = true;
this.ReportFooter.Name = "ReportFooter";
this.ReportFooter.StylePriority.UseFont = false;
@@ -275,9 +285,10 @@ namespace BeWoImFlow.Alt
this.xrLabel10.Multiline = true;
this.xrLabel10.Name = "xrLabel10";
this.xrLabel10.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrLabel10.SizeF = new System.Drawing.SizeF(675.33F, 150F);
this.xrLabel10.SizeF = new System.Drawing.SizeF(675.33F, 94.27084F);
this.xrLabel10.StylePriority.UseFont = false;
this.xrLabel10.Text = resources.GetString("xrLabel10.Text");
this.xrLabel10.Text = "Ich bitte Sie, die Differenz in meiner nächsten Avis zu verrechnen. \r\n\r\nMit freun" +
"dlichen Grüßen\r\n\r\nAlexander Rieps";
//
// topMarginBand1
//
@@ -288,6 +299,20 @@ namespace BeWoImFlow.Alt
this.topMarginBand1.HeightF = 300F;
this.topMarginBand1.Name = "topMarginBand1";
//
// xrRichText2
//
this.xrRichText2.LocationFloat = new DevExpress.Utils.PointFloat(30F, 270F);
this.xrRichText2.Name = "xrRichText2";
this.xrRichText2.SerializableRtfString = resources.GetString("xrRichText2.SerializableRtfString");
this.xrRichText2.SizeF = new System.Drawing.SizeF(410.67F, 30F);
//
// xrRichText1
//
this.xrRichText1.LocationFloat = new DevExpress.Utils.PointFloat(550.9999F, 42.95832F);
this.xrRichText1.Name = "xrRichText1";
this.xrRichText1.SerializableRtfString = resources.GetString("xrRichText1.SerializableRtfString");
this.xrRichText1.SizeF = new System.Drawing.SizeF(154.3335F, 200.3333F);
//
// xrPictureBox1
//
this.xrPictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("xrPictureBox1.Image")));
@@ -305,6 +330,13 @@ namespace BeWoImFlow.Alt
this.bottomMarginBand1.HeightF = 120F;
this.bottomMarginBand1.Name = "bottomMarginBand1";
//
// xrRichText3
//
this.xrRichText3.LocationFloat = new DevExpress.Utils.PointFloat(30.00005F, 20.00008F);
this.xrRichText3.Name = "xrRichText3";
this.xrRichText3.SerializableRtfString = resources.GetString("xrRichText3.SerializableRtfString");
this.xrRichText3.SizeF = new System.Drawing.SizeF(650F, 80F);
//
// xrLine1
//
this.xrLine1.LocationFloat = new DevExpress.Utils.PointFloat(30.00005F, 0F);
@@ -325,6 +357,16 @@ namespace BeWoImFlow.Alt
this.GroupHeader1.Name = "GroupHeader1";
this.GroupHeader1.StylePriority.UseFont = false;
//
// lblAdresse
//
this.lblAdresse.LocationFloat = new DevExpress.Utils.PointFloat(30.00005F, 0F);
this.lblAdresse.Multiline = true;
this.lblAdresse.Name = "lblAdresse";
this.lblAdresse.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.lblAdresse.ProcessNullValues = DevExpress.XtraReports.UI.ValueSuppressType.SuppressAndShrink;
this.lblAdresse.SizeF = new System.Drawing.SizeF(410.6667F, 93.9167F);
this.lblAdresse.StylePriority.UseFont = false;
//
// DetailReport
//
this.DetailReport.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] {
@@ -390,6 +432,10 @@ namespace BeWoImFlow.Alt
this.xrTableCell23.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopRight;
this.xrTableCell23.Weight = 0.21685899000901443D;
//
// bindingSource1
//
this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.SettlementRO);
//
// GroupFooter1
//
this.GroupFooter1.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] {
@@ -587,51 +633,6 @@ namespace BeWoImFlow.Alt
this.xrTableCell58.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopRight;
this.xrTableCell58.Weight = 0.21685899000901443D;
//
// xrRichText1
//
this.xrRichText1.LocationFloat = new DevExpress.Utils.PointFloat(550.9999F, 42.95832F);
this.xrRichText1.Name = "xrRichText1";
this.xrRichText1.SerializableRtfString = resources.GetString("xrRichText1.SerializableRtfString");
this.xrRichText1.SizeF = new System.Drawing.SizeF(154.3335F, 200.3333F);
//
// xrRichText2
//
this.xrRichText2.LocationFloat = new DevExpress.Utils.PointFloat(30F, 270F);
this.xrRichText2.Name = "xrRichText2";
this.xrRichText2.SerializableRtfString = resources.GetString("xrRichText2.SerializableRtfString");
this.xrRichText2.SizeF = new System.Drawing.SizeF(410.67F, 30F);
//
// lblAdresse
//
this.lblAdresse.LocationFloat = new DevExpress.Utils.PointFloat(30.00005F, 0F);
this.lblAdresse.Multiline = true;
this.lblAdresse.Name = "lblAdresse";
this.lblAdresse.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.lblAdresse.ProcessNullValues = DevExpress.XtraReports.UI.ValueSuppressType.SuppressAndShrink;
this.lblAdresse.SizeF = new System.Drawing.SizeF(410.6667F, 93.9167F);
this.lblAdresse.StylePriority.UseFont = false;
//
// xrTableCell1
//
this.xrTableCell1.Name = "xrTableCell1";
this.xrTableCell1.Padding = new DevExpress.XtraPrinting.PaddingInfo(4, 2, 0, 0, 100F);
this.xrTableCell1.StylePriority.UseBorderColor = false;
this.xrTableCell1.StylePriority.UseBorders = false;
this.xrTableCell1.StylePriority.UsePadding = false;
this.xrTableCell1.Text = "Geleistete FLS";
this.xrTableCell1.Weight = 0.27692307692307694D;
//
// xrRichText3
//
this.xrRichText3.LocationFloat = new DevExpress.Utils.PointFloat(30.00005F, 20.00008F);
this.xrRichText3.Name = "xrRichText3";
this.xrRichText3.SerializableRtfString = resources.GetString("xrRichText3.SerializableRtfString");
this.xrRichText3.SizeF = new System.Drawing.SizeF(650F, 80F);
//
// bindingSource1
//
this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.SettlementRO);
//
// Spitzabrechnung
//
this.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] {
@@ -653,12 +654,12 @@ namespace BeWoImFlow.Alt
this.PaperKind = System.Drawing.Printing.PaperKind.A4;
this.Version = "17.1";
((System.ComponentModel.ISupportInitialize)(this.xrTable1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.xrTable5)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.xrTable4)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.xrRichText1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.xrRichText2)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.xrRichText1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.xrRichText3)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.xrTable5)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.xrTable4)).EndInit();
((System.ComponentModel.ISupportInitialize)(this)).EndInit();
}

View File

@@ -120,17 +120,6 @@
<data name="xrLabel6.Text" xml:space="preserve">
<value>anbei sende ich Ihnen die unterzeichneten Quittierungsbelege über die im Rahmen des
Betreuten Wohnens für [Salutation2] [CustomerName] erbrachten Leistungen zu. Nach unserer Berechnung ergeben sich hieraus:</value>
</data>
<data name="xrLabel10.Text" xml:space="preserve">
<value>Ich bitte Sie, die Differenz in meiner nächsten Avis zu verrechnen.
Mit freundlichen Grüßen
Alexander Rieps
- Da die Abrechnung ein automatisch erstelltes Schreiben ist, ist sie auch ohne Unterschrift gültig -
</value>
</data>
<data name="xrRichText2.SerializableRtfString" xml:space="preserve">
<value>ewBcAHIAdABmADEAXABkAGUAZgBmADAAewBcAGYAbwBuAHQAdABiAGwAewBcAGYAMAAgAEMAYQBsAGkAYgByAGkAOwB9AHsAXABmADEAIABUAGkAbQBlAHMAIABOAGUAdwAgAFIAbwBtAGEAbgA7AH0AewBcAGYAMgAgAFYAZQByAGQAYQBuAGEAOwB9AHsAXABmADMAIABBAHIAaQBhAGwAOwB9AH0AewBcAGMAbwBsAG8AcgB0AGIAbAAgADsAXAByAGUAZAAxADUAMwBcAGcAcgBlAGUAbgAxADUAMwBcAGIAbAB1AGUAMQA1ADMAIAA7AFwAcgBlAGQAMABcAGcAcgBlAGUAbgAwAFwAYgBsAHUAZQAwACAAOwBcAHIAZQBkADAAXABnAHIAZQBlAG4AMABcAGIAbAB1AGUAMgA1ADUAIAA7AH0AewBcACoAXABkAGUAZgBjAGgAcAAgAFwAZgAxAFwAZgBzADIANAB9AHsAXABzAHQAeQBsAGUAcwBoAGUAZQB0ACAAewBcAHEAbABcAGYAMQBcAGYAcwAyADQAIABOAG8AcgBtAGEAbAA7AH0AewBcAHMAMQBcAHMAYgBhAHMAZQBkAG8AbgAwAFwAcwBuAGUAeAB0ADEAXABxAGwAXABmADIAXABmAHMAMQA1AFwAYwBmADEAIABCAG8AZAB5ACAAVABlAHgAdAAgADIAOwB9AHsAXAAqAFwAYwBzADIAXABmADEAXABmAHMAMgA0AFwAYwBmADIAIABEAGUAZgBhAHUAbAB0ACAAUABhAHIAYQBnAHIAYQBwAGgAIABGAG8AbgB0ADsAfQB7AFwAKgBcAGMAcwAzAFwAcwBiAGEAcwBlAGQAbwBuADIAXABmADEAXABmAHMAMgA0AFwAYwBmADIAIABMAGkAbgBlACAATgB1AG0AYgBlAHIAOwB9AHsAXAAqAFwAYwBzADQAXAB1AGwAXABmADEAXABmAHMAMgA0AFwAYwBmADMAIABIAHkAcABlAHIAbABpAG4AawA7AH0AewBcACoAXAB0AHMANQBcAHQAcwByAG8AdwBkAFwAZgAxAFwAZgBzADIANABcAHEAbABcAHQAcwBjAGUAbABsAHAAYQBkAGQAZgBsADMAXAB0AHMAYwBlAGwAbABwAGEAZABkAGwAMQAwADgAXAB0AHMAYwBlAGwAbABwAGEAZABkAGYAYgAzAFwAdABzAGMAZQBsAGwAcABhAGQAZABmAHIAMwBcAHQAcwBjAGUAbABsAHAAYQBkAGQAcgAxADAAOABcAHQAcwBjAGUAbABsAHAAYQBkAGQAZgB0ADMAXAB0AHMAdgBlAHIAdABhAGwAdABcAGMAbAB0AHgAbAByAHQAYgAgAE4AbwByAG0AYQBsACAAVABhAGIAbABlADsAfQB7AFwAKgBcAHQAcwA2AFwAdABzAHIAbwB3AGQAXABzAGIAYQBzAGUAZABvAG4ANQBcAGYAMQBcAGYAcwAyADQAXABxAGwAXAB0AHIAYgByAGQAcgB0AFwAYgByAGQAcgBzAFwAYgByAGQAcgB3ADEAMABcAHQAcgBiAHIAZAByAGwAXABiAHIAZAByAHMAXABiAHIAZAByAHcAMQAwAFwAdAByAGIAcgBkAHIAYgBcAGIAcgBkAHIAcwBcAGIAcgBkAHIAdwAxADAAXAB0AHIAYgByAGQAcgByAFwAYgByAGQAcgBzAFwAYgByAGQAcgB3ADEAMABcAHQAcgBiAHIAZAByAGgAXABiAHIAZAByAHMAXABiAHIAZAByAHcAMQAwAFwAdAByAGIAcgBkAHIAdgBcAGIAcgBkAHIAcwBcAGIAcgBkAHIAdwAxADAAXAB0AHMAYwBlAGwAbABwAGEAZABkAGYAbAAzAFwAdABzAGMAZQBsAGwAcABhAGQAZABsADEAMAA4AFwAdABzAGMAZQBsAGwAcABhAGQAZABmAHIAMwBcAHQAcwBjAGUAbABsAHAAYQBkAGQAcgAxADAAOABcAHQAcwB2AGUAcgB0AGEAbAB0AFwAYwBsAHQAeABsAHIAdABiACAAVABhAGIAbABlACAAUwBpAG0AcABsAGUAIAAxADsAfQB9AHsAXAAqAFwAbABpAHMAdABvAHYAZQByAHIAaQBkAGUAdABhAGIAbABlAH0AXABuAG8AdQBpAGMAbwBtAHAAYQB0AFwAcwBwAGwAeQB0AHcAbgBpAG4AZQBcAGgAdABtAGEAdQB0AHMAcABcAHAAYQByAGQAXABwAGwAYQBpAG4AXABxAGwAewBcAGIAXABmADMAXABmAHMAMQA2AFwAYwBmADAAIABCAGUAVwBvAC0AaQBtAGYAbABvAHcAfQB7AFwAZgAzAFwAZgBzADEANgBcAGMAZgAwACAAIABcAHUAOQA2ADcAOQBcACcAMwBmAH0AewBcAGIAXABmADMAXABmAHMAMQA2AFwAYwBmADAAIABBAGQAYQBsAGIAZQByAHQAcwB0AHIALgAgADEAMQAtADEANQAgAFwAdQA5ADYANwA5AFwAJwAzAGYAIAA1ADEAMQAwADMAIAAgAEsAXAB1ADIANAA2AFwAJwBmADYAbABuAH0AXABsAGEAbgBnADEAMAAzADEAXABsAGEAbgBnAGYAZQAxADAAMwAxAFwAZgAxAFwAZgBzADIANABcAGMAZgAyAFwAcABhAHIAfQA=</value>

View File

@@ -97,6 +97,8 @@ www.landshuter-netzwerk.de";
}
else if (team == "Betreutes Wohnen Dingolfing-Landau")
{
pRO.Notice = "Therapeutische Wohngemeinschaft";
lblNameStandort.Text = "Betreutes Wohnen Dingolfing-Landau";
lblAnschriftKurz.Text = "Landshuter Netzwerk e.V., Bahnhofstraße 1, 84130 Dingolfing";
lblKontaktdaten.Text = @"

View File

@@ -110,7 +110,7 @@ namespace BeWo.LebenshilfeEssenReports
else
{
base.CalculateSpecialHours(dd, sr, duration);
}
}
}

View File

@@ -31,7 +31,7 @@ namespace Lori
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Spitzabrechnung));
this.Detail = new DevExpress.XtraReports.UI.DetailBand();
this.xrLine2 = new DevExpress.XtraReports.UI.XRLine();
this.xrLineFussnote = new DevExpress.XtraReports.UI.XRLine();
this.xrLine1 = new DevExpress.XtraReports.UI.XRLine();
this.xrLabel16 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel35 = new DevExpress.XtraReports.UI.XRLabel();
@@ -65,9 +65,9 @@ namespace Lori
this.xrTableCell29 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrLabel10 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel7 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel14 = new DevExpress.XtraReports.UI.XRLabel();
this.lblAktenzeichen = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel15 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel17 = new DevExpress.XtraReports.UI.XRLabel();
this.lblFussnote = new DevExpress.XtraReports.UI.XRLabel();
this.ruleRateFactorNull = new DevExpress.XtraReports.UI.FormattingRule();
this.topMarginBand1 = new DevExpress.XtraReports.UI.TopMarginBand();
this.bottomMarginBand1 = new DevExpress.XtraReports.UI.BottomMarginBand();
@@ -85,7 +85,7 @@ namespace Lori
// Detail
//
this.Detail.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] {
this.xrLine2,
this.xrLineFussnote,
this.xrLine1,
this.xrLabel16,
this.xrLabel35,
@@ -95,9 +95,9 @@ namespace Lori
this.xrTable2,
this.xrLabel10,
this.xrLabel7,
this.xrLabel14,
this.lblAktenzeichen,
this.xrLabel15,
this.xrLabel17});
this.lblFussnote});
this.Detail.Font = new System.Drawing.Font("Arial", 11F);
this.Detail.HeightF = 583.0833F;
this.Detail.Name = "Detail";
@@ -105,11 +105,11 @@ namespace Lori
this.Detail.StylePriority.UseFont = false;
this.Detail.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft;
//
// xrLine2
// xrLineFussnote
//
this.xrLine2.LocationFloat = new DevExpress.Utils.PointFloat(65.00015F, 546.2501F);
this.xrLine2.Name = "xrLine2";
this.xrLine2.SizeF = new System.Drawing.SizeF(270F, 9.75F);
this.xrLineFussnote.LocationFloat = new DevExpress.Utils.PointFloat(65.00015F, 546.2501F);
this.xrLineFussnote.Name = "xrLineFussnote";
this.xrLineFussnote.SizeF = new System.Drawing.SizeF(270F, 9.75F);
//
// xrLine1
//
@@ -384,20 +384,20 @@ namespace Lori
this.xrLabel7.Text = "Bewilligungszeitraum von [AccountingPeriod]";
this.xrLabel7.WordWrap = false;
//
// xrLabel14
// lblAktenzeichen
//
this.xrLabel14.BackColor = System.Drawing.Color.Transparent;
this.xrLabel14.CanShrink = true;
this.xrLabel14.Font = new System.Drawing.Font("Arial", 11F, System.Drawing.FontStyle.Bold);
this.xrLabel14.LocationFloat = new DevExpress.Utils.PointFloat(60.0001F, 67.37493F);
this.xrLabel14.Multiline = true;
this.xrLabel14.Name = "xrLabel14";
this.xrLabel14.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrLabel14.SizeF = new System.Drawing.SizeF(650F, 20F);
this.xrLabel14.StylePriority.UseBackColor = false;
this.xrLabel14.StylePriority.UseFont = false;
this.xrLabel14.Text = "Aktenzeichen LWL: [CustomerReferenceNumber]";
this.xrLabel14.WordWrap = false;
this.lblAktenzeichen.BackColor = System.Drawing.Color.Transparent;
this.lblAktenzeichen.CanShrink = true;
this.lblAktenzeichen.Font = new System.Drawing.Font("Arial", 11F, System.Drawing.FontStyle.Bold);
this.lblAktenzeichen.LocationFloat = new DevExpress.Utils.PointFloat(60.0001F, 67.37493F);
this.lblAktenzeichen.Multiline = true;
this.lblAktenzeichen.Name = "lblAktenzeichen";
this.lblAktenzeichen.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.lblAktenzeichen.SizeF = new System.Drawing.SizeF(650F, 20F);
this.lblAktenzeichen.StylePriority.UseBackColor = false;
this.lblAktenzeichen.StylePriority.UseFont = false;
this.lblAktenzeichen.Text = "Aktenzeichen LWL: [CustomerReferenceNumber]";
this.lblAktenzeichen.WordWrap = false;
//
// xrLabel15
//
@@ -413,18 +413,18 @@ namespace Lori
this.xrLabel15.Text = "für [Salutation2] [CustomerName], geb. [CustomerBirthdayString]";
this.xrLabel15.WordWrap = false;
//
// xrLabel17
// lblFussnote
//
this.xrLabel17.BackColor = System.Drawing.Color.Transparent;
this.xrLabel17.Font = new System.Drawing.Font("Arial", 10F);
this.xrLabel17.LocationFloat = new DevExpress.Utils.PointFloat(65.00015F, 556.0001F);
this.xrLabel17.Multiline = true;
this.xrLabel17.Name = "xrLabel17";
this.xrLabel17.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrLabel17.SizeF = new System.Drawing.SizeF(598.0811F, 27.08325F);
this.xrLabel17.StylePriority.UseBackColor = false;
this.xrLabel17.StylePriority.UseFont = false;
this.xrLabel17.Text = "¹vom LWL gesondert bewilligte Leistungen zur Deckung eines einmaligen Bedarfs";
this.lblFussnote.BackColor = System.Drawing.Color.Transparent;
this.lblFussnote.Font = new System.Drawing.Font("Arial", 10F);
this.lblFussnote.LocationFloat = new DevExpress.Utils.PointFloat(65.00015F, 556.0001F);
this.lblFussnote.Multiline = true;
this.lblFussnote.Name = "lblFussnote";
this.lblFussnote.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.lblFussnote.SizeF = new System.Drawing.SizeF(598.0811F, 27.08325F);
this.lblFussnote.StylePriority.UseBackColor = false;
this.lblFussnote.StylePriority.UseFont = false;
this.lblFussnote.Text = "¹vom LWL gesondert bewilligte Leistungen zur Deckung eines einmaligen Bedarfs";
//
// ruleRateFactorNull
//
@@ -551,12 +551,12 @@ namespace Lori
private DevExpress.XtraReports.UI.GroupHeaderBand GroupHeader1;
private DevExpress.XtraReports.UI.XRLabel lblAdresse;
private DevExpress.XtraReports.UI.XRLabel xrLabel7;
private DevExpress.XtraReports.UI.XRLabel xrLabel14;
private DevExpress.XtraReports.UI.XRLabel lblAktenzeichen;
private DevExpress.XtraReports.UI.XRLabel xrLabel10;
private DevExpress.XtraReports.UI.XRLabel xrLabel16;
private DevExpress.XtraReports.UI.XRLabel xrLabel15;
private DevExpress.XtraReports.UI.XRLabel xrLabel12;
private DevExpress.XtraReports.UI.XRLabel xrLabel17;
private DevExpress.XtraReports.UI.XRLabel lblFussnote;
private DevExpress.XtraReports.UI.XRTable xrTable2;
private DevExpress.XtraReports.UI.XRTableRow xrTableRow2;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell2;
@@ -587,7 +587,7 @@ namespace Lori
private DevExpress.XtraReports.UI.XRLabel xrLabel35;
private DevExpress.XtraReports.UI.XRLabel lblAdresseLori;
private DevExpress.XtraReports.UI.XRLabel xrLabel19;
private DevExpress.XtraReports.UI.XRLine xrLine2;
private DevExpress.XtraReports.UI.XRLine xrLineFussnote;
private DevExpress.XtraReports.UI.XRLine xrLine1;
private DevExpress.XtraReports.UI.XRLabel ortDatum;
private DevExpress.XtraReports.UI.XRCrossBandBox xrCrossBandBox1;

View File

@@ -58,7 +58,14 @@ namespace Lori
ErstelleRechnungspositionen(pRO, terminationDate);
if (!String.IsNullOrEmpty(pRO.RecipientOrganisation) &&
!pRO.RecipientOrganisation.ToLower().Contains("lwl"))
{
lblAktenzeichen.Text = String.Format("Aktenzeichen: {0}", pRO.CustomerReferenceNumber);
lblFussnote.Visible = false;
xrLineFussnote.Visible = false;
}
ortDatum.Text = string.Format("{0}", DateTime.Now.ToShortDateString());
@@ -67,7 +74,18 @@ namespace Lori
private void ErstelleRechnungspositionen(SettlementRO pRO, DateTime? terminationDate)
{
if (pRO.InvoiceItems != null && pRO.InvoiceItems.Count > 0)
bool createStandardPostition = pRO.InvoiceItems == null || pRO.InvoiceItems.Count == 0;
if (!createStandardPostition && pRO.InvoiceItems.Count == 1)
{
if (pRO.InvoiceItems[0].ItemDescription == "Spitzabrechnung" && (pRO.InvoiceItems[0].UnitCount == null || pRO.InvoiceItems[0].UnitCount.Value == 0))
{
createStandardPostition = true;
}
}
if (!createStandardPostition)
{
if (terminationDate.HasValue)
{

View File

@@ -74,6 +74,7 @@
<Compile Include="Quittierungsbeleg.Designer.cs">
<DependentUpon>Quittierungsbeleg.cs</DependentUpon>
</Compile>
<Compile Include="Service\UserService.cs" />
<Compile Include="Teamstundenkonto.cs">
<SubType>Component</SubType>
</Compile>

View File

@@ -61,8 +61,8 @@ namespace PflegedienstWessel
this.xrTableCell7 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell43 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell49 = new DevExpress.XtraReports.UI.XRTableCell();
this.formattingRuleStartDate = new DevExpress.XtraReports.UI.FormattingRule();
this.xrPictureBox1 = new DevExpress.XtraReports.UI.XRPictureBox();
this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components);
this.xrLabel3 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel17 = new DevExpress.XtraReports.UI.XRLabel();
this.lblHeader = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel7 = new DevExpress.XtraReports.UI.XRLabel();
@@ -70,7 +70,8 @@ namespace PflegedienstWessel
this.xrLabel6 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel5 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel4 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel3 = new DevExpress.XtraReports.UI.XRLabel();
this.xrPictureBox1 = new DevExpress.XtraReports.UI.XRPictureBox();
this.formattingRuleStartDate = new DevExpress.XtraReports.UI.FormattingRule();
this.formattingRuleServiceDesc = new DevExpress.XtraReports.UI.FormattingRule();
this.formattingRuleCostBearer = new DevExpress.XtraReports.UI.FormattingRule();
this.formattingRuleEmployeeName = new DevExpress.XtraReports.UI.FormattingRule();
@@ -78,6 +79,9 @@ namespace PflegedienstWessel
this.bottomMarginBand1 = new DevExpress.XtraReports.UI.BottomMarginBand();
this.xrLabel2 = new DevExpress.XtraReports.UI.XRLabel();
this.GroupFooter1 = new DevExpress.XtraReports.UI.GroupFooterBand();
this.xrLabel11 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel14 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel16 = new DevExpress.XtraReports.UI.XRLabel();
this.lblUnterschriftKlient = new DevExpress.XtraReports.UI.XRLabel();
this.lblUnterschriftMitarbeiter = new DevExpress.XtraReports.UI.XRLabel();
this.xrTableAbwesenheiten = new DevExpress.XtraReports.UI.XRTable();
@@ -112,19 +116,15 @@ namespace PflegedienstWessel
this.xrLabel9 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel1 = new DevExpress.XtraReports.UI.XRLabel();
this.fieldKontaktArt = new DevExpress.XtraReports.UI.CalculatedField();
this.xrLabel11 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel14 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel16 = new DevExpress.XtraReports.UI.XRLabel();
this.fieldStunden = new DevExpress.XtraReports.UI.CalculatedField();
this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components);
this.GroupHeader2 = new DevExpress.XtraReports.UI.GroupHeaderBand();
this.xrPageInfo1 = new DevExpress.XtraReports.UI.XRPageInfo();
this.lblSeite = new DevExpress.XtraReports.UI.XRLabel();
this.GroupHeader3 = new DevExpress.XtraReports.UI.GroupHeaderBand();
((System.ComponentModel.ISupportInitialize)(this.xrTable3)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.xrTableServiceRecords1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.xrTableAbwesenheiten)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.xrRichText2)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.xrRichText1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this)).BeginInit();
//
// Detail
@@ -139,8 +139,7 @@ namespace PflegedienstWessel
//
this.DetailReport.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] {
this.Detail1,
this.GroupHeader1,
this.GroupHeader2});
this.GroupHeader1});
this.DetailReport.DataMember = "Services";
this.DetailReport.DataSource = this.bindingSource1;
this.DetailReport.Level = 0;
@@ -522,20 +521,27 @@ namespace PflegedienstWessel
this.xrTableCell49.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopCenter;
this.xrTableCell49.Weight = 0.44692737430167606D;
//
// formattingRuleStartDate
// bindingSource1
//
this.formattingRuleStartDate.Condition = "[StartDate2] < [StartDate]";
this.formattingRuleStartDate.DataMember = "ServicesDouble";
this.formattingRuleStartDate.Formatting.Visible = DevExpress.Utils.DefaultBoolean.False;
this.formattingRuleStartDate.Name = "formattingRuleStartDate";
this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.ServicesOverviewRO);
//
// xrPictureBox1
// xrLabel3
//
this.xrPictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("xrPictureBox1.Image")));
this.xrPictureBox1.LocationFloat = new DevExpress.Utils.PointFloat(435.1389F, 0F);
this.xrPictureBox1.Name = "xrPictureBox1";
this.xrPictureBox1.SizeF = new System.Drawing.SizeF(299.8606F, 88.87501F);
this.xrPictureBox1.Sizing = DevExpress.XtraPrinting.ImageSizeMode.ZoomImage;
this.xrLabel3.BackColor = System.Drawing.Color.Gainsboro;
this.xrLabel3.Borders = ((DevExpress.XtraPrinting.BorderSide)(((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Top)
| DevExpress.XtraPrinting.BorderSide.Right)));
this.xrLabel3.Font = new System.Drawing.Font("Arial", 10F);
this.xrLabel3.LocationFloat = new DevExpress.Utils.PointFloat(42.70833F, 155.4444F);
this.xrLabel3.Name = "xrLabel3";
this.xrLabel3.Padding = new DevExpress.XtraPrinting.PaddingInfo(3, 2, 0, 0, 100F);
this.xrLabel3.SizeF = new System.Drawing.SizeF(120.6389F, 30.50001F);
this.xrLabel3.StylePriority.UseBackColor = false;
this.xrLabel3.StylePriority.UseBorders = false;
this.xrLabel3.StylePriority.UseFont = false;
this.xrLabel3.StylePriority.UsePadding = false;
this.xrLabel3.StylePriority.UseTextAlignment = false;
this.xrLabel3.Text = "Monat";
this.xrLabel3.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft;
//
// xrLabel17
//
@@ -645,23 +651,20 @@ namespace PflegedienstWessel
this.xrLabel4.Text = "Klientin, Klient";
this.xrLabel4.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft;
//
// xrLabel3
// xrPictureBox1
//
this.xrLabel3.BackColor = System.Drawing.Color.Gainsboro;
this.xrLabel3.Borders = ((DevExpress.XtraPrinting.BorderSide)(((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Top)
| DevExpress.XtraPrinting.BorderSide.Right)));
this.xrLabel3.Font = new System.Drawing.Font("Arial", 10F);
this.xrLabel3.LocationFloat = new DevExpress.Utils.PointFloat(42.70833F, 155.4444F);
this.xrLabel3.Name = "xrLabel3";
this.xrLabel3.Padding = new DevExpress.XtraPrinting.PaddingInfo(3, 2, 0, 0, 100F);
this.xrLabel3.SizeF = new System.Drawing.SizeF(120.6389F, 30.50001F);
this.xrLabel3.StylePriority.UseBackColor = false;
this.xrLabel3.StylePriority.UseBorders = false;
this.xrLabel3.StylePriority.UseFont = false;
this.xrLabel3.StylePriority.UsePadding = false;
this.xrLabel3.StylePriority.UseTextAlignment = false;
this.xrLabel3.Text = "Monat";
this.xrLabel3.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft;
this.xrPictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("xrPictureBox1.Image")));
this.xrPictureBox1.LocationFloat = new DevExpress.Utils.PointFloat(435.1389F, 0F);
this.xrPictureBox1.Name = "xrPictureBox1";
this.xrPictureBox1.SizeF = new System.Drawing.SizeF(299.8606F, 88.87501F);
this.xrPictureBox1.Sizing = DevExpress.XtraPrinting.ImageSizeMode.ZoomImage;
//
// formattingRuleStartDate
//
this.formattingRuleStartDate.Condition = "[StartDate2] < [StartDate]";
this.formattingRuleStartDate.DataMember = "ServicesDouble";
this.formattingRuleStartDate.Formatting.Visible = DevExpress.Utils.DefaultBoolean.False;
this.formattingRuleStartDate.Name = "formattingRuleStartDate";
//
// formattingRuleServiceDesc
//
@@ -737,6 +740,56 @@ namespace PflegedienstWessel
this.GroupFooter1.KeepTogether = true;
this.GroupFooter1.Name = "GroupFooter1";
//
// xrLabel11
//
this.xrLabel11.Borders = DevExpress.XtraPrinting.BorderSide.Right;
this.xrLabel11.Font = new System.Drawing.Font("Arial", 10F);
this.xrLabel11.LocationFloat = new DevExpress.Utils.PointFloat(245.0002F, 20.00001F);
this.xrLabel11.Name = "xrLabel11";
this.xrLabel11.Padding = new DevExpress.XtraPrinting.PaddingInfo(3, 2, 0, 0, 100F);
this.xrLabel11.SizeF = new System.Drawing.SizeF(85F, 20F);
this.xrLabel11.StylePriority.UseBackColor = false;
this.xrLabel11.StylePriority.UseBorders = false;
this.xrLabel11.StylePriority.UseFont = false;
this.xrLabel11.StylePriority.UsePadding = false;
this.xrLabel11.StylePriority.UseTextAlignment = false;
this.xrLabel11.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft;
//
// xrLabel14
//
this.xrLabel14.BackColor = System.Drawing.Color.Gainsboro;
this.xrLabel14.Borders = ((DevExpress.XtraPrinting.BorderSide)((DevExpress.XtraPrinting.BorderSide.Right | DevExpress.XtraPrinting.BorderSide.Bottom)));
this.xrLabel14.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "fieldStunden", "{0:0.00}")});
this.xrLabel14.Font = new System.Drawing.Font("Arial", 10F);
this.xrLabel14.LocationFloat = new DevExpress.Utils.PointFloat(330.0003F, 20.00001F);
this.xrLabel14.Name = "xrLabel14";
this.xrLabel14.Padding = new DevExpress.XtraPrinting.PaddingInfo(3, 2, 0, 0, 100F);
this.xrLabel14.SizeF = new System.Drawing.SizeF(85F, 20F);
this.xrLabel14.StylePriority.UseBackColor = false;
this.xrLabel14.StylePriority.UseBorders = false;
this.xrLabel14.StylePriority.UseFont = false;
this.xrLabel14.StylePriority.UsePadding = false;
this.xrLabel14.StylePriority.UseTextAlignment = false;
this.xrLabel14.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
//
// xrLabel16
//
this.xrLabel16.BackColor = System.Drawing.Color.Gainsboro;
this.xrLabel16.Borders = ((DevExpress.XtraPrinting.BorderSide)((DevExpress.XtraPrinting.BorderSide.Right | DevExpress.XtraPrinting.BorderSide.Bottom)));
this.xrLabel16.Font = new System.Drawing.Font("Arial", 10F);
this.xrLabel16.LocationFloat = new DevExpress.Utils.PointFloat(415.0004F, 20.00001F);
this.xrLabel16.Name = "xrLabel16";
this.xrLabel16.Padding = new DevExpress.XtraPrinting.PaddingInfo(3, 2, 0, 0, 100F);
this.xrLabel16.SizeF = new System.Drawing.SizeF(320F, 20F);
this.xrLabel16.StylePriority.UseBackColor = false;
this.xrLabel16.StylePriority.UseBorders = false;
this.xrLabel16.StylePriority.UseFont = false;
this.xrLabel16.StylePriority.UsePadding = false;
this.xrLabel16.StylePriority.UseTextAlignment = false;
this.xrLabel16.Text = "Stunden";
this.xrLabel16.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft;
//
// lblUnterschriftKlient
//
this.lblUnterschriftKlient.Borders = DevExpress.XtraPrinting.BorderSide.Top;
@@ -1136,70 +1189,25 @@ namespace PflegedienstWessel
this.fieldKontaktArt.FieldType = DevExpress.XtraReports.UI.FieldType.String;
this.fieldKontaktArt.Name = "fieldKontaktArt";
//
// xrLabel11
//
this.xrLabel11.Borders = DevExpress.XtraPrinting.BorderSide.Right;
this.xrLabel11.Font = new System.Drawing.Font("Arial", 10F);
this.xrLabel11.LocationFloat = new DevExpress.Utils.PointFloat(245.0002F, 20.00001F);
this.xrLabel11.Name = "xrLabel11";
this.xrLabel11.Padding = new DevExpress.XtraPrinting.PaddingInfo(3, 2, 0, 0, 100F);
this.xrLabel11.SizeF = new System.Drawing.SizeF(85F, 20F);
this.xrLabel11.StylePriority.UseBackColor = false;
this.xrLabel11.StylePriority.UseBorders = false;
this.xrLabel11.StylePriority.UseFont = false;
this.xrLabel11.StylePriority.UsePadding = false;
this.xrLabel11.StylePriority.UseTextAlignment = false;
this.xrLabel11.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft;
//
// xrLabel14
//
this.xrLabel14.BackColor = System.Drawing.Color.Gainsboro;
this.xrLabel14.Borders = ((DevExpress.XtraPrinting.BorderSide)((DevExpress.XtraPrinting.BorderSide.Right | DevExpress.XtraPrinting.BorderSide.Bottom)));
this.xrLabel14.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "fieldStunden", "{0:0.00}")});
this.xrLabel14.Font = new System.Drawing.Font("Arial", 10F);
this.xrLabel14.LocationFloat = new DevExpress.Utils.PointFloat(330.0003F, 20.00001F);
this.xrLabel14.Name = "xrLabel14";
this.xrLabel14.Padding = new DevExpress.XtraPrinting.PaddingInfo(3, 2, 0, 0, 100F);
this.xrLabel14.SizeF = new System.Drawing.SizeF(85F, 20F);
this.xrLabel14.StylePriority.UseBackColor = false;
this.xrLabel14.StylePriority.UseBorders = false;
this.xrLabel14.StylePriority.UseFont = false;
this.xrLabel14.StylePriority.UsePadding = false;
this.xrLabel14.StylePriority.UseTextAlignment = false;
this.xrLabel14.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
//
// xrLabel16
//
this.xrLabel16.BackColor = System.Drawing.Color.Gainsboro;
this.xrLabel16.Borders = ((DevExpress.XtraPrinting.BorderSide)((DevExpress.XtraPrinting.BorderSide.Right | DevExpress.XtraPrinting.BorderSide.Bottom)));
this.xrLabel16.Font = new System.Drawing.Font("Arial", 10F);
this.xrLabel16.LocationFloat = new DevExpress.Utils.PointFloat(415.0004F, 20.00001F);
this.xrLabel16.Name = "xrLabel16";
this.xrLabel16.Padding = new DevExpress.XtraPrinting.PaddingInfo(3, 2, 0, 0, 100F);
this.xrLabel16.SizeF = new System.Drawing.SizeF(320F, 20F);
this.xrLabel16.StylePriority.UseBackColor = false;
this.xrLabel16.StylePriority.UseBorders = false;
this.xrLabel16.StylePriority.UseFont = false;
this.xrLabel16.StylePriority.UsePadding = false;
this.xrLabel16.StylePriority.UseTextAlignment = false;
this.xrLabel16.Text = "Stunden";
this.xrLabel16.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft;
//
// fieldStunden
//
this.fieldStunden.Expression = "[TotalFLMBillable] / 60";
this.fieldStunden.FieldType = DevExpress.XtraReports.UI.FieldType.Decimal;
this.fieldStunden.Name = "fieldStunden";
//
// bindingSource1
// lblSeite
//
this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.ServicesOverviewRO);
this.lblSeite.LocationFloat = new DevExpress.Utils.PointFloat(42.71189F, 25F);
this.lblSeite.Name = "lblSeite";
this.lblSeite.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.lblSeite.SizeF = new System.Drawing.SizeF(372.288F, 25F);
this.lblSeite.StylePriority.UseFont = false;
this.lblSeite.PrintOnPage += new DevExpress.XtraReports.UI.PrintOnPageEventHandler(this.lblSeite_PrintOnPage);
//
// GroupHeader2
// GroupHeader3
//
this.GroupHeader2.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] {
this.xrPageInfo1,
this.GroupHeader3.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] {
this.lblSeite,
this.xrLabel3,
this.xrLabel17,
this.lblHeader,
@@ -1209,17 +1217,9 @@ namespace PflegedienstWessel
this.xrLabel5,
this.xrLabel4,
this.xrPictureBox1});
this.GroupHeader2.HeightF = 240F;
this.GroupHeader2.Level = 1;
this.GroupHeader2.Name = "GroupHeader2";
//
// xrPageInfo1
//
this.xrPageInfo1.Format = "Seite {0} von {1}";
this.xrPageInfo1.LocationFloat = new DevExpress.Utils.PointFloat(42.70833F, 25F);
this.xrPageInfo1.Name = "xrPageInfo1";
this.xrPageInfo1.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 96F);
this.xrPageInfo1.SizeF = new System.Drawing.SizeF(243.75F, 32.29166F);
this.GroupHeader3.HeightF = 240F;
this.GroupHeader3.Name = "GroupHeader3";
this.GroupHeader3.RepeatEveryPage = true;
//
// Quittierungsbeleg
//
@@ -1228,7 +1228,8 @@ namespace PflegedienstWessel
this.DetailReport,
this.topMarginBand1,
this.bottomMarginBand1,
this.GroupFooter1});
this.GroupFooter1,
this.GroupHeader3});
this.CalculatedFields.AddRange(new DevExpress.XtraReports.UI.CalculatedField[] {
this.fieldKontaktArt,
this.fieldStunden});
@@ -1246,10 +1247,10 @@ namespace PflegedienstWessel
this.Version = "17.1";
((System.ComponentModel.ISupportInitialize)(this.xrTable3)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.xrTableServiceRecords1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.xrTableAbwesenheiten)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.xrRichText2)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.xrRichText1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this)).EndInit();
}
@@ -1342,7 +1343,7 @@ namespace PflegedienstWessel
private DevExpress.XtraReports.UI.XRLabel xrLabel14;
private DevExpress.XtraReports.UI.XRLabel xrLabel16;
private DevExpress.XtraReports.UI.CalculatedField fieldStunden;
private DevExpress.XtraReports.UI.GroupHeaderBand GroupHeader2;
private DevExpress.XtraReports.UI.XRPageInfo xrPageInfo1;
private DevExpress.XtraReports.UI.XRLabel lblSeite;
private DevExpress.XtraReports.UI.GroupHeaderBand GroupHeader3;
}
}

View File

@@ -12,7 +12,7 @@ namespace PflegedienstWessel
{
InitializeComponent();
}
public void SetReportDataSource(ServicesOverviewRO pRO)
{
var catDict = new Dictionary<string, string>();
@@ -108,5 +108,10 @@ namespace PflegedienstWessel
}
}
}
private void lblSeite_PrintOnPage(object sender, DevExpress.XtraReports.UI.PrintOnPageEventArgs e)
{
lblSeite.Text = String.Format("Seite {0} von {1}", e.PageIndex + 1, e.PageCount);
}
}
}

View File

@@ -117,6 +117,9 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="bindingSource1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>21, 17</value>
</metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="xrPictureBox1.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
@@ -379,9 +382,6 @@
AABaU6cBAACgNXUaAAAAWlOnAQAAoDV1GgAAAFr67W//fwQ0DpKntHgrAAAAAElFTkSuQmCC
</value>
</data>
<metadata name="bindingSource1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>21, 17</value>
</metadata>
<data name="xrRichText2.SerializableRtfString" xml:space="preserve">
<value>ewBcAHIAdABmADEAXABkAGUAZgBmADAAewBcAGYAbwBuAHQAdABiAGwAewBcAGYAMAAgAEMAYQBsAGkAYgByAGkAOwB9AHsAXABmADEAIABUAGkAbQBlAHMAIABOAGUAdwAgAFIAbwBtAGEAbgA7AH0AewBcAGYAMgAgAEEAcgBpAGEAbAA7AH0AfQB7AFwAYwBvAGwAbwByAHQAYgBsACAAOwBcAHIAZQBkADAAXABnAHIAZQBlAG4AMABcAGIAbAB1AGUAMAAgADsAXAByAGUAZAAwAFwAZwByAGUAZQBuADAAXABiAGwAdQBlADIANQA1ACAAOwB9AHsAXAAqAFwAZABlAGYAYwBoAHAAIABcAGYAMQBcAGYAcwAyADQAfQB7AFwAcwB0AHkAbABlAHMAaABlAGUAdAAgAHsAXABxAGwAXABmADEAXABmAHMAMgA0ACAATgBvAHIAbQBhAGwAOwB9AHsAXAAqAFwAYwBzADEAXABmADEAXABmAHMAMgA0AFwAYwBmADEAIABEAGUAZgBhAHUAbAB0ACAAUABhAHIAYQBnAHIAYQBwAGgAIABGAG8AbgB0ADsAfQB7AFwAKgBcAGMAcwAyAFwAcwBiAGEAcwBlAGQAbwBuADEAXABmADEAXABmAHMAMgA0AFwAYwBmADEAIABMAGkAbgBlACAATgB1AG0AYgBlAHIAOwB9AHsAXAAqAFwAYwBzADMAXAB1AGwAXABmADEAXABmAHMAMgA0AFwAYwBmADIAIABIAHkAcABlAHIAbABpAG4AawA7AH0AewBcACoAXAB0AHMANABcAHQAcwByAG8AdwBkAFwAZgAxAFwAZgBzADIANABcAHEAbABcAHQAcwBjAGUAbABsAHAAYQBkAGQAZgBsADMAXAB0AHMAYwBlAGwAbABwAGEAZABkAGwAMQAwADgAXAB0AHMAYwBlAGwAbABwAGEAZABkAGYAYgAzAFwAdABzAGMAZQBsAGwAcABhAGQAZABmAHIAMwBcAHQAcwBjAGUAbABsAHAAYQBkAGQAcgAxADAAOABcAHQAcwBjAGUAbABsAHAAYQBkAGQAZgB0ADMAXAB0AHMAdgBlAHIAdABhAGwAdABcAGMAbAB0AHgAbAByAHQAYgAgAE4AbwByAG0AYQBsACAAVABhAGIAbABlADsAfQB7AFwAKgBcAHQAcwA1AFwAdABzAHIAbwB3AGQAXABzAGIAYQBzAGUAZABvAG4ANABcAGYAMQBcAGYAcwAyADQAXABxAGwAXAB0AHIAYgByAGQAcgB0AFwAYgByAGQAcgBzAFwAYgByAGQAcgB3ADEAMABcAHQAcgBiAHIAZAByAGwAXABiAHIAZAByAHMAXABiAHIAZAByAHcAMQAwAFwAdAByAGIAcgBkAHIAYgBcAGIAcgBkAHIAcwBcAGIAcgBkAHIAdwAxADAAXAB0AHIAYgByAGQAcgByAFwAYgByAGQAcgBzAFwAYgByAGQAcgB3ADEAMABcAHQAcgBiAHIAZAByAGgAXABiAHIAZAByAHMAXABiAHIAZAByAHcAMQAwAFwAdAByAGIAcgBkAHIAdgBcAGIAcgBkAHIAcwBcAGIAcgBkAHIAdwAxADAAXAB0AHMAYwBlAGwAbABwAGEAZABkAGYAbAAzAFwAdABzAGMAZQBsAGwAcABhAGQAZABsADEAMAA4AFwAdABzAGMAZQBsAGwAcABhAGQAZABmAHIAMwBcAHQAcwBjAGUAbABsAHAAYQBkAGQAcgAxADAAOABcAHQAcwB2AGUAcgB0AGEAbAB0AFwAYwBsAHQAeABsAHIAdABiACAAVABhAGIAbABlACAAUwBpAG0AcABsAGUAIAAxADsAfQB9AHsAXAAqAFwAbABpAHMAdABvAHYAZQByAHIAaQBkAGUAdABhAGIAbABlAH0AXABuAG8AdQBpAGMAbwBtAHAAYQB0AFwAcwBwAGwAeQB0AHcAbgBpAG4AZQBcAGgAdABtAGEAdQB0AHMAcABcAHAAYQByAGQAXABwAGwAYQBpAG4AXABxAGwAewBcAGYAMgBcAGYAcwAyADAAXABjAGYAMQAgAEsAZQBpAG4AZQAgAH0AewBcAGwAYQBuAGcAMQAwADMAMQBcAGwAYQBuAGcAZgBlADEAMAAzADEAXAB1AGwAXABmADIAXABmAHMAMgAwAFwAYwBmADEAIABLAHIAYQBuAGsAZQBuAGgAYQB1AHMAYQB1AGYAZQBuAHQAaABhAGwAdABlAH0AXABsAGEAbgBnADEAMAAzADEAXABsAGEAbgBnAGYAZQAxADAAMwAxAFwAdQBsAFwAZgAyAFwAZgBzADIAMABcAGMAZgAxAFwAcABhAHIAXABwAGEAcgBkAFwAcABsAGEAaQBuAFwAcQBsAHsAXABsAGEAbgBnADEAMAAzADEAXABsAGEAbgBnAGYAZQAxADAAMwAxAFwAdQBsAFwAZgAyAFwAZgBzADIAMABcAGMAZgAxACAAYgBlAGsAYQBuAG4AdAAgAG8AZABlAHIAIAB9AFwAbABhAG4AZwAxADAAMwAxAFwAbABhAG4AZwBmAGUAMQAwADMAMQBcAHUAbABcAGYAMgBcAGYAcwAyADAAXABjAGYAMQBcAHAAYQByAFwAcABhAHIAZABcAHAAbABhAGkAbgBcAHEAbAB7AFwAbABhAG4AZwAxADAAMwAxAFwAbABhAG4AZwBmAGUAMQAwADMAMQBcAHUAbABcAGYAMgBcAGYAcwAyADAAXABjAGYAMQAgAGEAYgByAGUAYwBoAG4AdQBuAGcAcwByAGUAbABlAHYAYQBuAHQAfQB7AFwAbABhAG4AZwAxADAAMwAxAFwAbABhAG4AZwBmAGUAMQAwADMAMQBcAGYAMgBcAGYAcwAyADAAXABjAGYAMQAgACAAaQBtACAAQQBiAHIAZQBjAGgAbgB1AG4AZwBzAHoAZQBpAHQAcgBhAHUAbQB9AFwAbABhAG4AZwAxADAAMwAxAFwAbABhAG4AZwBmAGUAMQAwADMAMQBcAGYAMQBcAGYAcwAyADQAXABjAGYAMQBcAHAAYQByAH0A</value>
</data>

View File

@@ -0,0 +1,52 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using BeWo.Data.Access;
using BeWo.Data.Entities;
using BeWo.Service.Core;
using BeWo.Service.DCEntityMapper;
using BeWo.Service.MessageContracts;
using BeWo.Service.Plugins;
using BS.Shared;
using BS.Shared.Core;
using BS.Shared.DataContracts;
using BS.Shared.Extensions;
using BS.Shared.Services;
using Utils = BS.Shared.Core.Utils;
namespace PflegedienstWessel.Service
{
public class CustomUserService : UserService
{
public override UserDC LoadUserByLoginName(string pUserName)
{
var user = base.LoadUserByLoginName(pUserName);
bool isTeamleiter = false;
foreach (var group in user.UserGroups)
{
if (group.Name.Contains("Teamleitung"))
{
isTeamleiter = true;
}
}
if (isTeamleiter)
{
foreach (var toid in user.Employee.TeamOids)
{
if (user.Employee.LeadingTeamOids == null)
{
user.Employee.LeadingTeamOids = new List<long>();
}
if (!user.Employee.LeadingTeamOids.Contains(toid))
{
user.Employee.LeadingTeamOids.Add(toid);
}
}
}
return user;
}
}
}

View File

@@ -31,14 +31,18 @@ namespace BeWo.SHGSchwerte
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Spitzabrechnung));
this.Detail = new DevExpress.XtraReports.UI.DetailBand();
this.xrLabel16 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel10 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel7 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel14 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel15 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLine2 = new DevExpress.XtraReports.UI.XRLine();
this.xrLine1 = new DevExpress.XtraReports.UI.XRLine();
this.xrLabel16 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel35 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel12 = new DevExpress.XtraReports.UI.XRLabel();
this.xrCheckBox2 = new DevExpress.XtraReports.UI.XRCheckBox();
this.xrCheckBox1 = new DevExpress.XtraReports.UI.XRCheckBox();
this.xrTable2 = new DevExpress.XtraReports.UI.XRTable();
this.tableRechnungspositionen = new DevExpress.XtraReports.UI.XRTable();
this.xrTableRow2 = new DevExpress.XtraReports.UI.XRTableRow();
this.xrTableCell2 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell4 = new DevExpress.XtraReports.UI.XRTableCell();
@@ -63,10 +67,6 @@ namespace BeWo.SHGSchwerte
this.cellHourlyRate3 = new DevExpress.XtraReports.UI.XRTableCell();
this.cellFLS3 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell29 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrLabel10 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel7 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel14 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel15 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel17 = new DevExpress.XtraReports.UI.XRLabel();
this.ruleRateFactorNull = new DevExpress.XtraReports.UI.FormattingRule();
this.topMarginBand1 = new DevExpress.XtraReports.UI.TopMarginBand();
@@ -78,45 +78,27 @@ namespace BeWo.SHGSchwerte
this.xrLabel9 = new DevExpress.XtraReports.UI.XRLabel();
this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components);
this.xrCrossBandBox1 = new DevExpress.XtraReports.UI.XRCrossBandBox();
((System.ComponentModel.ISupportInitialize)(this.xrTable2)).BeginInit();
this.GroupFooter1 = new DevExpress.XtraReports.UI.GroupFooterBand();
this.GroupFooter2 = new DevExpress.XtraReports.UI.GroupFooterBand();
((System.ComponentModel.ISupportInitialize)(this.tableRechnungspositionen)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this)).BeginInit();
//
// Detail
//
this.Detail.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] {
this.xrLine2,
this.xrLine1,
this.xrLabel16,
this.xrLabel35,
this.xrLabel12,
this.xrCheckBox2,
this.xrCheckBox1,
this.xrTable2,
this.xrLabel10,
this.xrLabel7,
this.xrLabel14,
this.xrLabel15,
this.xrLabel17});
this.xrLabel15});
this.Detail.Font = new System.Drawing.Font("Arial", 11F);
this.Detail.HeightF = 583.0834F;
this.Detail.HeightF = 165F;
this.Detail.Name = "Detail";
this.Detail.Padding = new DevExpress.XtraPrinting.PaddingInfo(0, 0, 0, 0, 100F);
this.Detail.StylePriority.UseFont = false;
this.Detail.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft;
//
// xrLine2
//
this.xrLine2.LocationFloat = new DevExpress.Utils.PointFloat(65.00015F, 546.2501F);
this.xrLine2.Name = "xrLine2";
this.xrLine2.SizeF = new System.Drawing.SizeF(270F, 9.75F);
//
// xrLine1
//
this.xrLine1.LocationFloat = new DevExpress.Utils.PointFloat(65.00015F, 476.25F);
this.xrLine1.Name = "xrLine1";
this.xrLine1.SizeF = new System.Drawing.SizeF(309.5687F, 9.749969F);
//
// xrLabel16
//
this.xrLabel16.BackColor = System.Drawing.Color.Transparent;
@@ -131,12 +113,80 @@ namespace BeWo.SHGSchwerte
this.xrLabel16.Text = "Ambulant Betreutes Wohnen - Budgetnachweis";
this.xrLabel16.WordWrap = false;
//
// xrLabel10
//
this.xrLabel10.BackColor = System.Drawing.Color.Transparent;
this.xrLabel10.LocationFloat = new DevExpress.Utils.PointFloat(60.0001F, 131.5828F);
this.xrLabel10.Multiline = true;
this.xrLabel10.Name = "xrLabel10";
this.xrLabel10.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrLabel10.SizeF = new System.Drawing.SizeF(642F, 27.08333F);
this.xrLabel10.StylePriority.UseBackColor = false;
this.xrLabel10.StylePriority.UseFont = false;
this.xrLabel10.Text = "Im Bewilligungszeitraum tatsächlich geleistete Fachleistungsstunden (FLS)";
//
// xrLabel7
//
this.xrLabel7.BackColor = System.Drawing.Color.Transparent;
this.xrLabel7.CanShrink = true;
this.xrLabel7.Font = new System.Drawing.Font("Arial", 11F, System.Drawing.FontStyle.Bold);
this.xrLabel7.LocationFloat = new DevExpress.Utils.PointFloat(60.0001F, 87.37488F);
this.xrLabel7.Multiline = true;
this.xrLabel7.Name = "xrLabel7";
this.xrLabel7.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrLabel7.SizeF = new System.Drawing.SizeF(650F, 20F);
this.xrLabel7.StylePriority.UseBackColor = false;
this.xrLabel7.StylePriority.UseFont = false;
this.xrLabel7.Text = "Bewilligungszeitraum von [AccountingPeriod]";
this.xrLabel7.WordWrap = false;
//
// xrLabel14
//
this.xrLabel14.BackColor = System.Drawing.Color.Transparent;
this.xrLabel14.CanShrink = true;
this.xrLabel14.Font = new System.Drawing.Font("Arial", 11F, System.Drawing.FontStyle.Bold);
this.xrLabel14.LocationFloat = new DevExpress.Utils.PointFloat(60.0001F, 67.37493F);
this.xrLabel14.Multiline = true;
this.xrLabel14.Name = "xrLabel14";
this.xrLabel14.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrLabel14.SizeF = new System.Drawing.SizeF(650F, 20F);
this.xrLabel14.StylePriority.UseBackColor = false;
this.xrLabel14.StylePriority.UseFont = false;
this.xrLabel14.Text = "Aktenzeichen LWL: [CustomerReferenceNumber]";
this.xrLabel14.WordWrap = false;
//
// xrLabel15
//
this.xrLabel15.BackColor = System.Drawing.Color.Transparent;
this.xrLabel15.CanShrink = true;
this.xrLabel15.Font = new System.Drawing.Font("Arial", 11F, System.Drawing.FontStyle.Bold);
this.xrLabel15.LocationFloat = new DevExpress.Utils.PointFloat(60.0001F, 47.37492F);
this.xrLabel15.Name = "xrLabel15";
this.xrLabel15.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrLabel15.SizeF = new System.Drawing.SizeF(650F, 20F);
this.xrLabel15.StylePriority.UseBackColor = false;
this.xrLabel15.StylePriority.UseFont = false;
this.xrLabel15.Text = "für [Salutation2] [CustomerName], geb. [CustomerBirthdayString]";
this.xrLabel15.WordWrap = false;
//
// xrLine2
//
this.xrLine2.LocationFloat = new DevExpress.Utils.PointFloat(65.00015F, 274.3801F);
this.xrLine2.Name = "xrLine2";
this.xrLine2.SizeF = new System.Drawing.SizeF(270F, 9.75F);
//
// xrLine1
//
this.xrLine1.LocationFloat = new DevExpress.Utils.PointFloat(65.00015F, 204.38F);
this.xrLine1.Name = "xrLine1";
this.xrLine1.SizeF = new System.Drawing.SizeF(309.5687F, 9.749969F);
//
// xrLabel35
//
this.xrLabel35.BackColor = System.Drawing.Color.Transparent;
this.xrLabel35.Borders = DevExpress.XtraPrinting.BorderSide.None;
this.xrLabel35.Font = new System.Drawing.Font("Arial", 11F, System.Drawing.FontStyle.Bold);
this.xrLabel35.LocationFloat = new DevExpress.Utils.PointFloat(65.00015F, 486F);
this.xrLabel35.LocationFloat = new DevExpress.Utils.PointFloat(65.00015F, 214.13F);
this.xrLabel35.Multiline = true;
this.xrLabel35.Name = "xrLabel35";
this.xrLabel35.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
@@ -150,7 +200,7 @@ namespace BeWo.SHGSchwerte
// xrLabel12
//
this.xrLabel12.BackColor = System.Drawing.Color.Transparent;
this.xrLabel12.LocationFloat = new DevExpress.Utils.PointFloat(65.00015F, 339.5832F);
this.xrLabel12.LocationFloat = new DevExpress.Utils.PointFloat(65.00015F, 67.71317F);
this.xrLabel12.Multiline = true;
this.xrLabel12.Name = "xrLabel12";
this.xrLabel12.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
@@ -161,7 +211,7 @@ namespace BeWo.SHGSchwerte
//
// xrCheckBox2
//
this.xrCheckBox2.LocationFloat = new DevExpress.Utils.PointFloat(424.5834F, 281.87F);
this.xrCheckBox2.LocationFloat = new DevExpress.Utils.PointFloat(424.5832F, 9.999974F);
this.xrCheckBox2.Name = "xrCheckBox2";
this.xrCheckBox2.SizeF = new System.Drawing.SizeF(211.0832F, 21.875F);
this.xrCheckBox2.StylePriority.UseFont = false;
@@ -169,29 +219,29 @@ namespace BeWo.SHGSchwerte
//
// xrCheckBox1
//
this.xrCheckBox1.LocationFloat = new DevExpress.Utils.PointFloat(65.00015F, 281.87F);
this.xrCheckBox1.LocationFloat = new DevExpress.Utils.PointFloat(65.00015F, 9.999974F);
this.xrCheckBox1.Name = "xrCheckBox1";
this.xrCheckBox1.SizeF = new System.Drawing.SizeF(359.5833F, 21.875F);
this.xrCheckBox1.StylePriority.UseFont = false;
this.xrCheckBox1.Text = " Die Betreuung wurde am beendet.";
//
// xrTable2
// tableRechnungspositionen
//
this.xrTable2.Borders = ((DevExpress.XtraPrinting.BorderSide)((((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Top)
this.tableRechnungspositionen.Borders = ((DevExpress.XtraPrinting.BorderSide)((((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Top)
| DevExpress.XtraPrinting.BorderSide.Right)
| DevExpress.XtraPrinting.BorderSide.Bottom)));
this.xrTable2.LocationFloat = new DevExpress.Utils.PointFloat(60.0001F, 173.5417F);
this.xrTable2.Name = "xrTable2";
this.xrTable2.Padding = new DevExpress.XtraPrinting.PaddingInfo(3, 3, 0, 0, 100F);
this.xrTable2.Rows.AddRange(new DevExpress.XtraReports.UI.XRTableRow[] {
this.tableRechnungspositionen.LocationFloat = new DevExpress.Utils.PointFloat(60.0001F, 0F);
this.tableRechnungspositionen.Name = "tableRechnungspositionen";
this.tableRechnungspositionen.Padding = new DevExpress.XtraPrinting.PaddingInfo(3, 3, 0, 0, 100F);
this.tableRechnungspositionen.Rows.AddRange(new DevExpress.XtraReports.UI.XRTableRow[] {
this.xrTableRow2,
this.xrTableRow5,
this.xrTableRow6,
this.xrTableRow8});
this.xrTable2.SizeF = new System.Drawing.SizeF(641.9999F, 96F);
this.xrTable2.StylePriority.UseBorders = false;
this.xrTable2.StylePriority.UseFont = false;
this.xrTable2.StylePriority.UsePadding = false;
this.tableRechnungspositionen.SizeF = new System.Drawing.SizeF(641.9999F, 96F);
this.tableRechnungspositionen.StylePriority.UseBorders = false;
this.tableRechnungspositionen.StylePriority.UseFont = false;
this.tableRechnungspositionen.StylePriority.UsePadding = false;
//
// xrTableRow2
//
@@ -357,67 +407,11 @@ namespace BeWo.SHGSchwerte
this.xrTableCell29.Name = "xrTableCell29";
this.xrTableCell29.Weight = 0.663551203509769D;
//
// xrLabel10
//
this.xrLabel10.BackColor = System.Drawing.Color.Transparent;
this.xrLabel10.LocationFloat = new DevExpress.Utils.PointFloat(60.0001F, 131.5828F);
this.xrLabel10.Multiline = true;
this.xrLabel10.Name = "xrLabel10";
this.xrLabel10.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrLabel10.SizeF = new System.Drawing.SizeF(642F, 27.08333F);
this.xrLabel10.StylePriority.UseBackColor = false;
this.xrLabel10.StylePriority.UseFont = false;
this.xrLabel10.Text = "Im Bewilligungszeitraum tatsächlich geleistete Fachleistungsstunden (FLS)";
//
// xrLabel7
//
this.xrLabel7.BackColor = System.Drawing.Color.Transparent;
this.xrLabel7.CanShrink = true;
this.xrLabel7.Font = new System.Drawing.Font("Arial", 11F, System.Drawing.FontStyle.Bold);
this.xrLabel7.LocationFloat = new DevExpress.Utils.PointFloat(60.0001F, 87.37488F);
this.xrLabel7.Multiline = true;
this.xrLabel7.Name = "xrLabel7";
this.xrLabel7.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrLabel7.SizeF = new System.Drawing.SizeF(650F, 20F);
this.xrLabel7.StylePriority.UseBackColor = false;
this.xrLabel7.StylePriority.UseFont = false;
this.xrLabel7.Text = "Bewilligungszeitraum von [AccountingPeriod]";
this.xrLabel7.WordWrap = false;
//
// xrLabel14
//
this.xrLabel14.BackColor = System.Drawing.Color.Transparent;
this.xrLabel14.CanShrink = true;
this.xrLabel14.Font = new System.Drawing.Font("Arial", 11F, System.Drawing.FontStyle.Bold);
this.xrLabel14.LocationFloat = new DevExpress.Utils.PointFloat(60.0001F, 67.37493F);
this.xrLabel14.Multiline = true;
this.xrLabel14.Name = "xrLabel14";
this.xrLabel14.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrLabel14.SizeF = new System.Drawing.SizeF(650F, 20F);
this.xrLabel14.StylePriority.UseBackColor = false;
this.xrLabel14.StylePriority.UseFont = false;
this.xrLabel14.Text = "Aktenzeichen LWL: [CustomerReferenceNumber]";
this.xrLabel14.WordWrap = false;
//
// xrLabel15
//
this.xrLabel15.BackColor = System.Drawing.Color.Transparent;
this.xrLabel15.CanShrink = true;
this.xrLabel15.Font = new System.Drawing.Font("Arial", 11F, System.Drawing.FontStyle.Bold);
this.xrLabel15.LocationFloat = new DevExpress.Utils.PointFloat(60.0001F, 47.37492F);
this.xrLabel15.Name = "xrLabel15";
this.xrLabel15.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrLabel15.SizeF = new System.Drawing.SizeF(650F, 20F);
this.xrLabel15.StylePriority.UseBackColor = false;
this.xrLabel15.StylePriority.UseFont = false;
this.xrLabel15.Text = "für [Salutation2] [CustomerName], geb. [CustomerBirthdayString]";
this.xrLabel15.WordWrap = false;
//
// xrLabel17
//
this.xrLabel17.BackColor = System.Drawing.Color.Transparent;
this.xrLabel17.Font = new System.Drawing.Font("Arial", 10F);
this.xrLabel17.LocationFloat = new DevExpress.Utils.PointFloat(65.00015F, 556.0001F);
this.xrLabel17.LocationFloat = new DevExpress.Utils.PointFloat(65.00015F, 284.1301F);
this.xrLabel17.Multiline = true;
this.xrLabel17.Name = "xrLabel17";
this.xrLabel17.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
@@ -429,9 +423,6 @@ namespace BeWo.SHGSchwerte
// ruleRateFactorNull
//
this.ruleRateFactorNull.Condition = "[RateFactorText2] == ?";
//
//
//
this.ruleRateFactorNull.Formatting.Visible = DevExpress.Utils.DefaultBoolean.False;
this.ruleRateFactorNull.Name = "ruleRateFactorNull";
//
@@ -442,7 +433,7 @@ namespace BeWo.SHGSchwerte
//
// bottomMarginBand1
//
this.bottomMarginBand1.HeightF = 50F;
this.bottomMarginBand1.HeightF = 90.33334F;
this.bottomMarginBand1.Name = "bottomMarginBand1";
//
// GroupHeader1
@@ -513,34 +504,61 @@ namespace BeWo.SHGSchwerte
//
// xrCrossBandBox1
//
this.xrCrossBandBox1.BorderWidth = 1;
this.xrCrossBandBox1.BorderWidth = 1F;
this.xrCrossBandBox1.EndBand = this.bottomMarginBand1;
this.xrCrossBandBox1.EndPointFloat = new DevExpress.Utils.PointFloat(0F, 21.87494F);
this.xrCrossBandBox1.EndPointFloat = new DevExpress.Utils.PointFloat(0F, 62.20828F);
this.xrCrossBandBox1.LocationFloat = new DevExpress.Utils.PointFloat(0F, 29.99999F);
this.xrCrossBandBox1.Name = "xrCrossBandBox1";
this.xrCrossBandBox1.StartBand = this.topMarginBand1;
this.xrCrossBandBox1.StartPointFloat = new DevExpress.Utils.PointFloat(0F, 29.99999F);
this.xrCrossBandBox1.WidthF = 766.6667F;
//
// GroupFooter1
//
this.GroupFooter1.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] {
this.tableRechnungspositionen});
this.GroupFooter1.Font = new System.Drawing.Font("Arial", 11F);
this.GroupFooter1.HeightF = 96F;
this.GroupFooter1.Name = "GroupFooter1";
this.GroupFooter1.StylePriority.UseFont = false;
//
// GroupFooter2
//
this.GroupFooter2.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] {
this.xrLine2,
this.xrLine1,
this.xrLabel35,
this.xrLabel12,
this.xrCheckBox2,
this.xrLabel17,
this.xrCheckBox1});
this.GroupFooter2.Font = new System.Drawing.Font("Arial", 11F);
this.GroupFooter2.HeightF = 311.2133F;
this.GroupFooter2.Level = 1;
this.GroupFooter2.Name = "GroupFooter2";
this.GroupFooter2.StylePriority.UseFont = false;
//
// Spitzabrechnung
//
this.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] {
this.Detail,
this.topMarginBand1,
this.bottomMarginBand1,
this.GroupHeader1});
this.GroupHeader1,
this.GroupFooter1,
this.GroupFooter2});
this.CrossBandControls.AddRange(new DevExpress.XtraReports.UI.XRCrossBandControl[] {
this.xrCrossBandBox1});
this.DataSource = this.bindingSource1;
this.ExportOptions.PrintPreview.DefaultFileName = "Spitzabrechnung";
this.FormattingRuleSheet.AddRange(new DevExpress.XtraReports.UI.FormattingRule[] {
this.ruleRateFactorNull});
this.Margins = new System.Drawing.Printing.Margins(30, 30, 90, 50);
this.Margins = new System.Drawing.Printing.Margins(30, 30, 90, 90);
this.PageHeight = 1169;
this.PageWidth = 827;
this.PaperKind = System.Drawing.Printing.PaperKind.A4;
this.Version = "13.1";
((System.ComponentModel.ISupportInitialize)(this.xrTable2)).EndInit();
this.Version = "17.1";
((System.ComponentModel.ISupportInitialize)(this.tableRechnungspositionen)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this)).EndInit();
@@ -562,7 +580,7 @@ namespace BeWo.SHGSchwerte
private DevExpress.XtraReports.UI.XRLabel xrLabel15;
private DevExpress.XtraReports.UI.XRLabel xrLabel12;
private DevExpress.XtraReports.UI.XRLabel xrLabel17;
private DevExpress.XtraReports.UI.XRTable xrTable2;
private DevExpress.XtraReports.UI.XRTable tableRechnungspositionen;
private DevExpress.XtraReports.UI.XRTableRow xrTableRow2;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell2;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell4;
@@ -596,5 +614,7 @@ namespace BeWo.SHGSchwerte
private DevExpress.XtraReports.UI.XRLine xrLine1;
private DevExpress.XtraReports.UI.XRLabel ortDatum;
private DevExpress.XtraReports.UI.XRCrossBandBox xrCrossBandBox1;
private DevExpress.XtraReports.UI.GroupFooterBand GroupFooter1;
private DevExpress.XtraReports.UI.GroupFooterBand GroupFooter2;
}
}

View File

@@ -64,28 +64,29 @@ namespace BeWo.SHGSchwerte
{
if (pRO.InvoiceItems != null && pRO.InvoiceItems.Count > 0)
{
if (terminationDate.HasValue)
int rowIndex = 0;
foreach (var ii in pRO.InvoiceItems)
{
if (terminationDate < pRO.InvoiceItems[pRO.InvoiceItems.Count - 1].ItemPeriodEnd)
if (ii.UnitCount.HasValue && ii.UnitCount.Value > 0)
{
pRO.InvoiceItems[pRO.InvoiceItems.Count - 1].ItemPeriodEnd = terminationDate;
AddRechnungsposition(ii, rowIndex++);
}
}
if (pRO.InvoiceItems.Count == 3)
{
SetzeRechnungsTexte(pRO.InvoiceItems[0], cellStart1, cellEnd1, cellHourlyRate1, cellFLS1);
SetzeRechnungsTexte(pRO.InvoiceItems[1], cellStart2, cellEnd2, cellHourlyRate2, cellFLS2);
SetzeRechnungsTexte(pRO.InvoiceItems[2], cellStart3, cellEnd3, cellHourlyRate3, cellFLS3);
}
else if (pRO.InvoiceItems.Count == 2)
{
SetzeRechnungsTexte(pRO.InvoiceItems[0], cellStart1, cellEnd1, cellHourlyRate1, cellFLS1);
SetzeRechnungsTexte(pRO.InvoiceItems[1], cellStart2, cellEnd2, cellHourlyRate2, cellFLS2);
}
else
{
SetzeRechnungsTexte(pRO.InvoiceItems[0], cellStart1, cellEnd1, cellHourlyRate1, cellFLS1);
}
//if (pRO.InvoiceItems.Count == 3)
//{
// SetzeRechnungsTexte(pRO.InvoiceItems[0], cellStart1, cellEnd1, cellHourlyRate1, cellFLS1);
// SetzeRechnungsTexte(pRO.InvoiceItems[1], cellStart2, cellEnd2, cellHourlyRate2, cellFLS2);
// SetzeRechnungsTexte(pRO.InvoiceItems[2], cellStart3, cellEnd3, cellHourlyRate3, cellFLS3);
//}
//else if (pRO.InvoiceItems.Count == 2)
//{
// SetzeRechnungsTexte(pRO.InvoiceItems[0], cellStart1, cellEnd1, cellHourlyRate1, cellFLS1);
// SetzeRechnungsTexte(pRO.InvoiceItems[1], cellStart2, cellEnd2, cellHourlyRate2, cellFLS2);
//}
//else
//{
// SetzeRechnungsTexte(pRO.InvoiceItems[0], cellStart1, cellEnd1, cellHourlyRate1, cellFLS1);
//}
}
else
{
@@ -93,6 +94,23 @@ namespace BeWo.SHGSchwerte
}
}
private void AddRechnungsposition(InvoiceItemDC ii, int rowIndex)
{
XRTableRow newRow = null;
if (rowIndex > 2)
{
newRow = tableRechnungspositionen.InsertRowBelow(tableRechnungspositionen.Rows[tableRechnungspositionen.Rows.Count - 1]);
}
else
{
newRow = tableRechnungspositionen.Rows[rowIndex + 1];
}
newRow.Cells[0].Text = String.Format("{0:dd.MM.yyyy}", ii.ItemPeriodStart);
newRow.Cells[1].Text = String.Format("{0:dd.MM.yyyy}", ii.ItemPeriodEnd);
newRow.Cells[2].Text = String.Format("{0:0.00}", ii.AmountPerUnit);
newRow.Cells[3].Text = String.Format("{0:0.00}", ii.UnitCount);
}
private void SetzeRechnungsTexte(InvoiceItemDC ii, XRTableCell cellStart, XRTableCell cellEnd, XRTableCell cellHourlyRate, XRTableCell cellFLS)
{
cellStart.Text = String.Format("{0:dd.MM.yyyy}", ii.ItemPeriodStart);

View File

@@ -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("VkmRietberg")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("VkmRietberg")]
[assembly: AssemblyCopyright("Copyright © 2019")]
[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("a14ab74b-a788-492f-93c3-c992eb03abc1")]
// 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")]

View File

@@ -0,0 +1 @@
DevExpress.XtraReports.UI.XtraReport, DevExpress.XtraReports.v17.1, Version=17.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,131 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using System.IO;
using System.Text.RegularExpressions;
using BeWo.Report.ReportObjects;
using BS.Shared.Core;
using DevExpress.XtraReports.UI;
namespace BeWo.Report.DefaultReports
{
public partial class Quittierungsbeleg : DevExpress.XtraReports.UI.XtraReport, IBeWoReport<ServicesOverviewRO>
{
public Quittierungsbeleg()
{
InitializeComponent();
}
public void SetReportDataSource(ServicesOverviewRO pRO)
{
bool hatGruppen = false;
if (pRO.Services != null)
{
List<ServicesOverviewRO.ServiceDetail> servicesBillable = new List<ServicesOverviewRO.ServiceDetail>();
foreach (var sd in pRO.Services)
{
if (sd.IsBillable)
{
ServicesOverviewRO.CreateSignatureString(sd);
if (sd.IsGroup)
{
//sd.Notice5 = String.Format("{0} Teilnehmer", sd.CustomerCount);
hatGruppen = true;
}
servicesBillable.Add(sd);
}
}
pRO.Services = servicesBillable;
}
if (String.IsNullOrWhiteSpace(pRO.AbsenceTimes))
{
lblHatAbwesenheiten.Text = "X";
}
if (!hatGruppen)
{
lblHatGruppen.Text = "X";
}
ErstelleAbwesenheitenTabelle(pRO);
bindingSource1.DataSource = pRO;
}
private void ErstelleAbwesenheitenTabelle(ServicesOverviewRO pRo)
{
if (pRo.Abwesenheiten != null)
{
int newRows = 0;
int index = 1;
foreach (var at in pRo.Abwesenheiten)
{
DevExpress.XtraReports.UI.XRTableRow row = null;
if (index < xrTableAbwesenheiten.Rows.Count)
{
row = xrTableAbwesenheiten.Rows[index];
}
else
{
row = xrTableAbwesenheiten.InsertRowBelow(xrTableAbwesenheiten.Rows[xrTableAbwesenheiten.Rows.Count - 1]);
newRows++;
}
row.Cells[0].Text = String.Format("{0:dd.MM.yyyy}", at.Start);
int? days = null;
if (at.End.HasValue)
{
row.Cells[1].Text = String.Format("{0:dd.MM.yyyy}", at.End);
days = (int)at.End.Value.Subtract(at.Start.Value).TotalDays + 1;
}
else
{
row.Cells[1].Text = "unbekannt";
}
row.Cells[2].Text = String.Format("{0:0}", days);
index++;
}
if (newRows > 0)
{
lblUnterschriftKlient.Top += newRows * 20;
lblUnterschriftMitarbeiter.Top += newRows * 20;
}
}
}
private void picSignature_BeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e)
{
XRPictureBox xrBox = sender as XRPictureBox;
//var test = this.GetCurrent
string base64String = xrBox.Tag as string;
if (!String.IsNullOrWhiteSpace(base64String))
{
var base64Data = Regex.Match(base64String, @"data:image/(?<type>.+?),(?<data>.+)").Groups["data"].Value;
var binData = Convert.FromBase64String(base64Data);
Image img = ByteArrayToImage(binData);
xrBox.Image = Utils.CropImage(img);
}
else
{
xrBox.Image = null;
}
}
public Image ByteArrayToImage(byte[] byteArrayIn)
{
Image returnImage = null;
MemoryStream ms = new System.IO.MemoryStream(byteArrayIn);
returnImage = Image.FromStream(ms);
return returnImage;
}
}
}

View File

@@ -0,0 +1,129 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="bindingSource1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>21, 17</value>
</metadata>
<data name="xrRichText2.SerializableRtfString" xml:space="preserve">
<value>ewBcAHIAdABmADEAXABkAGUAZgBmADAAewBcAGYAbwBuAHQAdABiAGwAewBcAGYAMAAgAEMAYQBsAGkAYgByAGkAOwB9AHsAXABmADEAIABUAGkAbQBlAHMAIABOAGUAdwAgAFIAbwBtAGEAbgA7AH0AewBcAGYAMgAgAEEAcgBpAGEAbAA7AH0AfQB7AFwAYwBvAGwAbwByAHQAYgBsACAAOwBcAHIAZQBkADAAXABnAHIAZQBlAG4AMABcAGIAbAB1AGUAMAAgADsAXAByAGUAZAAwAFwAZwByAGUAZQBuADAAXABiAGwAdQBlADIANQA1ACAAOwB9AHsAXAAqAFwAZABlAGYAYwBoAHAAIABcAGYAMQBcAGYAcwAyADQAfQB7AFwAcwB0AHkAbABlAHMAaABlAGUAdAAgAHsAXABxAGwAXABmADEAXABmAHMAMgA0ACAATgBvAHIAbQBhAGwAOwB9AHsAXAAqAFwAYwBzADEAXABmADEAXABmAHMAMgA0AFwAYwBmADEAIABEAGUAZgBhAHUAbAB0ACAAUABhAHIAYQBnAHIAYQBwAGgAIABGAG8AbgB0ADsAfQB7AFwAKgBcAGMAcwAyAFwAcwBiAGEAcwBlAGQAbwBuADEAXABmADEAXABmAHMAMgA0AFwAYwBmADEAIABMAGkAbgBlACAATgB1AG0AYgBlAHIAOwB9AHsAXAAqAFwAYwBzADMAXAB1AGwAXABmADEAXABmAHMAMgA0AFwAYwBmADIAIABIAHkAcABlAHIAbABpAG4AawA7AH0AewBcACoAXAB0AHMANABcAHQAcwByAG8AdwBkAFwAZgAxAFwAZgBzADIANABcAHEAbABcAHQAcwBjAGUAbABsAHAAYQBkAGQAZgBsADMAXAB0AHMAYwBlAGwAbABwAGEAZABkAGwAMQAwADgAXAB0AHMAYwBlAGwAbABwAGEAZABkAGYAYgAzAFwAdABzAGMAZQBsAGwAcABhAGQAZABmAHIAMwBcAHQAcwBjAGUAbABsAHAAYQBkAGQAcgAxADAAOABcAHQAcwBjAGUAbABsAHAAYQBkAGQAZgB0ADMAXAB0AHMAdgBlAHIAdABhAGwAdABcAGMAbAB0AHgAbAByAHQAYgAgAE4AbwByAG0AYQBsACAAVABhAGIAbABlADsAfQB7AFwAKgBcAHQAcwA1AFwAdABzAHIAbwB3AGQAXABzAGIAYQBzAGUAZABvAG4ANABcAGYAMQBcAGYAcwAyADQAXABxAGwAXAB0AHIAYgByAGQAcgB0AFwAYgByAGQAcgBzAFwAYgByAGQAcgB3ADEAMABcAHQAcgBiAHIAZAByAGwAXABiAHIAZAByAHMAXABiAHIAZAByAHcAMQAwAFwAdAByAGIAcgBkAHIAYgBcAGIAcgBkAHIAcwBcAGIAcgBkAHIAdwAxADAAXAB0AHIAYgByAGQAcgByAFwAYgByAGQAcgBzAFwAYgByAGQAcgB3ADEAMABcAHQAcgBiAHIAZAByAGgAXABiAHIAZAByAHMAXABiAHIAZAByAHcAMQAwAFwAdAByAGIAcgBkAHIAdgBcAGIAcgBkAHIAcwBcAGIAcgBkAHIAdwAxADAAXAB0AHMAYwBlAGwAbABwAGEAZABkAGYAbAAzAFwAdABzAGMAZQBsAGwAcABhAGQAZABsADEAMAA4AFwAdABzAGMAZQBsAGwAcABhAGQAZABmAHIAMwBcAHQAcwBjAGUAbABsAHAAYQBkAGQAcgAxADAAOABcAHQAcwB2AGUAcgB0AGEAbAB0AFwAYwBsAHQAeABsAHIAdABiACAAVABhAGIAbABlACAAUwBpAG0AcABsAGUAIAAxADsAfQB9AHsAXAAqAFwAbABpAHMAdABvAHYAZQByAHIAaQBkAGUAdABhAGIAbABlAH0AXABuAG8AdQBpAGMAbwBtAHAAYQB0AFwAcwBwAGwAeQB0AHcAbgBpAG4AZQBcAGgAdABtAGEAdQB0AHMAcABcAHAAYQByAGQAXABwAGwAYQBpAG4AXABxAGwAewBcAGYAMgBcAGYAcwAyADAAXABjAGYAMQAgAEsAZQBpAG4AZQAgAH0AewBcAGwAYQBuAGcAMQAwADMAMQBcAGwAYQBuAGcAZgBlADEAMAAzADEAXAB1AGwAXABmADIAXABmAHMAMgAwAFwAYwBmADEAIABLAHIAYQBuAGsAZQBuAGgAYQB1AHMAYQB1AGYAZQBuAHQAaABhAGwAdABlAH0AXABsAGEAbgBnADEAMAAzADEAXABsAGEAbgBnAGYAZQAxADAAMwAxAFwAdQBsAFwAZgAyAFwAZgBzADIAMABcAGMAZgAxAFwAcABhAHIAXABwAGEAcgBkAFwAcABsAGEAaQBuAFwAcQBsAHsAXABsAGEAbgBnADEAMAAzADEAXABsAGEAbgBnAGYAZQAxADAAMwAxAFwAdQBsAFwAZgAyAFwAZgBzADIAMABcAGMAZgAxACAAYgBlAGsAYQBuAG4AdAAgAG8AZABlAHIAIAB9AFwAbABhAG4AZwAxADAAMwAxAFwAbABhAG4AZwBmAGUAMQAwADMAMQBcAHUAbABcAGYAMgBcAGYAcwAyADAAXABjAGYAMQBcAHAAYQByAFwAcABhAHIAZABcAHAAbABhAGkAbgBcAHEAbAB7AFwAbABhAG4AZwAxADAAMwAxAFwAbABhAG4AZwBmAGUAMQAwADMAMQBcAHUAbABcAGYAMgBcAGYAcwAyADAAXABjAGYAMQAgAGEAYgByAGUAYwBoAG4AdQBuAGcAcwByAGUAbABlAHYAYQBuAHQAfQB7AFwAbABhAG4AZwAxADAAMwAxAFwAbABhAG4AZwBmAGUAMQAwADMAMQBcAGYAMgBcAGYAcwAyADAAXABjAGYAMQAgACAAaQBtACAAQQBiAHIAZQBjAGgAbgB1AG4AZwBzAHoAZQBpAHQAcgBhAHUAbQB9AFwAbABhAG4AZwAxADAAMwAxAFwAbABhAG4AZwBmAGUAMQAwADMAMQBcAGYAMQBcAGYAcwAyADQAXABjAGYAMQBcAHAAYQByAH0A</value>
</data>
<data name="xrRichText1.SerializableRtfString" xml:space="preserve">
<value>ewBcAHIAdABmADEAXABkAGUAZgBmADAAewBcAGYAbwBuAHQAdABiAGwAewBcAGYAMAAgAEMAYQBsAGkAYgByAGkAOwB9AHsAXABmADEAIABUAGkAbQBlAHMAIABOAGUAdwAgAFIAbwBtAGEAbgA7AH0AewBcAGYAMgAgAEEAcgBpAGEAbAA7AH0AfQB7AFwAYwBvAGwAbwByAHQAYgBsACAAOwBcAHIAZQBkADAAXABnAHIAZQBlAG4AMABcAGIAbAB1AGUAMAAgADsAXAByAGUAZAAwAFwAZwByAGUAZQBuADAAXABiAGwAdQBlADIANQA1ACAAOwB9AHsAXAAqAFwAZABlAGYAYwBoAHAAIABcAGYAMQBcAGYAcwAyADQAfQB7AFwAcwB0AHkAbABlAHMAaABlAGUAdAAgAHsAXABxAGwAXABmADEAXABmAHMAMgA0ACAATgBvAHIAbQBhAGwAOwB9AHsAXAAqAFwAYwBzADEAXABmADEAXABmAHMAMgA0AFwAYwBmADEAIABEAGUAZgBhAHUAbAB0ACAAUABhAHIAYQBnAHIAYQBwAGgAIABGAG8AbgB0ADsAfQB7AFwAKgBcAGMAcwAyAFwAcwBiAGEAcwBlAGQAbwBuADEAXABmADEAXABmAHMAMgA0AFwAYwBmADEAIABMAGkAbgBlACAATgB1AG0AYgBlAHIAOwB9AHsAXAAqAFwAYwBzADMAXAB1AGwAXABmADEAXABmAHMAMgA0AFwAYwBmADIAIABIAHkAcABlAHIAbABpAG4AawA7AH0AewBcACoAXAB0AHMANABcAHQAcwByAG8AdwBkAFwAZgAxAFwAZgBzADIANABcAHEAbABcAHQAcwBjAGUAbABsAHAAYQBkAGQAZgBsADMAXAB0AHMAYwBlAGwAbABwAGEAZABkAGwAMQAwADgAXAB0AHMAYwBlAGwAbABwAGEAZABkAGYAYgAzAFwAdABzAGMAZQBsAGwAcABhAGQAZABmAHIAMwBcAHQAcwBjAGUAbABsAHAAYQBkAGQAcgAxADAAOABcAHQAcwBjAGUAbABsAHAAYQBkAGQAZgB0ADMAXAB0AHMAdgBlAHIAdABhAGwAdABcAGMAbAB0AHgAbAByAHQAYgAgAE4AbwByAG0AYQBsACAAVABhAGIAbABlADsAfQB7AFwAKgBcAHQAcwA1AFwAdABzAHIAbwB3AGQAXABzAGIAYQBzAGUAZABvAG4ANABcAGYAMQBcAGYAcwAyADQAXABxAGwAXAB0AHIAYgByAGQAcgB0AFwAYgByAGQAcgBzAFwAYgByAGQAcgB3ADEAMABcAHQAcgBiAHIAZAByAGwAXABiAHIAZAByAHMAXABiAHIAZAByAHcAMQAwAFwAdAByAGIAcgBkAHIAYgBcAGIAcgBkAHIAcwBcAGIAcgBkAHIAdwAxADAAXAB0AHIAYgByAGQAcgByAFwAYgByAGQAcgBzAFwAYgByAGQAcgB3ADEAMABcAHQAcgBiAHIAZAByAGgAXABiAHIAZAByAHMAXABiAHIAZAByAHcAMQAwAFwAdAByAGIAcgBkAHIAdgBcAGIAcgBkAHIAcwBcAGIAcgBkAHIAdwAxADAAXAB0AHMAYwBlAGwAbABwAGEAZABkAGYAbAAzAFwAdABzAGMAZQBsAGwAcABhAGQAZABsADEAMAA4AFwAdABzAGMAZQBsAGwAcABhAGQAZABmAHIAMwBcAHQAcwBjAGUAbABsAHAAYQBkAGQAcgAxADAAOABcAHQAcwB2AGUAcgB0AGEAbAB0AFwAYwBsAHQAeABsAHIAdABiACAAVABhAGIAbABlACAAUwBpAG0AcABsAGUAIAAxADsAfQB9AHsAXAAqAFwAbABpAHMAdABvAHYAZQByAHIAaQBkAGUAdABhAGIAbABlAH0AXABuAG8AdQBpAGMAbwBtAHAAYQB0AFwAcwBwAGwAeQB0AHcAbgBpAG4AZQBcAGgAdABtAGEAdQB0AHMAcABcAHAAYQByAGQAXABwAGwAYQBpAG4AXABxAGwAewBcAGYAMgBcAGYAcwAyADAAXABjAGYAMQAgAEsAZQBpAG4AZQAgAH0AewBcAHUAbABcAGYAMgBcAGYAcwAyADAAXABjAGYAMQAgAEcAcgB1AHAAcABlAG4AYQBuAGcAZQBiAG8AdABlAH0AewBcAGYAMgBcAGYAcwAyADAAXABjAGYAMQAgACAAaQBtACAAQQBiAHIAZQBjAGgAbgB1AG4AZwBzAHoAZQBpAHQAcgBhAHUAbQB9AFwAZgAxAFwAZgBzADIANABcAGMAZgAxAFwAcABhAHIAfQA=</value>
</data>
</root>

View File

@@ -0,0 +1,81 @@
<?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>{A14AB74B-A788-492F-93C3-C992EB03ABC1}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>VkmRietberg</RootNamespace>
<AssemblyName>3678599942_Reports</AssemblyName>
<TargetFrameworkVersion>v4.5</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="Properties\AssemblyInfo.cs" />
<Compile Include="Quittierungsbeleg.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="Quittierungsbeleg.Designer.cs">
<DependentUpon>Quittierungsbeleg.cs</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Properties\licenses.licx" />
<EmbeddedResource Include="Quittierungsbeleg.resx">
<DependentUpon>Quittierungsbeleg.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
</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="..\..\Shared\Shared.csproj">
<Project>{2F50B83D-A3F0-4EC4-979A-3F9B7E3D8ED4}</Project>
<Name>Shared</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

View File

@@ -7,7 +7,7 @@ using BS.Shared.DataContracts;
namespace BeWo.Service.DCEntityMapper
{
public class SupportConceptApprovalPeriodDC_SupportConceptApprovalPeriod : AbstractIDCEntityMapper<SupportConceptApprovalPeriod, SupportConceptApprovalPeriodDC>
{
{
public override SupportConceptApprovalPeriodDC MergeWithDC(SupportConceptApprovalPeriod pEntity, SupportConceptApprovalPeriodDC pDataContract)
{
pDataContract.ApprovedBEInterval = pEntity.ApprovedBEInterval;
@@ -24,6 +24,8 @@ namespace BeWo.Service.DCEntityMapper
pDataContract.ContactCountPerInterval = pEntity.ContactCountPerInterval;
pDataContract.ApprovedFixedAmount = pEntity.ApprovedFixedAmount;
pDataContract.ApprovedFixedAmountInterval = pEntity.ApprovedFixedAmountInterval;
pDataContract.Bewilligungsart = pEntity.Bewilligungsart;
;
pDataContract.SupportConceptApprovalPeriodEmployeeRelations = MapperFactory.SupportConceptApprovalPeriodEmployeeRelDC_SupportConceptApprovalPeriod2Employee.MapToNewDCs(pEntity.SupportConceptApprovalPeriod2Employee);
@@ -47,6 +49,11 @@ namespace BeWo.Service.DCEntityMapper
pDataContract.ServiceCategory = MapperFactory.ServiceCategoryDC_ServiceCategory.MapToNewDC(pEntity.ServiceCategory);
}
if (pEntity.Budget != null)
{
pDataContract.BudgetDC = MapperFactory.BudgetDC_Budget.MapToNewDC(pEntity.Budget);
}
return pDataContract;
}
@@ -68,6 +75,16 @@ namespace BeWo.Service.DCEntityMapper
pEntity.Oid = pDataContract.SupportConceptApprovalPeriodOid;
pEntity.Version = pDataContract.SupportConceptApprovalPeriodVersion;
pEntity.StartDate = pDataContract.StartDate;
pEntity.Bewilligungsart = pDataContract.Bewilligungsart;
if (pDataContract.BudgetDC == null)
{
pEntity.Budget = null;
}
else if (pDataContract.BudgetDC != null && pDataContract.BudgetDC.BudgetOid.HasValue)
{
pEntity.Budget = DAOFactory.GenericDAO.LoadByID<Budget>(pDataContract.BudgetDC.BudgetOid.Value);
}
if (pDataContract.ServiceCategory == null)
{

View File

@@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.IO;
using System.Linq;
using BeWo.Data;
using BeWo.Data.Access;
using BeWo.Data.Entities;
using BeWo.Service.Core;
@@ -13,7 +14,8 @@ using BS.Shared.DataContracts;
using BS.Shared.DataContracts.Compact;
using BS.Shared.Extensions;
using BS.Shared.Services;
using Utils = BS.Shared.Core.Utils;
using Utils = BeWo.Service.Core.Utils;
namespace BeWo.Service.Plugins
{
@@ -36,5 +38,21 @@ namespace BeWo.Service.Plugins
{
return MapperFactory.CompactEmployeeDC_Employee.MapToNewDCs(DAOFactory.GenericDAO.GetAllActiveAndArchived<Employee>());
}
public virtual List<CompactTeamDC> GetAllTeamsCompact()
{
if (Utils.UserHasRight(LoggedInUserOperationContextExt.Current.User, UserRightType.TeamView_ViewAll))
{
return MapperFactory.CompactTeamDC_Team.MapToNewDCs(DAOFactory.GenericDAO.GetAllActive<Team>());
}
if (Utils.UserHasRight(LoggedInUserOperationContextExt.Current.User, UserRightType.TeamView_ViewMyTeams))
{
var teams = DAOFactory.SearchDAO.FindAllActiveTeamsOfEmployee(LoggedInUserOperationContextExt.Current.User.Employee.Oid.Value);
return MapperFactory.CompactTeamDC_Team.MapToNewDCs(teams);
}
return new List<CompactTeamDC>();
}
}
}

View File

@@ -18,136 +18,76 @@ namespace BeWo.Service.Plugins
{
public class FlexibleReportService : AbstractIDSpecificDefaultClass<FlexibleReportService>
{
private Dictionary<long, IList<CostRatePeriodDC>> categoryOid2Stundensatz;
private Dictionary<long, IList<CostRatePeriodDC>> leistungOid2Stundensatz;
private Dictionary<long, IList<CostRatePeriodDC>> costbearerOid2Stundensatz;
private Dictionary<long, IList<CostRatePeriodDC>> costbearerOid2RateFactor;
private Dictionary<long, IList<CostRatePeriodDC>> _CategoryOid2Stundensatz;
private Dictionary<long, IList<CostRatePeriodDC>> _LeistungOid2Stundensatz;
private Dictionary<long, IList<CostRatePeriodDC>> _CostbearerOid2Stundensatz;
private Dictionary<long, IList<CostRatePeriodDC>> _CostbearerOid2RateFactor;
public virtual FlexibleReportResultDC GetAllFlexibleReportEntrys(FlexibleReportFilterDC filter)
{
var result = new FlexibleReportResultDC();
result.StartDatum = filter.StartDatum;
result.EndDatum = filter.EndDatum;
BuildStundensatzDictionaries();
var result = new FlexibleReportResultDC
{
StartDatum = filter.StartDatum,
EndDatum = filter.EndDatum
};
var calc = PluginLoader.FindClass<Calculations>();
var span = new DateTimeSpan() { StartDateTime = filter.StartDatum.Date, EndDateTime = filter.EndDatum.Date.AddDays(1).AddTicks(-1) };
var alleRec = DAOFactory.SearchDAO.FindServiceRecordsInSpan(span, null).ToList();
var filterZeitraum = new DateTimeSpan() { StartDateTime = filter.StartDatum.Date, EndDateTime = filter.EndDatum.Date.AddDays(1).AddTicks(-1) };
if (!filter.ReduzierteAnsicht)
// Erstellt die FlexibleReportDummies
if (filter.AlleHilfeplaneAnzeigen.HasValue && filter.AlleHilfeplaneAnzeigen.Value)
{
result.Dummies = new List<FlexibleReportDummyDC>();
var alleHelp = DAOFactory.GenericDAO.GetAllActiveAndArchived<SupportConcept>().ToArray();
// Zwischenspeicher für die richtigen Zeiträume
var dateTimeSpan = new DateTimeSpan();
var alleHps = DAOFactory.GenericDAO.GetAllActiveAndArchived<SupportConcept>();
var alleEmps = DAOFactory.GenericDAO.GetAllActiveAndArchived<Employee>();
foreach (var hilfePlan in alleHps.Where(x => span.StartDate <= x.EndDate && span.EndDate >= x.StartDate))
if (alleHelp.Length > 0)
{
// Holt sich den richtigen Zeitraum zum erstellen der Daten
dateTimeSpan.StartDate = span.StartDate > hilfePlan.StartDate ? span.StartDate : hilfePlan.StartDate.Value;
dateTimeSpan.EndDate = span.EndDate < hilfePlan.EndDate ? span.EndDate : hilfePlan.EndDate.Value;
var dummies = GetFlexibleReportResult_Dummies(alleHelp, filterZeitraum, calc,
filter.SollAnzeigen.HasValue && filter.SollAnzeigen.Value);
foreach (var c2s in hilfePlan.CostBearer2SupportConceptList.Where(x => span.StartDate <= x.EndDate && span.EndDate >= x.StartDate))
{
foreach (var approvalPeriod in c2s.ApprovalPeriodList.Where(x => span.StartDate <= x.EndDate && span.EndDate >= x.StartDate))
{
// Holt sich den richtigen Zeitraum zum erstellen der Daten
dateTimeSpan.StartDate = span.StartDate > approvalPeriod.StartDate ? span.StartDate : approvalPeriod.StartDate.Value;
dateTimeSpan.EndDate = span.EndDate < approvalPeriod.EndDate ? span.EndDate : approvalPeriod.EndDate.Value;
// Wenn kein Mitarbeiter dem Bewilligungszeitraum zugewiesen ist
if (approvalPeriod.SupportConceptApprovalPeriod2Employee.Count == 0)
{
var hauptbetreuer = GetHauptbetreuer(hilfePlan.Customer).ToList();
// Wenn der Klient keine Hauptbetreuer hat
if (hauptbetreuer.Count == 0)
{
decimal? soll = GetSollPerDay(hilfePlan.Customer, dateTimeSpan.StartDate, approvalPeriod, calc);
if (soll != null)
result.Dummies.Add(CreateFlexibleReportsDummyDC(dateTimeSpan, null, hilfePlan, c2s.CostBearer, approvalPeriod, soll.Value));
}
// Wenn der Klient ein oder mehr Hauptbetreuer hat
else
{
decimal? soll = GetSollPerDay(hilfePlan.Customer, dateTimeSpan.StartDate, approvalPeriod, calc);
if (soll.HasValue)
{
decimal sollAnteil = soll.Value / hauptbetreuer.Count;
foreach (var betreuer in hauptbetreuer)
{
result.Dummies.Add(CreateFlexibleReportsDummyDC(dateTimeSpan, betreuer, hilfePlan, c2s.CostBearer, approvalPeriod, sollAnteil));
}
}
}
}
// Wenn ein oder mehr Mitarbeiter dem Bewilligungszeitraum zugewiesen ist/sind
else
{
foreach (var scap2employee in approvalPeriod.SupportConceptApprovalPeriod2Employee)
{
var employee = scap2employee.Employee;
decimal? soll = GetSollPerDay(hilfePlan.Customer, employee, approvalPeriod.StartDate.Value, approvalPeriod, calc);
if (soll != null)
{
result.Dummies.Add(CreateFlexibleReportsDummyDC(dateTimeSpan, employee, hilfePlan, c2s.CostBearer, approvalPeriod, soll.Value));
}
}
}
}
}
}
if(alleEmps.Count > 0)
{
result.Employees = new Dictionary<long, string>();
foreach (var employee in alleEmps)
{
result.Employees.Add(employee.Oid.Value, string.Format("{0}, {1}", employee.Person.LastName, employee.Person.FirstName));
}
result.Dummies = dummies.ToList();
}
}
if(alleRec.Count > 0)
// Erstellt die FlexibleReportEntries
if (filter.AlleServiceBerichteAnzeigen.HasValue && filter.AlleServiceBerichteAnzeigen.Value)
{
result.Entries = new List<FlexibleReportEntryDC>();
var alleRec = DAOFactory.SearchDAO.FindServiceRecordsInSpan(filterZeitraum, null).ToArray();
foreach (var serviceRecordListEntry in alleRec)
if (alleRec.Length > 0)
{
var stundensatz = GetStundensatz(serviceRecordListEntry);
var entries = GetFlexibleReportResult_Entries(alleRec,
filter.IstAnzeigen.HasValue && filter.IstAnzeigen.Value,
filter.BetragAnzeigen.HasValue && filter.BetragAnzeigen.Value,
filter.GefahreneKilometerAnzeigen.HasValue && filter.GefahreneKilometerAnzeigen.Value);
if (serviceRecordListEntry.CostBearer2SupportConcept == null)
continue;
result.Entries = entries.ToList();
}
}
result.Entries.Add(new FlexibleReportEntryDC()
{
AnzahlMinuten = serviceRecordListEntry.RoundedDuration,
AnzahlMinutenSoll = 0,
Betrag = stundensatz.HasValue ? stundensatz * (serviceRecordListEntry.RoundedDuration / 60) : null,
CustomerOid = serviceRecordListEntry.Customer?.Oid,
CustomerString = serviceRecordListEntry.Customer != null ? string.Format("{0}, {1}", serviceRecordListEntry.Customer.Person.LastName, serviceRecordListEntry.Customer.Person.FirstName) : null,
EmployeeOid = serviceRecordListEntry.Employee?.Oid,
EmployeeString = serviceRecordListEntry.Employee != null ? string.Format("{0}, {1}", serviceRecordListEntry.Employee.Person.LastName, serviceRecordListEntry.Employee.Person.FirstName) : null,
EndDatum = serviceRecordListEntry.End.Value,
Kilometer = serviceRecordListEntry.DistanceInMeter,
Leistung = serviceRecordListEntry.ServiceDescription.Name,
Leistungskategorie = serviceRecordListEntry.ServiceDescription.ServiceCategory.Name,
Organisation = serviceRecordListEntry.CostBearer2SupportConcept.CostBearer.Organisation.Name,
StartDatum = serviceRecordListEntry.Start.Value,
Stundensatz = stundensatz,
SupportConceptOid = serviceRecordListEntry.SupportConcept?.Oid,
SupportConceptString = serviceRecordListEntry.SupportConcept != null ? string.Format("{0:dd.MM.yyyy} - {1:dd.MM.yyyy}", serviceRecordListEntry.SupportConcept.StartDate, serviceRecordListEntry.SupportConcept.EndDate) : null,
Team = serviceRecordListEntry.Customer != null ? GetTeamNameByTeam2CustomerList(serviceRecordListEntry.Customer.Team2CustomerList) : null,
Type = FlexibleReportEntryType.ServiceRecordEntry
});
// Erstellt CustomerDic
if (filter.AlleKlientenAnzeigen.HasValue && filter.AlleKlientenAnzeigen.Value)
{
var alleCos = DAOFactory.GenericDAO.GetAllActiveAndArchived<Customer>();
if (alleCos.Count > 0)
{
var customers = GetFlexibleReportResult_Customers(alleCos);
result.Customers = customers;
}
}
// Erstellt EmployeeDic
if (filter.AlleMitarbeiterAnzeigen.HasValue && filter.AlleMitarbeiterAnzeigen.Value)
{
var alleEmps = DAOFactory.GenericDAO.GetAllActiveAndArchived<Employee>();
if (alleEmps.Count > 0)
{
var employees = GetFlexibleReportResult_Employees(alleEmps);
result.Employees = employees;
}
}
@@ -156,62 +96,66 @@ namespace BeWo.Service.Plugins
protected virtual decimal? GetStundensatz(ServiceRecord sr)
{
decimal? betrag = null;
if (_CategoryOid2Stundensatz == null)
BuildStundensatzDictionaries();
if (sr.CostBearer2SupportConcept != null)
{
if (leistungOid2Stundensatz.ContainsKey(sr.ServiceDescription.Oid.Value))
if (_LeistungOid2Stundensatz.ContainsKey(sr.ServiceDescription.Oid.Value))
{
var crList = leistungOid2Stundensatz[sr.ServiceDescription.Oid.Value];
var crList = _LeistungOid2Stundensatz[sr.ServiceDescription.Oid.Value];
var cr = crList.GetCostRatePeriodForDate(CostRatePeriodType.AmountOfMoney, sr.Start.Value);
if (cr != null && cr.CostRateValue.HasValue)
{
betrag = cr.CostRateValue.Value;
return cr.CostRateValue.Value;
}
}
if (betrag == null && categoryOid2Stundensatz.ContainsKey(sr.ServiceDescription.ServiceCategory.Oid.Value))
if (_CategoryOid2Stundensatz.ContainsKey(sr.ServiceDescription.ServiceCategory.Oid.Value))
{
var crList = categoryOid2Stundensatz[sr.ServiceDescription.ServiceCategory.Oid.Value];
var crList = _CategoryOid2Stundensatz[sr.ServiceDescription.ServiceCategory.Oid.Value];
var cr = crList.GetCostRatePeriodForDate(CostRatePeriodType.AmountOfMoney, sr.Start.Value);
if (cr != null && cr.CostRateValue.HasValue)
{
betrag = cr.CostRateValue.Value;
return cr.CostRateValue.Value;
}
}
if (betrag == null && costbearerOid2Stundensatz.ContainsKey(sr.CostBearer2SupportConcept.CostBearer.Oid.Value))
if (_CostbearerOid2Stundensatz.ContainsKey(sr.CostBearer2SupportConcept.CostBearer.Oid.Value))
{
var crList = costbearerOid2Stundensatz[sr.CostBearer2SupportConcept.CostBearer.Oid.Value];
var crList = _CostbearerOid2Stundensatz[sr.CostBearer2SupportConcept.CostBearer.Oid.Value];
var cr = crList.GetCostRatePeriodForDate(CostRatePeriodType.HourlyRate, sr.Start.Value);
if (cr != null && cr.CostRateValue.HasValue)
if (cr?.CostRateValue != null)
{
betrag = cr.CostRateValue.Value;
}
if (betrag != null && costbearerOid2RateFactor.ContainsKey(sr.CostBearer2SupportConcept.CostBearer.Oid.Value))
{
crList = costbearerOid2RateFactor[sr.CostBearer2SupportConcept.CostBearer.Oid.Value];
var betrag = cr.CostRateValue.Value;
cr = crList.GetCostRatePeriodForDate(CostRatePeriodType.RateFactor, sr.Start.Value);
if (cr != null && cr.CostRateValue.HasValue)
if (_CostbearerOid2RateFactor.ContainsKey(sr.CostBearer2SupportConcept.CostBearer.Oid.Value))
{
betrag *= (100 + cr.CostRateValue.Value) / 100;
crList = _CostbearerOid2RateFactor[sr.CostBearer2SupportConcept.CostBearer.Oid.Value];
cr = crList.GetCostRatePeriodForDate(CostRatePeriodType.RateFactor, sr.Start.Value);
if (cr?.CostRateValue != null)
{
betrag *= 1 + cr.CostRateValue.Value / 100;
}
}
return betrag;
}
}
}
return betrag;
return null;
}
protected virtual void BuildStundensatzDictionaries()
{
categoryOid2Stundensatz = new Dictionary<long, IList<CostRatePeriodDC>>();
leistungOid2Stundensatz = new Dictionary<long, IList<CostRatePeriodDC>>();
costbearerOid2Stundensatz = new Dictionary<long, IList<CostRatePeriodDC>>();
costbearerOid2RateFactor = new Dictionary<long, IList<CostRatePeriodDC>>();
_CategoryOid2Stundensatz = new Dictionary<long, IList<CostRatePeriodDC>>();
_LeistungOid2Stundensatz = new Dictionary<long, IList<CostRatePeriodDC>>();
_CostbearerOid2Stundensatz = new Dictionary<long, IList<CostRatePeriodDC>>();
_CostbearerOid2RateFactor = new Dictionary<long, IList<CostRatePeriodDC>>();
var categories = DAOFactory.GenericDAO.GetAllActive<ServiceCategory>();
@@ -222,7 +166,7 @@ namespace BeWo.Service.Plugins
var hrCats = cat.CostRatePeriods.ToList();
if (hrCats.Count > 0)
{
categoryOid2Stundensatz.Add(cat.Oid.Value, MapperFactory.CostRatePeriodDC_CostRatePeriod.MapToNewDCs(hrCats));
_CategoryOid2Stundensatz.Add(cat.Oid.Value, MapperFactory.CostRatePeriodDC_CostRatePeriod.MapToNewDCs(hrCats));
}
}
}
@@ -235,7 +179,7 @@ namespace BeWo.Service.Plugins
var hrCats = desc.CostRatePeriods.ToList();
if (hrCats.Count > 0)
{
leistungOid2Stundensatz.Add(desc.Oid.Value, MapperFactory.CostRatePeriodDC_CostRatePeriod.MapToNewDCs(hrCats));
_LeistungOid2Stundensatz.Add(desc.Oid.Value, MapperFactory.CostRatePeriodDC_CostRatePeriod.MapToNewDCs(hrCats));
}
}
}
@@ -246,32 +190,18 @@ namespace BeWo.Service.Plugins
var hrCats = cb.CostRatePeriods.Where(c => c.CostRateType == CostRatePeriodType.HourlyRate).ToList();
if (hrCats.Count > 0)
{
costbearerOid2Stundensatz.Add(cb.Oid.Value, MapperFactory.CostRatePeriodDC_CostRatePeriod.MapToNewDCs(hrCats));
_CostbearerOid2Stundensatz.Add(cb.Oid.Value, MapperFactory.CostRatePeriodDC_CostRatePeriod.MapToNewDCs(hrCats));
}
var rfCats = cb.CostRatePeriods.Where(c => c.CostRateType == CostRatePeriodType.RateFactor).ToList();
if (rfCats.Count > 0)
{
costbearerOid2RateFactor.Add(cb.Oid.Value, MapperFactory.CostRatePeriodDC_CostRatePeriod.MapToNewDCs(rfCats));
_CostbearerOid2RateFactor.Add(cb.Oid.Value, MapperFactory.CostRatePeriodDC_CostRatePeriod.MapToNewDCs(rfCats));
}
}
}
protected virtual string GetTeamNameByTeam2CustomerList(IList<Team2Customer> team2Customers)
{
string name = "";
foreach (var t2c in team2Customers)
{
if (name.Length > 0)
name += ", ";
name = t2c.Team.Name;
}
return name;
}
protected virtual decimal? GetSollPerDay(Customer customer, Employee employee, DateTime date, SupportConceptApprovalPeriod scap, Calculations calc)
protected virtual decimal? GetSollPerDayEmployee(Customer customer, Employee employee, DateTime date, SupportConceptApprovalPeriod scap, Calculations calc)
{
var scapDC = MapperFactory.SupportConceptApprovalPeriodDC_SupportConceptApprovalPeriod.MapToNewDC(scap);
var sollPerDay = calc.GetApprovedHoursPerDay(scapDC, new List<CostRatePeriodDC>()) * 60;
@@ -295,159 +225,188 @@ namespace BeWo.Service.Plugins
return sollPerDay;
}
protected virtual void CreateFlexibleReportSoll(FlexibleReportEntryDC entry, ServiceRecord item, DateTime datum, Calculations calc)
{
if (item.CostBearer2SupportConcept != null)
{
decimal? soll = null;
SupportConceptApprovalPeriod scap = null;
SupportConceptApprovalPeriodDC scapdc = null;
//Schritt 1: Prüfe Costbearer2SupportConcept.ApprovalPeriodList welcher im Zeitraum liegt und ob die ApprovalPeriod.Categoriy der item.ServiceDescription.Category entspricht.
foreach (var iscap in item.CostBearer2SupportConcept.ApprovalPeriodList)
{
if (iscap.ServiceCategory != null && iscap.ServiceCategory.Oid == item.ServiceDescription.ServiceCategory.Oid)
{
if (item.Start >= iscap.StartDate && item.Start <= iscap.EndDate)
{
scap = iscap;
}
}
}
//Schritt 2: Prüfe Costbearer2SupportConcept.ApprovalPeriodList welcher im Zeitraum liegt und ob die ApprovalPeriod.Categoriy = null ist
if (scap == null)
{
foreach (var iscap in item.CostBearer2SupportConcept.ApprovalPeriodList)
{
if (iscap.ServiceCategory == null)
{
if (item.Start >= iscap.StartDate && item.Start <= iscap.EndDate)
{
scap = iscap;
}
}
}
}
if (scap != null)
{
//Schritt 3: Soll liegt vor, prüfe Verteilung auf Mitarbeiter
scapdc = MapperFactory.SupportConceptApprovalPeriodDC_SupportConceptApprovalPeriod.MapToNewDC(scap);
var sollPerDay = calc.GetApprovedHoursPerDay(scapdc, new List<CostRatePeriodDC>()) * 60;
// Keine Betreuerverteilung definiert
if (scap.SupportConceptApprovalPeriod2Employee.Count == 0 && IstHauptbetreuer(item.Customer, item.Employee))
{
soll = sollPerDay; // Hauptbetreuer muss 100% leisten
}
else
{
//Prüfe ob item.Employee in scap.SupportConceptApprovalPeriod2Employee definiert ist und wenn ja berechne Anteil am sollPerDay
//scap.SupportConceptApprovalPeriod2Employee[0]
var sc2e = scap.SupportConceptApprovalPeriod2Employee.FirstOrDefault(x => x.Employee.Oid == item.Employee.Oid);
if (sc2e != null)
{
soll = sc2e.IsAbsolut ? sc2e.Betreuungsschluessel : sollPerDay * sc2e.Betreuungsschluessel/100;
}
}
}
//if (item.CostBearer2SupportConcept != null && IstHauptbetreuer(item.Customer, item.Employee))
//{
// var c2sDc = MapperFactory.SupportConceptCostBearerRelDC_CostBearer2SupportConcept.MapToNewDC(item.CostBearer2SupportConcept);
// var sollPerDay = calc.GetApprovedHoursPerDay(c2sDc, datum);
// entry.AnzahlMinutenSoll = sollPerDay * 60;
//}
entry.AnzahlMinutenSoll = soll;
}
}
protected virtual bool IstHauptbetreuer(Customer c, Employee e)
// ToDo: Auslagern / generaliesieren
protected static IEnumerable<Employee> GetHauptbetreuer(Customer c)
{
foreach (Employee2Customer e2c in c.Employee2CustomerList)
{
foreach (ValueListEntry2Object vle2o in e2c.ValueList)
{
var vle = vle2o.Entry;
if (vle.SystemEntryID == SystemEntryID.EmployeeRoleMainAttendant && e2c.EmployeeOid.ToString() == vle.Value)
return true;
//if (vle.SystemEntryID != null && vle.SystemEntryID.Value == SystemEntryID.EmployeeRoleMainAttendant && e2c.EmployeeOid == e.Oid.Value)
//{
// return true;
//}
}
}
return false;
}
protected IEnumerable<Employee> GetHauptbetreuer(Customer c)
{
foreach (Employee2Customer e2c in c.Employee2CustomerList)
{
foreach (ValueListEntry2Object vle2o in e2c.ValueList)
{
var vle = vle2o.Entry;
if (vle.SystemEntryID == SystemEntryID.EmployeeRoleMainAttendant && e2c.EmployeeOid.ToString() == vle.Value)
if (vle.SystemEntryID == SystemEntryID.EmployeeRoleMainAttendant && e2c.CustomerOid == c.Oid)
yield return e2c.Employee;
}
}
}
protected virtual FlexibleReportDummyDC CreateFlexibleReportsDummyDC(DateTimeSpan span, Employee employee, SupportConcept supportConcept, CostBearer costBearer, SupportConceptApprovalPeriod approvalPeriod, decimal soll)
protected virtual IEnumerable<FlexibleReportEntryDC> GetFlexibleReportResult_Entries(IEnumerable<ServiceRecord> alleRec, bool zeigeIst, bool zeigeBetrag, bool zeigeKilometer)
{
var dummy = new FlexibleReportDummyDC()
foreach (var serviceRecord in alleRec)
{
CustomerOid = null,
CustomerString = null,
EmployeeOid = null,
EmployeeString = null,
EndDate = span.EndDate,
EntryType = FlexibleReportEntryType.SollEntry,
Leistungskategorie = null,
Organisation = null,
Soll = soll,
StartDate = span.StartDate,
SupportConceptOid = null,
SupportConceptString = null
};
if (!serviceRecord.Start.HasValue || !serviceRecord.End.HasValue)
continue;
if (supportConcept != null)
{
dummy.SupportConceptOid = supportConcept.Oid;
dummy.SupportConceptString = string.Format("{0:dd.MM.yyyy} - {1:dd.MM.yyyy}", supportConcept.StartDate, supportConcept.EndDate);
var entry = new FlexibleReportEntryDC
{
ServiceRecordOid = serviceRecord.Oid,
EndDatum = serviceRecord.End.Value,
Notice = serviceRecord.Notice,
Notice2 = serviceRecord.Notice2,
Notice3 = serviceRecord.Notice3,
Notice4 = serviceRecord.Notice4,
Notice5 = serviceRecord.Notice5,
SollMinuten = null,
StartDatum = serviceRecord.Start.Value,
Leistung = serviceRecord.ServiceDescription.Name,
Leistungskategorie = serviceRecord.ServiceDescription.ServiceCategory.Name
};
dummy.CustomerOid = supportConcept.Oid;
dummy.CustomerString = string.Format("{0}, {1}", supportConcept.Customer.Person.LastName, supportConcept.Customer.Person.FirstName);
if (zeigeIst)
{
entry.IstMinuten = serviceRecord.RoundedDuration;
}
dummy.Organisation = costBearer.Organisation.Name;
dummy.Leistungskategorie = approvalPeriod.ServiceCategory?.Name;
if (zeigeBetrag)
{
entry.Stundensatz = GetStundensatz(serviceRecord);
entry.Betrag = serviceRecord.RoundedDuration / 60 * entry.Stundensatz;
}
if (zeigeKilometer)
{
entry.Kilometer = serviceRecord.DistanceInMeter;
}
if (serviceRecord.Customer != null)
{
entry.CustomerOid = serviceRecord.Customer.Oid;
entry.CustomerString = serviceRecord.Customer.Person.LastNameFirstName;
entry.Team = serviceRecord.Customer.TeamSimpleString;
}
if (serviceRecord.Employee != null)
{
entry.EmployeeOid = serviceRecord.Employee.Oid;
entry.EmployeeString = serviceRecord.Employee.Person.LastNameFirstName;
}
if (serviceRecord.SupportConcept != null)
{
entry.SupportConceptOid = serviceRecord.SupportConcept.Oid;
entry.SupportConceptString = serviceRecord.SupportConcept.TimeSpanString;
}
if (serviceRecord.CostBearer2SupportConcept != null)
{
entry.Organisation = serviceRecord.CostBearer2SupportConcept.CostBearer.Organisation.Name;
}
yield return entry;
}
}
protected virtual IEnumerable<FlexibleReportDummyDC> GetFlexibleReportResult_Dummies(IList<SupportConcept> alleHelp, DateTimeSpan filterZeitraum, Calculations calc, bool zeigeSoll)
{
foreach (var hilfePlan in alleHelp.Where(x => filterZeitraum.StartDate <= x.EndDate && filterZeitraum.EndDate >= x.StartDate))
{
foreach (var c2s in hilfePlan.CostBearer2SupportConceptList.Where(x => filterZeitraum.StartDate <= x.EndDate && filterZeitraum.EndDate >= x.StartDate))
{
foreach (var approvalPeriod in c2s.ApprovalPeriodList.Where(x => filterZeitraum.StartDate <= x.EndDate && filterZeitraum.EndDate >= x.StartDate))
{
var start = filterZeitraum.StartDate > approvalPeriod.StartDate ? filterZeitraum.StartDate : approvalPeriod.StartDate.Value;
var ende = filterZeitraum.EndDate < approvalPeriod.EndDate ? filterZeitraum.EndDate : approvalPeriod.EndDate.Value;
var zeitraum = new DateTimeSpan(start, ende);
// Wenn kein Mitarbeiter dem Bewilligungszeitraum zugewiesen ist
if (approvalPeriod.SupportConceptApprovalPeriod2Employee.Count == 0)
{
var hauptbetreuer = GetHauptbetreuer(hilfePlan.Customer).ToList();
var soll = zeigeSoll ? GetSollPerDay(hilfePlan.Customer, start, approvalPeriod, calc) : null;
// Wenn der Klient keine Hauptbetreuer hat
if (hauptbetreuer.Count == 0)
{
yield return GetFlexibleReportDummy(hilfePlan.Customer, null, zeitraum, hilfePlan, approvalPeriod, soll);
}
// Wenn der Klient ein oder mehr Hauptbetreuer hat
else
{
var sollAnteil = soll / hauptbetreuer.Count;
foreach (var betreuer in hauptbetreuer)
{
yield return GetFlexibleReportDummy(hilfePlan.Customer, betreuer, zeitraum, hilfePlan, approvalPeriod, sollAnteil);
}
}
}
// Wenn ein oder mehr Mitarbeiter dem Bewilligungszeitraum zugewiesen ist/sind
else
{
foreach (var s2e in approvalPeriod.SupportConceptApprovalPeriod2Employee)
{
var soll = zeigeSoll ? GetSollPerDayEmployee(hilfePlan.Customer, s2e.Employee, approvalPeriod.StartDate.Value, approvalPeriod, calc) : null;
yield return GetFlexibleReportDummy(hilfePlan.Customer, s2e.Employee, zeitraum, hilfePlan, approvalPeriod, soll);
}
}
}
}
}
}
protected virtual FlexibleReportDummyDC GetFlexibleReportDummy(Customer customer, Employee employee, DateTimeSpan timeSpan, SupportConcept supportConcept, SupportConceptApprovalPeriod approvalPeriod, decimal? soll)
{
var dummy = new FlexibleReportDummyDC
{
CustomerOid = customer.Oid,
CustomerString = customer.Person.LastNameFirstName,
SupportConceptOid = supportConcept.Oid,
SupportConceptString = supportConcept.TimeSpanString,
StartDate = timeSpan.StartDate.Date,
EndDate = timeSpan.EndDate.Date,
Soll = soll
};
if (employee != null)
{
dummy.EmployeeOid = employee.Oid;
dummy.EmployeeString = string.Format("{0}, {1}", employee.Person.LastName, employee.Person.FirstName);
dummy.EmployeeString = employee.Person.LastNameFirstName;
}
if (approvalPeriod != null)
{
dummy.Leistungskategorie = approvalPeriod.ServiceCategory?.Name;
dummy.Organisation = approvalPeriod.CostBearer2SupportConcept.CostBearer.Organisation.Name;
}
return dummy;
}
protected virtual FlexibleReportDummyDC CreateFlexibleReportsDummyDC(DateTimeSpan span, Employee employee)
protected virtual Dictionary<long, string> GetFlexibleReportResult_Customers(IList<Customer> customers)
{
return new FlexibleReportDummyDC()
var customerDic = new Dictionary<long, string>();
foreach (var customer in customers)
{
EndDate = span.EndDate,
StartDate = span.StartDate,
EmployeeOid = employee.Oid,
EmployeeString = string.Format("{0}, {1}", employee.Person.LastName, employee.Person.FirstName),
EntryType = FlexibleReportEntryType.EmployeeNullEntry
};
customerDic.Add(customer.Oid.Value, string.Format("{0}, {1}", customer.Person.LastName, customer.Person.FirstName));
}
return customerDic;
}
protected virtual Dictionary<long, string> GetFlexibleReportResult_Employees(IList<Employee> employees)
{
var employeeDic = new Dictionary<long, string>();
foreach (var employee in employees)
{
employeeDic.Add(employee.Oid.Value, string.Format("{0}, {1}", employee.Person.LastName, employee.Person.FirstName));
}
return employeeDic;
}
}
}

View File

@@ -26,7 +26,7 @@ namespace BeWo.Service.Plugins
//t = "8562233401"; // Sozialwirkstatt Schmitz
//t = "1076891970"; // Assistenza
//t = "0216265667"; // LH Hannover
//t = "1774789565"; // LH Essen
t = "1774789565"; // LH Essen
//t = "9342168675"; // ABC Betreuungen
//t = "1193188501"; // Aids Hilfe Dortmund
//t = "7860351957"; // SKF Alsdorf
@@ -65,7 +65,7 @@ namespace BeWo.Service.Plugins
//t = "2028095630"; // Integra Heinsberg
//t = "5351926758"; // Viva a Vida
//t = "2215396183"; // Diakonie Remscheid Lennep
//t = "5157599087"; // SHG Schwerte
t = "5157599087"; // SHG Schwerte
//t = "4526293996"; // Fortis
//t = "3647969417"; // Caritas Bottrop
//t = "3963982016"; // Convoi
@@ -165,7 +165,7 @@ namespace BeWo.Service.Plugins
//t = "7803602698"; // Taubblindendienst
//t = "5518600303"; // Wetterleuchten e.V.
//t = "4096649015"; // AWO Dortmund
t = "3614251071"; // Pusteblume
//t = "3614251071"; // Pusteblume
//t = "7755740484"; // Sawo
//t = "8275654834"; // Twg Jonathan
//t = "6586058528"; // Freundeskreis Suchtkrankenhilfe e.V.
@@ -177,7 +177,7 @@ namespace BeWo.Service.Plugins
//t = "2331203795"; // BeWo für dich
//t = "5426234256"; // SKM Leverkusen
//t = "4137042939"; // MLG Lebengestalten / Haus Müllestumpe
//t = "5260936181"; // LORI
t = "5260936181"; // LORI
//t = "1931553444"; // HIBA
//t = "7185338722"; // BeWo Walz & Paiva
//t = "3196643272"; // Betreutes Wohnen Lisa Wöll

View File

@@ -0,0 +1,79 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using BeWo.Data;
using BeWo.Data.Access;
using BeWo.Data.Entities;
using BeWo.Service.Core;
using BeWo.Service.DCEntityMapper;
using BeWo.Service.MessageContracts;
using BS.Shared;
using BS.Shared.Core;
using BS.Shared.DataContracts;
using BS.Shared.DataContracts.Compact;
using BS.Shared.Extensions;
using BS.Shared.Services;
using Utils = BeWo.Service.Core.Utils;
namespace BeWo.Service.Plugins
{
public class UserService : AbstractIDSpecificDefaultClass<UserService>
{
public virtual UserDC LoadUserByLoginName(string pUserName)
{
UserDC userDC = null;
ApplicationUser user = DAOFactory.UserDAO.FindUserByLoginName(pUserName);
if (user != null)
{
userDC = MapperFactory.UserDC_User.MapToNewDC(user);
CompactEmployeeDC emp = userDC.Employee;
if (emp != null)
{
//foreach (var item in user.Employee.Employee2CustomerList)
//{
// if (emp.RelatedCustomerOIDList == null)
// emp.RelatedCustomerOIDList = new List<long>();
// emp.RelatedCustomerOIDList.Add(item.CustomerOid.Value);
//}
emp.AllTeamMemberOids = new List<long>();
if (user.Employee.LeadingTeams.Count > 0)
{
emp.IsTeamLeader = true;
List<long> oids = new List<long>();
foreach (var item in user.Employee.LeadingTeams)
{
oids.Add(item.Oid.Value);
foreach (var member in item.MemberList)
{
emp.AllTeamMemberOids.Add(member.Oid.Value);
}
}
emp.LeadingTeamOids = oids;
}
var teams = DAOFactory.SearchDAO.FindAllActiveTeamsOfEmployee(emp.EmployeeOid);
emp.TeamOids = new List<long>();
foreach (var t in teams)
{
emp.TeamOids.Add(t.Oid.Value);
foreach (var member in t.MemberList)
{
emp.AllTeamMemberOids.Add(member.Oid.Value);
}
}
}
}
return userDC;
}
}
}

View File

@@ -326,6 +326,7 @@
<Compile Include="Multitenancy\MultitenancyEndpointBehavior.cs" />
<Compile Include="Plugins\AccountingService.cs" />
<Compile Include="Plugins\CustomerService.cs" />
<Compile Include="Plugins\UserService.cs" />
<Compile Include="Plugins\FlexibleReportService.cs" />
<Compile Include="Plugins\OperationService.cs" />
<Compile Include="Plugins\QueryService.cs" />

View File

@@ -437,18 +437,10 @@ namespace BeWo.Service.ServiceImplementations
{
try
{
if (Utils.UserHasRight(LoggedInUserOperationContextExt.Current.User, UserRightType.TeamView_ViewAll))
{
return MapperFactory.CompactTeamDC_Team.MapToNewDCs(DAOFactory.GenericDAO.GetAllActive<Team>());
}
var s = PluginLoader.FindClass<EmployeeService>();
if (Utils.UserHasRight(LoggedInUserOperationContextExt.Current.User, UserRightType.TeamView_ViewMyTeams))
{
var teams = DAOFactory.SearchDAO.FindAllActiveTeamsOfEmployee(LoggedInUserOperationContextExt.Current.User.Employee.Oid.Value);
return MapperFactory.CompactTeamDC_Team.MapToNewDCs(teams);
}
return s.GetAllTeamsCompact();
return new List<CompactTeamDC>();
}
catch (Exception e)
{

View File

@@ -23,6 +23,7 @@ using BS.Shared.Extensions;
using MySql.Data.MySqlClient;
using BeWo.Service.Configuration;
using BeWo.Service.Plugins;
namespace BeWo.Service.ServiceImplementations
{
@@ -501,57 +502,10 @@ namespace BeWo.Service.ServiceImplementations
{
try
{
UserDC userDC = null;
var s = PluginLoader.FindClass<UserService>();
ApplicationUser user = DAOFactory.UserDAO.FindUserByLoginName(pUserName);
if (user != null)
{
userDC = MapperFactory.UserDC_User.MapToNewDC(user);
CompactEmployeeDC emp = userDC.Employee;
if (emp != null)
{
//foreach (var item in user.Employee.Employee2CustomerList)
//{
// if (emp.RelatedCustomerOIDList == null)
// emp.RelatedCustomerOIDList = new List<long>();
// emp.RelatedCustomerOIDList.Add(item.CustomerOid.Value);
//}
emp.AllTeamMemberOids = new List<long>();
if (user.Employee.LeadingTeams.Count > 0)
{
emp.IsTeamLeader = true;
List<long> oids = new List<long>();
foreach (var item in user.Employee.LeadingTeams)
{
oids.Add(item.Oid.Value);
foreach (var member in item.MemberList)
{
emp.AllTeamMemberOids.Add(member.Oid.Value);
}
}
emp.LeadingTeamOids = oids;
}
var teams = DAOFactory.SearchDAO.FindAllActiveTeamsOfEmployee(emp.EmployeeOid);
emp.TeamOids = new List<long>();
foreach (var t in teams)
{
emp.TeamOids.Add(t.Oid.Value);
foreach (var member in t.MemberList)
{
emp.AllTeamMemberOids.Add(member.Oid.Value);
}
}
}
}
return userDC;
return s.LoadUserByLoginName(pUserName);
}
catch (Exception e)
{

View File

@@ -550,36 +550,36 @@ namespace BS.Shared
public enum ValueListEntryType
{
EmploymentType, //0
DisabilityType,
AccountingTransactionType,
StaffRoleType,
StaffActivityFocusType,
StaffQualificationsType, //5
ResourceCategory,
EnvironmentPersonType,
CustomerCareType, //8
SupportConceptGoalCategoryType,
SupportConceptGoalType, //10
TitleType,
FunctionType,
PlacementObjectiveType,
TerminationReasonType,
PersonCategoryType, //15
CustomerCategoryType,
EnvironmentOrganisationType,
SupportConceptIndividualGoalType,
Auszahlungsart,
SupportConceptIndividualGoalCategoryType, // 20
DocumentType,
OrganisationFunctionType,
RoleInOrganisationType,
RoleInFamily,
Nationality,
Aufenthaltsstatus,
Migrationshintergrund,
ContractType,
QualifikationsBedarf
EmploymentType = 0,
DisabilityType = 1,
AccountingTransactionType = 2,
StaffRoleType = 3,
StaffActivityFocusType = 4,
StaffQualificationsType = 5,
ResourceCategory = 6,
EnvironmentPersonType = 7,
CustomerCareType = 8,
SupportConceptGoalCategoryType = 9,
SupportConceptGoalType = 10,
TitleType = 11,
FunctionType = 12,
PlacementObjectiveType = 13,
TerminationReasonType = 14,
PersonCategoryType = 15,
CustomerCategoryType = 16,
EnvironmentOrganisationType = 17,
SupportConceptIndividualGoalType = 18,
Auszahlungsart = 19,
SupportConceptIndividualGoalCategoryType = 20,
DocumentType = 21,
OrganisationFunctionType = 22,
RoleInOrganisationType = 23,
RoleInFamily = 24,
Nationality = 25,
Aufenthaltsstatus = 26,
Migrationshintergrund = 27,
ContractType = 28,
QualifikationsBedarf = 29
}
public enum ContactType
@@ -1002,10 +1002,15 @@ namespace BS.Shared
public enum FlexibleReportEntryType
{
EmployeeNullEntry,
CustomerNullEntry,
CustomerEmployeeNullEntry,
ServiceRecordEntry,
SollEntry
EmployeeNullEntry,
CustomerNullEntry,
ServiceRecordEntry,
SupportConceptEntry
}
public enum Bewilligungsart
{
Direkt = 0,
Budget = 1,
}
}

View File

@@ -40,6 +40,17 @@ namespace BS.Shared.Core
private bool _SynchEndDate;
public DateTimeSpan()
{
}
public DateTimeSpan(DateTime start, DateTime ende)
{
_StartDate = start;
_EndDate = ende;
}
public DateTime EndDate
{
get { return _EndDate; }

View File

@@ -860,7 +860,7 @@ namespace BS.Shared.Core
ValueListEntryType.EnvironmentOrganisationType, "Rollen des Umfeldes (Organisationen)"
},
{
ValueListEntryType.DocumentType, "Dokumentationstypen"
ValueListEntryType.DocumentType, "Dokumentationsfelder"
},
{
ValueListEntryType.OrganisationFunctionType,"Funktionen (Organisationen)"
@@ -945,7 +945,7 @@ namespace BS.Shared.Core
ValueListEntryType.EnvironmentOrganisationType, "Rollen des Umfeldes (Organisationen)"
},
{
ValueListEntryType.DocumentType, "Dokumentationstypen"
ValueListEntryType.DocumentType, "Dokumentationsfelder"
},
{
ValueListEntryType.OrganisationFunctionType,"Funktionen (Organisationen)"

View File

@@ -37,5 +37,25 @@ namespace BS.Shared.DataContracts
[DataMember]
public decimal? Betragshoehe { get; set; }
}
public override string ToString()
{
return Name + " (" + (Betragshoehe.HasValue ? Math.Round(Betragshoehe.Value, 2) : 0) + " Std)";
}
public override bool Equals(object obj)
{
if (obj is BudgetDC budget)
{
return BudgetOid == budget.BudgetOid;
}
return false;
}
public override int GetHashCode()
{
return GetType().Name.GetHashCode() ^ BudgetOid.GetHashCode();
}
}
}

View File

@@ -40,11 +40,8 @@ namespace BS.Shared.DataContracts
[DataMember]
public string Organisation { get; set; }
[DataMember]
public FlexibleReportEntryType EntryType { get; set; }
[DataMember]
public decimal Soll { get; set; }
public decimal? Soll { get; set; }
}
}

View File

@@ -12,6 +12,9 @@ namespace BS.Shared.DataContracts
[DataContract]
public class FlexibleReportEntryDC : IDataContract
{
[DataMember]
public long? ServiceRecordOid { get; set; }
[DataMember]
public long? CustomerOid { get; set; }
@@ -40,10 +43,10 @@ namespace BS.Shared.DataContracts
public string Leistung { get; set; }
[DataMember]
public decimal AnzahlMinuten { get; set; }
public decimal? IstMinuten { get; set; }
[DataMember]
public decimal? AnzahlMinutenSoll { get; set; }
public decimal? SollMinuten { get; set; }
[DataMember]
public decimal? Betrag { get; set; }
@@ -61,9 +64,21 @@ namespace BS.Shared.DataContracts
public DateTime EndDatum { get; set; }
[DataMember]
public FlexibleReportEntryType Type { get; set; }
public string Organisation { get; set; }
[DataMember]
public string Organisation { get; set; }
public string Notice { get; set; }
[DataMember]
public string Notice2 { get; set; }
[DataMember]
public string Notice3 { get; set; }
[DataMember]
public string Notice4 { get; set; }
[DataMember]
public string Notice5 { get; set; }
}
}

View File

@@ -24,6 +24,30 @@ namespace BS.Shared.DataContracts
public IList<ServiceDescriptionDC> Leistungen { get; set; }
[DataMember]
public bool ReduzierteAnsicht { get; set; }
public bool? ReduzierteAnsicht { get; set; }
[DataMember]
public bool? BetragAnzeigen { get; set; }
[DataMember]
public bool? IstAnzeigen { get; set; }
[DataMember]
public bool? SollAnzeigen { get; set; }
[DataMember]
public bool? GefahreneKilometerAnzeigen { get; set; }
[DataMember]
public bool? AlleServiceBerichteAnzeigen { get; set; }
[DataMember]
public bool? AlleHilfeplaneAnzeigen { get; set; }
[DataMember]
public bool? AlleMitarbeiterAnzeigen { get; set; }
[DataMember]
public bool? AlleKlientenAnzeigen { get; set; }
}
}

View File

@@ -29,5 +29,6 @@ namespace BS.Shared.DataContracts
[DataMember]
public IList<FlexibleReportEntryDC> Entries { get; set; }
public int Length => Employees?.Count + Customers?.Count + Dummies?.Count + Entries?.Count ?? 0;
}
}

View File

@@ -41,7 +41,10 @@ namespace BS.Shared.DataContracts
[DataMember]
public string RssFeedUrl { get; set; }
[DataMember]
[DataMember]
public string SupportToolUrl { get; set; }
[DataMember]
public bool IsSchedulerAllowed { get; set; }
[DataMember]

View File

@@ -84,5 +84,11 @@ namespace BS.Shared.DataContracts
[DataMember]
public List<SupportConceptApprovalPeriodEmployeeRelDC> SupportConceptApprovalPeriodEmployeeRelations { get; set; }
[DataMember]
public BudgetDC BudgetDC { get; set; }
[DataMember]
public Bewilligungsart Bewilligungsart { get; set; }
}
}