Merge branch 'master' of ssh://float.beyondsoft.de/git/beyondSoft/BeWo
# Conflicts: # Service/Plugins/PluginLoader.cs
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -515,6 +515,7 @@
|
||||
/ReportImp/LebenshilfeDuisburgAtz/obj/Debug
|
||||
/ReportImp/LebenshilfeDuisburgAtz/obj/Release
|
||||
/ReportImp/VaroSozialagentur/obj/Debug
|
||||
/ReportImp/AmbulantBetreutesWohnenAstridPulm/obj/Debug
|
||||
/ReportImp/VaroSozialagentur/obj/Release
|
||||
/ReportImp/LebenshilfeDuisburg2/obj/Debug
|
||||
/ReportImp/LebenshilfeDuisburg2/obj/Release
|
||||
|
||||
19
BeWo.sln
19
BeWo.sln
@@ -461,6 +461,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bewolonia", "ReportImp\Bewo
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VaroSozialagentur", "ReportImp\VaroSozialagentur\VaroSozialagentur.csproj", "{5C99CC38-15A8-4485-8D59-997EEEA9D6C1}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AmbulantBetreutesWohnenAstridPulm", "ReportImp\AmbulantBetreutesWohnenAstridPulm\AmbulantBetreutesWohnenAstridPulm.csproj", "{6AB16005-E552-4619-9E55-D752FCCAC3B0}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|.NET = Debug|.NET
|
||||
@@ -3536,6 +3538,22 @@ Global
|
||||
{5C99CC38-15A8-4485-8D59-997EEEA9D6C1}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{5C99CC38-15A8-4485-8D59-997EEEA9D6C1}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{5C99CC38-15A8-4485-8D59-997EEEA9D6C1}.Release|x86.Build.0 = Release|Any CPU
|
||||
{6AB16005-E552-4619-9E55-D752FCCAC3B0}.Debug|.NET.ActiveCfg = Debug|Any CPU
|
||||
{6AB16005-E552-4619-9E55-D752FCCAC3B0}.Debug|.NET.Build.0 = Debug|Any CPU
|
||||
{6AB16005-E552-4619-9E55-D752FCCAC3B0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{6AB16005-E552-4619-9E55-D752FCCAC3B0}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{6AB16005-E552-4619-9E55-D752FCCAC3B0}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{6AB16005-E552-4619-9E55-D752FCCAC3B0}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{6AB16005-E552-4619-9E55-D752FCCAC3B0}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{6AB16005-E552-4619-9E55-D752FCCAC3B0}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{6AB16005-E552-4619-9E55-D752FCCAC3B0}.Release|.NET.ActiveCfg = Release|Any CPU
|
||||
{6AB16005-E552-4619-9E55-D752FCCAC3B0}.Release|.NET.Build.0 = Release|Any CPU
|
||||
{6AB16005-E552-4619-9E55-D752FCCAC3B0}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{6AB16005-E552-4619-9E55-D752FCCAC3B0}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{6AB16005-E552-4619-9E55-D752FCCAC3B0}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{6AB16005-E552-4619-9E55-D752FCCAC3B0}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{6AB16005-E552-4619-9E55-D752FCCAC3B0}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{6AB16005-E552-4619-9E55-D752FCCAC3B0}.Release|x86.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
@@ -3762,6 +3780,7 @@ Global
|
||||
{B0C86A71-94ED-4F0D-98B3-49DB04056882} = {D8A691C5-146D-4613-86CC-438F02FE9106}
|
||||
{B289C237-C966-41A0-8968-C04D0004F30B} = {D8A691C5-146D-4613-86CC-438F02FE9106}
|
||||
{5C99CC38-15A8-4485-8D59-997EEEA9D6C1} = {D8A691C5-146D-4613-86CC-438F02FE9106}
|
||||
{6AB16005-E552-4619-9E55-D752FCCAC3B0} = {D8A691C5-146D-4613-86CC-438F02FE9106}
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {FBE985BB-9F0F-4DBB-8F94-ABC37A803FF9}
|
||||
|
||||
@@ -43,12 +43,12 @@
|
||||
<TargetCulture>de-DE</TargetCulture>
|
||||
<ProductName>BeWoPlaner</ProductName>
|
||||
<PublisherName>beyondSoft GmbH</PublisherName>
|
||||
<MinimumRequiredVersion>2.0.1.200</MinimumRequiredVersion>
|
||||
<MinimumRequiredVersion>2.0.1.204</MinimumRequiredVersion>
|
||||
<CreateWebPageOnPublish>true</CreateWebPageOnPublish>
|
||||
<WebPage>publish.htm</WebPage>
|
||||
<OpenBrowserOnPublish>false</OpenBrowserOnPublish>
|
||||
<TrustUrlParameters>true</TrustUrlParameters>
|
||||
<ApplicationRevision>201</ApplicationRevision>
|
||||
<ApplicationRevision>205</ApplicationRevision>
|
||||
<ApplicationVersion>2.0.1.%2a</ApplicationVersion>
|
||||
<UseApplicationTrust>false</UseApplicationTrust>
|
||||
<CreateDesktopShortcut>true</CreateDesktopShortcut>
|
||||
@@ -320,6 +320,10 @@
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="View\Detail\UrlaubstagSchenkenView.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="View\Detail\Suchergebnis.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
@@ -813,6 +817,7 @@
|
||||
</Compile>
|
||||
<Compile Include="SchulbegleitenderDienst\WochenansichtVM.cs" />
|
||||
<Compile Include="SchulbegleitenderDienst\WochenVertretung.cs" />
|
||||
<Compile Include="Security\EncryptionUtils.cs" />
|
||||
<Compile Include="UploadDialog.xaml.cs">
|
||||
<DependentUpon>UploadDialog.xaml</DependentUpon>
|
||||
</Compile>
|
||||
@@ -891,6 +896,7 @@
|
||||
<Compile Include="ViewModel\BudgetVM.cs" />
|
||||
<Compile Include="ViewModel\DocumentTreeItemVM.cs" />
|
||||
<Compile Include="ViewModel\DokumentvorlageVM.cs" />
|
||||
<Compile Include="ViewModel\GeschenkterUrlaubstagVM.cs" />
|
||||
<Compile Include="ViewModel\PrintSelectionVM.cs" />
|
||||
<Compile Include="ViewModel\QuittierungsbelegsstatusVM.cs" />
|
||||
<Compile Include="ViewModel\RatingTypeVM.cs" />
|
||||
@@ -992,9 +998,10 @@
|
||||
<Compile Include="View\Controls\DPCtrlDienstTooltip.xaml.cs">
|
||||
<DependentUpon>DPCtrlDienstTooltip.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="View\Controls\DPCtrlIst.cs" />
|
||||
<Compile Include="View\Controls\DPCtrlMonth.cs" />
|
||||
<Compile Include="View\Controls\DPCtrlSaldo.cs" />
|
||||
<Compile Include="View\Controls\DPCtrlSollIst.cs" />
|
||||
<Compile Include="View\Controls\DPCtrlSoll.cs" />
|
||||
<Compile Include="View\Controls\DPCtrlUrlaubKrankheit.cs" />
|
||||
<Compile Include="View\Controls\DPCtrlZeitkonto.cs" />
|
||||
<Compile Include="View\Controls\MonthPicker.xaml.cs">
|
||||
@@ -1025,6 +1032,9 @@
|
||||
<Compile Include="View\Detail\InformationView.xaml.cs">
|
||||
<DependentUpon>InformationView.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="View\Detail\UrlaubstagSchenkenView.xaml.cs">
|
||||
<DependentUpon>UrlaubstagSchenkenView.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="View\Detail\SuchergebnisMasterMenuItem.cs" />
|
||||
<Compile Include="View\Detail\Suchergebnis.xaml.cs">
|
||||
<DependentUpon>Suchergebnis.xaml</DependentUpon>
|
||||
@@ -2347,6 +2357,7 @@
|
||||
<None Include="app.config">
|
||||
<SubType>Designer</SubType>
|
||||
</None>
|
||||
<None Include="packages.config" />
|
||||
<None Include="Properties\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||
|
||||
@@ -47,8 +47,8 @@ namespace BeWo
|
||||
public static LoginControl LoginControl;
|
||||
|
||||
public static MainControl MainControl;
|
||||
public static string ShortVersion = "3.3";
|
||||
public static string Version = "Version 3.3";
|
||||
public static string ShortVersion = "3.4";
|
||||
public static string Version = "Version 3.4";
|
||||
|
||||
public static int RenderTier = 0;
|
||||
|
||||
@@ -1088,20 +1088,6 @@ namespace BeWo
|
||||
#endif
|
||||
}
|
||||
|
||||
public static void LogMessage(string message, DebugWindowMessageColor color)
|
||||
{
|
||||
#if DEBUG
|
||||
if(_DebugMessageLogView == null)
|
||||
{
|
||||
_DebugMessageLogView = new DebugMessageLogView();
|
||||
}
|
||||
|
||||
_DebugMessageLogView.Closed += (s, e) => { _DebugMessageLogView = null; };
|
||||
|
||||
_DebugMessageLogView.Show();
|
||||
_DebugMessageLogView.LogMessage(message, color);
|
||||
#endif
|
||||
}
|
||||
public static void LogMessage(string message, Color customColor)
|
||||
{
|
||||
#if DEBUG
|
||||
|
||||
@@ -25,6 +25,7 @@ using BS.Shared;
|
||||
using BS.Shared.Extensions;
|
||||
|
||||
using BeWo.Core;
|
||||
using BeWo.Security;
|
||||
using BeWo.ServiceProxy;
|
||||
using BeWo.View;
|
||||
using BeWo.View.Detail;
|
||||
@@ -431,9 +432,9 @@ namespace BeWo
|
||||
|
||||
while (!myFile.EndOfStream)
|
||||
{
|
||||
var data = myFile.ReadLine().Split('|');
|
||||
var data = myFile.ReadLine()?.Split('|');
|
||||
|
||||
if (data.Length >= 3)
|
||||
if (data?.Length >= 3)
|
||||
{
|
||||
if (!String.IsNullOrEmpty(data[1]) && !String.IsNullOrEmpty(data[2]))
|
||||
ProfileList.Add(new BeWoProfile(data[0], data[1], data[2]));
|
||||
@@ -445,7 +446,6 @@ namespace BeWo
|
||||
catch (Exception e)
|
||||
{
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private string GetNumericServerName(string serverName)
|
||||
@@ -1073,6 +1073,7 @@ namespace BeWo
|
||||
ReadProxyName();
|
||||
}
|
||||
|
||||
// TODO: Verschlüsselung einbauen!
|
||||
private void ReadProxyName()
|
||||
{
|
||||
int counter = 0;
|
||||
@@ -1087,17 +1088,24 @@ namespace BeWo
|
||||
filePath = Path.Combine(BeWoApp.GetAndCreateUserAppDataPath(), "proxy.dat");
|
||||
}
|
||||
|
||||
var file = new System.IO.StreamReader(filePath);
|
||||
while ((line = file.ReadLine()) != null)
|
||||
{
|
||||
byte[] decbuff = Convert.FromBase64String(line);
|
||||
var x = System.Text.Encoding.UTF8.GetString(decbuff);
|
||||
var allLines = File.ReadAllLines(filePath);
|
||||
|
||||
datai[counter] = x;
|
||||
foreach(var linex in allLines)
|
||||
{
|
||||
var decryptedLine = EncryptionUtils.DecryptString(linex);
|
||||
datai[counter] = decryptedLine;
|
||||
counter++;
|
||||
}
|
||||
|
||||
file.Close();
|
||||
|
||||
//var file = new StreamReader(filePath);
|
||||
//while ((line = file.ReadLine()) != null)
|
||||
//{
|
||||
// datai[counter] = Encoding.UTF8.GetString(Convert.FromBase64String(line));
|
||||
// counter++;
|
||||
//}
|
||||
|
||||
//file.Close();
|
||||
|
||||
proxyname = datai[0];
|
||||
proxyUsername = datai[1];
|
||||
@@ -1111,6 +1119,7 @@ namespace BeWo
|
||||
|
||||
}
|
||||
|
||||
|
||||
private void SaveSelectedProfile(BeWoProfile profile)
|
||||
{
|
||||
try
|
||||
@@ -1134,7 +1143,6 @@ namespace BeWo
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void SaveProfileListToFile()
|
||||
{
|
||||
try
|
||||
|
||||
@@ -1,36 +1,22 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Security.Cryptography;
|
||||
using System.Text;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Shapes;
|
||||
using BeWo.Security;
|
||||
|
||||
namespace BeWo
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaktionslogik für ProxyLoginView.xaml
|
||||
/// </summary>
|
||||
public partial class ProxyLoginView : Window
|
||||
public partial class ProxyLoginView
|
||||
{
|
||||
public ProxyLoginView()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
|
||||
überprüfe();
|
||||
CheckBeWoProfile();
|
||||
}
|
||||
|
||||
|
||||
private void überprüfe() {
|
||||
private void CheckBeWoProfile() {
|
||||
|
||||
if (proxynametxt.Text.Equals("") && proxybenutzer.Text.Equals("") && proxypasswort.Password.Equals("")) {
|
||||
|
||||
@@ -41,24 +27,34 @@ namespace BeWo
|
||||
|
||||
try
|
||||
{
|
||||
var filePath = System.IO.Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + "\\proxy.dat";
|
||||
var filePath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + "\\proxy.dat";
|
||||
if (!File.Exists(filePath))
|
||||
{
|
||||
filePath = System.IO.Path.Combine(BeWoApp.GetAndCreateUserAppDataPath(), "proxy.dat");
|
||||
filePath = Path.Combine(BeWoApp.GetAndCreateUserAppDataPath(), "proxy.dat");
|
||||
}
|
||||
|
||||
var file = new System.IO.StreamReader(filePath);
|
||||
while ((line = file.ReadLine()) != null)
|
||||
{
|
||||
var allLines = File.ReadAllLines(filePath);
|
||||
|
||||
byte[] decbuff = Convert.FromBase64String(line);
|
||||
var x= System.Text.Encoding.UTF8.GetString(decbuff);
|
||||
datai[counter] = x;
|
||||
foreach(var linex in allLines)
|
||||
{
|
||||
var decryptedLine = EncryptionUtils.DecryptString(linex);
|
||||
datai[counter] = decryptedLine;
|
||||
|
||||
counter++;
|
||||
}
|
||||
|
||||
file.Close();
|
||||
//var file = new StreamReader(filePath);
|
||||
//while ((line = file.ReadLine()) != null)
|
||||
//{
|
||||
|
||||
// byte[] decbuff = Convert.FromBase64String(line);
|
||||
// var x= System.Text.Encoding.UTF8.GetString(decbuff);
|
||||
// datai[counter] = x;
|
||||
|
||||
// counter++;
|
||||
//}
|
||||
|
||||
//file.Close();
|
||||
|
||||
proxynametxt.Text = datai[0];
|
||||
proxybenutzer.Text = datai[1];
|
||||
@@ -70,50 +66,53 @@ namespace BeWo
|
||||
|
||||
}
|
||||
|
||||
// TODO: Verschlüsselung einbauen!
|
||||
private void proxyOK_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
string ptname = proxynametxt.Text;
|
||||
string ptbenutzer = proxybenutzer.Text;
|
||||
string ptpasswd = proxypasswort.Password;
|
||||
|
||||
string[] lines = { ptname, ptbenutzer, ptpasswd };
|
||||
string[] lines = { proxynametxt.Text, proxybenutzer.Text, proxypasswort.Password };
|
||||
var encryptedLines = new List<string>();
|
||||
|
||||
try
|
||||
{
|
||||
var filePath = System.IO.Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + "\\proxy.dat";
|
||||
var filePath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + "\\proxy.dat";
|
||||
if (!File.Exists(filePath))
|
||||
{
|
||||
filePath = System.IO.Path.Combine(BeWoApp.GetAndCreateUserAppDataPath(), "proxy.dat");
|
||||
filePath = Path.Combine(BeWoApp.GetAndCreateUserAppDataPath(), "proxy.dat");
|
||||
}
|
||||
|
||||
using (System.IO.StreamWriter file =
|
||||
new System.IO.StreamWriter(filePath))
|
||||
foreach(var line in lines)
|
||||
{
|
||||
foreach (string line in lines)
|
||||
{
|
||||
byte[] encData_byte = new byte[line.Length];
|
||||
encData_byte = System.Text.Encoding.UTF8.GetBytes(line);
|
||||
string encodedData = Convert.ToBase64String(encData_byte);
|
||||
|
||||
file.WriteLine(encodedData);
|
||||
}
|
||||
encryptedLines.Add(EncryptionUtils.EncryptString(line));
|
||||
}
|
||||
|
||||
ptname = "";
|
||||
ptbenutzer = "";
|
||||
ptpasswd = "";
|
||||
File.WriteAllLines(filePath, encryptedLines);
|
||||
|
||||
this.Close();
|
||||
|
||||
}catch(IOException i){
|
||||
|
||||
|
||||
|
||||
//using (var file = new StreamWriter(filePath))
|
||||
//{
|
||||
// foreach (string line in lines)
|
||||
// {
|
||||
// byte[] encData_byte = new byte[line.Length];
|
||||
// encData_byte = System.Text.Encoding.UTF8.GetBytes(line);
|
||||
// string encodedData = Convert.ToBase64String(encData_byte);
|
||||
|
||||
// file.WriteLine(encodedData);
|
||||
// }
|
||||
//}
|
||||
|
||||
Close();
|
||||
|
||||
}catch(IOException){
|
||||
//Fehlermeldung
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void proxyAbbr_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
this.Close();
|
||||
Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -291,18 +291,22 @@
|
||||
<!-- Region Start -->
|
||||
<Label x:Name="StartLabel" Grid.Column="0" Grid.Row="2" VerticalAlignment="Center" Content="Start" />
|
||||
<dxe:DateEdit Grid.Column="1" Grid.Row="2" MaskType="DateTimeAdvancingCaret" Background="White"
|
||||
Height="23" MinWidth="80" Margin="3" EditValue="{Binding Controller.DisplayStartDate}" x:Name="StartDateDateEdit" />
|
||||
Height="23" MinWidth="80" Margin="3" EditValue="{Binding Controller.DisplayStartDate}" x:Name="StartDateDateEdit"
|
||||
EditValueChanged="StartDate_OnChange" />
|
||||
<dxe:TextEdit Grid.Column="2" Grid.Row="2" IsEnabled="{Binding Path=Controller.AllDay, Converter={StaticResource BoolReverseConverter}}"
|
||||
MaskType="DateTime" Mask="t" MaskUseAsDisplayFormat="True" Margin="3" Height="23"
|
||||
MaskType="DateTime" Mask="t" MaskUseAsDisplayFormat="True" Margin="3" Height="23" EditValueChanged="StartTimeTextEdit_OnEditValueChanged"
|
||||
EditValue ="{Binding Controller.DisplayStartTime, Converter={StaticResource TimeSpanToDateTimeConverter}}" x:Name="StartTimeTextEdit"/>
|
||||
<dxe:CheckEdit x:Name="AllDay" Grid.Column="3" Grid.Row="2" Content="Ganztägig" Checked="AllDay_OnCheckedChange" Unchecked="AllDay_OnCheckedChange" EditValue ="{Binding Controller.AllDay}" HorizontalAlignment="Right" Margin="3" />
|
||||
<dxe:CheckEdit x:Name="AllDay" Grid.Column="3" Grid.Row="2" Content="Ganztägig" EditValue ="{Binding Controller.AllDay}" HorizontalAlignment="Right" Margin="3" />
|
||||
<!-- Endregion -->
|
||||
|
||||
<!-- Region Ende -->
|
||||
<Label x:Name="EndLabel" Grid.Column="0" Grid.Row="3" VerticalAlignment="Center" Content="Ende"/>
|
||||
<dxe:DateEdit Grid.Column="1" Grid.Row="3" MaskType="DateTimeAdvancingCaret" Background="White" Height="23" MinWidth="80"
|
||||
Margin="3" EditValue="{Binding Controller.DisplayEndDate}" x:Name="EndDate" />
|
||||
<dxe:TextEdit Grid.Column="2" Grid.Row="3" IsEnabled="{Binding Path=Controller.AllDay, Converter={StaticResource BoolReverseConverter}}" MaskType="DateTime" Mask="t" MaskUseAsDisplayFormat="True" Margin="3" Height="23" EditValue ="{Binding Controller.DisplayEndTime, Converter={StaticResource TimeSpanToDateTimeConverter}}" x:Name="EndTime"/>
|
||||
Margin="3" EditValue="{Binding Controller.DisplayEndDate}" x:Name="EndDate"
|
||||
EditValueChanged="EndDate_OnChange" />
|
||||
<dxe:TextEdit Grid.Column="2" Grid.Row="3" IsEnabled="{Binding Path=Controller.AllDay, Converter={StaticResource BoolReverseConverter}}"
|
||||
MaskType="DateTime" Mask="t" MaskUseAsDisplayFormat="True" Margin="3" Height="23" EditValueChanged="EndTimeTextEdit_OnEditValueChanged"
|
||||
EditValue ="{Binding Controller.DisplayEndTime, Converter={StaticResource TimeSpanToDateTimeConverter}}" x:Name="EndTime"/>
|
||||
<!-- Endregion -->
|
||||
|
||||
<!-- Region Zu erledigen bis (Aufgabe) -->
|
||||
|
||||
@@ -3,14 +3,13 @@ using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Collections.Specialized;
|
||||
using System.ComponentModel;
|
||||
using System.Diagnostics;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Input;
|
||||
|
||||
using System.Windows.Media;
|
||||
using BeWo.Annotations;
|
||||
using BeWo.Core;
|
||||
using BeWo.Scheduler.Utils;
|
||||
@@ -23,7 +22,6 @@ using BS.Shared.Core;
|
||||
using BS.Shared.DataContracts;
|
||||
using BS.Shared.DataContracts.Compact;
|
||||
using BS.Shared.Extensions;
|
||||
using DevExpress.Mvvm.Native;
|
||||
using DevExpress.Xpf.Editors;
|
||||
using DevExpress.Xpf.Scheduler.UI;
|
||||
using DevExpress.XtraScheduler;
|
||||
@@ -465,7 +463,7 @@ namespace BeWo.Scheduler.View
|
||||
ViewModel.NewVM.Start = start;
|
||||
ViewModel.NewVM.End = end;
|
||||
|
||||
if(isTask && dueDate.HasValue)
|
||||
if (isTask && dueDate.HasValue)
|
||||
{
|
||||
ViewModel.NewVM.End = dueDate.Value.GetShortDateTime().AddDays(1);
|
||||
}
|
||||
@@ -474,7 +472,6 @@ namespace BeWo.Scheduler.View
|
||||
|
||||
var employeeOids = new List<long>();
|
||||
var customerOids = new List<long>();
|
||||
var overlaps = false;
|
||||
|
||||
foreach (var emp in employees)
|
||||
{
|
||||
@@ -488,40 +485,13 @@ namespace BeWo.Scheduler.View
|
||||
|
||||
var item = (SchedulerAppointmentVM) Appointment.GetSourceObject(Control.GetCoreStorage());
|
||||
|
||||
//if(!IsInTaskViewMode){
|
||||
// ServiceFacade.DoResourceServiceSync(definedBelow => overlaps = definedBelow.OverlappingAppointmentsExist(Appointment.Start, Appointment.End, employeeOids, customerOids, resources.Select(res => res.ResourceOid.Value).ToList(), ViewModel.NewVM.Originator.EmployeeOid, item?.CommitToDataContract().SchedulerAppointmentOid, string.Empty, Appointment.RecurrenceIndex));
|
||||
|
||||
// if (overlaps)
|
||||
// {
|
||||
// var erg = MessageBox.Show("Dieser Termin überschneidet sich mit einem anderen bereits existierenden Termin.\n Möchten Sie ihn wirklich speichern?", "Überschneidung", MessageBoxButton.YesNo, MessageBoxImage.Exclamation);
|
||||
|
||||
// if (erg.Equals(MessageBoxResult.No))
|
||||
// {
|
||||
// Controller.Storage.EndUpdate();
|
||||
// return;
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
|
||||
ViewModel.ShouldLockOverlappingAppointmentCheck = Appointment.Type == AppointmentType.ChangedOccurrence;
|
||||
ViewModel.ShouldLockOverlappingAppointmentCheck = Appointment.Type == AppointmentType.ChangedOccurrence;
|
||||
|
||||
if (Appointment.RecurrenceInfo != null)
|
||||
{
|
||||
ViewModel.ApplyChangesToChangedOccurencyCustomFields(employees, customers, resources, originator, isPrivate, Appointment.RecurrenceIndex.ToString(), new Guid(Appointment.RecurrenceInfo.Id.ToString()), isTask, taskDescription, completedDate, dueDate, completedNotice, supportConceptList, Appointment.Subject, Appointment.AllDay);
|
||||
}
|
||||
|
||||
//if(Appointment.IsOccurrence && item == null)
|
||||
//{
|
||||
// Appointment.GetCustomFieldStorage().EmployeeList.ForEach(each =>
|
||||
// {
|
||||
// each.Employee2SchedulerAppointmentOid = null;
|
||||
// each.Employee2SchedulerAppointmentVersion = null;
|
||||
// each.SchedulerAppointmentOid = null;
|
||||
// each.IsPChanged = false;
|
||||
// each.IsPC_CheckedTs = null;
|
||||
// });
|
||||
//}
|
||||
|
||||
ApplyChanges();
|
||||
}
|
||||
catch (Exception exception)
|
||||
@@ -676,48 +646,9 @@ namespace BeWo.Scheduler.View
|
||||
}
|
||||
}
|
||||
|
||||
private bool _HasBeenUnchecked;
|
||||
|
||||
private void AllDay_OnCheckedChange(object sender, RoutedEventArgs e)
|
||||
{
|
||||
var source = (CheckEdit) e.Source;
|
||||
var value = source.IsChecked ?? false;
|
||||
|
||||
if(value == false && _HasBeenUnchecked == false)
|
||||
{
|
||||
var displayStart = NewSchedulerAppointmentFormController.DisplayStart;
|
||||
var start = NewSchedulerAppointmentFormController.Start;
|
||||
var end = NewSchedulerAppointmentFormController.End;
|
||||
|
||||
if(!end.Equals(start))
|
||||
{
|
||||
_HasBeenUnchecked = true;
|
||||
|
||||
var day = displayStart.Day;
|
||||
var month = displayStart.Month;
|
||||
var year = displayStart.Year;
|
||||
|
||||
var newEndDay = (end.AddDays(-1) >= start ? end.AddDays(-1) : start).Day;
|
||||
|
||||
var newStart = new DateTime(year, month, day, 0, 0, 0);
|
||||
var newEnd = new DateTime(year, month, newEndDay, 1, 0, 0);
|
||||
|
||||
NewSchedulerAppointmentFormController.Start = newStart;
|
||||
NewSchedulerAppointmentFormController.End = newEnd;
|
||||
|
||||
NewSchedulerAppointmentFormController.DisplayStart = newStart;
|
||||
NewSchedulerAppointmentFormController.DisplayEnd = newEnd;
|
||||
|
||||
NewSchedulerAppointmentFormController.DisplayStartTime = new TimeSpan(0, 0, 0, 0);
|
||||
NewSchedulerAppointmentFormController.DisplayEndTime = new TimeSpan(0, 1, 0, 0);
|
||||
_HasBeenUnchecked = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void DueDate_OnEditValueChanged(object sender, EditValueChangedEventArgs e)
|
||||
{
|
||||
if(e.NewValue != null && e.NewValue is DateTime dueDate)
|
||||
if(e.NewValue != null && e.NewValue is DateTime dueDate)
|
||||
{
|
||||
var newEnd = dueDate.GetShortDateTime().AddDays(1);
|
||||
|
||||
@@ -726,7 +657,58 @@ namespace BeWo.Scheduler.View
|
||||
NewSchedulerAppointmentFormController.DisplayEndDate = newEnd;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Appointment.End:
|
||||
* ======================================================================================================
|
||||
* The End property is usually specified by the Appointment.Start and Appointment.
|
||||
* Duration properties, and is always calculated as End = Start + Duration.
|
||||
* When setting the End property, the Appointment. Start property retains its value, and the Appointment.
|
||||
* Duration is changed according to the new value of the End property.
|
||||
* If the new Appointment. End property's value is less than the Appointment.
|
||||
* Start property's value, an exception is raised.
|
||||
*
|
||||
* Endzeit = Startzeit + Vorherige Dauer
|
||||
*/
|
||||
|
||||
private DateTime? _PreviousEndDate;
|
||||
|
||||
private bool _HasBeenChangedByStartTime;
|
||||
|
||||
// TOOD: KGW?
|
||||
private void StartDate_OnChange(object sender, EditValueChangedEventArgs e)
|
||||
{
|
||||
//_HasBeenChangedByStartTime = false;
|
||||
}
|
||||
|
||||
// TOOD: KGW?
|
||||
private void EndDate_OnChange(object sender, EditValueChangedEventArgs e)
|
||||
{
|
||||
//_HasBeenChangedByStartTime = false;
|
||||
}
|
||||
|
||||
private void StartTimeTextEdit_OnEditValueChanged(object sender, EditValueChangedEventArgs e)
|
||||
{
|
||||
_PreviousEndDate = NewSchedulerAppointmentFormController.End;
|
||||
|
||||
_HasBeenChangedByStartTime = true;
|
||||
}
|
||||
|
||||
private void EndTimeTextEdit_OnEditValueChanged(object sender, EditValueChangedEventArgs e)
|
||||
{
|
||||
//if (_HasBeenChangedByStartTime && _PreviousEndDate.HasValue)
|
||||
//{
|
||||
// var start = NewSchedulerAppointmentFormController.Start;
|
||||
|
||||
// if (_PreviousEndDate > start)
|
||||
// {
|
||||
// NewSchedulerAppointmentFormController.End = NewSchedulerAppointmentFormController.End.MergeDatesByDate(_PreviousEndDate.Value);
|
||||
// }
|
||||
//}
|
||||
|
||||
_HasBeenChangedByStartTime = false;
|
||||
}
|
||||
}
|
||||
|
||||
public class NewSchedulerAppointmentFormController : AppointmentFormController
|
||||
{
|
||||
|
||||
@@ -331,17 +331,17 @@ namespace BeWo.Scheduler.ViewModel
|
||||
|
||||
private void UpdateSchedulerAppointment(Appointment app, SchedulerAppointmentVM vm)
|
||||
{
|
||||
vm.EmployeeList = app.CF_EmployeeList();
|
||||
vm.CustomerList = app.CF_CustomerList();
|
||||
vm.ResourceList = app.CF_ResourceList();
|
||||
vm.Originator = app.CF_Originator();
|
||||
vm.IsPrivate = app.CF_IsPrivate();
|
||||
vm.IsTask = app.CF_IsTask();
|
||||
vm.DueDate = app.CF_DueDate();
|
||||
vm.CompletedDate = app.CF_CompletedDate();
|
||||
vm.CompletedNotice = app.CF_CompletedNotice();
|
||||
vm.TaskDescription = app.CF_TaskDescription();
|
||||
vm.SupportConceptList = app.CF_SupportConceptList();
|
||||
vm.EmployeeList = app.CF_EmployeeList();
|
||||
vm.CustomerList = app.CF_CustomerList();
|
||||
vm.ResourceList = app.CF_ResourceList();
|
||||
vm.Originator = app.CF_Originator();
|
||||
vm.IsPrivate = app.CF_IsPrivate();
|
||||
vm.IsTask = app.CF_IsTask();
|
||||
vm.DueDate = app.CF_DueDate();
|
||||
vm.CompletedDate = app.CF_CompletedDate();
|
||||
vm.CompletedNotice = app.CF_CompletedNotice();
|
||||
vm.TaskDescription = app.CF_TaskDescription();
|
||||
vm.SupportConceptList = app.CF_SupportConceptList();
|
||||
vm.HasServiceRecordEntry = app.CF_HasServiceRecordEntry();
|
||||
|
||||
if(vm.IsTask)
|
||||
|
||||
73
BeWo/Security/EncryptionUtils.cs
Normal file
73
BeWo/Security/EncryptionUtils.cs
Normal file
@@ -0,0 +1,73 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Security.Cryptography;
|
||||
using System.Text;
|
||||
|
||||
namespace BeWo.Security
|
||||
{
|
||||
public class EncryptionUtils
|
||||
{
|
||||
private static readonly byte[] _Rc2Iv = { 50, 241, 173, 46, 224, 103, 137, 72 };
|
||||
private static readonly byte[] _Rc2Key = { 140, 81, 67, 90, 70, 222, 51, 20, 154, 60, 68, 87, 112, 169, 38, 234 };
|
||||
|
||||
public static string EncryptString(string stringToEncrypt)
|
||||
{
|
||||
var rc2Csp = new RC2CryptoServiceProvider();
|
||||
var encryptor = rc2Csp.CreateEncryptor(_Rc2Key, _Rc2Iv);
|
||||
|
||||
using(var memoryStream = new MemoryStream())
|
||||
{
|
||||
using(var cryptoStream = new CryptoStream(memoryStream, encryptor, CryptoStreamMode.Write))
|
||||
{
|
||||
var toEncrypt = Encoding.UTF8.GetBytes(stringToEncrypt);
|
||||
|
||||
cryptoStream.Write(toEncrypt, 0, toEncrypt.Length);
|
||||
cryptoStream.FlushFinalBlock();
|
||||
|
||||
var encrypted = memoryStream.ToArray();
|
||||
|
||||
return Convert.ToBase64String(encrypted);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static string DecryptString(string stringToDecrypt)
|
||||
{
|
||||
var rc2Csp = new RC2CryptoServiceProvider();
|
||||
var decryptor = rc2Csp.CreateDecryptor(_Rc2Key, _Rc2Iv);
|
||||
|
||||
stringToDecrypt = stringToDecrypt.Replace(' ', '+');
|
||||
stringToDecrypt = stringToDecrypt.Trim(',');
|
||||
|
||||
try
|
||||
{
|
||||
using (var memoryStream = new MemoryStream(Convert.FromBase64String(stringToDecrypt)))
|
||||
{
|
||||
using (var cryptoStream = new CryptoStream(memoryStream, decryptor, CryptoStreamMode.Read))
|
||||
{
|
||||
var bytes = new List<byte>();
|
||||
int b;
|
||||
|
||||
do
|
||||
{
|
||||
b = cryptoStream.ReadByte();
|
||||
|
||||
if(b != -1)
|
||||
{
|
||||
bytes.Add(Convert.ToByte(b));
|
||||
}
|
||||
} while(b != -1);
|
||||
|
||||
return Encoding.UTF8.GetString(bytes.ToArray());
|
||||
}
|
||||
}
|
||||
}
|
||||
catch(CryptographicException)
|
||||
{
|
||||
// Es wird davon ausgegangen, dass der String nicht verschlüsselt ist.
|
||||
return Encoding.UTF8.GetString(Convert.FromBase64String(stringToDecrypt));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -48,12 +48,17 @@ namespace BeWo.View.Controls
|
||||
c.Text = string.Empty;
|
||||
c.ToolTip = "Kein gültiger Arbeitsvertrag";
|
||||
}
|
||||
else if (info.Reason != null)
|
||||
else if (info.Reason != null && !info.IsFeiertag /*&& info.DayOfWeek != DayOfWeek.Saturday && info.DayOfWeek != DayOfWeek.Sunday*/)
|
||||
{
|
||||
c.Background = Brushes.White;
|
||||
c.Foreground = Brushes.Red;
|
||||
c.Text = $"{info.Reason.Description[0]}";
|
||||
c.ToolTip = $"{info.Reason.Description}";
|
||||
|
||||
if (info.DayOfWeek == DayOfWeek.Saturday || info.DayOfWeek == DayOfWeek.Sunday)
|
||||
c.Background = new SolidColorBrush(ColorExtensions.FromHexString("EFEFEF"));
|
||||
else
|
||||
c.Background = Brushes.White;
|
||||
|
||||
}
|
||||
else if (dc != null)
|
||||
{
|
||||
|
||||
@@ -30,20 +30,15 @@ namespace BeWo.View.Controls
|
||||
{
|
||||
if(information.Employee != null)
|
||||
{
|
||||
switch (information.Row)
|
||||
if (information.IsLastRow)
|
||||
{
|
||||
case 0:
|
||||
ctrl.BorderBlack.BorderThickness = new Thickness(0, 0, 1, 0);
|
||||
ctrl.BorderLight.BorderThickness = new Thickness(0, 0, 0, 1);
|
||||
break;
|
||||
case 1:
|
||||
ctrl.BorderBlack.BorderThickness = new Thickness(0, 0, 1, 0);
|
||||
ctrl.BorderLight.BorderThickness = new Thickness(0, 0, 0, 1);
|
||||
break;
|
||||
case 2:
|
||||
ctrl.BorderBlack.BorderThickness = new Thickness(0, 0, 1, 1);
|
||||
ctrl.BorderLight.BorderThickness = new Thickness(0, 0, 0, 1);
|
||||
break;
|
||||
ctrl.BorderBlack.BorderThickness = new Thickness(0, 0, 1, 1);
|
||||
ctrl.BorderLight.BorderThickness = new Thickness(0, 0, 0, 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
ctrl.BorderBlack.BorderThickness = new Thickness(0, 0, 1, 0);
|
||||
ctrl.BorderLight.BorderThickness = new Thickness(0, 0, 0, 1);
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -55,7 +50,9 @@ namespace BeWo.View.Controls
|
||||
|
||||
ctrl.Text = ctrl.DisplayMember;
|
||||
|
||||
ctrl.ToolTip = new DPCtrlEmployeeTooltip(information.Employee, information.Contracts);
|
||||
ctrl.ToolTip = new DPCtrlEmployeeTooltip(information.Employee, information.Contracts, information.IsVertretung);
|
||||
//if (information.IsVertretung)
|
||||
// ctrl.Path_Notice.Visibility = Visibility.Visible;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -112,7 +109,7 @@ namespace BeWo.View.Controls
|
||||
{
|
||||
|
||||
case 0: return EmployeeInformation.Employee.LastNameFirstName;
|
||||
|
||||
//Auskommentieren für nur eine Zeile
|
||||
case 1:
|
||||
|
||||
foreach (var contract in EmployeeInformation.Contracts)
|
||||
@@ -156,7 +153,7 @@ namespace BeWo.View.Controls
|
||||
}
|
||||
else
|
||||
{
|
||||
return Translator.Translate("Besetzungsstatus");
|
||||
return Translator.Translate("Status");
|
||||
}
|
||||
|
||||
return null;
|
||||
@@ -169,5 +166,7 @@ namespace BeWo.View.Controls
|
||||
public EmployeeDC Employee { get; set; }
|
||||
public List<ContractDC> Contracts { get; set; }
|
||||
public int Row { get; set; }
|
||||
public bool IsLastRow { get; set; }
|
||||
public bool IsVertretung { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ namespace BeWo.View.Controls
|
||||
/// </summary>
|
||||
public partial class DPCtrlEmployeeTooltip : UserControl
|
||||
{
|
||||
public DPCtrlEmployeeTooltip(EmployeeDC employeeDC, List<ContractDC> contractDCs)
|
||||
public DPCtrlEmployeeTooltip(EmployeeDC employeeDC, List<ContractDC> contractDCs, bool isVertretung)
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
@@ -28,12 +28,15 @@ namespace BeWo.View.Controls
|
||||
|
||||
foreach (var contract in contractDCs)
|
||||
{
|
||||
var sep = new Separator();
|
||||
var sep1 = new Separator();
|
||||
var sep2 = new Separator();
|
||||
var txtType1 = new TextBlock();
|
||||
var txtType2 = new TextBlock();
|
||||
var txtArbeit1 = new TextBlock();
|
||||
var txtArbeit2 = new TextBlock();
|
||||
|
||||
var txtVertretung1 = new TextBlock();
|
||||
var txtVertretung2 = new TextBlock();
|
||||
|
||||
txtType1.Text = "Beschäftigungsart:";
|
||||
txtType2.Text = $"{contract.EmploymentType?.Name}";
|
||||
|
||||
@@ -51,12 +54,14 @@ namespace BeWo.View.Controls
|
||||
{
|
||||
txtArbeit2.Text = $"k.A.";
|
||||
}
|
||||
txtVertretung1.Text = "Vertretung:";
|
||||
txtVertretung2.Text = isVertretung ? "Ja" : "Nein";
|
||||
|
||||
RootGrid.RowDefinitions.Add(new RowDefinition { Height = GridLength.Auto });
|
||||
RootGrid.Children.Add(sep);
|
||||
RootGrid.Children.Add(sep1);
|
||||
|
||||
Grid.SetRow(sep, RootGrid.RowDefinitions.Count - 1);
|
||||
Grid.SetColumnSpan(sep, 3);
|
||||
Grid.SetRow(sep1, RootGrid.RowDefinitions.Count - 1);
|
||||
Grid.SetColumnSpan(sep1, 3);
|
||||
|
||||
RootGrid.RowDefinitions.Add(new RowDefinition { Height = GridLength.Auto });
|
||||
RootGrid.Children.Add(txtType1);
|
||||
@@ -73,6 +78,22 @@ namespace BeWo.View.Controls
|
||||
Grid.SetRow(txtArbeit1, RootGrid.RowDefinitions.Count - 1);
|
||||
Grid.SetRow(txtArbeit2, RootGrid.RowDefinitions.Count - 1);
|
||||
Grid.SetColumn(txtArbeit2, 2);
|
||||
|
||||
|
||||
RootGrid.RowDefinitions.Add(new RowDefinition { Height = GridLength.Auto });
|
||||
RootGrid.Children.Add(sep2);
|
||||
|
||||
Grid.SetRow(sep2, RootGrid.RowDefinitions.Count - 1);
|
||||
Grid.SetColumnSpan(sep2, 3);
|
||||
|
||||
RootGrid.RowDefinitions.Add(new RowDefinition { Height = GridLength.Auto });
|
||||
RootGrid.Children.Add(txtVertretung1);
|
||||
RootGrid.Children.Add(txtVertretung2);
|
||||
|
||||
Grid.SetRow(txtVertretung1, RootGrid.RowDefinitions.Count - 1);
|
||||
Grid.SetRow(txtVertretung2, RootGrid.RowDefinitions.Count - 1);
|
||||
Grid.SetColumn(txtVertretung2, 2);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
65
BeWo/View/Controls/DPCtrlIst.cs
Normal file
65
BeWo/View/Controls/DPCtrlIst.cs
Normal file
@@ -0,0 +1,65 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
|
||||
namespace BeWo.View.Controls
|
||||
{
|
||||
public class DPCtrlIst : DienstplanerControl
|
||||
{
|
||||
public static readonly DependencyProperty IstInformationProperty = DependencyProperty.Register(
|
||||
"IstInformation",
|
||||
typeof(DPCtrlIstInformation),
|
||||
typeof(DPCtrlIst),
|
||||
new UIPropertyMetadata(
|
||||
(s, e) =>
|
||||
{
|
||||
var information = (DPCtrlIstInformation)e.NewValue;
|
||||
var ctrl = (DPCtrlIst)s;
|
||||
|
||||
if (ctrl != null)
|
||||
{
|
||||
if (information != null)
|
||||
{
|
||||
if (information.Row == 0 && !information.Statuszeile)
|
||||
{
|
||||
ctrl.Text = string.Format("{0:0.00}", information.IstWert);
|
||||
ctrl.ToolTip = "Ist-Wert";
|
||||
}
|
||||
|
||||
if (information.Statuszeile)
|
||||
ctrl.BorderBlack.BorderThickness = new Thickness(0, 0, 0, 2);
|
||||
else
|
||||
{
|
||||
if (information.IsLastRow)
|
||||
ctrl.BorderBlack.BorderThickness = new Thickness(0, 0, 0, 1);
|
||||
else
|
||||
ctrl.BorderBlack.BorderThickness = new Thickness(0, 0, 0, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}));
|
||||
|
||||
public DPCtrlIst()
|
||||
{
|
||||
InitializeComponent();
|
||||
//BorderBlack.BorderThickness = new Thickness(0, 0, 1, 1);
|
||||
txt.HorizontalAlignment = HorizontalAlignment.Right;
|
||||
}
|
||||
public DPCtrlIstInformation IstInformation
|
||||
{
|
||||
get { return (DPCtrlIstInformation)GetValue(IstInformationProperty); }
|
||||
|
||||
set { SetValue(IstInformationProperty, value); }
|
||||
}
|
||||
}
|
||||
public class DPCtrlIstInformation
|
||||
{
|
||||
public int Row { get; set; }
|
||||
public bool Statuszeile { get; set; }
|
||||
public decimal IstWert { get; set; }
|
||||
public bool IsLastRow { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -23,19 +23,20 @@ namespace BeWo.View.Controls
|
||||
{
|
||||
if (information != null)
|
||||
{
|
||||
if (information.Row == 2)
|
||||
ctrl.BorderBlack.BorderThickness = new Thickness(0, 0, 1, 1);
|
||||
if (information.Row == 0 && !information.Statuszeile)
|
||||
{
|
||||
ctrl.Text = string.Format("{0:0.00}", information.SaldoWert);
|
||||
ctrl.ToolTip = "Saldo-Wert";
|
||||
}
|
||||
|
||||
if (information.Statuszeile)
|
||||
ctrl.BorderBlack.BorderThickness = new Thickness(0, 0, 1, 2);
|
||||
else
|
||||
{
|
||||
if (information.Statuszeile)
|
||||
ctrl.BorderBlack.BorderThickness = new Thickness(0, 0, 1, 2);
|
||||
if (information.IsLastRow)
|
||||
ctrl.BorderBlack.BorderThickness = new Thickness(0, 0, 1, 1);
|
||||
else
|
||||
{
|
||||
ctrl.BorderBlack.BorderThickness = new Thickness(0, 0, 1, 0);
|
||||
if (information.Row == 0)
|
||||
ctrl.Text = string.Format("{0:0.00}", information.SaldoWert);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -58,5 +59,6 @@ namespace BeWo.View.Controls
|
||||
public int Row { get; set; }
|
||||
public bool Statuszeile { get; set; }
|
||||
public decimal SaldoWert { get; set; }
|
||||
public bool IsLastRow { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
72
BeWo/View/Controls/DPCtrlSoll.cs
Normal file
72
BeWo/View/Controls/DPCtrlSoll.cs
Normal file
@@ -0,0 +1,72 @@
|
||||
using BS.Shared.DataContracts;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
|
||||
|
||||
namespace BeWo.View.Controls
|
||||
{
|
||||
public class DPCtrlSoll : DienstplanerControl
|
||||
{
|
||||
public static readonly DependencyProperty SollInformationProperty = DependencyProperty.Register(
|
||||
"SollInformation",
|
||||
typeof(DPCtrlSollInformation),
|
||||
typeof(DPCtrlSoll),
|
||||
new UIPropertyMetadata(
|
||||
(s, e) =>
|
||||
{
|
||||
var information = (DPCtrlSollInformation)e.NewValue;
|
||||
var ctrl = (DPCtrlSoll)s;
|
||||
|
||||
if(ctrl != null)
|
||||
{
|
||||
if(information != null)
|
||||
{
|
||||
Debug.WriteLine("Status: " + information.Statuszeile + " | MA: " + information.EmployeeDC + " | Soll: " + information.SollWert);
|
||||
if (information.Row == 0 && !information.Statuszeile)
|
||||
{
|
||||
ctrl.Text = string.Format("{0:0.00}", information.SollWert);
|
||||
ctrl.ToolTip = "Soll-Wert";
|
||||
|
||||
}
|
||||
|
||||
if (information.Statuszeile)
|
||||
ctrl.BorderBlack.BorderThickness = new Thickness(0, 0, 0, 2);
|
||||
else
|
||||
{
|
||||
if (information.IsLastRow)
|
||||
ctrl.BorderBlack.BorderThickness = new Thickness(0, 0, 0, 1);
|
||||
else
|
||||
ctrl.BorderBlack.BorderThickness = new Thickness(0, 0, 0, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}));
|
||||
|
||||
public DPCtrlSoll()
|
||||
{
|
||||
InitializeComponent();
|
||||
//BorderBlack.BorderThickness = new Thickness(0, 0, 1, 1);
|
||||
txt.HorizontalAlignment = HorizontalAlignment.Right;
|
||||
}
|
||||
public DPCtrlSollInformation SollInformation
|
||||
{
|
||||
get { return (DPCtrlSollInformation)GetValue(SollInformationProperty); }
|
||||
|
||||
set { SetValue(SollInformationProperty, value); }
|
||||
}
|
||||
}
|
||||
public class DPCtrlSollInformation
|
||||
{
|
||||
public int Row { get; set; }
|
||||
public bool Statuszeile { get; set; }
|
||||
public decimal SollWert { get; set; }
|
||||
public bool IsLastRow { get; set; }
|
||||
public EmployeeDC EmployeeDC { get; set; }
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,74 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
|
||||
|
||||
namespace BeWo.View.Controls
|
||||
{
|
||||
public class DPCtrlSollIst : DienstplanerControl
|
||||
{
|
||||
public static readonly DependencyProperty SollIstInformationProperty = DependencyProperty.Register(
|
||||
"SollIstInformation",
|
||||
typeof(DPCtrlSollIstInformation),
|
||||
typeof(DPCtrlSollIst),
|
||||
new UIPropertyMetadata(
|
||||
(s, e) =>
|
||||
{
|
||||
var information = (DPCtrlSollIstInformation)e.NewValue;
|
||||
var ctrl = (DPCtrlSollIst)s;
|
||||
|
||||
if(ctrl != null)
|
||||
{
|
||||
if(information != null)
|
||||
{
|
||||
if (information.Row == 2)
|
||||
ctrl.BorderBlack.BorderThickness = new Thickness(0, 0, 1, 1);
|
||||
else
|
||||
{
|
||||
if (information.Statuszeile)
|
||||
ctrl.BorderBlack.BorderThickness = new Thickness(0, 0, 0, 2);
|
||||
else
|
||||
{
|
||||
ctrl.BorderBlack.BorderThickness = new Thickness(0, 0, 1, 0);
|
||||
if (information.Row == 0)
|
||||
{
|
||||
ctrl.Text = string.Format("{0:0.00}", information.SollWert);
|
||||
ctrl.ToolTip = "Soll-Wert";
|
||||
}
|
||||
else if (information.Row == 1)
|
||||
{
|
||||
ctrl.Text = string.Format("{0:0.00}", information.IstWert);
|
||||
ctrl.ToolTip = "Ist-Wert";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}));
|
||||
|
||||
public DPCtrlSollIst()
|
||||
{
|
||||
InitializeComponent();
|
||||
//BorderBlack.BorderThickness = new Thickness(0, 0, 1, 1);
|
||||
txt.HorizontalAlignment = HorizontalAlignment.Right;
|
||||
}
|
||||
public DPCtrlSollIstInformation SollIstInformation
|
||||
{
|
||||
get { return (DPCtrlSollIstInformation)GetValue(SollIstInformationProperty); }
|
||||
|
||||
set { SetValue(SollIstInformationProperty, value); }
|
||||
}
|
||||
}
|
||||
public class DPCtrlSollIstInformation
|
||||
{
|
||||
public int Row { get; set; }
|
||||
public bool Statuszeile { get; set; }
|
||||
public decimal SollWert { get; set; }
|
||||
public decimal IstWert { get; set; }
|
||||
}
|
||||
|
||||
}
|
||||
@@ -25,8 +25,10 @@ namespace BeWo.View.Controls
|
||||
{
|
||||
if (information.SpalteFuerUrlaub)
|
||||
{
|
||||
if (information.Row == 2)
|
||||
if (information.IsLastRow)
|
||||
{
|
||||
ctrl.BorderBlack.BorderThickness = new Thickness(0, 0, 0, 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (information.Statuszeile)
|
||||
@@ -37,8 +39,10 @@ namespace BeWo.View.Controls
|
||||
}
|
||||
else
|
||||
{
|
||||
if (information.Row == 2)
|
||||
if (information.IsLastRow)
|
||||
{
|
||||
ctrl.BorderBlack.BorderThickness = new Thickness(0, 0, 1, 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (information.Statuszeile)
|
||||
@@ -48,8 +52,11 @@ namespace BeWo.View.Controls
|
||||
}
|
||||
}
|
||||
|
||||
ctrl.Text = string.Format("{0:0}", information.SummeTage);
|
||||
|
||||
if(information.Row == 0 && !information.Statuszeile)
|
||||
{
|
||||
ctrl.Text = string.Format("{0:0}", information.SummeTage);
|
||||
ctrl.ToolTip = "Abwesenheiten an Wochenend- und Feiertagen werden nicht mitgezählt.";
|
||||
}
|
||||
}
|
||||
}
|
||||
}));
|
||||
@@ -73,5 +80,6 @@ namespace BeWo.View.Controls
|
||||
public int Row { get; set; }
|
||||
public bool SpalteFuerUrlaub { get; set; }
|
||||
public decimal SummeTage { get; set; }
|
||||
public bool IsLastRow { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,20 +25,24 @@ namespace BeWo.View.Controls
|
||||
if (dc != null)
|
||||
{
|
||||
//dc.RemoveAll(x => x == null);
|
||||
|
||||
c.BorderBlack.BorderThickness = new Thickness(0, 0, 1, 1);
|
||||
if (!dc.IsLastRow)
|
||||
c.BorderBlack.BorderThickness = new Thickness(0, 0, 1, 0);
|
||||
else
|
||||
c.BorderBlack.BorderThickness = new Thickness(0, 0, 1, 1);
|
||||
|
||||
double res = 0.0;
|
||||
|
||||
if (dc.Hours.Count != 0 || dc.Row == 2)
|
||||
if(!dc.Statuszeile)
|
||||
{
|
||||
foreach (var dauer in dc.Hours)
|
||||
if (dc.Hours.Count != 0 || dc.Row == 0)
|
||||
{
|
||||
res += dauer;
|
||||
foreach (var dauer in dc.Hours)
|
||||
{
|
||||
res += dauer;
|
||||
}
|
||||
c.Text = res.ToString("0.##");
|
||||
}
|
||||
c.Text = res.ToString("0.##");
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
if(dc.Statuszeile)
|
||||
@@ -81,5 +85,6 @@ namespace BeWo.View.Controls
|
||||
public List<double> Hours { get; set; }
|
||||
public bool Statuszeile { get; set; }
|
||||
public int Row { get; set; }
|
||||
public bool IsLastRow { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ namespace BeWo.View.Controls
|
||||
{
|
||||
if (information != null)
|
||||
{
|
||||
if (information.Row == 2)
|
||||
if (information.IsLastRow)
|
||||
ctrl.BorderBlack.BorderThickness = new Thickness(0, 0, 1, 1);
|
||||
else
|
||||
{
|
||||
@@ -68,5 +68,6 @@ namespace BeWo.View.Controls
|
||||
public int Row { get; set; }
|
||||
public bool Statuszeile { get; set; }
|
||||
public DienstplanerMonthlySummaryDC Monatszusammenfassung { get; set;}
|
||||
public bool IsLastRow { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,10 +5,17 @@
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:BeWo.View.Detail"
|
||||
Title="Debug Log" mc:Ignorable="d"
|
||||
d:DesignHeight="500" d:DesignWidth="1000">
|
||||
Height="900" Width="700">
|
||||
|
||||
<Grid>
|
||||
<ListView x:Name="DebugListView" ItemsSource="{Binding DebugMessageList}" Background="Gainsboro">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
<StackPanel Grid.Row="0">
|
||||
<Button Click="ButtonBase_OnClick">Leeren</Button>
|
||||
</StackPanel>
|
||||
<ListView x:Name="DebugListView" ItemsSource="{Binding DebugMessageList}" Background="FloralWhite" Grid.Row="1">
|
||||
<ListView.ItemTemplate>
|
||||
<DataTemplate DataType="local:DebugWindowMessage">
|
||||
<Grid>
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
using System.Collections.ObjectModel;
|
||||
using System.ComponentModel;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Windows;
|
||||
using System.Windows.Media;
|
||||
using BeWo.Annotations;
|
||||
|
||||
@@ -39,11 +40,6 @@ namespace BeWo.View.Detail
|
||||
DebugMessageList.Add(new DebugWindowMessage(message));
|
||||
}
|
||||
|
||||
public void LogMessage(string message, DebugWindowMessageColor debugWindowMessageColor)
|
||||
{
|
||||
DebugMessageList.Add(new DebugWindowMessage(message, debugWindowMessageColor));
|
||||
}
|
||||
|
||||
public void LogMessage(string message, Color color)
|
||||
{
|
||||
DebugMessageList.Add(new DebugWindowMessage(message, color));
|
||||
@@ -51,81 +47,37 @@ namespace BeWo.View.Detail
|
||||
|
||||
public event PropertyChangedEventHandler PropertyChanged;
|
||||
|
||||
|
||||
[NotifyPropertyChangedInvocator]
|
||||
protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null)
|
||||
{
|
||||
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
|
||||
}
|
||||
|
||||
private void ButtonBase_OnClick(object sender, RoutedEventArgs e)
|
||||
{
|
||||
DebugMessageList.Clear();
|
||||
}
|
||||
}
|
||||
|
||||
public class DebugWindowMessage
|
||||
{
|
||||
public string MessageText { get; }
|
||||
|
||||
public DebugWindowMessageColor DebugWindowMessageColor { get; }
|
||||
|
||||
public Color CustomColor { get; }
|
||||
|
||||
public SolidColorBrush TextColor
|
||||
{
|
||||
get
|
||||
{
|
||||
switch(DebugWindowMessageColor)
|
||||
{
|
||||
case DebugWindowMessageColor.Blue:
|
||||
return new SolidColorBrush(Colors.DodgerBlue);
|
||||
case DebugWindowMessageColor.Black:
|
||||
return new SolidColorBrush(Colors.Black);
|
||||
case DebugWindowMessageColor.Green:
|
||||
return new SolidColorBrush(Colors.MediumSeaGreen);
|
||||
case DebugWindowMessageColor.Orange:
|
||||
return new SolidColorBrush(Color.FromRgb(255, 90, 0));
|
||||
case DebugWindowMessageColor.Red:
|
||||
return new SolidColorBrush(Colors.Red);
|
||||
case DebugWindowMessageColor.Yellow:
|
||||
return new SolidColorBrush(Colors.Yellow);
|
||||
case DebugWindowMessageColor.Purple:
|
||||
return new SolidColorBrush(Colors.Purple);
|
||||
case DebugWindowMessageColor.Custom:
|
||||
return new SolidColorBrush(CustomColor);
|
||||
default:
|
||||
return new SolidColorBrush(Colors.Black);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
public SolidColorBrush TextColor => new SolidColorBrush(CustomColor);
|
||||
|
||||
public DebugWindowMessage(string messageText)
|
||||
{
|
||||
MessageText = $"{DateTime.Now:dd.MM.yyyy HH:mm:ss}: {messageText}";
|
||||
DebugWindowMessageColor = DebugWindowMessageColor.Black;
|
||||
CustomColor = Colors.Black;
|
||||
}
|
||||
|
||||
public DebugWindowMessage(string messageText, DebugWindowMessageColor debugWindowMessageColor)
|
||||
{
|
||||
MessageText = $"{DateTime.Now:dd.MM.yyyy HH:mm:ss}: {messageText}";
|
||||
DebugWindowMessageColor = debugWindowMessageColor;
|
||||
CustomColor = Colors.Black;
|
||||
}
|
||||
|
||||
public DebugWindowMessage(string messageText, Color customColor)
|
||||
{
|
||||
MessageText = $"{DateTime.Now:dd.MM.yyyy HH:mm:ss}: {messageText}";
|
||||
DebugWindowMessageColor = DebugWindowMessageColor.Custom;
|
||||
CustomColor = customColor;
|
||||
}
|
||||
}
|
||||
|
||||
public enum DebugWindowMessageColor
|
||||
{
|
||||
Black,
|
||||
Green,
|
||||
Yellow,
|
||||
Red,
|
||||
Orange,
|
||||
Blue,
|
||||
Custom,
|
||||
Purple
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,4 +1,5 @@
|
||||
using System.Collections.Generic;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Runtime.CompilerServices;
|
||||
@@ -22,7 +23,7 @@ using BS.Shared.Core;
|
||||
using BS.Shared.DataContracts;
|
||||
using BS.Shared.DataContracts.Compact;
|
||||
using BS.Shared.Extensions;
|
||||
|
||||
using DevExpress.Xpf.Editors;
|
||||
using DevExpress.Xpf.Editors.Settings;
|
||||
using DevExpress.Xpf.Grid;
|
||||
using Button = System.Windows.Controls.Button;
|
||||
@@ -37,9 +38,14 @@ namespace BeWo.View.Detail
|
||||
private GridControl _GridAbsenceTimes;
|
||||
private GridControl _GridOvertimes;
|
||||
private GridControl _GridCustomers;
|
||||
private GridControl _GridLeaveDays;
|
||||
|
||||
private bool _InitTabIndex;
|
||||
|
||||
public List<GeschenkterUrlaubstagDC> GeschenkteUrlaubstage { get; set; }
|
||||
|
||||
|
||||
|
||||
private readonly ObservableSortCollection<ValueListEntryDC> _EintragKategorien;
|
||||
|
||||
public EmployeeView(EmployeeVM pEmployeeDC)
|
||||
@@ -131,8 +137,17 @@ namespace BeWo.View.Detail
|
||||
{
|
||||
tabitem_notizen.Visibility = Visibility.Collapsed;
|
||||
}
|
||||
//Employee Image
|
||||
if (_ViewModel.EmployeeImage != null)
|
||||
|
||||
if (BeWoApp.AppSettings.ShowUrlaubsplanung)
|
||||
{
|
||||
tabitem_documents.Visibility = Visibility.Visible;
|
||||
}
|
||||
else
|
||||
{
|
||||
tabitem_notizen.Visibility = Visibility.Collapsed;
|
||||
}
|
||||
//Employee Image
|
||||
if (_ViewModel.EmployeeImage != null)
|
||||
{
|
||||
using (var ms = new System.IO.MemoryStream(_ViewModel.EmployeeImage))
|
||||
{
|
||||
@@ -150,7 +165,7 @@ namespace BeWo.View.Detail
|
||||
_EintragKategorien = pEmployeeDC.EintragKategorien;
|
||||
}
|
||||
|
||||
public void Image_EditValueChanged(object sender, DevExpress.Xpf.Editors.EditValueChangedEventArgs e)
|
||||
public void Image_EditValueChanged(object sender, DevExpress.Xpf.Editors.EditValueChangedEventArgs e)
|
||||
{
|
||||
_ViewModel.EmployeeImage = Img.EditValue as byte[];
|
||||
}
|
||||
@@ -207,6 +222,19 @@ namespace BeWo.View.Detail
|
||||
if (tabcontrol_contracts.Items.Count > 0)
|
||||
{
|
||||
tabcontrol_contracts.SelectedIndex = tabcontrol_contracts.Items.Count - 1;
|
||||
//var contract = tabcontrol_contracts.SelectedItem as ContractVM;
|
||||
|
||||
//if (contract != null && contract.EmploymentType != null)
|
||||
//{
|
||||
// ViewModel.LastContract.EmploymentTypeLeaveDaysVisibility =
|
||||
// (contract.EmploymentType.LeaveDays != null) ? Visibility.Visible : Visibility.Collapsed;
|
||||
// ViewModel.LastContract.LeaveDaysVisibility = (contract.EmploymentType.LeaveDays != null) ? Visibility.Collapsed : Visibility.Visible;
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// ViewModel.LastContract.EmploymentTypeLeaveDaysVisibility = Visibility.Collapsed;
|
||||
// ViewModel.LastContract.LeaveDaysVisibility = Visibility.Visible;
|
||||
//}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -234,10 +262,36 @@ namespace BeWo.View.Detail
|
||||
|
||||
try
|
||||
{
|
||||
//if (ViewModel.LastContract != null && ViewModel.LastContract.EmploymentType != null)
|
||||
// {
|
||||
// if (ViewModel.LastContract.EmploymentType.LeaveDays != null)
|
||||
// {
|
||||
// var originalEmploymentType = ServiceFacade.DoEmployeeServiceSync(s => s.GetEmploymentType((long)ViewModel.LastContract.EmploymentType.EmploymentTypeOid));
|
||||
|
||||
// if (originalEmploymentType.LeaveDays == ViewModel.LastContract.EmploymentType.LeaveDays) // Beschäftigungsart wurde feste Zahl Urlaubstage gegeben
|
||||
// {
|
||||
// int arbeitstage = ViewModel.LastContract.WeeklyDays != null ? (int)ViewModel.LastContract.WeeklyDays : 0;
|
||||
// decimal? urlaubstage = ViewModel.LastContract.EmploymentType.LeaveDays;
|
||||
// ViewModel.LastContract.LeaveDays = urlaubstage;
|
||||
// //if (ViewModel.LastContract.ContractEndDate.Value.Date >= new DateTime(ViewModel.LastContract.EntryDate.Value.Year, 12, 31))
|
||||
// //{
|
||||
// // int restlicheTageImJahr = Convert.ToInt32((new DateTime(ViewModel.LastContract.EntryDate.Value.Year, 12, 31) - ViewModel.LastContract.EntryDate.Value.Date).TotalDays);
|
||||
// // urlaubstage = CalculateUrlaubstage((DateTime)ViewModel.LastContract.EntryDate, arbeitstage, restlicheTageImJahr, urlaubstage);
|
||||
|
||||
// // // Urlaubskonto: Verbleibende Tage hier auf Urlaubstage setzen..
|
||||
|
||||
// //}
|
||||
// }
|
||||
// else // Beschäftigungsart sind keine festen Urlaubstage zugeordnet
|
||||
// {
|
||||
// ViewModel.LastContract.LeaveDays = ViewModel.LastContract.EmploymentType.LeaveDays;
|
||||
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
if(ViewModel.IsNew)
|
||||
{
|
||||
IsDoneWithInsertOrUpdate = false;
|
||||
|
||||
ServiceFacade.DoEmployeeServiceAsync(s => s.InsertNewEmployee(lDataContract), ReloadViewModel);
|
||||
}
|
||||
else
|
||||
@@ -256,6 +310,11 @@ namespace BeWo.View.Detail
|
||||
}
|
||||
}
|
||||
|
||||
private decimal CalculateUrlaubstage(DateTime entryDate, int anzahlArbeitstage, int restlicheTageImJahr, decimal? urlaubstage)
|
||||
{
|
||||
return ServiceFacade.DoEmployeeServiceSync(s => s.CalculateUrlaubstage(entryDate, anzahlArbeitstage, restlicheTageImJahr, urlaubstage));
|
||||
//return 0;
|
||||
}
|
||||
private bool ValidateContracts()
|
||||
{
|
||||
var count = ViewModel.Contracts.VMList.Count(c => !c.ContractEndDate.HasValue);
|
||||
@@ -427,6 +486,11 @@ namespace BeWo.View.Detail
|
||||
|
||||
private void tabitem_arbeitszeit_Selected(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (ViewModel.IsNew)
|
||||
{
|
||||
MessageBox.Show("Bevor Sie Arbeitszeiten eintragen können, muss dieser Datensatz zuerst gespeichert werden.", "Erst speichern bitte", MessageBoxButton.OK, MessageBoxImage.Information);
|
||||
return;
|
||||
}
|
||||
if (tabitem_arbeitszeit.Content == null)
|
||||
{
|
||||
tabitem_arbeitszeit.Content = new EmployeeArbeitszeitView(_ViewModel, ViewModel.DataContract.EmployeeOid.Value);
|
||||
@@ -458,6 +522,7 @@ namespace BeWo.View.Detail
|
||||
{
|
||||
ViewModel.Contracts.AddNewVMToList();
|
||||
tabcontrol_contracts.SelectedIndex = tabcontrol_contracts.Items.Count - 1;
|
||||
|
||||
}
|
||||
|
||||
private void btn_deleteContract_Click(object sender, RoutedEventArgs e)
|
||||
@@ -605,5 +670,73 @@ namespace BeWo.View.Detail
|
||||
{
|
||||
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
|
||||
}
|
||||
|
||||
|
||||
private void LeaveDaysTabItem_Selected(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (_GridLeaveDays == null)
|
||||
{
|
||||
_GridLeaveDays = rootGrid.Resources["datagrid_leavedays"] as GridControl;
|
||||
|
||||
GroupBoxLeaveDays.Content = _GridLeaveDays;
|
||||
}
|
||||
GeschenkteUrlaubstage = ServiceFacade.DoEmployeeServiceSync(s => s.GetGeschenkteUrlaubstageForEmployee((long)ViewModel.DataContract.EmployeeOid));
|
||||
_GridLeaveDays.ItemsSource = GeschenkteUrlaubstage;
|
||||
}
|
||||
private void button_addLeaveDay_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
var anzahlTage = Convert.ToDecimal(spinedit_anzahlTage.Text);
|
||||
var erlaeuterung = textbox_erlaeuterung.Text;
|
||||
GeschenkterUrlaubstagDC dc = new GeschenkterUrlaubstagDC()
|
||||
{
|
||||
AnzahlTage = anzahlTage,
|
||||
Date = DateTime.Now.Date,
|
||||
Employee = (long)ViewModel.DataContract.EmployeeOid,
|
||||
GeschenkterUrlaubstagNotice = erlaeuterung
|
||||
};
|
||||
ServiceFacade.DoEmployeeServiceSync(s => s.InsertGeschenkterUrlaubstag(dc));
|
||||
GeschenkteUrlaubstage.Add(dc);
|
||||
_GridLeaveDays.ItemsSource = null;
|
||||
_GridLeaveDays.ItemsSource = GeschenkteUrlaubstage;
|
||||
}
|
||||
private void button_removeLeaveDay_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
var dc = _GridLeaveDays.GetCurrentValue<GeschenkterUrlaubstagDC>();
|
||||
ServiceFacade.DoEmployeeServiceSync(s => s.DeleteGeschenkterUrlaubstag(dc));
|
||||
|
||||
var items = _GridLeaveDays.ItemsSource as List<GeschenkterUrlaubstagDC>;
|
||||
items.Remove(dc);
|
||||
|
||||
_GridLeaveDays.ItemsSource = null;
|
||||
_GridLeaveDays.ItemsSource = items;
|
||||
}
|
||||
|
||||
private void combobox_employmenttype_EditValueChanged(object sender, EditValueChangedEventArgs e)
|
||||
{
|
||||
//var contract = tabcontrol_contracts.SelectedItem as ContractVM;
|
||||
|
||||
// if (contract.EmploymentType != null && contract.EmploymentType.LeaveDays != null)
|
||||
// {
|
||||
// contract.EmploymentTypeLeaveDaysVisibility = Visibility.Visible;
|
||||
// contract.LeaveDaysVisibility = Visibility.Collapsed;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// contract.EmploymentTypeLeaveDaysVisibility = Visibility.Collapsed;
|
||||
// contract.LeaveDaysVisibility = Visibility.Visible;
|
||||
// }
|
||||
|
||||
//var index = tabcontrol_contracts.SelectedIndex;
|
||||
//if(index == tabcontrol_contracts.Items.Count - 1)
|
||||
// {
|
||||
// Cache.GetInstance().ClearEmployees();
|
||||
// BeWoApp.MainControl.ResetView(UIContext.Employee);
|
||||
//}
|
||||
//else
|
||||
// {
|
||||
// tabcontrol_contracts.SelectedIndex = tabcontrol_contracts.Items.Count - 1;
|
||||
// tabcontrol_contracts.SelectedIndex = index;
|
||||
//}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -18,15 +18,20 @@
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Label Name="label_" Content="Bezeichnung" />
|
||||
<TextBox Margin="3" Grid.Column="1" Text="{val:ValidationBinding Path=NewVM.Name, UpdateSourceTrigger=PropertyChanged}" Height="23" VerticalAlignment="Center" />
|
||||
<Button Margin="3" Padding="3,2,3,2" Grid.Column="2" IsDefault="True" Name="button_add" Click="button_add_Click" VerticalAlignment="Center" Content="Hinzufügen" Height="25" Width="Auto" FontWeight="Normal" />
|
||||
|
||||
<dxg:GridControl Margin="0,10,0,0" Grid.Row="1" Grid.ColumnSpan="3" Name="grid">
|
||||
|
||||
<Label Name="label_leavedays" Grid.Row="1" Content="Urlaubstage" />
|
||||
<TextBox Margin="3" Grid.Row="1" Grid.Column="1" Text="{val:ValidationBinding Path=NewVM.LeaveDays, UpdateSourceTrigger=PropertyChanged}" Height="23" VerticalAlignment="Center"/>
|
||||
<Button Margin="3" Padding="3,2,3,2" Grid.Row="1" Grid.Column="2" IsDefault="True" Name="button_add" Click="button_add_Click" VerticalAlignment="Center" Content="Hinzufügen" Height="25" Width="Auto" FontWeight="Normal" />
|
||||
|
||||
<dxg:GridControl Margin="0,10,0,0" Grid.Row="2" Grid.ColumnSpan="3" Name="grid">
|
||||
<dxg:GridControl.Columns>
|
||||
<dxg:GridColumn FieldName="IsDeleteable" Header="" FixedWidth="True" Width="24" ReadOnly="True">
|
||||
|
||||
@@ -38,6 +43,7 @@
|
||||
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn FieldName="Name" Header="Bezeichnung" />
|
||||
<dxg:GridColumn FieldName="LeaveDays" Header="Urlaubstage"/>
|
||||
</dxg:GridControl.Columns>
|
||||
<dxg:GridControl.View>
|
||||
<dxg:TableView AutoWidth="true" ShowGroupPanel="False" ShowGroupedColumns="false" ShowTotalSummary="False" NavigationStyle="Cell" />
|
||||
|
||||
@@ -178,8 +178,12 @@
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock VerticalAlignment="Center" Margin="0,0,3,0" >
|
||||
<Hyperlink TargetName="_NewWindow" Foreground="#FFFFFFFF" Click="Hyperlink_Hilfeplan_Reaktivieren_Click" Tag="{Binding}">Reaktivieren</Hyperlink>
|
||||
<TextBlock VerticalAlignment="Center" Margin="8,10,0,0" FontSize="12" Foreground="{DynamicResource MainGroupBoxForegroundBrush}">
|
||||
<Hyperlink x:Name="HyperlinkOwnChatSettings" TargetName="_NewWindow" Click="Hyperlink_ShowOwnChatSettings_Click">
|
||||
<Hyperlink.Inlines>
|
||||
<Run Text="{markup:Translate ownChat Einstellungen öffnen}"/>
|
||||
</Hyperlink.Inlines>
|
||||
</Hyperlink>
|
||||
</TextBlock>
|
||||
|
||||
</Grid>
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
using System.Collections.Generic;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Windows;
|
||||
using System.Windows.Documents;
|
||||
using BeWo.ServiceProxy;
|
||||
using BeWo.ViewModel;
|
||||
using BS.Shared.DataContracts;
|
||||
@@ -15,6 +17,18 @@ namespace BeWo.View.Detail
|
||||
{
|
||||
InitializeComponent();
|
||||
ViewModel = viewModel;
|
||||
|
||||
if (BeWoApp.LoggedOnUser.HasRight(BS.Shared.UserRightType.ChatAdminSettings) && BeWoApp.AppSettings.ShowOwnChatSettings)
|
||||
{
|
||||
var url = ServiceFacade.DoOperationsServiceSync(s => s.GetOwnChatSettingsUrl());
|
||||
HyperlinkOwnChatSettings.NavigateUri = new Uri(url);
|
||||
//HyperlinkOwnChatSettings.Inlines.Add("testtestestt");
|
||||
//HyperlinkOwnChatSettings.Text
|
||||
}
|
||||
else
|
||||
{
|
||||
GroupOwnChatSettings.Visibility = Visibility.Collapsed;
|
||||
}
|
||||
}
|
||||
|
||||
public override bool IsDirty
|
||||
@@ -73,5 +87,10 @@ namespace BeWo.View.Detail
|
||||
})));
|
||||
}
|
||||
|
||||
private void Hyperlink_ShowOwnChatSettings_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
System.Diagnostics.Process.Start(new System.Diagnostics.ProcessStartInfo((sender as Hyperlink).NavigateUri.ToString()));
|
||||
e.Handled = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -73,10 +73,11 @@ namespace BeWo.View.Detail.Report
|
||||
|
||||
Parent._SchedulerControl.Storage.AppointmentStorage.Remove(Appointment);
|
||||
ServiceFacade.DoOperationsServiceSync(x => x.DeleteAbsenceTime(AbsenceTime));
|
||||
|
||||
Parent.UrlaubsplanerRootObj.Abwesenheiten.Remove(AbsenceTime);
|
||||
SchedulerFormBehavior.Close(this, true);
|
||||
|
||||
Parent.UpdateUrlaubkonto(AbsenceTime.EmployeeOid.Value);
|
||||
Parent.UpdateScheduler();
|
||||
}
|
||||
|
||||
private void SaveBtn_Click(object sender, RoutedEventArgs e)
|
||||
@@ -99,6 +100,18 @@ namespace BeWo.View.Detail.Report
|
||||
{
|
||||
AbsenceTime = ServiceFacade.DoOperationsServiceSync(x => x.UpdateAbsenceTimeWithReturn(AbsenceTime));
|
||||
|
||||
AbsenceTimeDC dc = null;
|
||||
foreach (var item in Parent.UrlaubsplanerRootObj.Abwesenheiten)
|
||||
{
|
||||
if (item.AbsenceTimeOid == AbsenceTime.AbsenceTimeOid)
|
||||
dc = item;
|
||||
}
|
||||
if (dc != null)
|
||||
{
|
||||
Parent.UrlaubsplanerRootObj.Abwesenheiten.Remove(dc);
|
||||
Parent.UrlaubsplanerRootObj.Abwesenheiten.Add(AbsenceTime);
|
||||
}
|
||||
|
||||
var t = AbsenceTime.AbsenceTimeVersion;
|
||||
|
||||
SchedulerHelper.OverrideAppointmentWithAbsenceTime(Appointment, AbsenceTime);
|
||||
@@ -106,7 +119,7 @@ namespace BeWo.View.Detail.Report
|
||||
else
|
||||
{
|
||||
AbsenceTime = ServiceFacade.DoOperationsServiceSync(x => x.InsertAbsenceTimeWithReturn(AbsenceTime));
|
||||
|
||||
Parent.UrlaubsplanerRootObj.Abwesenheiten.Add(AbsenceTime);
|
||||
SchedulerHelper.OverrideAppointmentWithAbsenceTime(Appointment, AbsenceTime);
|
||||
|
||||
Parent._SchedulerControl.Storage.AppointmentStorage.Add(Appointment);
|
||||
|
||||
@@ -20,35 +20,6 @@ namespace BeWo.View.Detail.Report
|
||||
{
|
||||
public partial class AbwesenheitsEmployeeHeader : UserControl
|
||||
{
|
||||
//public static readonly DependencyProperty EmployeeDCProperty = DependencyProperty.Register(
|
||||
// "EmployeeDC",
|
||||
// typeof(EmployeeDC),
|
||||
// typeof(AbwesenheitsEmployeeHeader),
|
||||
// new UIPropertyMetadata(
|
||||
// (s, e) =>
|
||||
// {
|
||||
// var dc = (EmployeeDC)e.NewValue;
|
||||
// var c = (AbwesenheitsEmployeeHeader)s;
|
||||
|
||||
// if (c != null)
|
||||
// {
|
||||
// if (dc != null)
|
||||
// {
|
||||
|
||||
// c._EmployeeName.Text = dc.LastNameFirstName;
|
||||
// c._EmployeeUrlaub.Text = $"Urlaub: {dc.Urlaubskonto.Resturlaub.ToString("0.00")}/{dc.Urlaubskonto.Urlaubsanspruch.ToString("0.00")} Tage";
|
||||
// if (dc.Urlaubskonto.Resturlaub < 0)
|
||||
// c._EmployeeUrlaub.Foreground = Brushes.LightCoral;
|
||||
// var jahr = c.Jahr;
|
||||
// var monat = c.Monat;
|
||||
// //var absencetimes = ServiceFacade.DoOperationsServiceSync(x => x.GetAbsenceTimesForMonth(dc.EmployeeOid.Value, c.Monat, c.Jahr, 2));
|
||||
// //c._EmployeeUrlaubDieserMonat.Text +=
|
||||
// ((AbwesenheitsEmployeeHeaderTooltip)c.ToolTip).Set(dc);
|
||||
// //((AbwesenheitsEmployeeHeaderTooltip)c.ToolTip).Set(dc, absencetimes);
|
||||
// }
|
||||
// }
|
||||
// }));
|
||||
|
||||
public static readonly DependencyProperty AbwesenheitsInformationDCProperty = DependencyProperty.Register(
|
||||
"AbwesenheitsInformationDC",
|
||||
typeof(AbwesenheitsInformationDC),
|
||||
@@ -63,10 +34,16 @@ namespace BeWo.View.Detail.Report
|
||||
{
|
||||
if (dc != null)
|
||||
{
|
||||
decimal geschenkteUrlaubstage = 0.0m;
|
||||
//foreach (var urlaub in dc.GeschenkteUrlaubstage)
|
||||
// geschenkteUrlaubstage += urlaub.AnzahlTage;
|
||||
|
||||
c._EmployeeName.Text = dc.Employee.LastNameFirstName;
|
||||
c._EmployeeUrlaub.Text = $"Urlaub: {dc.Employee.Urlaubskonto.Resturlaub.ToString("0.00")}/{dc.Employee.Urlaubskonto.Urlaubsanspruch.ToString("0.00")} Tage";
|
||||
if (dc.Employee.Urlaubskonto.Resturlaub < 0)
|
||||
c._EmployeeUrlaub.Text = $"Urlaub: {(dc.Employee.Urlaubskonto.Resturlaub).ToString("0.00")}/{(dc.Employee.Urlaubskonto.Urlaubsanspruch).ToString("0.00")} Tage";
|
||||
if (dc.Employee.Urlaubskonto.Resturlaub + geschenkteUrlaubstage < 0)
|
||||
c._EmployeeUrlaub.Foreground = Brushes.LightCoral;
|
||||
else
|
||||
c._EmployeeUrlaub.Foreground = Brushes.White;
|
||||
|
||||
int tageUrlaub = 0;
|
||||
int tageKrankheit = 0;
|
||||
@@ -84,20 +61,28 @@ namespace BeWo.View.Detail.Report
|
||||
krankheitstage.Add(tag);
|
||||
}
|
||||
|
||||
// Berechnung der Urlaubstage (falls vorhanden)
|
||||
if (urlaubstage.Count > 0)
|
||||
{
|
||||
foreach (var spanne in urlaubstage)
|
||||
{
|
||||
if (spanne.End == null)
|
||||
spanne.End = new DateTime(dc.Year, dc.Month, DateTime.DaysInMonth(dc.Year, dc.Month));
|
||||
// Nur ein Tag
|
||||
if (spanne.Start == spanne.End)
|
||||
tageUrlaub++;
|
||||
// Mehrere Tage
|
||||
else
|
||||
{
|
||||
// Alle Tage in einem Monat
|
||||
if (spanne.Start.Value.Month == spanne.End.Value.Month)
|
||||
tageUrlaub += Convert.ToInt32((spanne.End.Value.Date - spanne.Start.Value.Date).TotalDays + 1);
|
||||
// Tage über Monate verteilt
|
||||
else
|
||||
{
|
||||
DateTime? tempStart = null;
|
||||
DateTime? tempEnd = null;
|
||||
// Prüfen, ob Start und/oder Ende nicht dem ausgewählten Monat entspricht
|
||||
if (spanne.Start.Value.Month != dc.Month)
|
||||
{
|
||||
tempStart = new DateTime(dc.Year, dc.Month, 1);
|
||||
@@ -116,44 +101,69 @@ namespace BeWo.View.Detail.Report
|
||||
}
|
||||
}
|
||||
}
|
||||
c._EmployeeUrlaubDieserMonat.Text = "Urlaub diesen Monat: " + tageUrlaub + " Tage";
|
||||
|
||||
}
|
||||
// Berechnung der Krankheitstage (falls vorhanden)
|
||||
if (krankheitstage.Count > 0)
|
||||
{
|
||||
foreach (var spanne in krankheitstage)
|
||||
{
|
||||
// Nur ein Tag
|
||||
if (spanne.Start == spanne.End)
|
||||
tageKrankheit++;
|
||||
// Mehrere Tage
|
||||
else
|
||||
{
|
||||
if (spanne.Start.Value.Month == spanne.End.Value.Month)
|
||||
tageUrlaub += Convert.ToInt32((spanne.End.Value.Date - spanne.Start.Value.Date).TotalDays + 1);
|
||||
// Wenn Krankheit ein Enddatum hat
|
||||
if (spanne.End != null)
|
||||
{
|
||||
// Alle Tage in einem Monat
|
||||
if (spanne.Start.Value.Month == spanne.End.Value.Month)
|
||||
tageKrankheit += Convert.ToInt32((spanne.End.Value.Date - spanne.Start.Value.Date).TotalDays + 1);
|
||||
// Tage über mehrere Monate verteilt
|
||||
else
|
||||
{
|
||||
// Prüfen, ob Start und/oder Ende nicht dem ausgewählten Monat entspricht
|
||||
DateTime? tempStart = null;
|
||||
DateTime? tempEnd = null;
|
||||
if (spanne.Start.Value.Month != dc.Month)
|
||||
{
|
||||
tempStart = new DateTime(dc.Year, dc.Month, 1);
|
||||
}
|
||||
if (spanne.End.Value.Month != dc.Month)
|
||||
{
|
||||
tempEnd = new DateTime(dc.Year, dc.Month, 1).AddMonths(1).AddTicks(-1);
|
||||
}
|
||||
|
||||
if (tempStart != null && tempEnd != null)
|
||||
tageKrankheit += Convert.ToInt32((tempEnd.Value.Date - tempStart.Value.Date).TotalDays + 1);
|
||||
else if (tempStart != null && tempEnd == null)
|
||||
tageKrankheit += Convert.ToInt32((spanne.End.Value.Date - tempStart.Value.Date).TotalDays + 1);
|
||||
else if (tempStart == null && tempEnd != null)
|
||||
tageKrankheit += Convert.ToInt32((tempEnd.Value.Date - spanne.Start.Value.Date).TotalDays + 1);
|
||||
}
|
||||
}
|
||||
// Wenn Krankheit kein Enddatum gesetzt wurde
|
||||
else
|
||||
{
|
||||
DateTime? tempStart = null;
|
||||
DateTime? tempEnd = null;
|
||||
if (spanne.Start.Value.Month != dc.Month)
|
||||
{
|
||||
tempStart = new DateTime(dc.Year, dc.Month, 1);
|
||||
}
|
||||
if (spanne.End.Value.Month != dc.Month)
|
||||
{
|
||||
tempEnd = new DateTime(dc.Year, dc.Month, 1).AddMonths(1).AddTicks(-1);
|
||||
}
|
||||
DateTime tempEnd = new DateTime(dc.Year, dc.Month, DateTime.DaysInMonth(dc.Year, dc.Month));
|
||||
DateTime tempStart = new DateTime(dc.Year, dc.Month, 1); ;
|
||||
|
||||
if (tempStart != null && tempEnd != null)
|
||||
tageKrankheit += Convert.ToInt32((tempEnd.Value.Date - tempStart.Value.Date).TotalDays + 1);
|
||||
else if (tempStart != null && tempEnd == null)
|
||||
tageKrankheit += Convert.ToInt32((spanne.End.Value.Date - tempStart.Value.Date).TotalDays + 1);
|
||||
else if (tempStart == null && tempEnd != null)
|
||||
tageKrankheit += Convert.ToInt32((tempEnd.Value.Date - spanne.Start.Value.Date).TotalDays + 1);
|
||||
tageKrankheit += Convert.ToInt32((tempEnd.Date - tempStart.Date).TotalDays + 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
DateTime tempEnd = new DateTime(spanne.Start.Value.Year, spanne.Start.Value.Month, DateTime.DaysInMonth(spanne.Start.Value.Year, spanne.Start.Value.Month));
|
||||
tageKrankheit += Convert.ToInt32((tempEnd.Date - spanne.Start.Value.Date).TotalDays + 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
c._EmployeeKrankheitDieserMonat.Text = "Krankheit diesen Monat: " + tageKrankheit + " Tage";
|
||||
}
|
||||
((AbwesenheitsEmployeeHeaderTooltip)c.ToolTip).Set(dc.Employee, tageUrlaub, tageKrankheit);
|
||||
c._EmployeeUrlaubDieserMonat.Text = "Urlaub diesen Monat: " + tageUrlaub + " Tage";
|
||||
c._EmployeeKrankheitDieserMonat.Text = "Krankheit diesen Monat: " + tageKrankheit + " Tage";
|
||||
((AbwesenheitsEmployeeHeaderTooltip)c.ToolTip).Set(dc.Employee, tageUrlaub, tageKrankheit, dc.Month);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Text="Resturlaub Vorjahr" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left" Foreground="Black" Margin="3"/>
|
||||
<TextBlock x:Name="_TxtResturlaubVorjahr" Text="35,00 Tage" Grid.Column="1" Grid.Row="0" HorizontalAlignment="Left" Foreground="Black" Margin="3"/>
|
||||
@@ -33,5 +34,8 @@
|
||||
<TextBlock x:Name="_TxtTageUrlaub" Text="00,00 Tage" Grid.Column="1" Grid.Row="4" HorizontalAlignment="Left" Foreground="Black" Margin="3" />
|
||||
<TextBlock Text="Tage Krank" Grid.Column="0" Grid.Row="5" HorizontalAlignment="Left" Foreground="Black" Margin="3" />
|
||||
<TextBlock x:Name="_TxtTageKrank" Text="00,00 Tage" Grid.Column="1" Grid.Row="5" HorizontalAlignment="Left" Foreground="Black" Margin="3" />
|
||||
|
||||
<TextBlock Text="Verfallene Urlaubstage" Grid.Column="0" Grid.Row="6" HorizontalAlignment="Left" Foreground="Black" Margin="3" />
|
||||
<TextBlock x:Name="_TxtVerfallenerUrlaub" Text="00,00 Tage" Grid.Column="1" Grid.Row="6" HorizontalAlignment="Left" Foreground="Black" Margin="3" />
|
||||
</Grid>
|
||||
</UserControl>
|
||||
|
||||
@@ -24,7 +24,7 @@ namespace BeWo.View.Detail.Report
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public void Set(EmployeeDC emp, int tageUrlaub, int tageKrankheit)
|
||||
public void Set(EmployeeDC emp, int tageUrlaub, int tageKrankheit, int month)
|
||||
{
|
||||
var konto = emp.Urlaubskonto;
|
||||
|
||||
@@ -36,6 +36,11 @@ namespace BeWo.View.Detail.Report
|
||||
_TxtUrlaubsanspruchVorjahr.Text = konto.ResturlaubVorjahrTotal.ToString("0.00") + " Tage";
|
||||
_TxtTageUrlaub.Text = tageUrlaub.ToString("0.00") + " Tage";
|
||||
_TxtTageKrank.Text = tageKrankheit.ToString("0.00") + " Tage";
|
||||
|
||||
if (emp.Urlaubskonto.UrlaubsVerfallsdatum.Month >= month)
|
||||
_TxtVerfallenerUrlaub.Text = "0.00 Tage";
|
||||
else
|
||||
_TxtVerfallenerUrlaub.Text = konto.VerfallenerUrlaub.ToString("0.00") + " Tage";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -123,20 +123,20 @@
|
||||
</dxsch:SchedulerControl.FullWeekView>
|
||||
<dxsch:SchedulerControl.MonthView >
|
||||
<dxsch:MonthView Enabled="False">
|
||||
<!--
|
||||
<dxsch:MonthView.CellStyle>
|
||||
|
||||
<!--<dxsch:MonthView.CellStyle>
|
||||
<Style TargetType="dxschv:CellControl">
|
||||
<Style.Triggers>
|
||||
<DataTrigger Value="True">
|
||||
<DataTrigger.Binding Converter="{Binding:TestConverter}">
|
||||
<Binding Path="Interval.Start"/>
|
||||
<Binding Path=""
|
||||
</DataTrigger.Binding>
|
||||
</DataTrigger>
|
||||
<MultiBinding Converter="{report:TestConverter}">
|
||||
<Binding Path="Interval.Start" />
|
||||
<Binding Path="(dxsch:SchedulerControl.Scheduler).DataContext.SpecialDates" RelativeSource="{RelativeSource Self}" />
|
||||
</MultiBinding>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</dxsch:MonthView.CellStyle>
|
||||
-->
|
||||
</dxsch:MonthView.CellStyle>-->
|
||||
|
||||
</dxsch:MonthView>
|
||||
</dxsch:SchedulerControl.MonthView>
|
||||
<dxsch:SchedulerControl.WeekView >
|
||||
@@ -160,11 +160,16 @@
|
||||
</dxsch:SchedulerControl>
|
||||
|
||||
<StackPanel Grid.Row="3" Grid.ColumnSpan="3" Orientation="Horizontal" VerticalAlignment="Bottom" HorizontalAlignment="Right">
|
||||
<TextBlock x:Name="textblock_link_pdfexport" Margin="5,0,5,3" FontSize="14">
|
||||
<Hyperlink x:Name="linkPdfExport" TargetName="_NewWindow" Foreground="#FF2B508B" RequestNavigate="LinkPdfExport_OnRequestNavigate">
|
||||
<Run Text="Drucken" />
|
||||
</Hyperlink>
|
||||
</TextBlock>
|
||||
<TextBlock x:Name="textblock_link_gift_leaveday" Margin="5,0,5,3" FontSize="14">
|
||||
<Hyperlink x:Name="linkGiftLeaveday" TargetName="_NewWindow" Foreground="#FF2B508B" RequestNavigate="LinkGiftLeaveday_OnRequestNavigate">
|
||||
<Run Text="Urlaub schenken" />
|
||||
</Hyperlink>
|
||||
</TextBlock>
|
||||
<TextBlock x:Name="textblock_link_pdfexport" Margin="5,0,5,3" FontSize="14">
|
||||
<Hyperlink x:Name="linkPdfExport" TargetName="_NewWindow" Foreground="#FF2B508B" RequestNavigate="LinkPdfExport_OnRequestNavigate">
|
||||
<Run Text="Drucken" />
|
||||
</Hyperlink>
|
||||
</TextBlock>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
|
||||
@@ -36,6 +36,7 @@ using AppointmentViewInfoCustomizingEventArgs = DevExpress.Xpf.Scheduler.Appoint
|
||||
using DevExpress.XtraScheduler;
|
||||
using System.Collections.ObjectModel;
|
||||
using DevExpress.Xpf.Scheduler.Drawing;
|
||||
//using System.Windows.Markup;
|
||||
|
||||
namespace BeWo.View.Detail.Report
|
||||
{
|
||||
@@ -52,15 +53,13 @@ namespace BeWo.View.Detail.Report
|
||||
private List<AbsenceReasonDC> _AbsenceReasonDCs;
|
||||
private List<CompactTeamDC> _TeamDCs;
|
||||
private Dictionary<long, EmployeeDC> _EmployeeDict;
|
||||
private List<AbsenceTimeDC> Abwesenheiten;
|
||||
|
||||
|
||||
private AbsenceOverviewFilterDC _SelectedFilter;
|
||||
|
||||
public int SelectedMonth;
|
||||
public int SelectedYear;
|
||||
|
||||
public List<FeiertagDC> Feiertage { get; set; }
|
||||
public UrlaubsplanerRootDC UrlaubsplanerRootObj { get; set; }
|
||||
|
||||
public int SelectedMonth { get; set; }
|
||||
public int SelectedYear { get; set; }
|
||||
|
||||
public AbwesenheitstabelleView()
|
||||
{
|
||||
@@ -71,6 +70,7 @@ namespace BeWo.View.Detail.Report
|
||||
InitializeScheduler();
|
||||
|
||||
linkPdfExport.NavigateUri = BeWoApp.SiteOfOrigin;
|
||||
linkGiftLeaveday.NavigateUri = BeWoApp.SiteOfOrigin;
|
||||
|
||||
_EmployeeDict = new Dictionary<long, EmployeeDC>();
|
||||
}
|
||||
@@ -88,8 +88,8 @@ namespace BeWo.View.Detail.Report
|
||||
|
||||
SelectedMonth = _MonthPicker.SelectedMonth;
|
||||
SelectedYear = (int)_YearPicker.SelectedItem;
|
||||
Feiertage = ServiceFacade.DoOperationsServiceSync(s => s.GetDefaultFeiertageForYear(SelectedYear)).Where(f => f.Datum.Month == SelectedMonth).ToList();
|
||||
Abwesenheiten = ServiceFacade.DoEmployeeServiceSync(s => s.GetAllEmployeeAbsenceTimesForMonth(SelectedYear, SelectedMonth));
|
||||
|
||||
UrlaubsplanerRootObj = ServiceFacade.DoOperationsServiceSync(s => s.BuildUrlaubsplanerRootObject(SelectedYear, SelectedMonth));
|
||||
|
||||
UpdateScheduler();
|
||||
ColorizeFeiertage();
|
||||
@@ -153,6 +153,40 @@ namespace BeWo.View.Detail.Report
|
||||
beWoWindow.rootGroupBox.Header = "Drucken";
|
||||
beWoWindow.ShowDialog();
|
||||
}
|
||||
private void LinkGiftLeaveday_OnRequestNavigate(object sender, RequestNavigateEventArgs e)
|
||||
{
|
||||
if (_EmployeeDict.Count > 0)
|
||||
{
|
||||
var employee = ServiceFacade.DoEmployeeServiceSync(s => s.GetAllActiveEmployees());
|
||||
var control = new UrlaubstagSchenkenView(employee);
|
||||
var beWoWindow = new BeWoWindow
|
||||
{
|
||||
rootGroupBox = { Header = "Urlaub schenken" },
|
||||
Height = 350,
|
||||
MinHeight = 350,
|
||||
Width = 300,
|
||||
MinWidth = 300,
|
||||
WindowStartupLocation = WindowStartupLocation.CenterOwner,
|
||||
GroupBoxContent = control,
|
||||
Owner = BeWoApp.CurrentBeWo.MainWindow
|
||||
};
|
||||
|
||||
control.ButtonCancelClicked += () =>
|
||||
{
|
||||
beWoWindow.Close();
|
||||
};
|
||||
control.ButtonConfirmClicked += () =>
|
||||
{
|
||||
beWoWindow.Close();
|
||||
};
|
||||
|
||||
beWoWindow.ShowDialog();
|
||||
}
|
||||
else
|
||||
{
|
||||
System.Windows.MessageBox.Show("Erstellen Sie zuerst die Abwesenheitsübersicht!", "BeWoPlaner", MessageBoxButton.OK, MessageBoxImage.Information);
|
||||
}
|
||||
}
|
||||
|
||||
private void SchedulerControl_PopupMenuShowing(object sender, SchedulerMenuEventArgs e)
|
||||
{
|
||||
@@ -292,8 +326,11 @@ namespace BeWo.View.Detail.Report
|
||||
Employee = employee,
|
||||
Month = _MonthPicker.SelectedMonth,
|
||||
Year = (int)_YearPicker.SelectedItem,
|
||||
AbsenceTimes = Abwesenheiten.Where(a => a.EmployeeOid == employee.EmployeeOid).ToList()
|
||||
AbsenceTimes = UrlaubsplanerRootObj.Abwesenheiten.Where(a => a.EmployeeOid == employee.EmployeeOid).ToList(),
|
||||
GeschenkteUrlaubstage = UrlaubsplanerRootObj.GeschenkteUrlaubstage.Where(u => u.Employee == employee.EmployeeOid).ToList()
|
||||
};
|
||||
infoDC.TageUrlaub = CountUrlaubstage(infoDC);
|
||||
infoDC.TageKrankheit = CountKrankheitstage(infoDC);
|
||||
|
||||
var resource = _SchedulerStorage.CreateResource(employee.EmployeeOid.Value.ToString());
|
||||
|
||||
@@ -350,10 +387,10 @@ namespace BeWo.View.Detail.Report
|
||||
_SelectedFilter = new AbsenceOverviewFilterDC() { Month = date.Month, Year = date.Year };
|
||||
|
||||
|
||||
if (Feiertage != null)
|
||||
if (UrlaubsplanerRootObj.Feiertage != null)
|
||||
{
|
||||
List<int> feiertageInMonat = new List<int>();
|
||||
foreach (var tag in Feiertage)
|
||||
foreach (var tag in UrlaubsplanerRootObj.Feiertage)
|
||||
{
|
||||
feiertageInMonat.Add(tag.Datum.Day);
|
||||
}
|
||||
@@ -371,7 +408,154 @@ namespace BeWo.View.Detail.Report
|
||||
private void VerticalHeaderControl_MouseDown(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
var temp = (VerticalHeaderControl)sender;
|
||||
var c = (VisualResourceHeaderContent)temp.Content;
|
||||
var info = c.CustomFields["AbwesenheitsInformationDC"] as AbwesenheitsInformationDC; //Hierin steht das AbwesenheitsInformationDC, aber man kommt nicht dran
|
||||
var urlaubskonto = info.Employee.Urlaubskonto;
|
||||
|
||||
bool urlaubVerfallen = info.Month >= urlaubskonto.UrlaubsVerfallsdatum.Month ? true : false;
|
||||
|
||||
string xamlstring = ServiceFacade.DoOperationsServiceSync(s => s.GetInformationStringForUrlaubsplaner(urlaubskonto, info.TageUrlaub, info.TageKrankheit, urlaubVerfallen));
|
||||
var control = new InformationView();
|
||||
control.SetXaml(xamlstring);
|
||||
|
||||
var beWoWindow = new BeWoWindow();
|
||||
|
||||
control.ButtonCloseClicked += () => beWoWindow.Close();
|
||||
|
||||
beWoWindow.Height = 100;
|
||||
beWoWindow.Width = 400;
|
||||
beWoWindow.WindowStartupLocation = WindowStartupLocation.CenterOwner;
|
||||
beWoWindow.GroupBoxContent = control;
|
||||
beWoWindow.Owner = BeWoApp.CurrentBeWo.MainWindow;
|
||||
beWoWindow.rootGroupBox.Header = "Infos zu " + info.Employee.LastNameFirstName;
|
||||
beWoWindow.ShowDialog();
|
||||
}
|
||||
|
||||
private decimal CountUrlaubstage(AbwesenheitsInformationDC info)
|
||||
{
|
||||
decimal tageUrlaub = 0;
|
||||
|
||||
List<AbsenceTimeDC> urlaubstage = new List<AbsenceTimeDC>();
|
||||
|
||||
foreach (var tag in info.AbsenceTimes)
|
||||
{
|
||||
if (tag.Reason.Description.Equals("Urlaub"))
|
||||
urlaubstage.Add(tag);
|
||||
}
|
||||
|
||||
if (urlaubstage.Count > 0)
|
||||
{
|
||||
foreach (var spanne in urlaubstage)
|
||||
{
|
||||
if (spanne.End == null)
|
||||
spanne.End = new DateTime(info.Year, info.Month, DateTime.DaysInMonth(info.Year, info.Month));
|
||||
// Nur ein Tag
|
||||
if (spanne.Start == spanne.End)
|
||||
tageUrlaub++;
|
||||
// Mehrere Tage
|
||||
else
|
||||
{
|
||||
// Alle Tage in einem Monat
|
||||
if (spanne.Start.Value.Month == spanne.End.Value.Month)
|
||||
tageUrlaub += Convert.ToInt32((spanne.End.Value.Date - spanne.Start.Value.Date).TotalDays + 1);
|
||||
// Tage über Monate verteilt
|
||||
else
|
||||
{
|
||||
DateTime? tempStart = null;
|
||||
DateTime? tempEnd = null;
|
||||
// Prüfen, ob Start und/oder Ende nicht dem ausgewählten Monat entspricht
|
||||
if (spanne.Start.Value.Month != info.Month)
|
||||
{
|
||||
tempStart = new DateTime(info.Year, info.Month, 1);
|
||||
}
|
||||
if (spanne.End.Value.Month != info.Month)
|
||||
{
|
||||
tempEnd = new DateTime(info.Year, info.Month, 1).AddMonths(1).AddTicks(-1);
|
||||
}
|
||||
|
||||
if (tempStart != null && tempEnd != null)
|
||||
tageUrlaub += Convert.ToInt32((tempEnd.Value.Date - tempStart.Value.Date).TotalDays + 1);
|
||||
else if (tempStart != null && tempEnd == null)
|
||||
tageUrlaub += Convert.ToInt32((spanne.End.Value.Date - tempStart.Value.Date).TotalDays + 1);
|
||||
else if (tempStart == null && tempEnd != null)
|
||||
tageUrlaub += Convert.ToInt32((tempEnd.Value.Date - spanne.Start.Value.Date).TotalDays + 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return tageUrlaub;
|
||||
}
|
||||
private decimal CountKrankheitstage(AbwesenheitsInformationDC info)
|
||||
{
|
||||
int tageKrankheit = 0;
|
||||
List<AbsenceTimeDC> krankheitstage = new List<AbsenceTimeDC>();
|
||||
|
||||
foreach (var tag in info.AbsenceTimes)
|
||||
{
|
||||
if (tag.Reason.Description.Equals("Krankheit"))
|
||||
krankheitstage.Add(tag);
|
||||
}
|
||||
if (krankheitstage.Count > 0)
|
||||
{
|
||||
foreach (var spanne in krankheitstage)
|
||||
{
|
||||
// Nur ein Tag
|
||||
if (spanne.Start == spanne.End)
|
||||
tageKrankheit++;
|
||||
// Mehrere Tage
|
||||
else
|
||||
{
|
||||
// Wenn Krankheit ein Enddatum hat
|
||||
if (spanne.End != null)
|
||||
{
|
||||
// Alle Tage in einem Monat
|
||||
if (spanne.Start.Value.Month == spanne.End.Value.Month)
|
||||
tageKrankheit += Convert.ToInt32((spanne.End.Value.Date - spanne.Start.Value.Date).TotalDays + 1);
|
||||
// Tage über mehrere Monate verteilt
|
||||
else
|
||||
{
|
||||
// Prüfen, ob Start und/oder Ende nicht dem ausgewählten Monat entspricht
|
||||
DateTime? tempStart = null;
|
||||
DateTime? tempEnd = null;
|
||||
if (spanne.Start.Value.Month != info.Month)
|
||||
{
|
||||
tempStart = new DateTime(info.Year, info.Month, 1);
|
||||
}
|
||||
if (spanne.End.Value.Month != info.Month)
|
||||
{
|
||||
tempEnd = new DateTime(info.Year, info.Month, 1).AddMonths(1).AddTicks(-1);
|
||||
}
|
||||
|
||||
if (tempStart != null && tempEnd != null)
|
||||
tageKrankheit += Convert.ToInt32((tempEnd.Value.Date - tempStart.Value.Date).TotalDays + 1);
|
||||
else if (tempStart != null && tempEnd == null)
|
||||
tageKrankheit += Convert.ToInt32((spanne.End.Value.Date - tempStart.Value.Date).TotalDays + 1);
|
||||
else if (tempStart == null && tempEnd != null)
|
||||
tageKrankheit += Convert.ToInt32((tempEnd.Value.Date - spanne.Start.Value.Date).TotalDays + 1);
|
||||
}
|
||||
}
|
||||
// Wenn Krankheit kein Enddatum gesetzt wurde
|
||||
else
|
||||
{
|
||||
if (spanne.Start.Value.Month != info.Month)
|
||||
{
|
||||
DateTime tempEnd = new DateTime(info.Year, info.Month, DateTime.DaysInMonth(info.Year, info.Month));
|
||||
DateTime tempStart = new DateTime(info.Year, info.Month, 1); ;
|
||||
|
||||
tageKrankheit += Convert.ToInt32((tempEnd.Date - tempStart.Date).TotalDays + 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
DateTime tempEnd = new DateTime(spanne.Start.Value.Year, spanne.Start.Value.Month, DateTime.DaysInMonth(spanne.Start.Value.Year, spanne.Start.Value.Month));
|
||||
tageKrankheit += Convert.ToInt32((tempEnd.Date - spanne.Start.Value.Date).TotalDays + 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return tageKrankheit;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -392,6 +576,22 @@ namespace BeWo.View.Detail.Report
|
||||
}
|
||||
}
|
||||
|
||||
//public class TestConverter : MarkupExtension, IMultiValueConverter
|
||||
//{
|
||||
// public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture)
|
||||
// {
|
||||
// return values[0] is DateTime && values[1] is System.Collections.IList ? ((System.Collections.IList)values[1]).Contains(values[0]) : false;
|
||||
// }
|
||||
// public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture)
|
||||
// {
|
||||
// throw new NotImplementedException();
|
||||
// }
|
||||
// public override object ProvideValue(IServiceProvider serviceProvider)
|
||||
// {
|
||||
// return this;
|
||||
// }
|
||||
//}
|
||||
|
||||
public static class SchedulerHelper
|
||||
{
|
||||
public static void OverrideAppointmentWithAbsenceTime(Appointment appointment, AbsenceTimeDC absenceTime)
|
||||
|
||||
@@ -28,8 +28,11 @@
|
||||
<ControlTemplate x:Key="ctrlEmp">
|
||||
<controls:DPCtrlEmployee Margin="0" Focusable="True" EmployeeInformation="{Binding Value}"/>
|
||||
</ControlTemplate>
|
||||
<ControlTemplate x:Key="ctrlSollIst">
|
||||
<controls:DPCtrlSollIst Margin="0" Focusable="True" SollIstInformation="{Binding Value}"/>
|
||||
<ControlTemplate x:Key="ctrlSoll">
|
||||
<controls:DPCtrlSoll Margin="0" Focusable="True" SollInformation="{Binding Value}"/>
|
||||
</ControlTemplate>
|
||||
<ControlTemplate x:Key="ctrlIst">
|
||||
<controls:DPCtrlIst Margin="0" Focusable="True" IstInformation="{Binding Value}"/>
|
||||
</ControlTemplate>
|
||||
<ControlTemplate x:Key="ctrlSaldo">
|
||||
<controls:DPCtrlSaldo Margin="0" Focusable="True" SaldoInformation="{Binding Value}"/>
|
||||
@@ -235,6 +238,7 @@
|
||||
</ListBox>
|
||||
<Button x:Name="Btn_RegelSchichtHinzufuegen" Grid.Column="3" Grid.Row="2" Margin="5 5 0 0" Content="Hinzufügen" Click="Btn_RegelSchichtHinzufuegen_Click"/>
|
||||
<Button x:Name="Btn_RegelSchichtEntfernen" Grid.Column="2" Grid.Row="2" Margin="0 5 0 0" Content="Löschen" Click="Btn_RegelSchichtEntfernen_Click"/>
|
||||
<!--<Button x:Name="Btn_ZeileHinzufuegen" Grid.Column="0" Grid.Row="2" Margin="0 5 0 0" HorizontalAlignment="Left" Content="Zeile hinzufügen" Click="Btn_ZeileHinzufuegen_Click"/>-->
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
</Border>
|
||||
|
||||
@@ -47,7 +47,8 @@ namespace BeWo.View.Detail.Report
|
||||
private List<GridColumn> _ColumnDays;
|
||||
private GridColumn _ColumnMonth;
|
||||
private List<GridColumn> _ColumnWeek;
|
||||
private GridColumn _ColumnSollIst;
|
||||
private GridColumn _ColumnSoll;
|
||||
private GridColumn _ColumnIst;
|
||||
private GridColumn _ColumnSaldo;
|
||||
private GridColumn _ColumnZeitkonto;
|
||||
private GridColumn _ColumnUrlaub;
|
||||
@@ -144,7 +145,6 @@ namespace BeWo.View.Detail.Report
|
||||
{
|
||||
RefreshStatusForDay(i);
|
||||
}
|
||||
|
||||
_GridControl.ItemsSource = null;
|
||||
_GridControl.ItemsSource = _DienstplanerRootObj.DienstZeilenListe;
|
||||
}
|
||||
@@ -492,7 +492,8 @@ namespace BeWo.View.Detail.Report
|
||||
var weekControlTemplate = (ControlTemplate)FindResource("ctrlWeek");
|
||||
var monthControlTemplate = (ControlTemplate)FindResource("ctrlMonth");
|
||||
var empControlTemplate = (ControlTemplate)FindResource("ctrlEmp");
|
||||
var sollIstControlTemplate = (ControlTemplate)FindResource("ctrlSollIst");
|
||||
var sollControlTemplate = (ControlTemplate)FindResource("ctrlSoll");
|
||||
var istControlTemplate = (ControlTemplate)FindResource("ctrlIst");
|
||||
var saldoControlTemplate = (ControlTemplate)FindResource("ctrlSaldo");
|
||||
var zeitkontoControlTemplate = (ControlTemplate)FindResource("ctrlZeitkonto");
|
||||
var urlaubKrankheitControlTemplate = (ControlTemplate)FindResource("ctrlUrlaubKrankheit");
|
||||
@@ -502,7 +503,9 @@ namespace BeWo.View.Detail.Report
|
||||
|
||||
_ColumnMonth = NewGridColumnUnbound("Monatsstunden", "month", "MO:", 60, 40, DevExpress.Data.UnboundColumnType.Object, monthControlTemplate, DevExpress.Utils.DefaultBoolean.True);
|
||||
|
||||
_ColumnSollIst = NewGridColumnUnbound("Soll/Ist", "sollist", "SI:", 55, 40, DevExpress.Data.UnboundColumnType.Object, sollIstControlTemplate, DevExpress.Utils.DefaultBoolean.True);
|
||||
_ColumnSoll = NewGridColumnUnbound("Soll", "soll", "SO:", 55, 40, DevExpress.Data.UnboundColumnType.Object, sollControlTemplate, DevExpress.Utils.DefaultBoolean.True);
|
||||
|
||||
_ColumnIst = NewGridColumnUnbound("Ist", "ist", "IS:", 55, 40, DevExpress.Data.UnboundColumnType.Object, istControlTemplate, DevExpress.Utils.DefaultBoolean.True);
|
||||
|
||||
_ColumnSaldo = NewGridColumnUnbound("Saldo", "saldo", "SA:", 55, 40, DevExpress.Data.UnboundColumnType.Object, saldoControlTemplate, DevExpress.Utils.DefaultBoolean.True);
|
||||
|
||||
@@ -529,7 +532,8 @@ namespace BeWo.View.Detail.Report
|
||||
//Hinzufügen der Spalten Mitarbeiter, einzelne Wochentage und Woche
|
||||
_GridControl.Columns.Add(_ColumnEmp);
|
||||
//_GridControl.Columns.Add(_ColumnMonth);
|
||||
_GridControl.Columns.Add(_ColumnSollIst);
|
||||
_GridControl.Columns.Add(_ColumnSoll);
|
||||
_GridControl.Columns.Add(_ColumnIst);
|
||||
_GridControl.Columns.Add(_ColumnSaldo);
|
||||
//_GridControl.Columns.Add(_ColumnZeitkonto); // Zeitkonto wieder einblenden
|
||||
_GridControl.Columns.Add(_ColumnUrlaub);
|
||||
@@ -593,19 +597,6 @@ namespace BeWo.View.Detail.Report
|
||||
textblock_link_pdfexport.Visibility = Visibility.Visible;
|
||||
}
|
||||
|
||||
private void FillDienstLists()
|
||||
{
|
||||
//_AlleDienstEintraege = ServiceFacade.DoOperationsServiceSync(s => s.GetAllDienstEintraegeAsList(AuswahlWohnheim.WohnheimOid,
|
||||
// _AuswahlMonat.Year, _AuswahlMonat.Month));
|
||||
//_AlleDienstvertretungen = ServiceFacade.DoOperationsServiceSync(s => s.GetAllDienstvertretungenAsList(AuswahlWohnheim.WohnheimOid,
|
||||
// _AuswahlMonat.Year, _AuswahlMonat.Month));
|
||||
|
||||
_DienstplanerRootObj.AlleDienstEintraege = ServiceFacade.DoOperationsServiceSync(s => s.GetAllDienstEintraegeAsList(AuswahlWohnheim.WohnheimOid,
|
||||
_AuswahlMonat.Year, _AuswahlMonat.Month)); //Root
|
||||
_DienstplanerRootObj.AlleDienstvertretungen = ServiceFacade.DoOperationsServiceSync(s => s.GetAllDienstvertretungenAsList(AuswahlWohnheim.WohnheimOid,
|
||||
_AuswahlMonat.Year, _AuswahlMonat.Month)); //Root
|
||||
}
|
||||
|
||||
private void button_neuerMitarbeiter_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
popUp_neuerMitarbeiterFuerWohnheim.IsOpen = true;
|
||||
@@ -671,7 +662,7 @@ namespace BeWo.View.Detail.Report
|
||||
DienstBlockDC newDC = new DienstBlockDC()
|
||||
{
|
||||
Contracts = emp.Contracts,
|
||||
DienstDictArray = new Dictionary<int, long>[3],
|
||||
DienstDictArray = new Dictionary<int, long>[3] { new Dictionary<int, long>(), new Dictionary<int, long>(), new Dictionary<int, long>() },
|
||||
Employee = emp,
|
||||
Wohnheim = _AuswahlWohnheim
|
||||
};
|
||||
@@ -704,6 +695,9 @@ namespace BeWo.View.Detail.Report
|
||||
return;
|
||||
if (_AuswahlWohnheim.EmployeeOids.Contains((long)_AuswahlDienstZeileDC.Employee.EmployeeOid))
|
||||
{
|
||||
Btn_RegelSchichtHinzufuegen.Visibility = Visibility.Visible;
|
||||
Btn_RegelSchichtEntfernen.Visibility = Visibility.Visible;
|
||||
|
||||
popUp_RightClickEmployee.IsOpen = true;
|
||||
groupbox_popUp_RightClickEmployee.Header = dpCtrlEmp.EmployeeInformation.Employee.LastNameFirstName;
|
||||
|
||||
@@ -712,7 +706,16 @@ namespace BeWo.View.Detail.Report
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
Btn_RegelSchichtHinzufuegen.Visibility = Visibility.Collapsed;
|
||||
Btn_RegelSchichtEntfernen.Visibility = Visibility.Collapsed;
|
||||
|
||||
popUp_RightClickEmployee.IsOpen = true;
|
||||
groupbox_popUp_RightClickEmployee.Header = dpCtrlEmp.EmployeeInformation.Employee.LastNameFirstName;
|
||||
|
||||
return;
|
||||
}
|
||||
return;
|
||||
|
||||
|
||||
}
|
||||
@@ -723,14 +726,21 @@ namespace BeWo.View.Detail.Report
|
||||
var fieldname = _GridControl.View.GetColumnByMouseEventArgs(e).FieldName.Split('_');
|
||||
_AuswahlTag = int.Parse(fieldname[1]);
|
||||
|
||||
/* Dienste an Feiertagen setzen können deaktivieren
|
||||
////Dienste an Feiertagen setzen können deaktivieren
|
||||
//var date = new DateTime(_AuswahlMonat.Year, _AuswahlMonat.Month, _AuswahlTag);
|
||||
//foreach (var tag in _DienstplanerRootObj.Feiertage)
|
||||
//{
|
||||
// if (tag.Datum.Date == date)
|
||||
// return;
|
||||
//}
|
||||
//Dienste an Abwesenheitstagen setzen können deaktivieren
|
||||
var date = new DateTime(_AuswahlMonat.Year, _AuswahlMonat.Month, _AuswahlTag);
|
||||
foreach (var tag in _DienstplanerRootObj.Feiertage)
|
||||
foreach (var at in _DienstplanerRootObj.AbsenceTimes)
|
||||
{
|
||||
if (tag.Datum.Date == date)
|
||||
if (at.EmployeeOid == _AuswahlDienstZeileDC.Employee.EmployeeOid && at.AbsenceSpan.ContainsDate(date))
|
||||
return;
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
popUp_RightClick.IsOpen = true;
|
||||
combobox_dienste.ItemsSource = _DienstplanerRootObj.AlleDienste;
|
||||
@@ -868,13 +878,15 @@ namespace BeWo.View.Detail.Report
|
||||
|
||||
if (_AuswahlWohnheim.EmployeeOids.Contains(_AuswahlDienstZeileDC.Employee.EmployeeOid.Value))
|
||||
{
|
||||
//var eintrag = ServiceFacade.DoOperationsServiceSync(s => s.GetDienstEintrag(_AuswahlDienstZeileDC.Employee.EmployeeOid.Value,
|
||||
// _AuswahlWohnheim.WohnheimOid, _AuswahlDienstZeileDC.Zeile, Pointer)); //Zeit sparen durch Root-Objekt
|
||||
decimal stundenFuerSaldo = 0.0m;
|
||||
|
||||
var eintrag = GetDienstEintrag(_AuswahlDienstZeileDC.Employee.EmployeeOid.Value,
|
||||
_AuswahlWohnheim.WohnheimOid, _AuswahlDienstZeileDC.Zeile, Pointer);
|
||||
|
||||
if (eintrag != null)
|
||||
{
|
||||
stundenFuerSaldo += Convert.ToDecimal(eintrag.DauerInStunden);
|
||||
|
||||
var oldDienst = TryGetDienst(_AuswahlDienstZeileDC, _AuswahlTag); //abc
|
||||
ServiceFacade.DoOperationsServiceSync(x => x.DeleteDienstEintrag(_AuswahlDienstZeileDC.Employee.EmployeeOid.Value, AuswahlWohnheim.WohnheimOid, _AuswahlDienstZeileDC.Zeile, Pointer));
|
||||
_AuswahlDienstZeileDC.RemoveDienst(_AuswahlTag);
|
||||
@@ -907,19 +919,21 @@ namespace BeWo.View.Detail.Report
|
||||
if (item.Employee.EmployeeOid == _AuswahlDienstZeileDC.Employee.EmployeeOid)
|
||||
{
|
||||
item.Ist += Convert.ToDecimal(newEintrag.DauerInStunden);
|
||||
item.Saldo += Convert.ToDecimal(newEintrag.DauerInStunden);
|
||||
item.Saldo += (stundenFuerSaldo == 0.0m) ? Convert.ToDecimal(newEintrag.DauerInStunden) : Convert.ToDecimal(newEintrag.DauerInStunden) - stundenFuerSaldo;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//var vertretung = ServiceFacade.DoOperationsServiceSync(s => s.GetDienstvertretung(_AuswahlDienstZeileDC.Employee.EmployeeOid.Value,
|
||||
// _AuswahlWohnheim.WohnheimOid, _AuswahlDienstZeileDC.Zeile, Pointer)); //Zeit sparen durch Root-Objekt
|
||||
var vertretung = GetDienstvertretung(_AuswahlDienstZeileDC.Employee.EmployeeOid.Value,
|
||||
_AuswahlWohnheim.WohnheimOid, _AuswahlDienstZeileDC.Zeile, Pointer);
|
||||
|
||||
decimal stundenFuerSaldo = 0.0m;
|
||||
|
||||
if (vertretung != null)
|
||||
{
|
||||
stundenFuerSaldo += Convert.ToDecimal(vertretung.DauerInStunden);
|
||||
|
||||
var oldDienst = TryGetDienst(_AuswahlDienstZeileDC, _AuswahlTag); //abc
|
||||
ServiceFacade.DoOperationsServiceSync(x => x.DeleteDienstvertretung(_AuswahlDienstZeileDC.Employee.EmployeeOid.Value, AuswahlWohnheim.WohnheimOid, _AuswahlDienstZeileDC.Zeile, Pointer));
|
||||
_AuswahlDienstZeileDC.RemoveDienst(_AuswahlTag);
|
||||
@@ -952,7 +966,7 @@ namespace BeWo.View.Detail.Report
|
||||
if (item.Employee.EmployeeOid == _AuswahlDienstZeileDC.Employee.EmployeeOid)
|
||||
{
|
||||
item.Ist += Convert.ToDecimal(newVertretung.DauerInStunden);
|
||||
item.Saldo += Convert.ToDecimal(newVertretung.DauerInStunden);
|
||||
item.Saldo += (stundenFuerSaldo == 0.0m) ? Convert.ToDecimal(newVertretung.DauerInStunden) : Convert.ToDecimal(newVertretung.DauerInStunden) - stundenFuerSaldo;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -960,6 +974,7 @@ namespace BeWo.View.Detail.Report
|
||||
_AuswahlDienstZeileDC.AddDienst(_AuswahlTag, combobox_dienste.SelectedItem as DienstInfoDC);
|
||||
//FillDienstLists();
|
||||
RefreshStatusForDay(Pointer.Day);
|
||||
RefreshGrid();
|
||||
textbox_bemerkung.Text = "";
|
||||
popUp_RightClick.IsOpen = false;
|
||||
}
|
||||
@@ -993,6 +1008,20 @@ namespace BeWo.View.Detail.Report
|
||||
if (e.IsGetData)
|
||||
{
|
||||
var selZeile = _GridControl.GetRowByListIndex(e.ListSourceRowIndex) as DienstZeileDC;
|
||||
bool isLastRow = false;
|
||||
if (selZeile.DienstDict != null)
|
||||
{
|
||||
var rowsForEmployee = new List<DienstZeileDC>();
|
||||
foreach (var zeile in _DienstplanerRootObj.DienstZeilenListe)
|
||||
{
|
||||
if (zeile.Employee == selZeile.Employee)
|
||||
rowsForEmployee.Add(zeile);
|
||||
}
|
||||
|
||||
if (rowsForEmployee.Count > 0)
|
||||
isLastRow = rowsForEmployee[rowsForEmployee.Count - 1] == selZeile ? true : false;
|
||||
}
|
||||
|
||||
DienstplanerMonthlySummaryDC summary = new DienstplanerMonthlySummaryDC();
|
||||
foreach (var summ in _DienstplanerRootObj.MonatsZusammenfassung)
|
||||
{
|
||||
@@ -1065,7 +1094,7 @@ namespace BeWo.View.Detail.Report
|
||||
e.Value = new DPCtrlDayInformation
|
||||
{
|
||||
DienstInfoDC = TryGetDienst(selZeile, pos), //abc
|
||||
IsLastRow = selZeile.Zeile == 2,
|
||||
IsLastRow = isLastRow,
|
||||
DayOfWeek = date.DayOfWeek,
|
||||
IsLastColumn = pos == DateTime.DaysInMonth(AuswahlMonat.Year, AuswahlMonat.Month),
|
||||
IsInContractRange = GetContract(selZeile, pos) != null, //abc
|
||||
@@ -1113,10 +1142,10 @@ namespace BeWo.View.Detail.Report
|
||||
|
||||
pos = int.Parse(e.Column.FieldName.Remove(e.Column.FieldName.Length - 1));
|
||||
//e.Value = selZeile.Zeile == 2 ? _DienstEintragListe.FindAll(x => x.Employee == selZeile.Employee).SelectMany(y => y.GetDienstWoche(pos)).ToList() : null;
|
||||
if (selZeile.Zeile == 2)
|
||||
if (selZeile.Zeile == 0 && selZeile.StatusListe == null)
|
||||
{
|
||||
var eintraegeFuerMitarbeiter = selZeile.Zeile == 2 ? _DienstplanerRootObj.AlleDienstEintraege.FindAll(x => x.EmployeeOid == selZeile.Employee.EmployeeOid).ToList() : null;
|
||||
var vertretungenFuerMitarbeiter = selZeile.Zeile == 2 ? _DienstplanerRootObj.AlleDienstvertretungen.FindAll(x => x.EmployeeOid == selZeile.Employee.EmployeeOid).ToList() : null;
|
||||
var eintraegeFuerMitarbeiter = selZeile.Zeile == 0 ? _DienstplanerRootObj.AlleDienstEintraege.FindAll(x => x.EmployeeOid == selZeile.Employee.EmployeeOid).ToList() : null;
|
||||
var vertretungenFuerMitarbeiter = selZeile.Zeile == 0 ? _DienstplanerRootObj.AlleDienstvertretungen.FindAll(x => x.EmployeeOid == selZeile.Employee.EmployeeOid).ToList() : null;
|
||||
|
||||
var eintraegeEinerWoche = eintraegeFuerMitarbeiter != null ? GetEintraegeEinerWoche(eintraegeFuerMitarbeiter, pos) : null;
|
||||
var vertretungenEinerWoche = vertretungenFuerMitarbeiter != null ? GetVertretungenEinerWoche(vertretungenFuerMitarbeiter, pos) : null;
|
||||
@@ -1136,7 +1165,8 @@ namespace BeWo.View.Detail.Report
|
||||
{
|
||||
Hours = stundenWoche,
|
||||
Statuszeile = selZeile.DienstDict == null,
|
||||
Row = selZeile.Zeile
|
||||
Row = selZeile.Zeile,
|
||||
IsLastRow = isLastRow
|
||||
};
|
||||
}
|
||||
else
|
||||
@@ -1145,7 +1175,8 @@ namespace BeWo.View.Detail.Report
|
||||
{
|
||||
Hours = new List<double>(),
|
||||
Statuszeile = selZeile.DienstDict == null,
|
||||
Row = selZeile.Zeile
|
||||
Row = selZeile.Zeile,
|
||||
IsLastRow = isLastRow
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1155,7 +1186,9 @@ namespace BeWo.View.Detail.Report
|
||||
{
|
||||
Employee = selZeile.Employee,
|
||||
Contracts = selZeile.Contracts,
|
||||
Row = selZeile.Zeile
|
||||
Row = selZeile.Zeile,
|
||||
IsLastRow = isLastRow,
|
||||
IsVertretung = (selZeile.Employee != null) ? !_AuswahlWohnheim.EmployeeOids.Contains((long)selZeile.Employee.EmployeeOid) : false
|
||||
};
|
||||
|
||||
return;
|
||||
@@ -1186,8 +1219,31 @@ namespace BeWo.View.Detail.Report
|
||||
|
||||
return;
|
||||
|
||||
case "SI":
|
||||
case "SO":
|
||||
if(selZeile.StatusListe == null)
|
||||
{
|
||||
e.Value = new DPCtrlSollInformation
|
||||
{
|
||||
Row = selZeile.Zeile,
|
||||
Statuszeile = selZeile.DienstDict == null,
|
||||
SollWert = summary.Soll,
|
||||
IsLastRow = isLastRow,
|
||||
EmployeeDC = selZeile.Employee
|
||||
};
|
||||
}
|
||||
else
|
||||
{
|
||||
e.Value = new DPCtrlSollInformation
|
||||
{
|
||||
Row = selZeile.Zeile,
|
||||
Statuszeile = selZeile.DienstDict == null,
|
||||
EmployeeDC = selZeile.Employee
|
||||
};
|
||||
}
|
||||
|
||||
return;
|
||||
case "IS":
|
||||
if (selZeile.StatusListe == null)
|
||||
{
|
||||
var eintraegeFuerMitarbeiterMonat = _DienstplanerRootObj.AlleDienstEintraege.FindAll(x => x.EmployeeOid == selZeile.Employee.EmployeeOid).ToList();
|
||||
var vertretungenFuerMitarbeiterMonat = _DienstplanerRootObj.AlleDienstvertretungen.FindAll(x => x.EmployeeOid == selZeile.Employee.EmployeeOid).ToList();
|
||||
@@ -1204,21 +1260,20 @@ namespace BeWo.View.Detail.Report
|
||||
stunden += Convert.ToDecimal(vertretung.DauerInStunden);
|
||||
}
|
||||
|
||||
|
||||
e.Value = new DPCtrlSollIstInformation
|
||||
e.Value = new DPCtrlIstInformation
|
||||
{
|
||||
Row = selZeile.Zeile,
|
||||
Statuszeile = selZeile.DienstDict == null,
|
||||
IstWert = stunden,
|
||||
SollWert = summary.Soll
|
||||
IsLastRow = isLastRow
|
||||
};
|
||||
}
|
||||
else
|
||||
{
|
||||
e.Value = new DPCtrlSollIstInformation
|
||||
e.Value = new DPCtrlIstInformation
|
||||
{
|
||||
Row = selZeile.Zeile,
|
||||
Statuszeile = selZeile.DienstDict == null
|
||||
Statuszeile = selZeile.DienstDict == null,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1239,7 +1294,8 @@ namespace BeWo.View.Detail.Report
|
||||
{
|
||||
Row = selZeile.Zeile,
|
||||
Statuszeile = selZeile.DienstDict == null,
|
||||
SaldoWert = summaryForSaldo.Saldo
|
||||
SaldoWert = summaryForSaldo.Saldo,
|
||||
IsLastRow = isLastRow
|
||||
};
|
||||
}
|
||||
else
|
||||
@@ -1287,7 +1343,8 @@ namespace BeWo.View.Detail.Report
|
||||
Row = selZeile.Zeile,
|
||||
SpalteFuerUrlaub = true,
|
||||
Statuszeile = selZeile.DienstDict == null,
|
||||
SummeTage = summary.TageUrlaub
|
||||
SummeTage = summary.TageUrlaub,
|
||||
IsLastRow = isLastRow
|
||||
};
|
||||
return;
|
||||
case "KR":
|
||||
@@ -1296,7 +1353,8 @@ namespace BeWo.View.Detail.Report
|
||||
Row = selZeile.Zeile,
|
||||
SpalteFuerUrlaub = false,
|
||||
Statuszeile = selZeile.DienstDict == null,
|
||||
SummeTage = summary.TageKrank
|
||||
SummeTage = summary.TageKrank,
|
||||
IsLastRow = isLastRow
|
||||
};
|
||||
return;
|
||||
}
|
||||
@@ -1371,29 +1429,10 @@ namespace BeWo.View.Detail.Report
|
||||
|
||||
private void RefreshDienste()
|
||||
{
|
||||
//_DienstDCListe = ServiceFacade.DoOperationsServiceSync(x => x.GetDienstEintraege(AuswahlWohnheim.WohnheimOid, AuswahlMonat.Year, AuswahlMonat.Month)); //Dem Wohnheim zugeordnete Mitarbeiter mit ihren Diensten
|
||||
//_DienstplanerRootObj.DienstDCListe = ServiceFacade.DoOperationsServiceSync(x =>
|
||||
//x.GetDienstEintraege(AuswahlWohnheim.WohnheimOid, AuswahlMonat.Year, AuswahlMonat.Month)); //Root
|
||||
//var vertretungen = ServiceFacade.DoOperationsServiceSync(x => x.GetDienstvertretungen(AuswahlWohnheim.WohnheimOid, AuswahlMonat.Year, AuswahlMonat.Month));
|
||||
//_DienstDCListe.AddRange(vertretungen);
|
||||
//_DienstplanerRootObj.DienstDCListe.AddRange(ServiceFacade.DoOperationsServiceSync(x =>
|
||||
// x.GetDienstvertretungen(AuswahlWohnheim.WohnheimOid, AuswahlMonat.Year, AuswahlMonat.Month))); //Root
|
||||
//_DienstplanerRootObj.DienstDCListe = _DienstplanerRootObj.DienstDCListe.OrderBy(d => d.Employee.LastName).ToList(); //Root
|
||||
//_DienstDCListe = _DienstDCListe.OrderBy(d => d.Employee.LastName).ToList();
|
||||
|
||||
//_AlleDienste = ServiceFacade.DoOperationsServiceSync(x => x.GetAllDienste()); //Verschiedene Schichten zum Zuordnen an Mitarbeiter
|
||||
//_AlleDienste = _AlleDienste.OrderBy(d => d.Start).ToList();
|
||||
//_AlleDienste.Insert(0, DienstInfoDC.Platzhalter); // Leere Schicht zum Löschen von Einträgen im Dienstplan
|
||||
|
||||
//_DienstEintragListe.AddRange(_DienstDCListe
|
||||
// .SelectMany(x => Init(x, _AlleDienste, RefreshGrid, AuswahlMonat)) //Erstellen der 3 Zeilen pro Mitarbeiter
|
||||
// .ToList());
|
||||
_DienstplanerRootObj.DienstZeilenListe.AddRange(_DienstplanerRootObj.DienstDCListe //Root
|
||||
.SelectMany(x => Init(x, _DienstplanerRootObj.AlleDienste, RefreshGrid, AuswahlMonat))
|
||||
.ToList());
|
||||
|
||||
//var absence = ServiceFacade.DoOperationsServiceSync(x => x.GetAbsenceTimeVacationByWohnheim(AuswahlWohnheim.WohnheimOid, AuswahlMonat.Year, AuswahlMonat.Month));
|
||||
|
||||
var temp = new Dictionary<long, List<AbsenceTimeDC>>();
|
||||
|
||||
foreach (var abs in _DienstplanerRootObj.AbsenceTimes)
|
||||
@@ -1432,17 +1471,31 @@ namespace BeWo.View.Detail.Report
|
||||
|
||||
private void _BtnRemoveAllDiensteForMonth_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (System.Windows.MessageBox.Show("Wollen Sie alle Dienste des gewählten Monats entfernen? Dies kann nicht rückgängig gemacht werden.", "BeWoPlaner",
|
||||
MessageBoxButton.YesNo, MessageBoxImage.Warning) == MessageBoxResult.Yes)
|
||||
MessageBoxResult result = (System.Windows.MessageBox.Show("Wollen Sie auch die regelmäßigen Dienste des gewählten löschen? Das Löschen kann nicht" +
|
||||
" rückgängig gemacht werden.", "BeWoPlaner", MessageBoxButton.YesNoCancel, MessageBoxImage.Question));
|
||||
if (result == MessageBoxResult.Yes)
|
||||
{
|
||||
RemoveDiensteForMonth(_AuswahlMonat);
|
||||
RemoveDiensteForMonth(_AuswahlMonat, true);
|
||||
}
|
||||
else if (result == MessageBoxResult.No)
|
||||
{
|
||||
RemoveDiensteForMonth(_AuswahlMonat, false);
|
||||
}
|
||||
else if (result == MessageBoxResult.Cancel)
|
||||
return;
|
||||
|
||||
}
|
||||
private void RemoveDiensteForMonth(DateTime auswahlMonat, bool includeRegelmaessigeDienste)
|
||||
{
|
||||
_DienstplanerRootObj.AlleDienstEintraege = new List<DienstEintragDC>();
|
||||
_DienstplanerRootObj.AlleDienstvertretungen = new List<DienstvertretungDC>();
|
||||
}
|
||||
private void RemoveDiensteForMonth(DateTime auswahlMonat)
|
||||
{
|
||||
ServiceFacade.DoOperationsServiceSync(s => s.RemoveAllDiensteForOneMonth(auswahlMonat));
|
||||
|
||||
List<RegelmaessigerDienstDC> rd = new List<RegelmaessigerDienstDC>();
|
||||
if (includeRegelmaessigeDienste)
|
||||
{
|
||||
rd.AddRange(_DienstplanerRootObj.RegelmaessigeDienste);
|
||||
}
|
||||
ServiceFacade.DoOperationsServiceSync(s => s.RemoveAllDiensteForOneMonth(auswahlMonat, rd));
|
||||
InitGridControl(true);
|
||||
}
|
||||
|
||||
@@ -1481,6 +1534,50 @@ namespace BeWo.View.Detail.Report
|
||||
routine_listbox_dienste.ItemsSource = t;
|
||||
|
||||
}
|
||||
private void Btn_ZeileHinzufuegen_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
var emp = _AuswahlDienstZeileDC.Employee;
|
||||
for (int i = 0; i < _DienstplanerRootObj.DienstZeilenListe.Count; i++)
|
||||
{
|
||||
var zeile = _DienstplanerRootObj.DienstZeilenListe[i];
|
||||
if (i < _DienstplanerRootObj.DienstZeilenListe.Count - 1)
|
||||
{
|
||||
if (zeile.Employee == emp && _DienstplanerRootObj.DienstZeilenListe[i + 1].Employee != zeile.Employee && zeile.Zeile + 1 <= 2) //Letzte Zeile des ausgewählten Mitarbeiters
|
||||
{
|
||||
_DienstplanerRootObj.DienstZeilenListe.Insert(zeile.Zeile + 1,
|
||||
new DienstZeileDC()
|
||||
{
|
||||
Contracts = zeile.Contracts,
|
||||
Date = zeile.Date,
|
||||
DienstDict = new Dictionary<int, DienstInfoDC>(),
|
||||
Employee = zeile.Employee,
|
||||
StatusListe = null,
|
||||
Zeile = zeile.Zeile + 1
|
||||
});
|
||||
RefreshGrid();
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (zeile.Employee == emp && zeile.Zeile + 1 <= 2) //Letzte Zeile des Grids
|
||||
{
|
||||
_DienstplanerRootObj.DienstZeilenListe.Add(new DienstZeileDC()
|
||||
{
|
||||
Contracts = zeile.Contracts,
|
||||
Date = zeile.Date,
|
||||
DienstDict = new Dictionary<int, DienstInfoDC>(),
|
||||
Employee = zeile.Employee,
|
||||
StatusListe = null,
|
||||
Zeile = zeile.Zeile + 1
|
||||
});
|
||||
RefreshGrid();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
popUp_RightClickEmployee.IsOpen = false;
|
||||
}
|
||||
private void routine_button_save_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (routine_combobox_weekdays.SelectedItem == null || routine_listbox_dienste.SelectedItem == null)
|
||||
@@ -1579,14 +1676,22 @@ namespace BeWo.View.Detail.Report
|
||||
break;
|
||||
}
|
||||
}
|
||||
//foreach (var tag in _DienstplanerRootObj.Feiertage)
|
||||
//{
|
||||
// if (tag.Datum.Date == date.Date)
|
||||
// {
|
||||
// eintragFuerDatumExistiert = true;
|
||||
// break;
|
||||
// }
|
||||
//}
|
||||
foreach (var tag in _DienstplanerRootObj.Feiertage)
|
||||
{
|
||||
if (tag.Datum.Date == date.Date)
|
||||
{
|
||||
eintragFuerDatumExistiert = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
foreach (var abwesenheit in _DienstplanerRootObj.AbsenceTimes.Where(a => a.EmployeeOid == dc.EmployeeOid))
|
||||
{
|
||||
if (abwesenheit.AbsenceSpan.ContainsDate(date))
|
||||
{
|
||||
eintragFuerDatumExistiert = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!eintragFuerDatumExistiert)
|
||||
{
|
||||
@@ -1671,7 +1776,8 @@ namespace BeWo.View.Detail.Report
|
||||
}
|
||||
private void popUp_RightClickEmployee_Opened(object sender, EventArgs e)
|
||||
{
|
||||
var t = _DienstplanerRootObj.RegelmaessigeDienste.Where(r => r.EmployeeOid == _AuswahlDienstZeileDC.Employee.EmployeeOid).ToList();
|
||||
var t = _DienstplanerRootObj.RegelmaessigeDienste.Where(r => r.EmployeeOid == _AuswahlDienstZeileDC.Employee.EmployeeOid &&
|
||||
r.WohnheimOid == _AuswahlWohnheim.WohnheimOid).ToList();
|
||||
listbox_regelmaessige_dienste.ItemsSource = t;
|
||||
}
|
||||
|
||||
@@ -1764,16 +1870,19 @@ namespace BeWo.View.Detail.Report
|
||||
{
|
||||
var zeileDC = eintragDC.DienstDictArray[i];
|
||||
|
||||
var newDic = new Dictionary<int, DienstInfoDC>();
|
||||
//if(zeileDC.Count > 0 || i == 0) //Nur eine Zeile
|
||||
//{
|
||||
var newDic = new Dictionary<int, DienstInfoDC>();
|
||||
|
||||
if (zeileDC != null)
|
||||
newDic = zeileDC.ToDictionary(k => k.Key, v => dienste.Find(x => x.Oid == v.Value));
|
||||
if (zeileDC != null)
|
||||
newDic = zeileDC.ToDictionary(k => k.Key, v => dienste.Find(x => x.Oid == v.Value));
|
||||
|
||||
var toAdd = new DienstZeileDC(eintragDC.Employee, eintragDC.Contracts, i, date, newDic);
|
||||
var toAdd = new DienstZeileDC(eintragDC.Employee, eintragDC.Contracts, i, date, newDic);
|
||||
|
||||
toAdd.DienstDictUpdated += dienstDictUpdate;
|
||||
toAdd.DienstDictUpdated += dienstDictUpdate;
|
||||
|
||||
res.Add(toAdd);
|
||||
res.Add(toAdd);
|
||||
//}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -119,6 +119,7 @@ namespace BeWo.View.Detail.Report
|
||||
|
||||
long eOid = 0;
|
||||
long tOid = 0;
|
||||
long catOid = 0;
|
||||
|
||||
if (_SelectedEmployee != null && checkbox_allEmployees.IsChecked == false)
|
||||
{
|
||||
@@ -128,7 +129,11 @@ namespace BeWo.View.Detail.Report
|
||||
{
|
||||
tOid = _SelectedTeam.TeamOid;
|
||||
}
|
||||
|
||||
if (ChkFilterServiceCategory.IsChecked.HasValue && ChkFilterServiceCategory.IsChecked.Value && ServiceCategoriesComboBox.SelectedItem != null)
|
||||
{
|
||||
var cat = ServiceCategoriesComboBox.SelectedItem as ServiceCategoryDC;
|
||||
catOid = cat.ServiceCategoryOid.Value;
|
||||
}
|
||||
List<SupportConceptOverviewDC> itemList = new List<SupportConceptOverviewDC>();
|
||||
|
||||
if (!String.IsNullOrWhiteSpace(textbox_search.Text))
|
||||
@@ -176,6 +181,7 @@ namespace BeWo.View.Detail.Report
|
||||
//+ "&token=" + BeWoApp.LoggedOnUser.RC2Password
|
||||
+ "?eOid=" + eOid
|
||||
+ "&tOid=" + tOid
|
||||
+ "&catOid=" + catOid
|
||||
+ "&exp=" + months
|
||||
+ "&arc=" + showArchived
|
||||
+ "&type=" + Utils.EnumName(ReportTypes.SupportConceptReport);
|
||||
@@ -208,6 +214,7 @@ namespace BeWo.View.Detail.Report
|
||||
|
||||
long? eOid = null;
|
||||
long? tOid = null;
|
||||
long? catOid = null;
|
||||
|
||||
if (_SelectedEmployee != null && checkbox_allEmployees.IsChecked == false && radioEmployeeReport.IsChecked.HasValue && radioEmployeeReport.IsChecked.Value)
|
||||
{
|
||||
@@ -217,10 +224,14 @@ namespace BeWo.View.Detail.Report
|
||||
{
|
||||
tOid = _SelectedTeam.TeamOid;
|
||||
}
|
||||
|
||||
else if (ChkFilterServiceCategory.IsChecked.HasValue && ChkFilterServiceCategory.IsChecked.Value && ServiceCategoriesComboBox.SelectedItem != null)
|
||||
{
|
||||
var cat = ServiceCategoriesComboBox.SelectedItem as ServiceCategoryDC;
|
||||
catOid = cat.ServiceCategoryOid.Value;
|
||||
}
|
||||
|
||||
ServiceFacade.DoAnalysisServiceAsync(
|
||||
s => s.GetSupportConceptAnalysis2(eOid, tOid, dt, months, showArchived),
|
||||
s => s.GetSupportConceptAnalysis3(eOid, tOid, catOid, dt, months, showArchived),
|
||||
r =>
|
||||
{
|
||||
this.Dispatch(
|
||||
|
||||
43
BeWo/View/Detail/UrlaubstagSchenkenView.xaml
Normal file
43
BeWo/View/Detail/UrlaubstagSchenkenView.xaml
Normal file
@@ -0,0 +1,43 @@
|
||||
<localView:BeWoView x:Class="BeWo.View.Detail.UrlaubstagSchenkenView"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:localView="clr-namespace:BeWo.View" xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid" xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
|
||||
Height="Auto" Width="Auto" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Focusable="True">
|
||||
|
||||
|
||||
<Grid Background="{StaticResource ObjectEditBackgroundBrush}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="auto" />
|
||||
<RowDefinition Height="auto" />
|
||||
<RowDefinition Height="auto" />
|
||||
<RowDefinition Height="auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<Label Grid.Column="0" Grid.Row="0" Margin="0 5 0 0" Content="Anzahl Tage:"/>
|
||||
<dxe:SpinEdit x:Name="spinEdit_AnzahlTage" Grid.Column="1" Grid.ColumnSpan="2" Grid.Row="0" MinValue="0.5" MaxValue="35" Value="1" Margin="0 5 5 0" MaskType="Numeric" Mask="########0.00" MaskUseAsDisplayFormat="True" Increment="0.5"/>
|
||||
<Label Grid.Column="0" Grid.Row="1" Margin="0 5 0 0" Content="Erläuterung:" />
|
||||
<dxe:TextEdit x:Name="textedit_erlaeuterung" Grid.Column="1" Grid.ColumnSpan="2" Grid.Row="1" Margin="0 5 5 0"/>
|
||||
<CheckBox x:Name="checkbox_FuerAlleMitarbeiter" Grid.Column="0" Grid.Row="2" Grid.ColumnSpan="3" Margin="5 10 0 5" Content="Für alle Mitarbeiter" Checked="Checkbox_FuerAlleMitarbeiter_Checked" Unchecked="Checkbox_FuerAlleMitarbeiter_Unchecked" />
|
||||
|
||||
<dxg:GridControl x:Name="EmployeeSelectionGrid" Grid.Row="3" Grid.Column="0" Grid.ColumnSpan="3" Margin="5" SelectionMode="MultipleRow">
|
||||
<dxg:GridControl.Columns>
|
||||
<dxg:GridColumn Header="Name des Mitarbeiters" FieldName="LastNameFirstName" Width="*" AllowEditing="False"/>
|
||||
</dxg:GridControl.Columns>
|
||||
<dxg:GridControl.View>
|
||||
<dxg:TableView AutoWidth="false" ShowGroupPanel="False" ShowGroupedColumns="false" ShowTotalSummary="False" NavigationStyle="Cell" x:Name="EmployeeSelectionGridView"/>
|
||||
</dxg:GridControl.View>
|
||||
</dxg:GridControl>
|
||||
</Grid>
|
||||
<StackPanel HorizontalAlignment="Right" VerticalAlignment="Bottom" Orientation="Horizontal">
|
||||
<Button x:Name="Btn_Abbrechen" Content="Abbrechen" Click="Btn_Abbrechen_Click" />
|
||||
<Button x:Name="Btn_Bestaetigen" Content="Bestätigen" Margin="5" Click="Btn_Bestaetigen_Click" />
|
||||
</StackPanel>
|
||||
|
||||
</Grid>
|
||||
|
||||
</localView:BeWoView>
|
||||
154
BeWo/View/Detail/UrlaubstagSchenkenView.xaml.cs
Normal file
154
BeWo/View/Detail/UrlaubstagSchenkenView.xaml.cs
Normal file
@@ -0,0 +1,154 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Input;
|
||||
|
||||
using BeWo.Controls;
|
||||
using BeWo.Core;
|
||||
using BeWo.ServiceProxy;
|
||||
using BeWo.Validation;
|
||||
using BeWo.View.Search;
|
||||
using BeWo.ViewModel;
|
||||
using BeWo.ViewModel.ListViewModel;
|
||||
using BeWo.Core.Service;
|
||||
|
||||
using BS.Shared;
|
||||
using BS.Shared.Extensions;
|
||||
using BS.Shared.Core;
|
||||
using BS.Shared.DataContracts;
|
||||
using BS.Shared.DataContracts.ClientPartials;
|
||||
using BS.Shared.DataContracts.Compact;
|
||||
using BS.Shared.Services;
|
||||
using BS.Shared.Translation;
|
||||
using DevExpress.Xpf.RichEdit;
|
||||
using SupportConceptService = BeWo.Core.Service.SupportConceptService;
|
||||
using System.Linq;
|
||||
using DevExpress.Xpf.Grid;
|
||||
using System.Windows.Media.Imaging;
|
||||
using DevExpress.Utils;
|
||||
|
||||
namespace BeWo.View.Detail
|
||||
{
|
||||
public partial class UrlaubstagSchenkenView
|
||||
{
|
||||
private List<EmployeeDC> _EmployeeList { get; set; }
|
||||
|
||||
public event Action ButtonConfirmClicked;
|
||||
public event Action ButtonCancelClicked;
|
||||
|
||||
public List<EmployeeDC> MitarbeiterAktualisiert { get; set; }
|
||||
|
||||
|
||||
|
||||
|
||||
public UrlaubstagSchenkenView(List<EmployeeDC> _EmployeeList)
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
//_EmployeeList = ServiceFacade.DoEmployeeServiceSync(s => s.GetAllActiveEmployees());
|
||||
EmployeeSelectionGrid.ItemsSource = _EmployeeList;
|
||||
}
|
||||
|
||||
private void Btn_Abbrechen_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
ButtonCancelClicked?.Invoke();
|
||||
}
|
||||
|
||||
private void Btn_Bestaetigen_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
List<GeschenkterUrlaubstagDC> geschenkteUrlaubstage = new List<GeschenkterUrlaubstagDC>();
|
||||
|
||||
decimal anzahlTage = Convert.ToDecimal(spinEdit_AnzahlTage.Text);
|
||||
if (checkbox_FuerAlleMitarbeiter.IsChecked != null)
|
||||
{
|
||||
if ((bool)checkbox_FuerAlleMitarbeiter.IsChecked == false)
|
||||
{
|
||||
var selected = EmployeeSelectionGrid.SelectedItems;
|
||||
if (selected != null)
|
||||
{
|
||||
if (selected.Count > 0)
|
||||
{
|
||||
foreach (var item in selected)
|
||||
{
|
||||
var emp = (EmployeeDC)item;
|
||||
var oid = emp.EmployeeOid;
|
||||
var urlaubstag = new GeschenkterUrlaubstagDC()
|
||||
{
|
||||
AnzahlTage = anzahlTage,
|
||||
Date = DateTime.Now.Date,
|
||||
Employee = (long)oid,
|
||||
GeschenkterUrlaubstagNotice = textedit_erlaeuterung.Text
|
||||
};
|
||||
geschenkteUrlaubstage.Add(urlaubstag);
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show("Es muss mindestens ein Mitarbeiter ausgewählt werden!", "BeWoPlaner", MessageBoxButton.OK, MessageBoxImage.Asterisk);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show("Es muss mindestens ein Mitarbeiter ausgewählt werden!", "BeWoPlaner", MessageBoxButton.OK, MessageBoxImage.Asterisk);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach (var item in _EmployeeList)
|
||||
{
|
||||
var oid = item.EmployeeOid;
|
||||
var urlaubstag = new GeschenkterUrlaubstagDC()
|
||||
{
|
||||
AnzahlTage = anzahlTage,
|
||||
Date = DateTime.Now.Date,
|
||||
Employee = (long)oid,
|
||||
GeschenkterUrlaubstagNotice = textedit_erlaeuterung.Text
|
||||
};
|
||||
geschenkteUrlaubstage.Add(urlaubstag);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ServiceFacade.DoEmployeeServiceSync(s => s.InsertMultipleGeschenkteUrlaubstage(geschenkteUrlaubstage));
|
||||
|
||||
ButtonConfirmClicked?.Invoke();
|
||||
}
|
||||
|
||||
private void Checkbox_FuerAlleMitarbeiter_Checked(object sender, RoutedEventArgs e)
|
||||
{
|
||||
EmployeeSelectionGrid.Visibility = Visibility.Collapsed;
|
||||
}
|
||||
|
||||
private void Checkbox_FuerAlleMitarbeiter_Unchecked(object sender, RoutedEventArgs e)
|
||||
{
|
||||
EmployeeSelectionGrid.Visibility = Visibility.Visible;
|
||||
}
|
||||
|
||||
private ContractDC GetLastContract(List<ContractDC> contracts)
|
||||
{
|
||||
DateTime maxDate = DateTime.MinValue;
|
||||
ContractDC lastContract = null;
|
||||
|
||||
if (contracts != null)
|
||||
{
|
||||
foreach (ContractDC c in contracts)
|
||||
{
|
||||
if (!c.ContractEndDate.HasValue)
|
||||
{
|
||||
lastContract = c;
|
||||
maxDate = DateTime.MaxValue;
|
||||
}
|
||||
else if (c.ContractEndDate.Value > maxDate)
|
||||
{
|
||||
maxDate = c.ContractEndDate.Value;
|
||||
lastContract = c;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return lastContract;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -104,7 +104,7 @@
|
||||
<dxa:AccordionItem Header="{markup:Translate Finanzkategorien}" Name="TabitemFinazCategories" Selected="Tabitem_Selected" Foreground="Black"/>
|
||||
<dxa:AccordionItem Header="{markup:Translate Notizenkategorie}" Name="TabitemNotizenkategorie" Selected="Tabitem_Selected" Foreground="Black"/>
|
||||
<dxa:AccordionItem Header="{markup:Translate Schulbegleitender Dienst}" Name="TabitemSbd" Selected="Tabitem_Selected" Foreground="Black"/>
|
||||
<dxa:AccordionItem Header="{markup:Translate ownChat Einstellungen}" Name="TabitemOwnChatSettings" Selected="Tabitem_Selected" Foreground="Black"/>
|
||||
|
||||
</dxa:AccordionItem>
|
||||
</dxa:AccordionControl>
|
||||
</Border>
|
||||
|
||||
@@ -94,10 +94,10 @@ namespace BeWo.View.Master
|
||||
{
|
||||
TabitemDienste.Visibility = Visibility.Collapsed;
|
||||
}
|
||||
if (!BeWoApp.LoggedOnUser.HasRight(UserRightType.ChatAdminSettings) || !BeWoApp.AppSettings.ShowOwnChatSettings)
|
||||
{
|
||||
TabitemOwnChatSettings.Visibility = Visibility.Collapsed;
|
||||
}
|
||||
//if (!BeWoApp.LoggedOnUser.HasRight(UserRightType.ChatAdminSettings) || !BeWoApp.AppSettings.ShowOwnChatSettings)
|
||||
//{
|
||||
// TabitemOwnChatSettings.Visibility = Visibility.Collapsed;
|
||||
//}
|
||||
|
||||
#if DEBUG
|
||||
TabitemDienste.Visibility = Visibility.Visible;
|
||||
@@ -415,9 +415,9 @@ namespace BeWo.View.Master
|
||||
VMFactory.CreateRatingTypeListVMAsync(r =>
|
||||
this.Dispatch(() => AddView(TabitemRatingTypes, new RatingTypeView(r))));
|
||||
return;
|
||||
case nameof(TabitemOwnChatSettings):
|
||||
AddView(TabitemOwnChatSettings, new OwnChatSettingsView());
|
||||
return;
|
||||
//case nameof(TabitemOwnChatSettings):
|
||||
// AddView(TabitemOwnChatSettings, new OwnChatSettingsView());
|
||||
// return;
|
||||
}
|
||||
|
||||
throw new ArgumentOutOfRangeException(nameof(accordionItem));
|
||||
|
||||
@@ -8,6 +8,7 @@ using BS.Shared.Extensions;
|
||||
|
||||
using System.Collections.Generic;
|
||||
using BS.Shared.Core;
|
||||
using System.Windows;
|
||||
|
||||
namespace BeWo.ViewModel
|
||||
{
|
||||
@@ -49,6 +50,48 @@ namespace BeWo.ViewModel
|
||||
private String _Notice;
|
||||
private EmploymentTypeDC _EmploymentType;
|
||||
|
||||
|
||||
//private Visibility _EmploymentTypeLeaveDaysVisibility;
|
||||
//private Visibility _LeaveDaysVisibility;
|
||||
public Visibility EmploymentTypeLeaveDaysVisibility
|
||||
{
|
||||
get
|
||||
{
|
||||
if (EmploymentType != null && EmploymentType.LeaveDays.HasValue)
|
||||
{
|
||||
return Visibility.Visible;
|
||||
}
|
||||
|
||||
return Visibility.Collapsed;
|
||||
|
||||
}
|
||||
//set
|
||||
//{
|
||||
// _EmploymentTypeLeaveDaysVisibility = value;
|
||||
// FirePropertyChanged("EmploymentTypeLeaveDaysVisibility");
|
||||
// FirePropertyChanged("LeaveDaysVisibility");
|
||||
//}
|
||||
}
|
||||
public Visibility LeaveDaysVisibility
|
||||
{
|
||||
get {
|
||||
if (EmploymentType == null || !EmploymentType.LeaveDays.HasValue)
|
||||
{
|
||||
return Visibility.Visible;
|
||||
}
|
||||
|
||||
return Visibility.Collapsed;
|
||||
}
|
||||
//set
|
||||
//{
|
||||
// _LeaveDaysVisibility = value;
|
||||
// FirePropertyChanged("EmploymentTypeLeaveDaysVisibility");
|
||||
// FirePropertyChanged("LeaveDaysVisibility");
|
||||
//}
|
||||
}
|
||||
|
||||
|
||||
|
||||
private IList<ValueListEntryDC> _AllContractTypes;
|
||||
|
||||
private IList<CostRatePeriodDC> _AllHourlyRateCostRatePeriods;
|
||||
@@ -140,6 +183,8 @@ namespace BeWo.ViewModel
|
||||
this._EmploymentType = value;
|
||||
this.StoreDirtyInformation(this.AreDifferent(this.DataContract.EmploymentType, value), PropertyName_EmploymentType);
|
||||
this.FirePropertyChanged(PropertyName_EmploymentType);
|
||||
FirePropertyChanged("EmploymentTypeLeaveDaysVisibility");
|
||||
FirePropertyChanged("LeaveDaysVisibility");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -148,7 +148,9 @@ namespace BeWo.ViewModel
|
||||
private ObservableSortCollection<ValueListEntryDC> _Nationalitaeten;
|
||||
private ObservableSortCollection<ValueListEntryDC> _EintragKategorien;
|
||||
|
||||
public EmployeeVM(
|
||||
private bool _SpinEditEnabled;
|
||||
|
||||
public EmployeeVM(
|
||||
EmployeeDC pEmployeeDC, IList<EmploymentTypeDC> pPossibleTypes, IEnumerable<ValueListEntryDC> pValueList, IEnumerable<ValueListEntryDC> pPossibleQualifications,
|
||||
IEnumerable<ValueListEntryDC> pPossibleFocusTypes, IEnumerable<AuszahlungsartDC> pPossibleAuszahlungsarten, List<ValueListEntryDC> allContractTypes, List<CostRatePeriodDC> allHourlyRateCostRatePeriods, List<ValueListEntryDC> eintragKategorien)
|
||||
: base(pEmployeeDC, pEmployeeDC.EmployeeOid == null)
|
||||
@@ -179,6 +181,15 @@ namespace BeWo.ViewModel
|
||||
_EintragKategorien = new ObservableSortCollection<ValueListEntryDC>(eintragKategorien);
|
||||
}
|
||||
|
||||
public bool SpinEditEnabled
|
||||
{
|
||||
get { return _SpinEditEnabled; }
|
||||
set
|
||||
{
|
||||
_SpinEditEnabled = value;
|
||||
}
|
||||
}
|
||||
|
||||
public List<SolidColorBrush> AllBrushes
|
||||
{
|
||||
get
|
||||
|
||||
@@ -9,8 +9,10 @@ namespace BeWo.ViewModel
|
||||
public class EmploymentTypeVM : AbstractDCMapperVM<EmploymentTypeDC>
|
||||
{
|
||||
public static string PropertyName_Name = "Name";
|
||||
public static string PropertyName_LeaveDays = "LeaveDays";
|
||||
|
||||
private string _Name;
|
||||
private decimal? _LeaveDays;
|
||||
|
||||
public EmploymentTypeVM(EmploymentTypeDC pDC) : base(pDC, pDC.EmploymentTypeOid == null)
|
||||
{
|
||||
@@ -31,7 +33,20 @@ namespace BeWo.ViewModel
|
||||
}
|
||||
}
|
||||
}
|
||||
public decimal? LeaveDays
|
||||
{
|
||||
get { return this._LeaveDays; }
|
||||
|
||||
set
|
||||
{
|
||||
if (this.AreDifferent(this._LeaveDays, value))
|
||||
{
|
||||
this._LeaveDays = value;
|
||||
this.StoreDirtyInformation(this.AreDifferent(this.DataContract.LeaveDays, value), PropertyName_LeaveDays);
|
||||
this.FirePropertyChanged(PropertyName_LeaveDays);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
protected override void InitByDataContract(EmploymentTypeDC pDataContract)
|
||||
@@ -39,12 +54,14 @@ namespace BeWo.ViewModel
|
||||
if (!this.IsNew)
|
||||
{
|
||||
this._Name = pDataContract.Name;
|
||||
this._LeaveDays = pDataContract.LeaveDays;
|
||||
}
|
||||
}
|
||||
|
||||
protected override EmploymentTypeDC MapToDataContract(EmploymentTypeDC pDataContract, bool doCommit)
|
||||
{
|
||||
pDataContract.Name = this._Name;
|
||||
pDataContract.LeaveDays = this._LeaveDays;
|
||||
return pDataContract;
|
||||
}
|
||||
}
|
||||
|
||||
95
BeWo/ViewModel/GeschenkterUrlaubstagVM.cs
Normal file
95
BeWo/ViewModel/GeschenkterUrlaubstagVM.cs
Normal file
@@ -0,0 +1,95 @@
|
||||
using BS.Shared.DataContracts;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BeWo.ViewModel
|
||||
{
|
||||
public class GeschenkterUrlaubstagVM : AbstractDCMapperVM<GeschenkterUrlaubstagDC>
|
||||
{
|
||||
public static string PropertyName_Employee = "Employee";
|
||||
public static string PropertyName_Date = "Date";
|
||||
public static string PropertyName_AnzahlTage = "AnzahlTage";
|
||||
|
||||
private long _Employee;
|
||||
private DateTime _Date;
|
||||
private decimal _AnzahlTage;
|
||||
private EmployeeVM _EmployeeObj;
|
||||
|
||||
public GeschenkterUrlaubstagVM(GeschenkterUrlaubstagDC pDC) : base(pDC, pDC.GeschenkterUrlaubstagOid == null)
|
||||
{
|
||||
}
|
||||
|
||||
public long Employee
|
||||
{
|
||||
get { return this._Employee; }
|
||||
|
||||
set
|
||||
{
|
||||
if (this.AreDifferent(this._Employee, value))
|
||||
{
|
||||
this._Employee = value;
|
||||
this.StoreDirtyInformation(this.AreDifferent(this.DataContract.Employee, value), PropertyName_Employee);
|
||||
this.FirePropertyChanged(PropertyName_Employee);
|
||||
}
|
||||
}
|
||||
}
|
||||
public DateTime Date
|
||||
{
|
||||
get { return this._Date; }
|
||||
|
||||
set
|
||||
{
|
||||
if (this.AreDifferent(this._Date, value))
|
||||
{
|
||||
this._Date = value;
|
||||
this.StoreDirtyInformation(this.AreDifferent(this.DataContract.Date, value), PropertyName_Date);
|
||||
this.FirePropertyChanged(PropertyName_Date);
|
||||
}
|
||||
}
|
||||
}
|
||||
public decimal AnzahlTage
|
||||
{
|
||||
get { return this._AnzahlTage; }
|
||||
|
||||
set
|
||||
{
|
||||
if (this.AreDifferent(this._AnzahlTage, value))
|
||||
{
|
||||
this._AnzahlTage = value;
|
||||
this.StoreDirtyInformation(this.AreDifferent(this.DataContract.AnzahlTage, value), PropertyName_AnzahlTage);
|
||||
this.FirePropertyChanged(PropertyName_AnzahlTage);
|
||||
}
|
||||
}
|
||||
}
|
||||
public EmployeeVM EmployeeObj
|
||||
{
|
||||
get { return _EmployeeObj; }
|
||||
|
||||
set
|
||||
{
|
||||
if (this.AreDifferent(this._EmployeeObj, value))
|
||||
this._EmployeeObj = value;
|
||||
}
|
||||
}
|
||||
|
||||
protected override void InitByDataContract(GeschenkterUrlaubstagDC pDataContract)
|
||||
{
|
||||
if (!this.IsNew)
|
||||
{
|
||||
this._Employee = pDataContract.Employee;
|
||||
this._Date = pDataContract.Date;
|
||||
this._AnzahlTage= pDataContract.AnzahlTage;
|
||||
}
|
||||
}
|
||||
protected override GeschenkterUrlaubstagDC MapToDataContract(GeschenkterUrlaubstagDC pDataContract, bool doCommit)
|
||||
{
|
||||
pDataContract.Employee = this._Employee;
|
||||
pDataContract.Date = this._Date;
|
||||
pDataContract.AnzahlTage = this._AnzahlTage;
|
||||
return pDataContract;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -170,6 +170,7 @@
|
||||
<Compile Include="Util\BootstrapTreeViewItem.cs" />
|
||||
<Compile Include="Util\ConvertedDateTimes.cs" />
|
||||
<Compile Include="Util\FormCollectionConstants.cs" />
|
||||
<Compile Include="Util\GoalRating.cs" />
|
||||
<Compile Include="Util\GoalTreeItem.cs" />
|
||||
<Compile Include="Controllers\LoginController.cs" />
|
||||
<Compile Include="Controllers\MainController.cs" />
|
||||
@@ -590,7 +591,7 @@
|
||||
<VisualStudio>
|
||||
<FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
|
||||
<WebProjectProperties>
|
||||
<UseIIS>False</UseIIS>
|
||||
<UseIIS>True</UseIIS>
|
||||
<AutoAssignPort>False</AutoAssignPort>
|
||||
<DevelopmentServerPort>8808</DevelopmentServerPort>
|
||||
<DevelopmentServerVPath>/</DevelopmentServerVPath>
|
||||
|
||||
@@ -64,6 +64,7 @@
|
||||
--danger: #dc3545;
|
||||
--light: #f8f9fa;
|
||||
--dark: #343a40;
|
||||
--bewo-goal-rating: #0000ff;
|
||||
--bewo-dev: #00cf7c;
|
||||
--bewo-customers: #3b7799;
|
||||
--bewo-service-records: #c80000;
|
||||
@@ -1929,6 +1930,26 @@ pre code {
|
||||
background-color: #b9bbbe;
|
||||
}
|
||||
|
||||
.table-bewo-goal-rating,
|
||||
.table-bewo-goal-rating > th,
|
||||
.table-bewo-goal-rating > td {
|
||||
background-color: #b8b8ff;
|
||||
}
|
||||
.table-bewo-goal-rating th,
|
||||
.table-bewo-goal-rating td,
|
||||
.table-bewo-goal-rating thead th,
|
||||
.table-bewo-goal-rating tbody + tbody {
|
||||
border-color: #7a7aff;
|
||||
}
|
||||
|
||||
.table-hover .table-bewo-goal-rating:hover {
|
||||
background-color: #9f9fff;
|
||||
}
|
||||
.table-hover .table-bewo-goal-rating:hover > td,
|
||||
.table-hover .table-bewo-goal-rating:hover > th {
|
||||
background-color: #9f9fff;
|
||||
}
|
||||
|
||||
.table-bewo-dev,
|
||||
.table-bewo-dev > th,
|
||||
.table-bewo-dev > td {
|
||||
@@ -2957,6 +2978,36 @@ fieldset:disabled a.btn {
|
||||
box-shadow: 0 0 0 0.2rem rgba(82, 88, 93, 0.5);
|
||||
}
|
||||
|
||||
.btn-bewo-goal-rating {
|
||||
color: #fff;
|
||||
background-color: #0000ff;
|
||||
border-color: #0000ff;
|
||||
}
|
||||
.btn-bewo-goal-rating:hover {
|
||||
color: #fff;
|
||||
background-color: #0000d9;
|
||||
border-color: #0000cc;
|
||||
}
|
||||
.btn-bewo-goal-rating:focus, .btn-bewo-goal-rating.focus {
|
||||
color: #fff;
|
||||
background-color: #0000d9;
|
||||
border-color: #0000cc;
|
||||
box-shadow: 0 0 0 0.2rem rgba(38, 38, 255, 0.5);
|
||||
}
|
||||
.btn-bewo-goal-rating.disabled, .btn-bewo-goal-rating:disabled {
|
||||
color: #fff;
|
||||
background-color: #0000ff;
|
||||
border-color: #0000ff;
|
||||
}
|
||||
.btn-bewo-goal-rating:not(:disabled):not(.disabled):active, .btn-bewo-goal-rating:not(:disabled):not(.disabled).active, .show > .btn-bewo-goal-rating.dropdown-toggle {
|
||||
color: #fff;
|
||||
background-color: #0000cc;
|
||||
border-color: #0000bf;
|
||||
}
|
||||
.btn-bewo-goal-rating:not(:disabled):not(.disabled):active:focus, .btn-bewo-goal-rating:not(:disabled):not(.disabled).active:focus, .show > .btn-bewo-goal-rating.dropdown-toggle:focus {
|
||||
box-shadow: 0 0 0 0.2rem rgba(38, 38, 255, 0.5);
|
||||
}
|
||||
|
||||
.btn-bewo-dev {
|
||||
color: #fff;
|
||||
background-color: #00cf7c;
|
||||
@@ -3517,6 +3568,31 @@ fieldset:disabled a.btn {
|
||||
box-shadow: 0 0 0 0.2rem rgba(52, 58, 64, 0.5);
|
||||
}
|
||||
|
||||
.btn-outline-bewo-goal-rating {
|
||||
color: #0000ff;
|
||||
border-color: #0000ff;
|
||||
}
|
||||
.btn-outline-bewo-goal-rating:hover {
|
||||
color: #fff;
|
||||
background-color: #0000ff;
|
||||
border-color: #0000ff;
|
||||
}
|
||||
.btn-outline-bewo-goal-rating:focus, .btn-outline-bewo-goal-rating.focus {
|
||||
box-shadow: 0 0 0 0.2rem rgba(0, 0, 255, 0.5);
|
||||
}
|
||||
.btn-outline-bewo-goal-rating.disabled, .btn-outline-bewo-goal-rating:disabled {
|
||||
color: #0000ff;
|
||||
background-color: transparent;
|
||||
}
|
||||
.btn-outline-bewo-goal-rating:not(:disabled):not(.disabled):active, .btn-outline-bewo-goal-rating:not(:disabled):not(.disabled).active, .show > .btn-outline-bewo-goal-rating.dropdown-toggle {
|
||||
color: #fff;
|
||||
background-color: #0000ff;
|
||||
border-color: #0000ff;
|
||||
}
|
||||
.btn-outline-bewo-goal-rating:not(:disabled):not(.disabled):active:focus, .btn-outline-bewo-goal-rating:not(:disabled):not(.disabled).active:focus, .show > .btn-outline-bewo-goal-rating.dropdown-toggle:focus {
|
||||
box-shadow: 0 0 0 0.2rem rgba(0, 0, 255, 0.5);
|
||||
}
|
||||
|
||||
.btn-outline-bewo-dev {
|
||||
color: #00cf7c;
|
||||
border-color: #00cf7c;
|
||||
@@ -5692,6 +5768,19 @@ a.badge-dark:focus, a.badge-dark.focus {
|
||||
box-shadow: 0 0 0 0.2rem rgba(52, 58, 64, 0.5);
|
||||
}
|
||||
|
||||
.badge-bewo-goal-rating {
|
||||
color: #fff;
|
||||
background-color: #0000ff;
|
||||
}
|
||||
a.badge-bewo-goal-rating:hover, a.badge-bewo-goal-rating:focus {
|
||||
color: #fff;
|
||||
background-color: #0000cc;
|
||||
}
|
||||
a.badge-bewo-goal-rating:focus, a.badge-bewo-goal-rating.focus {
|
||||
outline: 0;
|
||||
box-shadow: 0 0 0 0.2rem rgba(0, 0, 255, 0.5);
|
||||
}
|
||||
|
||||
.badge-bewo-dev {
|
||||
color: #fff;
|
||||
background-color: #00cf7c;
|
||||
@@ -5989,6 +6078,18 @@ a.badge-bewo-report:focus, a.badge-bewo-report.focus {
|
||||
color: #040505;
|
||||
}
|
||||
|
||||
.alert-bewo-goal-rating {
|
||||
color: #000085;
|
||||
background-color: #ccccff;
|
||||
border-color: #b8b8ff;
|
||||
}
|
||||
.alert-bewo-goal-rating hr {
|
||||
border-top-color: #9f9fff;
|
||||
}
|
||||
.alert-bewo-goal-rating .alert-link {
|
||||
color: #000052;
|
||||
}
|
||||
|
||||
.alert-bewo-dev {
|
||||
color: #006c40;
|
||||
background-color: #ccf5e5;
|
||||
@@ -6490,6 +6591,20 @@ a.badge-bewo-report:focus, a.badge-bewo-report.focus {
|
||||
border-color: #1b1e21;
|
||||
}
|
||||
|
||||
.list-group-item-bewo-goal-rating {
|
||||
color: #000085;
|
||||
background-color: #b8b8ff;
|
||||
}
|
||||
.list-group-item-bewo-goal-rating.list-group-item-action:hover, .list-group-item-bewo-goal-rating.list-group-item-action:focus {
|
||||
color: #000085;
|
||||
background-color: #9f9fff;
|
||||
}
|
||||
.list-group-item-bewo-goal-rating.list-group-item-action.active {
|
||||
color: #fff;
|
||||
background-color: #000085;
|
||||
border-color: #000085;
|
||||
}
|
||||
|
||||
.list-group-item-bewo-dev {
|
||||
color: #006c40;
|
||||
background-color: #b8f2da;
|
||||
@@ -7490,6 +7605,16 @@ button.bg-dark:focus {
|
||||
background-color: #1d2124 !important;
|
||||
}
|
||||
|
||||
.bg-bewo-goal-rating {
|
||||
background-color: #0000ff !important;
|
||||
}
|
||||
|
||||
a.bg-bewo-goal-rating:hover, a.bg-bewo-goal-rating:focus,
|
||||
button.bg-bewo-goal-rating:hover,
|
||||
button.bg-bewo-goal-rating:focus {
|
||||
background-color: #0000cc !important;
|
||||
}
|
||||
|
||||
.bg-bewo-dev {
|
||||
background-color: #00cf7c !important;
|
||||
}
|
||||
@@ -7690,6 +7815,10 @@ button.bg-bewo-report:focus {
|
||||
border-color: #343a40 !important;
|
||||
}
|
||||
|
||||
.border-bewo-goal-rating {
|
||||
border-color: #0000ff !important;
|
||||
}
|
||||
|
||||
.border-bewo-dev {
|
||||
border-color: #00cf7c !important;
|
||||
}
|
||||
@@ -11321,6 +11450,14 @@ a.text-dark:hover, a.text-dark:focus {
|
||||
color: #121416 !important;
|
||||
}
|
||||
|
||||
.text-bewo-goal-rating {
|
||||
color: #0000ff !important;
|
||||
}
|
||||
|
||||
a.text-bewo-goal-rating:hover, a.text-bewo-goal-rating:focus {
|
||||
color: #0000b3 !important;
|
||||
}
|
||||
|
||||
.text-bewo-dev {
|
||||
color: #00cf7c !important;
|
||||
}
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -1,4 +1,4 @@
|
||||
$theme-colors: ( "bewo-dev": #00cf7c, "primary": #FF5A00, "bewo-customers": #3b7799, "bewo-service-records": #c80000, "bewo-calendar": #04b4d0, "bewo-is-about-to-expire": #FF0000, "bewo-expires-in-three-months": #FF9400, "bewo-group-booking": #f9e79f, "bewo-customer-card-header": #AB4A07, "bewo-employee": #45993B, "bewo-resource": #04B4D0, "bewo-task-red": #993B3B, "bewo-report": #995E3B);
|
||||
$theme-colors: ( "bewo-goal-rating": #0000ff,"bewo-dev": #00cf7c, "primary": #FF5A00, "bewo-customers": #3b7799, "bewo-service-records": #c80000, "bewo-calendar": #04b4d0, "bewo-is-about-to-expire": #FF0000, "bewo-expires-in-three-months": #FF9400, "bewo-group-booking": #f9e79f, "bewo-customer-card-header": #AB4A07, "bewo-employee": #45993B, "bewo-resource": #04B4D0, "bewo-task-red": #993B3B, "bewo-report": #995E3B);
|
||||
|
||||
.no-underline {
|
||||
text-decoration: none !important
|
||||
|
||||
@@ -237,6 +237,8 @@ namespace BeWoPlanerMobil.Controllers
|
||||
|
||||
Model.SelectedSupportConceptListObject = Model.SupportConceptListObjects.FirstOrDefault(f => f.CostBearer2SupportConceptOid == "-1") ?? Model.SupportConceptListObjects.First();
|
||||
Model.CostBearer2SupportConceptOid = -1;
|
||||
|
||||
Model.HasAnyRatingTypes = OperationsService.GetAllRatingTypes().Any();
|
||||
}
|
||||
|
||||
if(Model.CostBearer2SupportConceptOid != null)
|
||||
@@ -256,6 +258,40 @@ namespace BeWoPlanerMobil.Controllers
|
||||
return View(Model);
|
||||
}
|
||||
|
||||
[Authorize]
|
||||
public void LoadGoalRatings()
|
||||
{
|
||||
if(Model == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var ratingTypes = OperationsService.GetAllRatingTypes().OrderBy(o => o.Position); ;
|
||||
|
||||
Model.GoalRatingTypes = ratingTypes.ToList();
|
||||
}
|
||||
|
||||
[Authorize]
|
||||
public string RateSelectedGoal(long? ratingTypeOid, long? goalOid)
|
||||
{
|
||||
if(Model == null || ratingTypeOid == null || goalOid == null)
|
||||
{
|
||||
return _LeerzeichenFuerGetMethoden;
|
||||
}
|
||||
|
||||
if(!Model.IsInGroupBookingMode)
|
||||
{
|
||||
var rating = Model.GoalRatingTypes.FirstOrDefault(ratingType => ratingType.RatingTypeOid == ratingTypeOid);
|
||||
|
||||
var goal = Model.GetGoalByOid(goalOid.Value);
|
||||
|
||||
goal.RatingTypeOid = ratingTypeOid;
|
||||
|
||||
return SerializeObject(new GoalRating(rating?.DisplayName ?? string.Empty, goal.ValueListEntryOid ?? 0));
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
[Authorize]
|
||||
@@ -279,68 +315,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
return base.Logout();
|
||||
}
|
||||
|
||||
[Authorize]
|
||||
public string LoadGoalTreeItems()
|
||||
{
|
||||
if (!Model.CostBearer2SupportConceptOid.HasValue || Model.CostBearer2SupportConceptOid.Value > 0 || Model.SelectedSupportConcept == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
var goals = Model.SelectedSupportConcept.Goals;
|
||||
|
||||
var missingParentElements = goals.Where(w => w.ParentOid.HasValue && !goals.Any(a => a.ValueListEntryOid.Equals(w.ParentOid))).Select(s => s.ParentOid).ToList();
|
||||
|
||||
_ParentGoals = new Dictionary<long, ValueListEntryDC>();
|
||||
foreach (var oid in missingParentElements)
|
||||
{
|
||||
LoadMissingParents(oid.Value);
|
||||
}
|
||||
|
||||
goals.AddRangeIfElementsNotIn(_ParentGoals.Values);
|
||||
|
||||
var ziele = goals.Where(w => _Zieltypen.Contains(w.Type)).OrderBy(s => s.TypeDescription).ToList();
|
||||
var massnahmen = goals.Where(w => _Massnahmentypen.Contains(w.Type)).OrderBy(s => s.TypeDescription).ToList();
|
||||
|
||||
var parentItems = goals.Where(w => w.ValueListEntryOid.HasValue && goals.Any(a => a.ParentOid.HasValue && a.ParentOid.Equals(w.ValueListEntryOid))).ToList();
|
||||
|
||||
var goalTree = new List<BootstrapTreeViewItem>();
|
||||
var goalTreeDic = new Dictionary<long, BootstrapTreeViewItem>();
|
||||
|
||||
foreach (var ziel in ziele.Where(ziel => ziel.ValueListEntryOid.HasValue))
|
||||
{
|
||||
var treeItem = new BootstrapTreeViewItem(ziel.TypeDescription, ziel.ParentOid, ziel.ValueListEntryOid.Value, parentItems.Contains(ziel));
|
||||
|
||||
goalTreeDic.Add(ziel.ValueListEntryOid.Value, treeItem);
|
||||
|
||||
if (ziel.ParentOid == null)
|
||||
{
|
||||
goalTree.Add(treeItem);
|
||||
}
|
||||
}
|
||||
|
||||
foreach (var zielMitEltern in goalTreeDic.Values.Where(zielMitEltern => zielMitEltern.ParentOid.HasValue))
|
||||
{
|
||||
goalTreeDic[zielMitEltern.ParentOid.Value].Nodes.Add(zielMitEltern);
|
||||
}
|
||||
|
||||
foreach (var ziel in massnahmen.Where(z => z.ValueListEntryOid.HasValue))
|
||||
{
|
||||
var node = new BootstrapTreeViewItem(ziel.TypeDescription, ziel.ParentOid, ziel.ValueListEntryOid.Value, parentItems.Contains(ziel));
|
||||
|
||||
if (ziel.ParentOid != null && goalTreeDic.ContainsKey(ziel.ParentOid.Value))
|
||||
{
|
||||
node.ParentOid = goalTreeDic[ziel.ParentOid.Value].ParentOid;
|
||||
goalTreeDic[ziel.ParentOid.Value].Nodes.Add(node);
|
||||
}
|
||||
}
|
||||
|
||||
return JsonConvert.SerializeObject(goalTree, Formatting.None, new JsonSerializerSettings
|
||||
{
|
||||
NullValueHandling = NullValueHandling.Ignore
|
||||
});
|
||||
}
|
||||
|
||||
// Wird beim Neuladen der Seite ausgeführt per Get-Aufruf
|
||||
[Authorize]
|
||||
public string LoadGoals()
|
||||
{
|
||||
@@ -360,6 +335,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
Model.SelectedSupportConcept = supportConcept;
|
||||
|
||||
var selectedGoals = supportConcept.Goals;
|
||||
|
||||
var missingParents = selectedGoals.Where(w => w.ParentOid != null && false == selectedGoals.Any(a => a.ValueListEntryOid.Equals(w.ParentOid))).Select(s => s.ParentOid).ToList();
|
||||
|
||||
_ParentGoals = new Dictionary<long, ValueListEntryDC>();
|
||||
@@ -368,20 +344,23 @@ namespace BeWoPlanerMobil.Controllers
|
||||
LoadMissingParents(oid.Value);
|
||||
}
|
||||
|
||||
var goalTree = BuildGoalTree(selectedGoals.Union(_ParentGoals.Values).ToList());
|
||||
var allGoals = selectedGoals.Union(_ParentGoals.Values).ToList();
|
||||
|
||||
var goalTree = BuildGoalTree(allGoals);
|
||||
|
||||
return SerializeObject(goalTree);
|
||||
}
|
||||
|
||||
private static List<GoalTreeItem> BuildGoalTree(IReadOnlyCollection<ValueListEntryDC> goals)
|
||||
private List<GoalTreeItem> BuildGoalTree(IReadOnlyCollection<ValueListEntryDC> goals)
|
||||
{
|
||||
var ziele = goals.Where(w => _Zieltypen.Contains(w.Type)).OrderBy(s => s.DisplayName).ToList();
|
||||
var massnahmen = goals.Where(w => _Massnahmentypen.Contains(w.Type)).OrderBy(s => s.DisplayName).ToList();
|
||||
var goalTree = new List<GoalTreeItem>();
|
||||
var goalTreeDic = new Dictionary<long, GoalTreeItem>();
|
||||
var goalsWithRating = Model.SelectedServiceRecord?.Goals.Where(goal => goal.RatingTypeOid.HasValue).ToList() ?? new List<ValueListEntryDC>();
|
||||
var ratingTypes = OperationsService.GetRatingTypesByOids(goalsWithRating.Where(goal => goal.RatingTypeOid.HasValue).Select(goal => goal.RatingTypeOid.Value).Distinct().ToList());
|
||||
|
||||
|
||||
foreach(var ziel in ziele.Where(z => z.ValueListEntryOid.HasValue))
|
||||
foreach (var ziel in ziele.Where(z => z.ValueListEntryOid.HasValue))
|
||||
{
|
||||
var treeItem = new GoalTreeItem { Children = new List<GoalTreeItem>(), Header = ziel.DisplayName, ParentOid = ziel.ParentOid, ValueListEntryOid = ziel.ValueListEntryOid };
|
||||
|
||||
@@ -400,7 +379,20 @@ namespace BeWoPlanerMobil.Controllers
|
||||
|
||||
foreach(var ziel in massnahmen)
|
||||
{
|
||||
var kind = new GoalTreeItem { Children = new List<GoalTreeItem>(), Header = ziel.DisplayName, IsLeaf = true, ValueListEntryOid = ziel.ValueListEntryOid };
|
||||
var ratingName = Model.HasAnyRatingTypes ? "Bewerten" : string.Empty;
|
||||
var goalWithRating = goalsWithRating.FirstOrDefault(g => g.ValueListEntryOid == ziel.ValueListEntryOid);
|
||||
|
||||
if(Model.HasAnyRatingTypes && Model.IsInEditingMode && goalWithRating != null && ratingTypes.Any())
|
||||
{
|
||||
var ratingType = ratingTypes.FirstOrDefault(rt => rt.RatingTypeOid == goalWithRating.RatingTypeOid);
|
||||
|
||||
if(ratingType != null)
|
||||
{
|
||||
ratingName = ratingType.DisplayName;
|
||||
}
|
||||
}
|
||||
|
||||
var kind = new GoalTreeItem { Children = new List<GoalTreeItem>(), Header = ziel.DisplayName, IsLeaf = true, ValueListEntryOid = ziel.ValueListEntryOid, RatingName = ratingName};
|
||||
|
||||
if(ziel.ParentOid != null && goalTreeDic.ContainsKey(ziel.ParentOid.Value))
|
||||
{
|
||||
@@ -417,6 +409,33 @@ namespace BeWoPlanerMobil.Controllers
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* var hasRatingTypes = Model.GoalRatingTypes.Any();
|
||||
|
||||
// TODO: Beim Editieren die Bewertungen laden!
|
||||
if(hasRatingTypes && Model.IsInEditingMode && Model.SelectedServiceRecord != null)
|
||||
{
|
||||
var goalsWithRating = Model.SelectedServiceRecord.Goals.Where(goal => goal.RatingTypeOid.HasValue).ToList();
|
||||
|
||||
var ratingTypes = OperationsService.GetRatingTypesByOids(goalsWithRating.Where(goal => goal.RatingTypeOid.HasValue).Select(goal => goal.RatingTypeOid.Value).Distinct().ToList());
|
||||
|
||||
goalTree.DoForEach(treeItem =>
|
||||
{
|
||||
var goal = goalsWithRating.FirstOrDefault(g => g.ValueListEntryOid == treeItem.ValueListEntryOid);
|
||||
|
||||
if(goal != null)
|
||||
{
|
||||
var ratingType = ratingTypes.FirstOrDefault(rt => rt.RatingTypeOid == goal.RatingTypeOid);
|
||||
|
||||
if(ratingType != null)
|
||||
{
|
||||
treeItem.RatingName = ratingType.DisplayName;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
*/
|
||||
|
||||
return goalTree;
|
||||
}
|
||||
|
||||
@@ -1463,7 +1482,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
|
||||
LoadRecordsToModel();
|
||||
|
||||
LoadGoalTreeItems();
|
||||
LoadGoalRatings();
|
||||
|
||||
return ResetEditingMode();
|
||||
}
|
||||
@@ -1473,7 +1492,6 @@ namespace BeWoPlanerMobil.Controllers
|
||||
|
||||
throw;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void LoadServiceCategoriesToModel(long? cb2ScOid)
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using BeWo.Service.ServiceImplementations;
|
||||
using BeWoPlanerMobil.Service;
|
||||
using BeWoPlanerMobil.Util;
|
||||
using BS.Shared;
|
||||
|
||||
@@ -497,7 +497,7 @@ namespace BeWoPlanerMobil.Models
|
||||
{
|
||||
var start = SelectedServiceRecord?.Start;
|
||||
|
||||
if(start != null && !(start.Value.GetServiceRecordNoDateTimeDate().Equals(start)))
|
||||
if(start != null && !start.Value.GetServiceRecordNoDateTimeDate().Equals(start))
|
||||
{
|
||||
return start.Value.ToString("HH:mm");
|
||||
}
|
||||
@@ -537,6 +537,15 @@ namespace BeWoPlanerMobil.Models
|
||||
{
|
||||
return ServiceRecords.FirstOrDefault(serviceRecord => serviceRecord.ServiceRecordOid.Equals(serviceRecordOid));
|
||||
}
|
||||
|
||||
public List<RatingTypeDC> GoalRatingTypes { get; set; } = new List<RatingTypeDC>();
|
||||
|
||||
public ValueListEntryDC GetGoalByOid(long goalOid)
|
||||
{
|
||||
return SelectedSupportConcept != null ? SelectedSupportConcept.Goals.FirstOrDefault(goal => goal.ValueListEntryOid == goalOid) : null;
|
||||
}
|
||||
|
||||
public bool HasAnyRatingTypes { get; set; }
|
||||
}
|
||||
|
||||
public class CustomSelectListItem
|
||||
|
||||
@@ -226,10 +226,26 @@ function calculateTimeWithDuration(timeInputValue, timeElement, startDate, durat
|
||||
|
||||
function resetCreateForm() {
|
||||
$("#serviceRecordCreationForm").trigger("reset");
|
||||
|
||||
var test = $("#has-any-rating-types").val().toLowerCase() === "true";
|
||||
|
||||
if (test) {
|
||||
$(".goal-rating-badge").text("Bewerten");
|
||||
} else {
|
||||
$(".goal-rating-badge").text("");
|
||||
}
|
||||
}
|
||||
|
||||
function resetSingleBookingForm() {
|
||||
$("#singleBookingForm").trigger("reset");
|
||||
|
||||
var test = $("#has-any-rating-types").val().toLowerCase() === "true";
|
||||
|
||||
if (test) {
|
||||
$(".goal-rating-badge").text("Bewerten");
|
||||
} else {
|
||||
$(".goal-rating-badge").text("");
|
||||
}
|
||||
}
|
||||
|
||||
function submitSingleBookingForm() {
|
||||
@@ -443,6 +459,7 @@ function buildGoaldTreeBranch(goalItem) {
|
||||
var goalOid = goalItem.ValueListEntryOid;
|
||||
var goalHeader = goalItem.Header;
|
||||
var isChecked = getSelectedGoalOids() !== null && isInArray(goalOid, getSelectedGoalOids()) ? "checked" : "";
|
||||
var ratingName = goalItem.RatingName;
|
||||
|
||||
if(!goalItem.IsLeaf) {
|
||||
treeHtml +=
|
||||
@@ -459,10 +476,48 @@ function buildGoaldTreeBranch(goalItem) {
|
||||
"</div>";
|
||||
} else {
|
||||
treeHtml +=
|
||||
'<div class="custom-control custom-checkbox">' +
|
||||
'<div class="custom-control custom-checkbox d-inline">' +
|
||||
'<input type="checkbox" class="custom-control-input" id="' + goalOid + '" ' + isChecked + ' onchange="updateSelectedGoals()">' +
|
||||
'<label class="custom-control-label" for="' + goalOid + '">' + goalHeader + "</label>" +
|
||||
"</div>";
|
||||
"</div><span id='goal-rating-" + goalOid + "' class='badge badge-bewo-goal-rating goal-rating-badge ml-1' onclick='showGoalRatingPopup(" + goalOid + ")'>" + ratingName + "</span>";
|
||||
}
|
||||
}
|
||||
|
||||
function showGoalRatingPopup(goalOid) {
|
||||
try {
|
||||
$("#goal-rating-popup").modal("show");
|
||||
$("#goal-to-rate-oid").val(goalOid);
|
||||
} catch (error) {
|
||||
logError(error.message);
|
||||
}
|
||||
}
|
||||
|
||||
function hideGoalRatingPopup() {
|
||||
try {
|
||||
$("#goal-rating-popup").modal("hide");
|
||||
} catch (error) {
|
||||
logError(error.message);
|
||||
}
|
||||
}
|
||||
|
||||
function rateGoal(ratingTypeOid) {
|
||||
try {
|
||||
var url = getRateSelectedGoalUrl();
|
||||
|
||||
var goalOid = $("#goal-to-rate-oid").val();
|
||||
|
||||
$.get(url, { ratingTypeOid: ratingTypeOid, goalOid: goalOid }).done(
|
||||
function (result) {
|
||||
var obj = $.parseJSON(result);
|
||||
|
||||
$("#goal-rating-" + goalOid).text(obj.RatingName);
|
||||
|
||||
hideGoalRatingPopup();
|
||||
$("#goal-to-rate-oid").val("");
|
||||
}
|
||||
);
|
||||
} catch (error) {
|
||||
logError(error.message);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
14
BeWoPlanerMobil/Util/GoalRating.cs
Normal file
14
BeWoPlanerMobil/Util/GoalRating.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
namespace BeWoPlanerMobil.Util
|
||||
{
|
||||
public class GoalRating
|
||||
{
|
||||
public string RatingName { get; }
|
||||
public long GoalOid { get; }
|
||||
|
||||
public GoalRating(string ratingName, long goalOid)
|
||||
{
|
||||
RatingName = ratingName;
|
||||
GoalOid = goalOid;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -5,11 +5,17 @@ namespace BeWoPlanerMobil.Util
|
||||
public class GoalTreeItem
|
||||
{
|
||||
public string Header { get; set; }
|
||||
|
||||
public bool IsLeaf { get; set; }
|
||||
|
||||
public List<GoalTreeItem> Children { get; set; }
|
||||
|
||||
public long? ParentOid { get; set; }
|
||||
|
||||
public long? ValueListEntryOid { get; set; }
|
||||
|
||||
public long? TopmostParentOid { get; set; }
|
||||
|
||||
public string RatingName { get; set; } = "Bewerten";//string.Empty;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -295,6 +295,18 @@
|
||||
function getGetSignatureImageUrl() {
|
||||
return "@Url.Action("GetSignatureImage")";
|
||||
}
|
||||
|
||||
function getRateSelectedGoalUrl() {
|
||||
return "@Url.Action("RateSelectedGoal")";
|
||||
}
|
||||
|
||||
function getSelectGoalToRateUrl() {
|
||||
return "@Url.Action("SelectGoalOidToRate")";
|
||||
}
|
||||
|
||||
function getResetSelectedGoalToRateUrl() {
|
||||
return "@Url.Action("ResetSelectedGoalToRate")";
|
||||
}
|
||||
</script>
|
||||
|
||||
<div class="container mt-3" id="checkbox-container">
|
||||
@@ -1442,3 +1454,31 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Bewertungspopup für Ziele -->
|
||||
<div id="goal-rating-popup" class="modal" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog modal-lg" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">Bewertungsskala</h5>
|
||||
<button class="close" type="button" data-dismiss="modal" onclick="hideGoalRatingPopup()">
|
||||
<span>×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<ul class="list-group">
|
||||
@foreach(var ratingType in Model.GoalRatingTypes)
|
||||
{
|
||||
<li class="list-group-item" id="grt-@ratingType.RatingTypeOid" onclick="rateGoal(@ratingType.RatingTypeOid)">@ratingType.DisplayName</li>
|
||||
}
|
||||
</ul>
|
||||
<input type="hidden" id="goal-to-rate-oid" />
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-primary" data-dismiss="modal" onclick="hideGoalRatingPopup()">Zurück</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<input type="hidden" id="has-any-rating-types" value="@Model?.HasAnyRatingTypes ?? False" />
|
||||
@@ -143,6 +143,7 @@
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<None Include="packages.config" />
|
||||
<None Include="Properties\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||
|
||||
@@ -4496,5 +4496,23 @@ namespace BeWo.Data.Access
|
||||
|
||||
return c.List<ServiceRecord>().ToList();
|
||||
}
|
||||
|
||||
public IList<GeschenkterUrlaubstag> FindGeschenkteUrlaubstageByEmpOid(long empOid)
|
||||
{
|
||||
var criteria = CreateCriteriaIsActive<GeschenkterUrlaubstag>()
|
||||
.Add(Restrictions.Eq("Employee", empOid));
|
||||
|
||||
return criteria.List<GeschenkterUrlaubstag>();
|
||||
}
|
||||
public IList<GeschenkterUrlaubstag> FindGeschenkteUrlaubstageByYear(int year)
|
||||
{
|
||||
DateTime start = new DateTime(year, 1, 1).AddTicks(-1);
|
||||
DateTime end = new DateTime(year, 12, 31).AddDays(1).AddTicks(-1);
|
||||
|
||||
var criteria = CreateCriteriaIsActive<GeschenkterUrlaubstag>()
|
||||
.Add(Restrictions.Between("Date", start, end));
|
||||
|
||||
return criteria.List<GeschenkterUrlaubstag>();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
19
Data/App.config
Normal file
19
Data/App.config
Normal file
@@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<configSections>
|
||||
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
|
||||
<section name="entityFramework"
|
||||
type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
|
||||
requirePermission="false"/>
|
||||
</configSections>
|
||||
<entityFramework>
|
||||
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">
|
||||
<parameters>
|
||||
<parameter value="v13.0"/>
|
||||
</parameters>
|
||||
</defaultConnectionFactory>
|
||||
<providers>
|
||||
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer"/>
|
||||
</providers>
|
||||
</entityFramework>
|
||||
</configuration>
|
||||
@@ -1,5 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="..\packages\Microsoft.CodeAnalysis.Analyzers.2.9.6\build\Microsoft.CodeAnalysis.Analyzers.props" Condition="Exists('..\packages\Microsoft.CodeAnalysis.Analyzers.2.9.6\build\Microsoft.CodeAnalysis.Analyzers.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
@@ -32,6 +33,8 @@
|
||||
<UseApplicationTrust>false</UseApplicationTrust>
|
||||
<BootstrapperEnabled>true</BootstrapperEnabled>
|
||||
<TargetFrameworkProfile />
|
||||
<NuGetPackageImportStamp>
|
||||
</NuGetPackageImportStamp>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
@@ -83,6 +86,24 @@
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\Lib\log4net.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.CodeAnalysis, Version=3.4.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.CodeAnalysis.Common.3.4.0\lib\netstandard2.0\Microsoft.CodeAnalysis.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.CodeAnalysis.CSharp, Version=3.4.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.CodeAnalysis.CSharp.3.4.0\lib\netstandard2.0\Microsoft.CodeAnalysis.CSharp.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.CodeAnalysis.CSharp.Workspaces, Version=3.4.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.CodeAnalysis.CSharp.Workspaces.3.4.0\lib\netstandard2.0\Microsoft.CodeAnalysis.CSharp.Workspaces.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.CodeAnalysis.VisualBasic, Version=3.4.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.CodeAnalysis.VisualBasic.3.4.0\lib\netstandard2.0\Microsoft.CodeAnalysis.VisualBasic.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.CodeAnalysis.VisualBasic.Workspaces, Version=3.4.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.CodeAnalysis.VisualBasic.Workspaces.3.4.0\lib\netstandard2.0\Microsoft.CodeAnalysis.VisualBasic.Workspaces.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.CodeAnalysis.Workspaces, Version=3.4.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.CodeAnalysis.Workspaces.Common.3.4.0\lib\netstandard2.0\Microsoft.CodeAnalysis.Workspaces.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="MySql.Data, Version=8.0.21.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
@@ -96,8 +117,29 @@
|
||||
<HintPath>..\Lib\NHibernate.ByteCode.Castle.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Buffers, Version=4.0.2.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Buffers.4.4.0\lib\netstandard2.0\System.Buffers.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Collections.Immutable, Version=1.2.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Collections.Immutable.1.5.0\lib\netstandard2.0\System.Collections.Immutable.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.ComponentModel" />
|
||||
<Reference Include="System.ComponentModel.DataAnnotations" />
|
||||
<Reference Include="System.Composition.AttributedModel, Version=1.0.31.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Composition.AttributedModel.1.0.31\lib\portable-net45+win8+wp8+wpa81\System.Composition.AttributedModel.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Composition.Convention, Version=1.0.31.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Composition.Convention.1.0.31\lib\portable-net45+win8+wp8+wpa81\System.Composition.Convention.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Composition.Hosting, Version=1.0.31.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Composition.Hosting.1.0.31\lib\portable-net45+win8+wp8+wpa81\System.Composition.Hosting.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Composition.Runtime, Version=1.0.31.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Composition.Runtime.1.0.31\lib\portable-net45+win8+wp8+wpa81\System.Composition.Runtime.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Composition.TypedParts, Version=1.0.31.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Composition.TypedParts.1.0.31\lib\portable-net45+win8+wp8+wpa81\System.Composition.TypedParts.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Configuration" />
|
||||
<Reference Include="System.Configuration.Install" />
|
||||
<Reference Include="System.Core">
|
||||
@@ -106,13 +148,31 @@
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Drawing.Design" />
|
||||
<Reference Include="System.Management" />
|
||||
<Reference Include="System.Memory, Version=4.0.1.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Memory.4.5.3\lib\netstandard2.0\System.Memory.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Numerics" />
|
||||
<Reference Include="System.Numerics.Vectors, Version=4.1.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Numerics.Vectors.4.4.0\lib\net46\System.Numerics.Vectors.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Reflection.Metadata, Version=1.4.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Reflection.Metadata.1.6.0\lib\netstandard2.0\System.Reflection.Metadata.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=4.0.4.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.4.5.2\lib\netstandard2.0\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Runtime.Serialization">
|
||||
<RequiredTargetFramework>3.0</RequiredTargetFramework>
|
||||
</Reference>
|
||||
<Reference Include="System.ServiceModel">
|
||||
<RequiredTargetFramework>3.0</RequiredTargetFramework>
|
||||
</Reference>
|
||||
<Reference Include="System.Text.Encoding.CodePages, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Text.Encoding.CodePages.4.5.1\lib\net461\System.Text.Encoding.CodePages.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Threading.Tasks.Extensions, Version=4.2.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Threading.Tasks.Extensions.4.5.3\lib\netstandard2.0\System.Threading.Tasks.Extensions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Transactions" />
|
||||
<Reference Include="System.Web" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
@@ -141,6 +201,7 @@
|
||||
<Compile Include="Entities\ConfirmationReceiptSignature.cs" />
|
||||
<Compile Include="Entities\Dienstvertretung.cs" />
|
||||
<Compile Include="Entities\Dokumentvorlage.cs" />
|
||||
<Compile Include="Entities\GeschenkterUrlaubstag.cs" />
|
||||
<Compile Include="Entities\GoalRating.cs" />
|
||||
<Compile Include="Entities\Quittierungsbelegsstatus.cs" />
|
||||
<Compile Include="Entities\Rating.cs" />
|
||||
@@ -643,6 +704,7 @@
|
||||
<EmbeddedResource Include="Mappings\Quittierungsbelegsstatus.hbm.xml" />
|
||||
<EmbeddedResource Include="Mappings\Dienstvertretung.hbm.xml" />
|
||||
<EmbeddedResource Include="Mappings\RegelmaessigerDienst.hbm.xml" />
|
||||
<EmbeddedResource Include="Mappings\GeschenkterUrlaubstag.hbm.xml" />
|
||||
<Content Include="Mappings\Timesheet2Mail.hbm.xml" />
|
||||
<EmbeddedResource Include="Mappings\ContactHistory.hbm.xml">
|
||||
<SubType>Designer</SubType>
|
||||
@@ -800,7 +862,20 @@
|
||||
<Name>Shared</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Analyzer Include="..\packages\Microsoft.CodeAnalysis.Analyzers.2.9.6\analyzers\dotnet\cs\Microsoft.CodeAnalysis.Analyzers.dll" />
|
||||
<Analyzer Include="..\packages\Microsoft.CodeAnalysis.Analyzers.2.9.6\analyzers\dotnet\cs\Microsoft.CodeAnalysis.CSharp.Analyzers.dll" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
<PropertyGroup>
|
||||
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
||||
</PropertyGroup>
|
||||
<Error Condition="!Exists('..\packages\Microsoft.CodeAnalysis.Analyzers.2.9.6\build\Microsoft.CodeAnalysis.Analyzers.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.CodeAnalysis.Analyzers.2.9.6\build\Microsoft.CodeAnalysis.Analyzers.props'))" />
|
||||
</Target>
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
|
||||
@@ -8,9 +8,11 @@ namespace BeWo.Data.Entities
|
||||
{
|
||||
|
||||
public static string PropertyName_Name = "Name";
|
||||
public static string PropertyName_LeaveDays = "LeaveDays";
|
||||
|
||||
|
||||
private string _Name;
|
||||
private decimal? _LeaveDays;
|
||||
|
||||
|
||||
public EmploymentType()
|
||||
@@ -34,7 +36,21 @@ namespace BeWo.Data.Entities
|
||||
}
|
||||
}
|
||||
}
|
||||
public virtual decimal? LeaveDays
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._LeaveDays;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
if (this.AreDifferent(this._LeaveDays, value))
|
||||
{
|
||||
this._LeaveDays = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
72
Data/Entities/GeschenkterUrlaubstag.cs
Normal file
72
Data/Entities/GeschenkterUrlaubstag.cs
Normal file
@@ -0,0 +1,72 @@
|
||||
using BS.Shared;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BeWo.Data.Entities
|
||||
{
|
||||
public class GeschenkterUrlaubstag : BeWoEntityBase
|
||||
{
|
||||
public static string PropertyName_Employee = "Employee";
|
||||
public static string PropertyName_Date = "Date";
|
||||
public static string PropertyName_AnzahlTage = "AnzahlTage";
|
||||
|
||||
private long _Employee;
|
||||
private DateTime _Date;
|
||||
private decimal _AnzahlTage;
|
||||
|
||||
public GeschenkterUrlaubstag()
|
||||
{
|
||||
this._Tid = TableID.GeschenkterUrlaubstag;
|
||||
}
|
||||
|
||||
public virtual long Employee
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._Employee;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
if (this.AreDifferent(this._Employee, value))
|
||||
{
|
||||
this._Employee = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
public virtual DateTime Date
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._Date;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
if (this.AreDifferent(this._Date, value))
|
||||
{
|
||||
this._Date = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
public virtual decimal AnzahlTage
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._AnzahlTage;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
if (this.AreDifferent(this._AnzahlTage, value))
|
||||
{
|
||||
this._AnzahlTage = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -14,6 +14,7 @@
|
||||
<property column="IsActive" type="BS.Shared.ActivationTypeId, BS.Shared" name="IsActive" />
|
||||
<property column="SystemEntryID" type="BS.Shared.SystemEntryID, BS.Shared" name="SystemEntryID" />
|
||||
<property column="Name" type="String" name="Name" />
|
||||
<property column="LeaveDays" type="Decimal" name="LeaveDays" />
|
||||
|
||||
</class>
|
||||
</hibernate-mapping>
|
||||
20
Data/Mappings/GeschenkterUrlaubstag.hbm.xml
Normal file
20
Data/Mappings/GeschenkterUrlaubstag.hbm.xml
Normal file
@@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
|
||||
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2">
|
||||
<class name="BeWo.Data.Entities.GeschenkterUrlaubstag,BeWo.Data" table="GeschenkterUrlaubstag">
|
||||
<id name="Oid" column="Oid" type="Int64" unsaved-value="null">
|
||||
<generator class="identity" />
|
||||
</id>
|
||||
<version type="Int64" column="Version" name="Version" />
|
||||
<property column="Tid" type="BS.Shared.TableID, BS.Shared" name="_Tid" access="field" />
|
||||
<property column="Notice" type="String" name="Notice" length="1024" />
|
||||
<property column="InsTs" type="DateTime" name="InsTs" />
|
||||
<property column="InsUser" type="String" name="InsUser" length="256" />
|
||||
<property column="UdpUser" type="String" name="UdpUser" length="256" />
|
||||
<property column="IsActive" type="BS.Shared.ActivationTypeId, BS.Shared" name="IsActive" />
|
||||
<property column="SystemEntryID" type="BS.Shared.SystemEntryID, BS.Shared" name="SystemEntryID" />
|
||||
<property column="Employee" type="Int64" name="Employee" />
|
||||
<property column="Date" type="DateTime" name="Date" />
|
||||
<property column="AnzahlTage" type="Decimal" name="AnzahlTage" />
|
||||
</class>
|
||||
</hibernate-mapping>
|
||||
@@ -1,5 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="..\packages\Microsoft.CodeAnalysis.Analyzers.2.9.6\build\Microsoft.CodeAnalysis.Analyzers.props" Condition="Exists('..\packages\Microsoft.CodeAnalysis.Analyzers.2.9.6\build\Microsoft.CodeAnalysis.Analyzers.props')" />
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
@@ -26,6 +27,8 @@
|
||||
<IISExpressUseClassicPipelineMode />
|
||||
<UseGlobalApplicationHostFile />
|
||||
<Use64BitIISExpress />
|
||||
<NuGetPackageImportStamp>
|
||||
</NuGetPackageImportStamp>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
@@ -72,15 +75,73 @@
|
||||
<Reference Include="DevExpress.XtraReports.v17.1.Web, Version=17.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
|
||||
<Reference Include="DevExpress.XtraScheduler.v17.1.Core, Version=17.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
|
||||
<Reference Include="DevExpress.XtraScheduler.v17.1.Reporting, Version=17.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
|
||||
<Reference Include="Microsoft.CodeAnalysis, Version=3.4.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.CodeAnalysis.Common.3.4.0\lib\netstandard2.0\Microsoft.CodeAnalysis.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.CodeAnalysis.CSharp, Version=3.4.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.CodeAnalysis.CSharp.3.4.0\lib\netstandard2.0\Microsoft.CodeAnalysis.CSharp.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.CodeAnalysis.CSharp.Workspaces, Version=3.4.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.CodeAnalysis.CSharp.Workspaces.3.4.0\lib\netstandard2.0\Microsoft.CodeAnalysis.CSharp.Workspaces.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.CodeAnalysis.VisualBasic, Version=3.4.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.CodeAnalysis.VisualBasic.3.4.0\lib\netstandard2.0\Microsoft.CodeAnalysis.VisualBasic.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.CodeAnalysis.VisualBasic.Workspaces, Version=3.4.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.CodeAnalysis.VisualBasic.Workspaces.3.4.0\lib\netstandard2.0\Microsoft.CodeAnalysis.VisualBasic.Workspaces.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.CodeAnalysis.Workspaces, Version=3.4.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.CodeAnalysis.Workspaces.Common.3.4.0\lib\netstandard2.0\Microsoft.CodeAnalysis.Workspaces.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="NHibernate, Version=3.1.0.4000, Culture=neutral, PublicKeyToken=aa95f207798dfdb4, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\Lib\NHibernate.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Buffers, Version=4.0.2.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Buffers.4.4.0\lib\netstandard2.0\System.Buffers.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Collections.Immutable, Version=1.2.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Collections.Immutable.1.5.0\lib\netstandard2.0\System.Collections.Immutable.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Composition.AttributedModel, Version=1.0.31.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Composition.AttributedModel.1.0.31\lib\portable-net45+win8+wp8+wpa81\System.Composition.AttributedModel.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Composition.Convention, Version=1.0.31.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Composition.Convention.1.0.31\lib\portable-net45+win8+wp8+wpa81\System.Composition.Convention.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Composition.Hosting, Version=1.0.31.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Composition.Hosting.1.0.31\lib\portable-net45+win8+wp8+wpa81\System.Composition.Hosting.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Composition.Runtime, Version=1.0.31.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Composition.Runtime.1.0.31\lib\portable-net45+win8+wp8+wpa81\System.Composition.Runtime.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Composition.TypedParts, Version=1.0.31.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Composition.TypedParts.1.0.31\lib\portable-net45+win8+wp8+wpa81\System.Composition.TypedParts.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="System.Memory, Version=4.0.1.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Memory.4.5.3\lib\netstandard2.0\System.Memory.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Numerics" />
|
||||
<Reference Include="System.Numerics.Vectors, Version=4.1.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Numerics.Vectors.4.4.0\lib\net46\System.Numerics.Vectors.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Reflection.Metadata, Version=1.4.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Reflection.Metadata.1.6.0\lib\netstandard2.0\System.Reflection.Metadata.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=4.0.4.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.4.5.2\lib\netstandard2.0\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Runtime.Serialization" />
|
||||
<Reference Include="System.ServiceModel" />
|
||||
<Reference Include="System.Text.Encoding.CodePages, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Text.Encoding.CodePages.4.5.1\lib\net461\System.Text.Encoding.CodePages.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Threading.Tasks.Extensions, Version=4.2.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Threading.Tasks.Extensions.4.5.3\lib\netstandard2.0\System.Threading.Tasks.Extensions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.ApplicationServices" />
|
||||
<Reference Include="System.Web.DynamicData" />
|
||||
<Reference Include="System.Web.Entity" />
|
||||
@@ -272,6 +333,10 @@
|
||||
<ItemGroup>
|
||||
<WCFMetadata Include="Service References\" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Analyzer Include="..\packages\Microsoft.CodeAnalysis.Analyzers.2.9.6\analyzers\dotnet\cs\Microsoft.CodeAnalysis.Analyzers.dll" />
|
||||
<Analyzer Include="..\packages\Microsoft.CodeAnalysis.Analyzers.2.9.6\analyzers\dotnet\cs\Microsoft.CodeAnalysis.CSharp.Analyzers.dll" />
|
||||
</ItemGroup>
|
||||
<PropertyGroup>
|
||||
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
|
||||
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
|
||||
@@ -304,4 +369,10 @@
|
||||
</FlavorProperties>
|
||||
</VisualStudio>
|
||||
</ProjectExtensions>
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
<PropertyGroup>
|
||||
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
||||
</PropertyGroup>
|
||||
<Error Condition="!Exists('..\packages\Microsoft.CodeAnalysis.Analyzers.2.9.6\build\Microsoft.CodeAnalysis.Analyzers.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.CodeAnalysis.Analyzers.2.9.6\build\Microsoft.CodeAnalysis.Analyzers.props'))" />
|
||||
</Target>
|
||||
</Project>
|
||||
1
Host/Multitenancy/2021040600.config
Normal file
1
Host/Multitenancy/2021040600.config
Normal file
@@ -0,0 +1 @@
|
||||
<?xml version="1.0"?><configuration><configSections><section name="hibernate-configuration" type="NHibernate.Cfg.ConfigurationSectionHandler, NHibernate" /></configSections><hibernate-configuration xmlns="urn:nhibernate-configuration-2.2"><session-factory><property name="connection.provider">NHibernate.Connection.DriverConnectionProvider</property><property name="connection.driver_class">NHibernate.Driver.MySqlDataDriver</property><property name="connection.connection_string">Server=localhost;Password=root;User ID=root; Initial Catalog=2021040600</property><property name="dialect">NHibernate.Dialect.MySQLDialect</property><property name="proxyfactory.factory_class">NHibernate.ByteCode.Castle.ProxyFactoryFactory, NHibernate.ByteCode.Castle</property><property name="hbm2ddl.keywords">none</property><property name="show_sql">true</property><!-- Bei true wird das SQL im Output Window angezeigt --><property name="format_sql">true</property><mapping assembly="BeWo.Data" /></session-factory></hibernate-configuration></configuration>
|
||||
1
Host/Multitenancy/2021040601.config
Normal file
1
Host/Multitenancy/2021040601.config
Normal file
@@ -0,0 +1 @@
|
||||
<?xml version="1.0"?><configuration><configSections><section name="hibernate-configuration" type="NHibernate.Cfg.ConfigurationSectionHandler, NHibernate" /></configSections><hibernate-configuration xmlns="urn:nhibernate-configuration-2.2"><session-factory><property name="connection.provider">NHibernate.Connection.DriverConnectionProvider</property><property name="connection.driver_class">NHibernate.Driver.MySqlDataDriver</property><property name="connection.connection_string">Server=localhost;Password=root;User ID=root; Initial Catalog=2021040601</property><property name="dialect">NHibernate.Dialect.MySQLDialect</property><property name="proxyfactory.factory_class">NHibernate.ByteCode.Castle.ProxyFactoryFactory, NHibernate.ByteCode.Castle</property><property name="hbm2ddl.keywords">none</property><property name="show_sql">true</property><!-- Bei true wird das SQL im Output Window angezeigt --><property name="format_sql">true</property><mapping assembly="BeWo.Data" /></session-factory></hibernate-configuration></configuration>
|
||||
1
Host/Multitenancy/2021040602.config
Normal file
1
Host/Multitenancy/2021040602.config
Normal file
@@ -0,0 +1 @@
|
||||
<?xml version="1.0"?><configuration><configSections><section name="hibernate-configuration" type="NHibernate.Cfg.ConfigurationSectionHandler, NHibernate" /></configSections><hibernate-configuration xmlns="urn:nhibernate-configuration-2.2"><session-factory><property name="connection.provider">NHibernate.Connection.DriverConnectionProvider</property><property name="connection.driver_class">NHibernate.Driver.MySqlDataDriver</property><property name="connection.connection_string">Server=localhost;Password=root;User ID=root; Initial Catalog=2021040602</property><property name="dialect">NHibernate.Dialect.MySQLDialect</property><property name="proxyfactory.factory_class">NHibernate.ByteCode.Castle.ProxyFactoryFactory, NHibernate.ByteCode.Castle</property><property name="hbm2ddl.keywords">none</property><property name="show_sql">true</property><!-- Bei true wird das SQL im Output Window angezeigt --><property name="format_sql">true</property><mapping assembly="BeWo.Data" /></session-factory></hibernate-configuration></configuration>
|
||||
1
Host/Multitenancy/2021040603.config
Normal file
1
Host/Multitenancy/2021040603.config
Normal file
@@ -0,0 +1 @@
|
||||
<?xml version="1.0"?><configuration><configSections><section name="hibernate-configuration" type="NHibernate.Cfg.ConfigurationSectionHandler, NHibernate" /></configSections><hibernate-configuration xmlns="urn:nhibernate-configuration-2.2"><session-factory><property name="connection.provider">NHibernate.Connection.DriverConnectionProvider</property><property name="connection.driver_class">NHibernate.Driver.MySqlDataDriver</property><property name="connection.connection_string">Server=localhost;Password=root;User ID=root; Initial Catalog=2021040603</property><property name="dialect">NHibernate.Dialect.MySQLDialect</property><property name="proxyfactory.factory_class">NHibernate.ByteCode.Castle.ProxyFactoryFactory, NHibernate.ByteCode.Castle</property><property name="hbm2ddl.keywords">none</property><property name="show_sql">true</property><!-- Bei true wird das SQL im Output Window angezeigt --><property name="format_sql">true</property><mapping assembly="BeWo.Data" /></session-factory></hibernate-configuration></configuration>
|
||||
1
Host/Multitenancy/2021040604.config
Normal file
1
Host/Multitenancy/2021040604.config
Normal file
@@ -0,0 +1 @@
|
||||
<?xml version="1.0"?><configuration><configSections><section name="hibernate-configuration" type="NHibernate.Cfg.ConfigurationSectionHandler, NHibernate" /></configSections><hibernate-configuration xmlns="urn:nhibernate-configuration-2.2"><session-factory><property name="connection.provider">NHibernate.Connection.DriverConnectionProvider</property><property name="connection.driver_class">NHibernate.Driver.MySqlDataDriver</property><property name="connection.connection_string">Server=localhost;Password=root;User ID=root; Initial Catalog=2021040604</property><property name="dialect">NHibernate.Dialect.MySQLDialect</property><property name="proxyfactory.factory_class">NHibernate.ByteCode.Castle.ProxyFactoryFactory, NHibernate.ByteCode.Castle</property><property name="hbm2ddl.keywords">none</property><property name="show_sql">true</property><!-- Bei true wird das SQL im Output Window angezeigt --><property name="format_sql">true</property><mapping assembly="BeWo.Data" /></session-factory></hibernate-configuration></configuration>
|
||||
1
Host/Multitenancy/2021040605.config
Normal file
1
Host/Multitenancy/2021040605.config
Normal file
@@ -0,0 +1 @@
|
||||
<?xml version="1.0"?><configuration><configSections><section name="hibernate-configuration" type="NHibernate.Cfg.ConfigurationSectionHandler, NHibernate" /></configSections><hibernate-configuration xmlns="urn:nhibernate-configuration-2.2"><session-factory><property name="connection.provider">NHibernate.Connection.DriverConnectionProvider</property><property name="connection.driver_class">NHibernate.Driver.MySqlDataDriver</property><property name="connection.connection_string">Server=localhost;Password=root;User ID=root; Initial Catalog=2021040605</property><property name="dialect">NHibernate.Dialect.MySQLDialect</property><property name="proxyfactory.factory_class">NHibernate.ByteCode.Castle.ProxyFactoryFactory, NHibernate.ByteCode.Castle</property><property name="hbm2ddl.keywords">none</property><property name="show_sql">true</property><!-- Bei true wird das SQL im Output Window angezeigt --><property name="format_sql">true</property><mapping assembly="BeWo.Data" /></session-factory></hibernate-configuration></configuration>
|
||||
1
Host/Multitenancy/2021040606.config
Normal file
1
Host/Multitenancy/2021040606.config
Normal file
@@ -0,0 +1 @@
|
||||
<?xml version="1.0"?><configuration><configSections><section name="hibernate-configuration" type="NHibernate.Cfg.ConfigurationSectionHandler, NHibernate" /></configSections><hibernate-configuration xmlns="urn:nhibernate-configuration-2.2"><session-factory><property name="connection.provider">NHibernate.Connection.DriverConnectionProvider</property><property name="connection.driver_class">NHibernate.Driver.MySqlDataDriver</property><property name="connection.connection_string">Server=localhost;Password=root;User ID=root; Initial Catalog=2021040606</property><property name="dialect">NHibernate.Dialect.MySQLDialect</property><property name="proxyfactory.factory_class">NHibernate.ByteCode.Castle.ProxyFactoryFactory, NHibernate.ByteCode.Castle</property><property name="hbm2ddl.keywords">none</property><property name="show_sql">true</property><!-- Bei true wird das SQL im Output Window angezeigt --><property name="format_sql">true</property><mapping assembly="BeWo.Data" /></session-factory></hibernate-configuration></configuration>
|
||||
1
Host/Multitenancy/2021040607.config
Normal file
1
Host/Multitenancy/2021040607.config
Normal file
@@ -0,0 +1 @@
|
||||
<?xml version="1.0"?><configuration><configSections><section name="hibernate-configuration" type="NHibernate.Cfg.ConfigurationSectionHandler, NHibernate" /></configSections><hibernate-configuration xmlns="urn:nhibernate-configuration-2.2"><session-factory><property name="connection.provider">NHibernate.Connection.DriverConnectionProvider</property><property name="connection.driver_class">NHibernate.Driver.MySqlDataDriver</property><property name="connection.connection_string">Server=localhost;Password=root;User ID=root; Initial Catalog=2021040607</property><property name="dialect">NHibernate.Dialect.MySQLDialect</property><property name="proxyfactory.factory_class">NHibernate.ByteCode.Castle.ProxyFactoryFactory, NHibernate.ByteCode.Castle</property><property name="hbm2ddl.keywords">none</property><property name="show_sql">true</property><!-- Bei true wird das SQL im Output Window angezeigt --><property name="format_sql">true</property><mapping assembly="BeWo.Data" /></session-factory></hibernate-configuration></configuration>
|
||||
1
Host/Multitenancy/2021040608.config
Normal file
1
Host/Multitenancy/2021040608.config
Normal file
@@ -0,0 +1 @@
|
||||
<?xml version="1.0"?><configuration><configSections><section name="hibernate-configuration" type="NHibernate.Cfg.ConfigurationSectionHandler, NHibernate" /></configSections><hibernate-configuration xmlns="urn:nhibernate-configuration-2.2"><session-factory><property name="connection.provider">NHibernate.Connection.DriverConnectionProvider</property><property name="connection.driver_class">NHibernate.Driver.MySqlDataDriver</property><property name="connection.connection_string">Server=localhost;Password=root;User ID=root; Initial Catalog=2021040608</property><property name="dialect">NHibernate.Dialect.MySQLDialect</property><property name="proxyfactory.factory_class">NHibernate.ByteCode.Castle.ProxyFactoryFactory, NHibernate.ByteCode.Castle</property><property name="hbm2ddl.keywords">none</property><property name="show_sql">true</property><!-- Bei true wird das SQL im Output Window angezeigt --><property name="format_sql">true</property><mapping assembly="BeWo.Data" /></session-factory></hibernate-configuration></configuration>
|
||||
1
Host/Multitenancy/2021040609.config
Normal file
1
Host/Multitenancy/2021040609.config
Normal file
@@ -0,0 +1 @@
|
||||
<?xml version="1.0"?><configuration><configSections><section name="hibernate-configuration" type="NHibernate.Cfg.ConfigurationSectionHandler, NHibernate" /></configSections><hibernate-configuration xmlns="urn:nhibernate-configuration-2.2"><session-factory><property name="connection.provider">NHibernate.Connection.DriverConnectionProvider</property><property name="connection.driver_class">NHibernate.Driver.MySqlDataDriver</property><property name="connection.connection_string">Server=localhost;Password=root;User ID=root; Initial Catalog=2021040609</property><property name="dialect">NHibernate.Dialect.MySQLDialect</property><property name="proxyfactory.factory_class">NHibernate.ByteCode.Castle.ProxyFactoryFactory, NHibernate.ByteCode.Castle</property><property name="hbm2ddl.keywords">none</property><property name="show_sql">true</property><!-- Bei true wird das SQL im Output Window angezeigt --><property name="format_sql">true</property><mapping assembly="BeWo.Data" /></session-factory></hibernate-configuration></configuration>
|
||||
30
Host/Multitenancy/4206942069.config
Normal file
30
Host/Multitenancy/4206942069.config
Normal file
@@ -0,0 +1,30 @@
|
||||
<?xml version="1.0"?>
|
||||
<configuration>
|
||||
<configSections>
|
||||
<section name="hibernate-configuration" type="NHibernate.Cfg.ConfigurationSectionHandler, NHibernate" />
|
||||
</configSections>
|
||||
<hibernate-configuration xmlns="urn:nhibernate-configuration-2.2">
|
||||
<session-factory>
|
||||
<property name="connection.provider">
|
||||
NHibernate.Connection.DriverConnectionProvider
|
||||
</property>
|
||||
<property name="connection.driver_class">
|
||||
NHibernate.Driver.MySqlDataDriver
|
||||
</property>
|
||||
<property name="connection.connection_string">
|
||||
Server=localhost;Password=root;User ID=root; Initial Catalog=4206942069
|
||||
</property>
|
||||
<property name="dialect">
|
||||
NHibernate.Dialect.MySQLDialect
|
||||
</property>
|
||||
<property name="proxyfactory.factory_class">
|
||||
NHibernate.ByteCode.Castle.ProxyFactoryFactory, NHibernate.ByteCode.Castle
|
||||
</property>
|
||||
<property name="hbm2ddl.keywords">none</property>
|
||||
<property name="show_sql">true</property>
|
||||
<!-- Bei true wird das SQL im Output Window angezeigt -->
|
||||
<property name="format_sql">true</property>
|
||||
<mapping assembly="BeWo.Data" />
|
||||
</session-factory>
|
||||
</hibernate-configuration>
|
||||
</configuration>
|
||||
29
Host/Multitenancy/6969696969.config
Normal file
29
Host/Multitenancy/6969696969.config
Normal file
@@ -0,0 +1,29 @@
|
||||
<?xml version="1.0"?>
|
||||
<configuration>
|
||||
<configSections>
|
||||
<section name="hibernate-configuration" type="NHibernate.Cfg.ConfigurationSectionHandler, NHibernate" />
|
||||
</configSections>
|
||||
<hibernate-configuration xmlns="urn:nhibernate-configuration-2.2">
|
||||
<session-factory>
|
||||
<property name="connection.provider">
|
||||
NHibernate.Connection.DriverConnectionProvider
|
||||
</property>
|
||||
<property name="connection.driver_class">
|
||||
NHibernate.Driver.MySqlDataDriver
|
||||
</property>
|
||||
<property name="connection.connection_string">
|
||||
Server=localhost;Password=root;User ID=root; Initial Catalog=6969696969
|
||||
</property>
|
||||
<property name="dialect">
|
||||
NHibernate.Dialect.MySQLDialect
|
||||
</property>
|
||||
<property name="proxyfactory.factory_class">
|
||||
NHibernate.ByteCode.Castle.ProxyFactoryFactory, NHibernate.ByteCode.Castle
|
||||
</property>
|
||||
<property name="hbm2ddl.keywords">none</property>
|
||||
<property name="show_sql">true</property> <!-- Bei true wird das SQL im Output Window angezeigt -->
|
||||
<property name="format_sql">true</property>
|
||||
<mapping assembly="BeWo.Data" />
|
||||
</session-factory>
|
||||
</hibernate-configuration>
|
||||
</configuration>
|
||||
@@ -471,7 +471,8 @@ namespace Host
|
||||
IList<long> c2sOids = null;
|
||||
long? eOid = null;
|
||||
long? tOid = null;
|
||||
int? exp = 0;
|
||||
long? catOid = null;
|
||||
int? exp = 0;
|
||||
int arc = 0;
|
||||
|
||||
if (Request.Params["c2slist"] != null)
|
||||
@@ -492,6 +493,11 @@ namespace Host
|
||||
{
|
||||
eOid = long.Parse(Request.Params["eOid"]);
|
||||
tOid = long.Parse(Request.Params["tOid"]);
|
||||
|
||||
if (Request.Params["catOid"] != null)
|
||||
{
|
||||
catOid = long.Parse(Request.Params["catOid"]);
|
||||
}
|
||||
exp = int.Parse(Request.Params["exp"]);
|
||||
arc = int.Parse(Request.Params["arc"]);
|
||||
|
||||
@@ -503,6 +509,10 @@ namespace Host
|
||||
{
|
||||
tOid = null;
|
||||
}
|
||||
if (catOid == 0)
|
||||
{
|
||||
catOid = null;
|
||||
}
|
||||
if (exp == 0)
|
||||
{
|
||||
exp = null;
|
||||
|
||||
@@ -1,5 +1,28 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="ClrHeapAllocationAnalyzer" version="3.0.0" targetFramework="net472" />
|
||||
<package id="jQuery" version="1.6.4" targetFramework="net40" />
|
||||
<package id="jquery.mobile" version="1.3.0" targetFramework="net40" />
|
||||
<package id="Microsoft.CodeAnalysis" version="3.4.0" targetFramework="net472" />
|
||||
<package id="Microsoft.CodeAnalysis.Analyzers" version="2.9.6" targetFramework="net472" developmentDependency="true" />
|
||||
<package id="Microsoft.CodeAnalysis.Common" version="3.4.0" targetFramework="net472" />
|
||||
<package id="Microsoft.CodeAnalysis.CSharp" version="3.4.0" targetFramework="net472" />
|
||||
<package id="Microsoft.CodeAnalysis.CSharp.Workspaces" version="3.4.0" targetFramework="net472" />
|
||||
<package id="Microsoft.CodeAnalysis.VisualBasic" version="3.4.0" targetFramework="net472" />
|
||||
<package id="Microsoft.CodeAnalysis.VisualBasic.Workspaces" version="3.4.0" targetFramework="net472" />
|
||||
<package id="Microsoft.CodeAnalysis.Workspaces.Common" version="3.4.0" targetFramework="net472" />
|
||||
<package id="System.Buffers" version="4.4.0" targetFramework="net472" />
|
||||
<package id="System.Collections.Immutable" version="1.5.0" targetFramework="net472" />
|
||||
<package id="System.Composition" version="1.0.31" targetFramework="net472" />
|
||||
<package id="System.Composition.AttributedModel" version="1.0.31" targetFramework="net472" />
|
||||
<package id="System.Composition.Convention" version="1.0.31" targetFramework="net472" />
|
||||
<package id="System.Composition.Hosting" version="1.0.31" targetFramework="net472" />
|
||||
<package id="System.Composition.Runtime" version="1.0.31" targetFramework="net472" />
|
||||
<package id="System.Composition.TypedParts" version="1.0.31" targetFramework="net472" />
|
||||
<package id="System.Memory" version="4.5.3" targetFramework="net472" />
|
||||
<package id="System.Numerics.Vectors" version="4.4.0" targetFramework="net472" />
|
||||
<package id="System.Reflection.Metadata" version="1.6.0" targetFramework="net472" />
|
||||
<package id="System.Runtime.CompilerServices.Unsafe" version="4.5.2" targetFramework="net472" />
|
||||
<package id="System.Text.Encoding.CodePages" version="4.5.1" targetFramework="net472" />
|
||||
<package id="System.Threading.Tasks.Extensions" version="4.5.3" targetFramework="net472" />
|
||||
</packages>
|
||||
2
Model/Changes_2021_05_14_EmploymentType.txt
Normal file
2
Model/Changes_2021_05_14_EmploymentType.txt
Normal file
@@ -0,0 +1,2 @@
|
||||
ALTER TABLE `bewodemo`.`employmenttype`
|
||||
ADD COLUMN `Workdays` INT NULL DEFAULT NULL AFTER `Name`;
|
||||
2
Model/Changes_2021_05_20_EmploymentType.txt
Normal file
2
Model/Changes_2021_05_20_EmploymentType.txt
Normal file
@@ -0,0 +1,2 @@
|
||||
ALTER TABLE `bewodemo`.`employmenttype`
|
||||
CHANGE COLUMN `Workdays` `Urlaubstage` DECIMAL NULL DEFAULT NULL ;
|
||||
2
Model/Changes_2021_05_20_EmploymentType2.txt
Normal file
2
Model/Changes_2021_05_20_EmploymentType2.txt
Normal file
@@ -0,0 +1,2 @@
|
||||
ALTER TABLE `bewodemo`.`employmenttype`
|
||||
CHANGE COLUMN `Urlaubstage` `LeaveDays` DECIMAL(10,0) NULL DEFAULT NULL
|
||||
17
Model/Changes_2021_05_25_GeschenkterUrlaubstag.txt
Normal file
17
Model/Changes_2021_05_25_GeschenkterUrlaubstag.txt
Normal file
@@ -0,0 +1,17 @@
|
||||
CREATE TABLE `geschenkterUrlaubstag` (
|
||||
`Oid` bigint NOT NULL AUTO_INCREMENT,
|
||||
`Tid` int NOT NULL,
|
||||
`ObjectOid` bigint DEFAULT NULL,
|
||||
`ObjectTid` int DEFAULT NULL,
|
||||
`Notice` varchar(1024) DEFAULT NULL,
|
||||
`InsTs` datetime DEFAULT NULL,
|
||||
`InsUser` varchar(256) DEFAULT NULL,
|
||||
`Version` bigint DEFAULT NULL,
|
||||
`UdpUser` varchar(256) DEFAULT NULL,
|
||||
`IsActive` tinyint DEFAULT NULL,
|
||||
`SystemEntryID` int DEFAULT NULL,
|
||||
`Employee` bigint DEFAULT NULL,
|
||||
`Date` datetime DEFAULT NULL,
|
||||
`AnzahlTage` tinyint DEFAULT NULL,
|
||||
PRIMARY KEY (`Oid`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
|
||||
19
Model/Changes_2021_05_25_GeschenkterUrlaubstag2.txt
Normal file
19
Model/Changes_2021_05_25_GeschenkterUrlaubstag2.txt
Normal file
@@ -0,0 +1,19 @@
|
||||
CREATE TABLE `geschenkterUrlaubstag` (
|
||||
`Oid` bigint NOT NULL AUTO_INCREMENT,
|
||||
`Tid` int NOT NULL,
|
||||
`ObjectOid` bigint DEFAULT NULL,
|
||||
`ObjectTid` int DEFAULT NULL,
|
||||
`Notice` varchar(1024) DEFAULT NULL,
|
||||
`InsTs` datetime DEFAULT NULL,
|
||||
`InsUser` varchar(256) DEFAULT NULL,
|
||||
`Version` bigint DEFAULT NULL,
|
||||
`UdpUser` varchar(256) DEFAULT NULL,
|
||||
`IsActive` tinyint DEFAULT NULL,
|
||||
`SystemEntryID` int DEFAULT NULL,
|
||||
`Employee` bigint DEFAULT NULL,
|
||||
`Date` datetime DEFAULT NULL,
|
||||
`AnzahlTage` DECIMAL DEFAULT NULL,
|
||||
PRIMARY KEY (`Oid`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
|
||||
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
INSERT INTO query(tid, type, title, notice, insts, version, isactive, reporttypename)
|
||||
VALUES
|
||||
(24, 0, 'Stundenübersicht Mitarbeiter', 'direct', NOW(), 1, 1, 'FLSAuswertung'),
|
||||
(24, 0, 'Stundenübersicht Team', 'direct', NOW(), 1, 1, 'FLSAuswertung')
|
||||
;
|
||||
|
||||
INSERT INTO parameter(queryoid, tid, name, type) VALUES
|
||||
(x, 25, 'Mitarbeiter', 1), #mitarbeiter
|
||||
(x, 25, 'Von_Bis', 5), #mitarbeiter
|
||||
(y, 25, 'Team', 6), #team
|
||||
(y, 25, 'Von_Bis', 5) #team
|
||||
;
|
||||
|
||||
INSERT INTO parameter(queryoid, tid, name, type) VALUES
|
||||
(x, 25, 'Intervall', 100), #mitarbeiter
|
||||
(y, 25, 'Intervall', 100) #team
|
||||
;
|
||||
@@ -1,5 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="..\packages\Microsoft.CodeAnalysis.Analyzers.2.9.6\build\Microsoft.CodeAnalysis.Analyzers.props" Condition="Exists('..\packages\Microsoft.CodeAnalysis.Analyzers.2.9.6\build\Microsoft.CodeAnalysis.Analyzers.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
@@ -32,6 +33,8 @@
|
||||
<UseApplicationTrust>false</UseApplicationTrust>
|
||||
<BootstrapperEnabled>true</BootstrapperEnabled>
|
||||
<TargetFrameworkProfile />
|
||||
<NuGetPackageImportStamp>
|
||||
</NuGetPackageImportStamp>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
@@ -106,6 +109,24 @@
|
||||
<Reference Include="DevExpress.XtraScheduler.v17.1, Version=17.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
|
||||
<Reference Include="DevExpress.XtraScheduler.v17.1.Core, Version=17.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
|
||||
<Reference Include="DevExpress.XtraScheduler.v17.1.Reporting, Version=17.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
|
||||
<Reference Include="Microsoft.CodeAnalysis, Version=3.4.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.CodeAnalysis.Common.3.4.0\lib\netstandard2.0\Microsoft.CodeAnalysis.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.CodeAnalysis.CSharp, Version=3.4.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.CodeAnalysis.CSharp.3.4.0\lib\netstandard2.0\Microsoft.CodeAnalysis.CSharp.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.CodeAnalysis.CSharp.Workspaces, Version=3.4.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.CodeAnalysis.CSharp.Workspaces.3.4.0\lib\netstandard2.0\Microsoft.CodeAnalysis.CSharp.Workspaces.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.CodeAnalysis.VisualBasic, Version=3.4.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.CodeAnalysis.VisualBasic.3.4.0\lib\netstandard2.0\Microsoft.CodeAnalysis.VisualBasic.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.CodeAnalysis.VisualBasic.Workspaces, Version=3.4.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.CodeAnalysis.VisualBasic.Workspaces.3.4.0\lib\netstandard2.0\Microsoft.CodeAnalysis.VisualBasic.Workspaces.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.CodeAnalysis.Workspaces, Version=3.4.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.CodeAnalysis.Workspaces.Common.3.4.0\lib\netstandard2.0\Microsoft.CodeAnalysis.Workspaces.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.VisualBasic" />
|
||||
<Reference Include="Microsoft.VisualBasic.Compatibility" />
|
||||
<Reference Include="Microsoft.Web.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
@@ -122,6 +143,27 @@
|
||||
<EmbedInteropTypes>True</EmbedInteropTypes>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Buffers, Version=4.0.2.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Buffers.4.4.0\lib\netstandard2.0\System.Buffers.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Collections.Immutable, Version=1.2.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Collections.Immutable.1.5.0\lib\netstandard2.0\System.Collections.Immutable.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Composition.AttributedModel, Version=1.0.31.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Composition.AttributedModel.1.0.31\lib\portable-net45+win8+wp8+wpa81\System.Composition.AttributedModel.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Composition.Convention, Version=1.0.31.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Composition.Convention.1.0.31\lib\portable-net45+win8+wp8+wpa81\System.Composition.Convention.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Composition.Hosting, Version=1.0.31.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Composition.Hosting.1.0.31\lib\portable-net45+win8+wp8+wpa81\System.Composition.Hosting.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Composition.Runtime, Version=1.0.31.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Composition.Runtime.1.0.31\lib\portable-net45+win8+wp8+wpa81\System.Composition.Runtime.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Composition.TypedParts, Version=1.0.31.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Composition.TypedParts.1.0.31\lib\portable-net45+win8+wp8+wpa81\System.Composition.TypedParts.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Core">
|
||||
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
||||
</Reference>
|
||||
@@ -130,9 +172,28 @@
|
||||
<Reference Include="System.Design" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Drawing.Design" />
|
||||
<Reference Include="System.Memory, Version=4.0.1.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Memory.4.5.3\lib\netstandard2.0\System.Memory.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Numerics" />
|
||||
<Reference Include="System.Numerics.Vectors, Version=4.1.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Numerics.Vectors.4.4.0\lib\net46\System.Numerics.Vectors.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Reflection.Metadata, Version=1.4.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Reflection.Metadata.1.6.0\lib\netstandard2.0\System.Reflection.Metadata.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=4.0.4.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.4.5.2\lib\netstandard2.0\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Runtime.Serialization.Formatters.Soap" />
|
||||
<Reference Include="System.ServiceModel" />
|
||||
<Reference Include="System.ServiceProcess" />
|
||||
<Reference Include="System.Text.Encoding.CodePages, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Text.Encoding.CodePages.4.5.1\lib\net461\System.Text.Encoding.CodePages.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Threading.Tasks.Extensions, Version=4.2.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Threading.Tasks.Extensions.4.5.3\lib\netstandard2.0\System.Threading.Tasks.Extensions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml.Linq">
|
||||
@@ -438,6 +499,7 @@
|
||||
</Compile>
|
||||
<Compile Include="DefaultReportCreator.cs" />
|
||||
<Compile Include="ReportObjects\BudgetnachweisAnhangRO.cs" />
|
||||
<Compile Include="ReportObjects\FlsAuslastungsauswertungRO.cs" />
|
||||
<Compile Include="ReportObjects\RosterRO.cs" />
|
||||
<Compile Include="ReportObjects\AdditionalServiceBookingRO.cs" />
|
||||
<Compile Include="ReportObjects\AbsenceRO.cs" />
|
||||
@@ -665,6 +727,7 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="app.config" />
|
||||
<None Include="packages.config" />
|
||||
<None Include="Properties\DataSources\BeWo.Report.DefaultReports.KalenderMonatsformatReport.datasource" />
|
||||
<None Include="Properties\DataSources\BeWo.Report.ReportObjects.AdditionalServiceBookingRO.datasource" />
|
||||
<None Include="Properties\DataSources\BeWo.Report.ReportObjects.AssessmentSheetRO.datasource" />
|
||||
@@ -696,7 +759,17 @@
|
||||
<Install>true</Install>
|
||||
</BootstrapperPackage>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Analyzer Include="..\packages\Microsoft.CodeAnalysis.Analyzers.2.9.6\analyzers\dotnet\cs\Microsoft.CodeAnalysis.Analyzers.dll" />
|
||||
<Analyzer Include="..\packages\Microsoft.CodeAnalysis.Analyzers.2.9.6\analyzers\dotnet\cs\Microsoft.CodeAnalysis.CSharp.Analyzers.dll" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
<PropertyGroup>
|
||||
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
||||
</PropertyGroup>
|
||||
<Error Condition="!Exists('..\packages\Microsoft.CodeAnalysis.Analyzers.2.9.6\build\Microsoft.CodeAnalysis.Analyzers.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.CodeAnalysis.Analyzers.2.9.6\build\Microsoft.CodeAnalysis.Analyzers.props'))" />
|
||||
</Target>
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using BeWo.Data.Entities;
|
||||
using BS.Shared;
|
||||
@@ -10,11 +11,23 @@ namespace BeWo.Report.ReportObjects
|
||||
{
|
||||
public class FlsAuslastungsauswertungRO : AbstractBeWoReportObject<FlsAuslastungsauswertungRO>
|
||||
{
|
||||
public string Auswertungszeitraum { get; set; } = string.Empty;
|
||||
public FLSAuswertungstyp FlsAuswertungstyp { get; }
|
||||
|
||||
public string Auswertungszeitraum => $"{StartDate:dd.MM.yyyy} - {EndDate:dd.MM.yyyy}";
|
||||
|
||||
public Employee Employee { get; set; }
|
||||
|
||||
public string EmployeeName => Employee?.Person?.LastNameFirstName ?? string.Empty;
|
||||
public string EmployeeName
|
||||
{
|
||||
get
|
||||
{
|
||||
var name = Employee?.Person?.LastNameFirstName ?? string.Empty;
|
||||
|
||||
var weeklyFls = Employee?.LastContract?.WeeklyFLS == null ? string.Empty : $"({Employee.LastContract.WeeklyFLS.Value})";
|
||||
|
||||
return $"{name} {weeklyFls}";
|
||||
}
|
||||
}
|
||||
|
||||
public Team Team { get; set; }
|
||||
|
||||
@@ -22,7 +35,7 @@ namespace BeWo.Report.ReportObjects
|
||||
|
||||
public string TargetObjectDescription { get; }
|
||||
|
||||
public string TargetObjectName { get; }
|
||||
public string TargetObjectName { get; set; }
|
||||
|
||||
public List<Customer2Values> Customer2Values { get; set; } = new List<Customer2Values>();
|
||||
|
||||
@@ -30,28 +43,41 @@ namespace BeWo.Report.ReportObjects
|
||||
|
||||
public DateTime EndDate { get; set; }
|
||||
|
||||
public FlsAuslastungsauswertungRO(DateTime startDate, DateTime endDate)
|
||||
public FlsAuslastungsauswertungRO(DateTime startDate, DateTime endDate, FLSAuswertungstyp flsAuswertungstyp)
|
||||
{
|
||||
StartDate = startDate;
|
||||
EndDate = endDate;
|
||||
StartDate = startDate;
|
||||
EndDate = endDate;
|
||||
FlsAuswertungstyp = flsAuswertungstyp;
|
||||
}
|
||||
|
||||
public FlsAuslastungsauswertungRO(Employee employee, DateTime startDate, DateTime endDate)
|
||||
public FlsAuslastungsauswertungRO(Employee employee, DateTime startDate, DateTime endDate, FLSAuswertungstyp flsAuswertungstyp)
|
||||
{
|
||||
Employee = employee;
|
||||
TargetObjectDescription = "Mitarbeiter";
|
||||
TargetObjectName = employee.Person.LastNameFirstName;
|
||||
StartDate = startDate;
|
||||
EndDate = endDate;
|
||||
FlsAuswertungstyp = flsAuswertungstyp;
|
||||
}
|
||||
|
||||
public FlsAuslastungsauswertungRO(Team team, DateTime startDate, DateTime endDate)
|
||||
public FlsAuslastungsauswertungRO(Team team, DateTime startDate, DateTime endDate, FLSAuswertungstyp flsAuswertungstyp)
|
||||
{
|
||||
Team = team;
|
||||
TargetObjectDescription = "Team";
|
||||
TargetObjectName = team.Name;
|
||||
StartDate = startDate;
|
||||
EndDate = endDate;
|
||||
FlsAuswertungstyp = flsAuswertungstyp;
|
||||
}
|
||||
|
||||
public void UpdateTargetObjectName()
|
||||
{
|
||||
if(Employee != null)
|
||||
{
|
||||
TargetObjectName = $"{Employee.Person.LastNameFirstName}({GetVertraglicheArbeitszeit():0.00}) Mehr/Minderarbeit: {GetMehrMinderauslastung():0.00}";
|
||||
}
|
||||
else if(Team != null)
|
||||
{
|
||||
TargetObjectName = $"{Team.Name} Mehr/Minderarbeit: {GetMehrMinderauslastung():0.00}";
|
||||
}
|
||||
}
|
||||
|
||||
public Customer2Values GetCustomer2ValuesByCustomer(Customer customer)
|
||||
@@ -61,19 +87,94 @@ namespace BeWo.Report.ReportObjects
|
||||
|
||||
public int GetMonthCount()
|
||||
{
|
||||
return StartDate.GetMonthCount(EndDate); ;
|
||||
return StartDate.GetMonthCount(EndDate);
|
||||
}
|
||||
|
||||
public int GetWeekCount()
|
||||
{
|
||||
return StartDate.GetWeekOfYearCount(EndDate);
|
||||
}
|
||||
|
||||
public int GetStartWeekOfYear()
|
||||
{
|
||||
return StartDate.GetIso8601WeekOfYear();
|
||||
}
|
||||
|
||||
public decimal GetMehrMinderauslastung()
|
||||
{
|
||||
decimal mehrMinderauslastung = 0;
|
||||
|
||||
foreach(var customer2Value in Customer2Values)
|
||||
{
|
||||
mehrMinderauslastung += customer2Value.SollSum + customer2Value.IstSum;
|
||||
}
|
||||
|
||||
return mehrMinderauslastung;
|
||||
}
|
||||
|
||||
public decimal GetVertraglicheArbeitszeit()
|
||||
{
|
||||
if(Employee != null)
|
||||
{
|
||||
var lastContract = Employee.LastContract;
|
||||
|
||||
if(lastContract?.WeeklyFLS != null)
|
||||
{
|
||||
return lastContract.WeeklyFLS.Value;
|
||||
}
|
||||
}
|
||||
|
||||
return 0M;
|
||||
}
|
||||
|
||||
public Customer2Values this[long index]
|
||||
{
|
||||
get
|
||||
{
|
||||
if(Customer2Values == null)
|
||||
{
|
||||
Customer2Values = new List<Customer2Values>();
|
||||
}
|
||||
|
||||
return Customer2Values.FirstOrDefault(f => { return f.Customer?.Oid == index; });
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public decimal DiffSum
|
||||
{
|
||||
get
|
||||
{
|
||||
return Customer2Values.Sum(c2V => { return c2V.DiffSum; });
|
||||
}
|
||||
}
|
||||
|
||||
public decimal SollSum
|
||||
{
|
||||
get
|
||||
{
|
||||
return Customer2Values.Sum(c2V => { return c2V.SollSum; });
|
||||
}
|
||||
}
|
||||
|
||||
public string DiffSumInPercent
|
||||
{
|
||||
get
|
||||
{
|
||||
var dsip = SollSum == 0 ? 0M : DiffSum / SollSum * 100;
|
||||
|
||||
return string.Format(new CultureInfo("de-DE"), "{0:0.00}%", dsip);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class Customer2Values
|
||||
{
|
||||
private readonly FLSAuswertungstyp _FlsAuswertungstyp;
|
||||
|
||||
public readonly Guid Id;
|
||||
|
||||
public string CustomerName => Customer?.Person?.LastNameFirstName;
|
||||
public Customer Customer { get; set; }
|
||||
|
||||
public FlsValueObject Day1 { get; set; }
|
||||
@@ -113,6 +214,7 @@ namespace BeWo.Report.ReportObjects
|
||||
public FlsValueObject Week3 { get; set; }
|
||||
public FlsValueObject Week4 { get; set; }
|
||||
public FlsValueObject Week5 { get; set; }
|
||||
public FlsValueObject Week6 { get; set; }
|
||||
|
||||
|
||||
public FlsValueObject Month1 { get; set; }
|
||||
@@ -130,58 +232,82 @@ namespace BeWo.Report.ReportObjects
|
||||
_FlsAuswertungstyp = flsAuswertungstyp;
|
||||
StartDate = startDate;
|
||||
EndDate = endDate;
|
||||
|
||||
Id = Guid.NewGuid();
|
||||
}
|
||||
|
||||
public decimal DifferenzGanzerAbrechnungszeitraum
|
||||
public Customer2Values()
|
||||
{
|
||||
get
|
||||
Id = Guid.NewGuid();
|
||||
}
|
||||
|
||||
public void CalcDifferences()
|
||||
{
|
||||
int count;
|
||||
string prefix;
|
||||
var sollSum = 0M;
|
||||
var istSum = 0M;
|
||||
|
||||
switch(_FlsAuswertungstyp)
|
||||
{
|
||||
int count;
|
||||
string prefix;
|
||||
decimal soll = 0;
|
||||
decimal ist = 0;
|
||||
case FLSAuswertungstyp.Daily:
|
||||
count = 30;
|
||||
prefix = "Day";
|
||||
break;
|
||||
case FLSAuswertungstyp.Weekly:
|
||||
count = GetWeekCount();
|
||||
prefix = "Week";
|
||||
break;
|
||||
case FLSAuswertungstyp.Monthly:
|
||||
count = GetMonthCount();
|
||||
prefix = "Month";
|
||||
break;
|
||||
default:
|
||||
count = 30;
|
||||
prefix = "Day";
|
||||
break;
|
||||
}
|
||||
|
||||
switch(_FlsAuswertungstyp)
|
||||
for(var i = 1; i <= count; i++)
|
||||
{
|
||||
var propertyName = $"{prefix}{i}";
|
||||
var propertyInfo = GetType().GetProperty(propertyName);
|
||||
|
||||
if(propertyInfo != null)
|
||||
{
|
||||
case FLSAuswertungstyp.Daily:
|
||||
count = 30;
|
||||
prefix = "Day";
|
||||
break;
|
||||
case FLSAuswertungstyp.Weekly:
|
||||
count = GetWeekCount();
|
||||
prefix = "Week";
|
||||
break;
|
||||
case FLSAuswertungstyp.Monthly:
|
||||
count = GetMonthCount();
|
||||
prefix = "Month";
|
||||
break;
|
||||
default:
|
||||
count = 30;
|
||||
prefix = "Day";
|
||||
break;
|
||||
}
|
||||
var propertyValue = (FlsValueObject)propertyInfo.GetValue(this, null);
|
||||
|
||||
for(var i = 1; i <= count; i++)
|
||||
{
|
||||
var propertyName = $"{prefix}{i}";
|
||||
var propertyInfo = GetType().GetProperty(propertyName);
|
||||
|
||||
if(propertyInfo != null)
|
||||
if(propertyValue != null)
|
||||
{
|
||||
var propertyValue = (FlsValueObject)propertyInfo.GetValue(this, null);
|
||||
|
||||
if(propertyValue != null)
|
||||
{
|
||||
soll += propertyValue.Soll;
|
||||
ist += propertyValue.Ist;
|
||||
}
|
||||
sollSum += propertyValue.Soll;
|
||||
istSum += propertyValue.Ist;
|
||||
}
|
||||
}
|
||||
|
||||
return soll - ist;
|
||||
}
|
||||
|
||||
var diffSum = sollSum - istSum;
|
||||
|
||||
SollSum = sollSum;
|
||||
IstSum = istSum;
|
||||
DiffSum = diffSum;
|
||||
|
||||
DifferenzGanzerAbrechnungszeitraum = diffSum;
|
||||
AuslastungNachEnddatumKunde = sollSum > 0 ? diffSum / sollSum * 100 : 0M;
|
||||
DiffSumInPercent = AuslastungNachEnddatumKunde;
|
||||
}
|
||||
|
||||
public decimal SollSum { get; set; }
|
||||
public decimal IstSum { get; set; }
|
||||
public decimal DiffSum { get; set; }
|
||||
public decimal DiffSumInPercent { get; set; }
|
||||
|
||||
|
||||
public decimal DifferenzGanzerAbrechnungszeitraum { get; set; }
|
||||
|
||||
public decimal AuslastungNachEnddatumKunde { get; set; }
|
||||
|
||||
public decimal RestlicheFlsProWoche { get; set; }
|
||||
|
||||
public void AddOrUpdateDay(string propertyName, decimal soll, decimal ist, string timeUnitString)
|
||||
{
|
||||
try
|
||||
@@ -226,7 +352,7 @@ namespace BeWo.Report.ReportObjects
|
||||
|
||||
public int GetMonthCount()
|
||||
{
|
||||
return StartDate.GetMonthCount(EndDate); ;
|
||||
return StartDate.GetMonthCount(EndDate);
|
||||
}
|
||||
|
||||
public int GetWeekCount()
|
||||
@@ -243,6 +369,11 @@ namespace BeWo.Report.ReportObjects
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return Id.GetHashCode();
|
||||
}
|
||||
}
|
||||
|
||||
public class FlsValueObject
|
||||
@@ -257,9 +388,9 @@ namespace BeWo.Report.ReportObjects
|
||||
|
||||
public FlsValueObject(decimal soll, decimal ist, string timeUnit)
|
||||
{
|
||||
Soll = soll;
|
||||
Ist = ist;
|
||||
TimeUnit = timeUnit;
|
||||
Soll = soll;
|
||||
Ist = ist;
|
||||
TimeUnit = timeUnit;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<runtime>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Castle.Core" publicKeyToken="407dd0808d44fbdc" culture="neutral"/>
|
||||
<bindingRedirect oldVersion="0.0.0.0-2.5.1.0" newVersion="2.5.1.0"/>
|
||||
<assemblyIdentity name="Castle.Core" publicKeyToken="407dd0808d44fbdc" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-2.5.1.0" newVersion="2.5.1.0" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2"/></startup></configuration>
|
||||
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" /></startup></configuration>
|
||||
|
||||
@@ -120,6 +120,9 @@
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="app.config" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
|
||||
11
ReportImp/ABCBetreuungenReports/app.config
Normal file
11
ReportImp/ABCBetreuungenReports/app.config
Normal file
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<runtime>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Castle.Core" publicKeyToken="407dd0808d44fbdc" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-2.5.1.0" newVersion="2.5.1.0" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
</configuration>
|
||||
@@ -104,6 +104,9 @@
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="app.config" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
|
||||
11
ReportImp/ABWElsebrock/app.config
Normal file
11
ReportImp/ABWElsebrock/app.config
Normal file
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<runtime>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Castle.Core" publicKeyToken="407dd0808d44fbdc" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-2.5.1.0" newVersion="2.5.1.0" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
</configuration>
|
||||
@@ -107,6 +107,9 @@
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="app.config" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
|
||||
11
ReportImp/ASBBergischGladbachReports/app.config
Normal file
11
ReportImp/ASBBergischGladbachReports/app.config
Normal file
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<runtime>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Castle.Core" publicKeyToken="407dd0808d44fbdc" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-2.5.1.0" newVersion="2.5.1.0" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
</configuration>
|
||||
@@ -197,7 +197,9 @@
|
||||
<Name>Shared</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup />
|
||||
<ItemGroup>
|
||||
<None Include="app.config" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
|
||||
11
ReportImp/ASBHammReports/app.config
Normal file
11
ReportImp/ASBHammReports/app.config
Normal file
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<runtime>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Castle.Core" publicKeyToken="407dd0808d44fbdc" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-2.5.1.0" newVersion="2.5.1.0" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
</configuration>
|
||||
@@ -141,6 +141,9 @@
|
||||
<DependentUpon>SettlementReport.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="app.config" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
|
||||
11
ReportImp/AachenerVereinReports/app.config
Normal file
11
ReportImp/AachenerVereinReports/app.config
Normal file
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<runtime>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Castle.Core" publicKeyToken="407dd0808d44fbdc" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-2.5.1.0" newVersion="2.5.1.0" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
</configuration>
|
||||
@@ -77,5 +77,8 @@
|
||||
<Name>Shared</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="app.config" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
||||
11
ReportImp/AbwDziallasMuhrin/app.config
Normal file
11
ReportImp/AbwDziallasMuhrin/app.config
Normal file
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<runtime>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Castle.Core" publicKeyToken="407dd0808d44fbdc" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-2.5.1.0" newVersion="2.5.1.0" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
</configuration>
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user