diff --git a/.gitignore b/.gitignore
index a6b7b824a..642987cac 100644
--- a/.gitignore
+++ b/.gitignore
@@ -463,3 +463,5 @@
/ReportImp/BellaDonna/obj/Release
/ReportImp/PsychosozialeHilfenBochum/obj/Debug
/ReportImp/PsychosozialeHilfenBochum/obj/Release
+/ReportImp/DieBrueckeHilfeUndHalt/obj/Debug
+/ReportImp/DieBrueckeHilfeUndHalt/obj/Release
diff --git a/BeWo/BeWo.csproj b/BeWo/BeWo.csproj
index 9efcfa014..d29fd0693 100644
--- a/BeWo/BeWo.csproj
+++ b/BeWo/BeWo.csproj
@@ -39,16 +39,16 @@
false
true
false
- http://app.beyondsoft.de/sbdtest/
+ http://app.beyondsoft.de/dev/
de-DE
BeWoPlaner
beyondSoft GmbH
- 2.0.1.184
+ 2.0.1.186
true
publish.htm
false
true
- 185
+ 187
2.0.1.%2a
false
true
@@ -116,6 +116,9 @@
+
+
+
@@ -151,21 +154,12 @@
-
- ..\packages\System.Runtime.CompilerServices.Unsafe.4.5.2\lib\netstandard1.0\System.Runtime.CompilerServices.Unsafe.dll
-
3.0
3.0
-
- ..\packages\System.Threading.Tasks.Extensions.4.5.2\lib\portable-net45+win8+wp8+wpa81\System.Threading.Tasks.Extensions.dll
-
-
- ..\packages\System.ValueTuple.4.4.0\lib\netstandard1.0\System.ValueTuple.dll
-
@@ -278,6 +272,26 @@
Designer
MSBuild:Compile
+
+ MSBuild:Compile
+ Designer
+
+
+ MSBuild:Compile
+ Designer
+
+
+ MSBuild:Compile
+ Designer
+
+
+ MSBuild:Compile
+ Designer
+
+
+ MSBuild:Compile
+ Designer
+
MSBuild:Compile
Designer
@@ -318,7 +332,7 @@
MSBuild:Compile
Designer
-
+
MSBuild:Compile
Designer
@@ -334,6 +348,10 @@
MSBuild:Compile
Designer
+
+ MSBuild:Compile
+ Designer
+
MSBuild:Compile
Designer
@@ -826,7 +844,7 @@
-
+
@@ -916,6 +934,25 @@
+
+ DPCtrlEmployeeContractTooltip.xaml
+
+
+ DPCtrlEmployeeTooltip.xaml
+
+
+ DPCtrlDienstTooltip.xaml
+
+
+ MonthPicker.xaml
+
+
+ DienstplanerControl.xaml
+
+
+
+
+
GoalRatingControl.xaml
@@ -943,8 +980,8 @@
AbsenceTimesView.xaml
-
- Dienstplaner.xaml
+
+ DienstplanerView.xaml
AbwesenheitstabelleView.xaml
@@ -952,6 +989,9 @@
AbwesenheitsEditView.xaml
+
+ AbwesenheitsPrintControl.xaml
+
IcfImportControl.xaml
@@ -2348,372 +2388,372 @@
False
- Include
- True
+ Include
+ True
Assembly
False
- Include
- True
+ Include
+ True
Assembly
False
- Include
- True
+ Include
+ True
Assembly
False
- Include
- True
+ Include
+ True
Assembly
False
- Include
- True
+ Include
+ True
Assembly
False
- Include
- True
+ Include
+ True
Assembly
False
- Include
- True
+ Include
+ True
Assembly
False
- Include
- True
+ Include
+ True
Assembly
False
- Include
- True
+ Include
+ True
Assembly
False
- Include
- True
+ Include
+ True
Assembly
False
- Include
- True
+ Include
+ True
Assembly
False
- Include
- True
+ Include
+ True
Assembly
False
- Include
- True
+ Include
+ True
Assembly
False
- Include
- True
+ Include
+ True
Assembly
False
- Include
- True
+ Include
+ True
Assembly
False
- Include
- True
+ Include
+ True
Assembly
False
- Include
- True
+ Include
+ True
Assembly
False
- Include
- True
+ Include
+ True
Assembly
False
- Include
- True
+ Include
+ True
Assembly
False
- Include
- True
+ Include
+ True
Assembly
False
- Include
- True
+ Include
+ True
Assembly
False
- Include
- True
+ Include
+ True
Assembly
False
- Include
- True
+ Include
+ True
Assembly
False
- Include
- True
+ Include
+ True
Assembly
False
- Include
- True
+ Include
+ True
Assembly
False
- Include
- True
+ Include
+ True
Assembly
False
- Include
- True
+ Include
+ True
Assembly
False
- Include
- True
+ Include
+ True
Assembly
False
- Include
- True
+ Include
+ True
Assembly
False
- Include
- True
+ Include
+ True
Assembly
False
- Include
- True
+ Include
+ True
Assembly
False
- Include
- True
+ Include
+ True
Assembly
False
- Include
- True
+ Include
+ True
Assembly
False
- Include
- True
+ Include
+ True
Assembly
False
- Include
- True
+ Include
+ True
Assembly
False
- Include
- True
+ Include
+ True
Assembly
False
- Include
- True
+ Include
+ True
Assembly
@@ -2828,6 +2868,12 @@
+
+
+
+
+
+
diff --git a/BeWo/BeWo.csproj.user b/BeWo/BeWo.csproj.user
index f7752167d..e8b054f48 100644
--- a/BeWo/BeWo.csproj.user
+++ b/BeWo/BeWo.csproj.user
@@ -2,7 +2,7 @@
D:\Projects\beyondsoft\BeWoPlaner\Publish\|D:\Projects\beyondsoft\BeWoPlaner\PublishTest\|D:\Projects\beyondsoft\BeWoPlaner\PublishDev\|D:\Projects\beyondsoft\BeWoPlaner\Publish45\|C:\Projects\beyondsoft\BeWoPlaner\Publish\
- http://app.beyondsoft.de/sbdtest/|http://app.beyondsoft.de/dev/|http://app.beyondsoft.de/sbd/|http://app.beyondsoft.de/lha/|http://fortis-bewoplaner.fortis-ev.org.local/
+ http://app.beyondsoft.de/dev/|http://app.beyondsoft.de/sbdtest/|http://app.beyondsoft.de/sbd/|http://app.beyondsoft.de/lha/|http://fortis-bewoplaner.fortis-ev.org.local/
diff --git a/BeWo/BeWoApp.xaml.cs b/BeWo/BeWoApp.xaml.cs
index 93f2f45e2..3f601d337 100644
--- a/BeWo/BeWoApp.xaml.cs
+++ b/BeWo/BeWoApp.xaml.cs
@@ -44,7 +44,7 @@ namespace BeWo
public static MainControl MainControl;
- public static string Version = "Version 2.4.7 Test";
+ public static string Version = "Version 2.4.8 Test";
public static int RenderTier = 0;
@@ -731,8 +731,9 @@ namespace BeWo
Dispatcher.UnhandledException += (s, ex)
=>
{
- if (ex.Exception == null || String.IsNullOrEmpty(ex.Exception.Message) || !ex.Exception.ToString().Contains("DevExpress.Xpf.Bars.Customization.CustomizationControl.OnLoaded"))
- {
+ if (ex.Exception == null || String.IsNullOrEmpty(ex.Exception.Message) || !ex.Exception.ToString().Contains("DevExpress.Xpf.Bars.Customization.CustomizationControl.OnLoaded") || !ex.Exception.ToString().Contains("DevExpress.Xpf.Grid.Native.SelectionStrategyCellBase.IsCellSelected"))
+
+ {
ShowError(null, ex.Exception, true);
}
ex.Handled = true;
diff --git a/BeWo/Core/BeWoUtils.cs b/BeWo/Core/BeWoUtils.cs
index 3e770800a..90f7c997f 100644
--- a/BeWo/Core/BeWoUtils.cs
+++ b/BeWo/Core/BeWoUtils.cs
@@ -55,6 +55,7 @@ using DevExpress.XtraScheduler;
using RestSharp;
using Control = System.Windows.Controls.Control;
using Utils = BS.Shared.Core.Utils;
+using Brush = System.Windows.Media.Brush;
namespace BeWo.Core
{
@@ -2192,6 +2193,6 @@ namespace BeWo.Core
var storage = pAppointment.GetCustomFieldStorage();
return Utils.CheckSchedulerRights(storage.CustomerList, storage.ResourceList, storage.EmployeeList.ToList(), storage.Originator, pIsNew, pCheckType, BeWoApp.LoggedOnUser);
- }
+ }
}
}
diff --git a/BeWo/Core/Service/SupportConceptService.cs b/BeWo/Core/Service/SupportConceptService.cs
index 2dfff3c29..ed7fac0ea 100644
--- a/BeWo/Core/Service/SupportConceptService.cs
+++ b/BeWo/Core/Service/SupportConceptService.cs
@@ -26,6 +26,7 @@ namespace BeWo.Core.Service
{
var treeItem = new SupportConceptGoalDC
{
+ CheckRecursive = false,
GoalEntryDC = goalCat,
IsExpanded = allGoalsAndCategories.Count <= 30
};
@@ -57,15 +58,20 @@ namespace BeWo.Core.Service
}
}
- var zieleOhneKinder = goalCategoryDict.Values.Where(w => w.Children.Count == 0).ToList();
- foreach (var ziel in zieleOhneKinder)
- {
- CheckIfSelected(ziel, selectedGoals);
- }
+ //var zieleOhneKinder = goalCategoryDict.Values.Where(w => w.Children.Count == 0).ToList();
+ //foreach (var ziel in zieleOhneKinder)
+ //{
+ // CheckIfSelected(ziel, selectedGoals);
+ //}
+ var alleZiele = goalCategoryDict.Values.ToList();
+ foreach (var ziel in alleZiele)
+ {
+ CheckIfSelected(ziel, selectedGoals);
+ }
foreach (var goal in massnahmen)
{
- var kind = new SupportConceptGoalDC { GoalEntryDC = goal };
+ var kind = new SupportConceptGoalDC { GoalEntryDC = goal, CheckRecursive = false };
CheckIfSelected(kind, selectedGoals);
@@ -104,25 +110,25 @@ namespace BeWo.Core.Service
}
}
- goal.PropertyChanged += (s, e) =>
- {
- var selectedGoal = s as SupportConceptGoalDC;
- if (selectedGoal != null)
- {
- if (selectedGoal.IsChecked)
- {
- if (!selectedGoals.Contains(selectedGoal.GoalEntryDC))
- {
- selectedGoals.Add(selectedGoal.GoalEntryDC);
- }
+ //goal.PropertyChanged += (s, e) =>
+ //{
+ // var selectedGoal = s as SupportConceptGoalDC;
+ // if (selectedGoal != null)
+ // {
+ // if (selectedGoal.IsChecked)
+ // {
+ // if (!selectedGoals.Contains(selectedGoal.GoalEntryDC))
+ // {
+ // selectedGoals.Add(selectedGoal.GoalEntryDC);
+ // }
- }
- else
- {
- selectedGoals.Remove(selectedGoal.GoalEntryDC);
- }
- }
- };
+ // }
+ // else
+ // {
+ // selectedGoals.Remove(selectedGoal.GoalEntryDC);
+ // }
+ // }
+ //};
}
}
diff --git a/BeWo/Core/SupportConceptGoalTreeItem.cs b/BeWo/Core/SupportConceptGoalTreeItem.cs
index d42f70d27..cc6f0cdc2 100644
--- a/BeWo/Core/SupportConceptGoalTreeItem.cs
+++ b/BeWo/Core/SupportConceptGoalTreeItem.cs
@@ -20,10 +20,34 @@ namespace BeWo.Core
set => _GoalEntryVM = value;
}
+ //CB Das ist doch genau falsch herum?
public bool IsGoal => GoalEntryVM != null ?
GoalEntryVM.Type.Equals(ValueListEntryType.SupportConceptGoalType) || GoalEntryVM.Type.Equals(ValueListEntryType.SupportConceptIndividualGoalType) :
GoalEntryDC.Type.Equals(ValueListEntryType.SupportConceptGoalType) || GoalEntryDC.Type.Equals(ValueListEntryType.SupportConceptIndividualGoalType);
+ public bool IsMassnahme
+ {
+ get
+ {
+ bool ism = false;
+ if (GoalEntryVM != null)
+ {
+ ism = GoalEntryVM.Type.Equals(ValueListEntryType.SupportConceptGoalType) || GoalEntryVM.Type.Equals(ValueListEntryType.SupportConceptIndividualGoalType);
+ }
+ else if (GoalEntryDC != null)
+ {
+ ism = GoalEntryDC.Type.Equals(ValueListEntryType.SupportConceptGoalType) || GoalEntryDC.Type.Equals(ValueListEntryType.SupportConceptIndividualGoalType);
+ }
+
+ return ism;
+ }
+
+
+ }
+ //public bool IsGoal => GoalEntryVM != null ?
+ // GoalEntryVM.Type.Equals(ValueListEntryType.SupportConceptGoalType) || GoalEntryVM.Type.Equals(ValueListEntryType.SupportConceptIndividualGoalType) :
+ // GoalEntryDC.Type.Equals(ValueListEntryType.SupportConceptGoalType) || GoalEntryDC.Type.Equals(ValueListEntryType.SupportConceptIndividualGoalType);
+
public bool ShowNotice
diff --git a/BeWo/LoginControl.xaml.cs b/BeWo/LoginControl.xaml.cs
index 10ec5581f..171623dd5 100644
--- a/BeWo/LoginControl.xaml.cs
+++ b/BeWo/LoginControl.xaml.cs
@@ -997,7 +997,7 @@ namespace BeWo
BeWoApp.PasswortStrength = BeWoUtils.CheckPasswordSecurity(lPassword);
- ServiceFacade.DoUserServiceAsync(s2 => s2.LoadUserByLoginName(lUserName),
+ ServiceFacade.DoUserServiceAsync(s2 => s2.LoadUserByNameAndPassword(lUserName, lPassword),
r2 =>
{
BeWoApp.LoggedOnUser = r2;
diff --git a/BeWo/Ressources/Icons/massnahme.png b/BeWo/Ressources/Icons/massnahme.png
new file mode 100644
index 000000000..26fd4e390
Binary files /dev/null and b/BeWo/Ressources/Icons/massnahme.png differ
diff --git a/BeWo/Ressources/Icons/ziel.png b/BeWo/Ressources/Icons/ziel.png
new file mode 100644
index 000000000..c8db1f45e
Binary files /dev/null and b/BeWo/Ressources/Icons/ziel.png differ
diff --git a/BeWo/ServiceProxy/Generated.cs b/BeWo/ServiceProxy/Generated.cs
index 139824b9a..48af73cb6 100644
--- a/BeWo/ServiceProxy/Generated.cs
+++ b/BeWo/ServiceProxy/Generated.cs
@@ -1,10 +1,10 @@
//------------------------------------------------------------------------------
//
-// This code was generated by a tool.
-// Runtime Version:4.0.30319.42000
+// Dieser Code wurde von einem Tool generiert.
+// Laufzeitversion:4.0.30319.42000
//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
+// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
+// der Code erneut generiert wird.
//
//------------------------------------------------------------------------------
@@ -1527,7 +1527,12 @@ namespace BeWo.ServiceProxy
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Employee2SchedulerAppointmentDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.Dictionary>))]
- [System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List))]
+ [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Reports.AuslastungAnalysisRootDC))]
+ [System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List))]
+ [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Reports.AuslastungAnalysisEmployeeDC))]
+ [System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List))]
+ [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Reports.AuslastungAnalysisSupportConceptDC))]
+ [System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Tuple, System.Collections.Generic.List>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.FlexibleReportFilterDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.FlexibleReportResultDC))]
@@ -1542,11 +1547,14 @@ namespace BeWo.ServiceProxy
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.ReportTemplateDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.ReportTypes))]
- [System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List))]
- [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.DienstDC))]
+ [System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List))]
+ [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.DienstInfoDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.ConfirmationReceiptSignatureDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List))]
+ [System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List))]
+ [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.DienstBlockDC))]
+ [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.DienstEintragDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.BargeldkassenDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List))]
@@ -1632,6 +1640,8 @@ namespace BeWo.ServiceProxy
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.ServiceRecordValidationResult))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.UiElementType))]
+ [System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List>))]
+ [System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.Dictionary))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.Dictionary))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.Dictionary>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.Dictionary))]
@@ -1640,11 +1650,7 @@ namespace BeWo.ServiceProxy
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.Dictionary))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.Dictionary))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.Dictionary>))]
- [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Reports.AuslastungAnalysisRootDC))]
- [System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List))]
- [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Reports.AuslastungAnalysisEmployeeDC))]
- [System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List))]
- [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Reports.AuslastungAnalysisSupportConceptDC))]
+ [System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Reports.AccountingReportDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List))]
@@ -3255,6 +3261,10 @@ namespace BeWo.ServiceProxy
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IUserService/LoadUserByLoginNameBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
BS.Shared.DataContracts.UserDC LoadUserByLoginName(string pUserName);
+ [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IUserService/LoadUserByNameAndPassword", ReplyAction="http://tempuri.org/IUserService/LoadUserByNameAndPasswordResponse")]
+ [System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IUserService/LoadUserByNameAndPasswordBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
+ BS.Shared.DataContracts.UserDC LoadUserByNameAndPassword(string pUserName, string password);
+
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IUserService/LoadUserGroup", ReplyAction="http://tempuri.org/IUserService/LoadUserGroupResponse")]
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IUserService/LoadUserGroupBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
BS.Shared.DataContracts.UserGroupDC LoadUserGroup(long pOid);
@@ -3431,6 +3441,11 @@ namespace BeWo.ServiceProxy
return base.Channel.LoadUserByLoginName(pUserName);
}
+ public BS.Shared.DataContracts.UserDC LoadUserByNameAndPassword(string pUserName, string password)
+ {
+ return base.Channel.LoadUserByNameAndPassword(pUserName, password);
+ }
+
public BS.Shared.DataContracts.UserGroupDC LoadUserGroup(long pOid)
{
return base.Channel.LoadUserGroup(pOid);
@@ -3508,24 +3523,24 @@ namespace BeWo.ServiceProxy
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IStreamingService/UpdateBeWoFoldersBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
void UpdateBeWoFolders(System.Collections.Generic.List dcs);
- // CODEGEN: Generating message contract since the wrapper name (UploadPackage) of message UploadPackage does not match the default value (UploadDocument)
+ // CODEGEN: Der Nachrichtenvertrag wird generiert, da der Wrappername (UploadPackage) von Nachricht "UploadPackage" nicht mit dem Standardwert (UploadDocument) übereinstimmt.
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IStreamingService/UploadDocument", ReplyAction="http://tempuri.org/IStreamingService/UploadDocumentResponse")]
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IStreamingService/UploadDocumentBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
BeWo.ServiceProxy.UploadResult UploadDocument(BeWo.ServiceProxy.UploadPackage request);
- // CODEGEN: Generating message contract since the wrapper name (UpdatePackage) of message UpdatePackage does not match the default value (UpdateDocument)
+ // CODEGEN: Der Nachrichtenvertrag wird generiert, da der Wrappername (UpdatePackage) von Nachricht "UpdatePackage" nicht mit dem Standardwert (UpdateDocument) übereinstimmt.
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IStreamingService/UpdateDocument", ReplyAction="http://tempuri.org/IStreamingService/UpdateDocumentResponse")]
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IStreamingService/UpdateDocumentBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
BeWo.ServiceProxy.UploadResult UpdateDocument(BeWo.ServiceProxy.UpdatePackage request);
- // CODEGEN: Generating message contract since the wrapper name (UploadChatPackage) of message UploadChatPackage does not match the default value (CreateNewSpeziallStreamChatMessagesDC)
+ // CODEGEN: Der Nachrichtenvertrag wird generiert, da der Wrappername (UploadChatPackage) von Nachricht "UploadChatPackage" nicht mit dem Standardwert (CreateNewSpeziallStreamChatMessagesDC) übereinstimmt.
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IStreamingService/CreateNewSpeziallStreamChatMessagesDC", ReplyAction="http://tempuri.org/IStreamingService/CreateNewSpeziallStreamChatMessagesDCRespons" +
"e")]
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IStreamingService/CreateNewSpeziallStreamChatMessagesDCBeWoFau" +
"ltFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
BeWo.ServiceProxy.UploadChatResult CreateNewSpeziallStreamChatMessagesDC(BeWo.ServiceProxy.UploadChatPackage request);
- // CODEGEN: Generating message contract since the wrapper name (UploadPackage) of message UploadPackage does not match the default value (UploadImportFile)
+ // CODEGEN: Der Nachrichtenvertrag wird generiert, da der Wrappername (UploadPackage) von Nachricht "UploadPackage" nicht mit dem Standardwert (UploadImportFile) übereinstimmt.
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IStreamingService/UploadImportFile", ReplyAction="http://tempuri.org/IStreamingService/UploadImportFileResponse")]
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IStreamingService/UploadImportFileBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
BeWo.ServiceProxy.UploadImportFileResult UploadImportFile(BeWo.ServiceProxy.UploadPackage request);
@@ -4737,9 +4752,25 @@ namespace BeWo.ServiceProxy
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/GetReportTemplatesBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
System.Collections.Generic.List GetReportTemplates(string url);
- [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/GetAbsenceTimeDCsFilter", ReplyAction="http://tempuri.org/IOperationsService/GetAbsenceTimeDCsFilterResponse")]
- [System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/GetAbsenceTimeDCsFilterBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
- System.Collections.Generic.List GetAbsenceTimeDCsFilter(System.DateTime start, System.DateTime end);
+ [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/GetAbsenceTimeDCEmployee11", ReplyAction="http://tempuri.org/IOperationsService/GetAbsenceTimeDCEmployee11Response")]
+ [System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/GetAbsenceTimeDCEmployee11BeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
+ System.Tuple, System.Collections.Generic.List> GetAbsenceTimeDCEmployee11();
+
+ [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/GetAbsenceTimeDCEmployee21", ReplyAction="http://tempuri.org/IOperationsService/GetAbsenceTimeDCEmployee21Response")]
+ [System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/GetAbsenceTimeDCEmployee21BeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
+ System.Tuple, System.Collections.Generic.List> GetAbsenceTimeDCEmployee21(System.Collections.Generic.List absenceReasons, System.Collections.Generic.List employmentTypes);
+
+ [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/GetAbsenceTimeDCEmployee31", ReplyAction="http://tempuri.org/IOperationsService/GetAbsenceTimeDCEmployee31Response")]
+ [System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/GetAbsenceTimeDCEmployee31BeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
+ System.Tuple, System.Collections.Generic.List> GetAbsenceTimeDCEmployee31(System.DateTime start, System.DateTime end);
+
+ [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/GetAbsenceTimeDCEmployee41", ReplyAction="http://tempuri.org/IOperationsService/GetAbsenceTimeDCEmployee41Response")]
+ [System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/GetAbsenceTimeDCEmployee41BeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
+ System.Tuple, System.Collections.Generic.List> GetAbsenceTimeDCEmployee41(System.DateTime start, System.DateTime end, System.Collections.Generic.List absenceReasons, System.Collections.Generic.List employmentTypes);
+
+ [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/GetAbsenceTimeDCEmployee51", ReplyAction="http://tempuri.org/IOperationsService/GetAbsenceTimeDCEmployee51Response")]
+ [System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/GetAbsenceTimeDCEmployee51BeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
+ System.Tuple, System.Collections.Generic.List> GetAbsenceTimeDCEmployee51(System.DateTime start, System.DateTime end, System.Collections.Generic.List absenceReasonIDs, System.Collections.Generic.List employmentTypeIDs);
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/GetAllAbsenceReason", ReplyAction="http://tempuri.org/IOperationsService/GetAllAbsenceReasonResponse")]
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/GetAllAbsenceReasonBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
@@ -4765,20 +4796,16 @@ namespace BeWo.ServiceProxy
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/GetAllDienste", ReplyAction="http://tempuri.org/IOperationsService/GetAllDiensteResponse")]
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/GetAllDiensteBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
- System.Collections.Generic.List GetAllDienste();
+ System.Collections.Generic.List GetAllDienste();
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/InsertNewDienst", ReplyAction="http://tempuri.org/IOperationsService/InsertNewDienstResponse")]
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/InsertNewDienstBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
- void InsertNewDienst(System.Collections.Generic.List dienst);
+ void InsertNewDienst(System.Collections.Generic.List dienst);
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/DeactivateDienst", ReplyAction="http://tempuri.org/IOperationsService/DeactivateDienstResponse")]
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/DeactivateDienstBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
void DeactivateDienst(System.Collections.Generic.Dictionary pOid2Version);
- [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/UpdateDienst", ReplyAction="http://tempuri.org/IOperationsService/UpdateDienstResponse")]
- [System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/UpdateDienstBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
- void UpdateDienst(System.Collections.Generic.List dienste);
-
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/GetAllRatingTypes", ReplyAction="http://tempuri.org/IOperationsService/GetAllRatingTypesResponse")]
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/GetAllRatingTypesBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
System.Collections.Generic.List GetAllRatingTypes();
@@ -4833,11 +4860,37 @@ namespace BeWo.ServiceProxy
"cordBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
System.Collections.Generic.List GetConfirmationReceiptSignaturesByServiceRecord(long serviceRecordOid);
+
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/GetAllConnfirConfirmationReceiptSignatures", ReplyAction="http://tempuri.org/IOperationsService/GetAllConnfirConfirmationReceiptSignaturesR" +
"esponse")]
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/GetAllConnfirConfirmationReceiptSignaturesB" +
"eWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
System.Collections.Generic.List GetAllConnfirConfirmationReceiptSignatures();
+
+ [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/UpdateDienst", ReplyAction="http://tempuri.org/IOperationsService/UpdateDienstResponse")]
+ [System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/UpdateDienstBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
+ void UpdateDienst(System.Collections.Generic.List dienste);
+
+ [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/GetDienstEintraege", ReplyAction="http://tempuri.org/IOperationsService/GetDienstEintraegeResponse")]
+ [System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/GetDienstEintraegeBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
+ System.Collections.Generic.List GetDienstEintraege(long wOid, int year, int month);
+
+ [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/InsertNewDienstEintrag", ReplyAction="http://tempuri.org/IOperationsService/InsertNewDienstEintragResponse")]
+ [System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/InsertNewDienstEintragBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
+ void InsertNewDienstEintrag(BS.Shared.DataContracts.DienstEintragDC dienstEintrag);
+
+ [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/UpdateDienstEintrag", ReplyAction="http://tempuri.org/IOperationsService/UpdateDienstEintragResponse")]
+ [System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/UpdateDienstEintragBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
+ void UpdateDienstEintrag(BS.Shared.DataContracts.DienstEintragDC dienstEintrag);
+
+ [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/DeleteDienstEintrag", ReplyAction="http://tempuri.org/IOperationsService/DeleteDienstEintragResponse")]
+ [System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/DeleteDienstEintragBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
+ void DeleteDienstEintrag(long empId, long wohnId, int Zeile, System.DateTime date);
+
+ [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/GetAbsenceTimeVacationByWohnheim", ReplyAction="http://tempuri.org/IOperationsService/GetAbsenceTimeVacationByWohnheimResponse")]
+ [System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/GetAbsenceTimeVacationByWohnheimBeWoFaultFa" +
+ "ult", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
+ System.Collections.Generic.List GetAbsenceTimeVacationByWohnheim(long wohnId, int year, int month);
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/UpdateIsChatActiveCustomerAPPCodeDC", ReplyAction="http://tempuri.org/IOperationsService/UpdateIsChatActiveCustomerAPPCodeDCResponse" +
"")]
@@ -5784,9 +5837,29 @@ namespace BeWo.ServiceProxy
return base.Channel.GetReportTemplates(url);
}
- public System.Collections.Generic.List GetAbsenceTimeDCsFilter(System.DateTime start, System.DateTime end)
+ public System.Tuple, System.Collections.Generic.List> GetAbsenceTimeDCEmployee11()
{
- return base.Channel.GetAbsenceTimeDCsFilter(start, end);
+ return base.Channel.GetAbsenceTimeDCEmployee11();
+ }
+
+ public System.Tuple, System.Collections.Generic.List> GetAbsenceTimeDCEmployee21(System.Collections.Generic.List absenceReasons, System.Collections.Generic.List employmentTypes)
+ {
+ return base.Channel.GetAbsenceTimeDCEmployee21(absenceReasons, employmentTypes);
+ }
+
+ public System.Tuple, System.Collections.Generic.List> GetAbsenceTimeDCEmployee31(System.DateTime start, System.DateTime end)
+ {
+ return base.Channel.GetAbsenceTimeDCEmployee31(start, end);
+ }
+
+ public System.Tuple, System.Collections.Generic.List> GetAbsenceTimeDCEmployee41(System.DateTime start, System.DateTime end, System.Collections.Generic.List absenceReasons, System.Collections.Generic.List employmentTypes)
+ {
+ return base.Channel.GetAbsenceTimeDCEmployee41(start, end, absenceReasons, employmentTypes);
+ }
+
+ public System.Tuple, System.Collections.Generic.List> GetAbsenceTimeDCEmployee51(System.DateTime start, System.DateTime end, System.Collections.Generic.List absenceReasonIDs, System.Collections.Generic.List employmentTypeIDs)
+ {
+ return base.Channel.GetAbsenceTimeDCEmployee51(start, end, absenceReasonIDs, employmentTypeIDs);
}
public System.Collections.Generic.List GetAllAbsenceReason()
@@ -5814,12 +5887,12 @@ namespace BeWo.ServiceProxy
return base.Channel.GetSupportConceptCostBearerRelDCsByOids(supportConcept2CostbearerOids);
}
- public System.Collections.Generic.List GetAllDienste()
+ public System.Collections.Generic.List GetAllDienste()
{
return base.Channel.GetAllDienste();
}
- public void InsertNewDienst(System.Collections.Generic.List dienst)
+ public void InsertNewDienst(System.Collections.Generic.List dienst)
{
base.Channel.InsertNewDienst(dienst);
}
@@ -5829,11 +5902,6 @@ namespace BeWo.ServiceProxy
base.Channel.DeactivateDienst(pOid2Version);
}
- public void UpdateDienst(System.Collections.Generic.List dienste)
- {
- base.Channel.UpdateDienst(dienste);
- }
-
public System.Collections.Generic.List GetAllRatingTypes()
{
return base.Channel.GetAllRatingTypes();
@@ -5893,6 +5961,35 @@ namespace BeWo.ServiceProxy
{
return base.Channel.GetAllConnfirConfirmationReceiptSignatures();
}
+ public void UpdateDienst(System.Collections.Generic.List dienste)
+ {
+ base.Channel.UpdateDienst(dienste);
+ }
+
+ public System.Collections.Generic.List GetDienstEintraege(long wOid, int year, int month)
+ {
+ return base.Channel.GetDienstEintraege(wOid, year, month);
+ }
+
+ public void InsertNewDienstEintrag(BS.Shared.DataContracts.DienstEintragDC dienstEintrag)
+ {
+ base.Channel.InsertNewDienstEintrag(dienstEintrag);
+ }
+
+ public void UpdateDienstEintrag(BS.Shared.DataContracts.DienstEintragDC dienstEintrag)
+ {
+ base.Channel.UpdateDienstEintrag(dienstEintrag);
+ }
+
+ public void DeleteDienstEintrag(long empId, long wohnId, int Zeile, System.DateTime date)
+ {
+ base.Channel.DeleteDienstEintrag(empId, wohnId, Zeile, date);
+ }
+
+ public System.Collections.Generic.List GetAbsenceTimeVacationByWohnheim(long wohnId, int year, int month)
+ {
+ return base.Channel.GetAbsenceTimeVacationByWohnheim(wohnId, year, month);
+ }
public void UpdateIsChatActiveCustomerAPPCodeDC(long customerOid, int activeType)
{
diff --git a/BeWo/ServiceProxy/ServiceFacade.cs b/BeWo/ServiceProxy/ServiceFacade.cs
index 1364abe31..b3a5ef9f2 100644
--- a/BeWo/ServiceProxy/ServiceFacade.cs
+++ b/BeWo/ServiceProxy/ServiceFacade.cs
@@ -248,7 +248,21 @@ namespace BeWo.ServiceProxy
ShowErrorMessage(e);
}
}
-
+
+ public static T DoWohnheimServiceSync(Func pFunc)
+ {
+ try
+ {
+ return pFunc.Invoke(GetInstance());
+ }
+ catch (Exception e)
+ {
+ ShowErrorMessage(e);
+ }
+
+ return default(T);
+ }
+
public static void DoMailServiceAsync(Func pFunc, Action pCallBack)
{
DoAsync(pFunc, pCallBack, true);
diff --git a/BeWo/View/Controls/ComboBoxTreeViewControl.xaml.cs b/BeWo/View/Controls/ComboBoxTreeViewControl.xaml.cs
index aa1cb794d..52bc26e92 100644
--- a/BeWo/View/Controls/ComboBoxTreeViewControl.xaml.cs
+++ b/BeWo/View/Controls/ComboBoxTreeViewControl.xaml.cs
@@ -15,6 +15,22 @@ namespace BeWo.View.Controls
{
private SupportConceptGoalDC lastCheckedSupportConceptGoal;
+ public static readonly DependencyProperty ShowRatingPanelProperty = DependencyProperty.Register("ShowRatingPanel", typeof(bool), typeof(ComboBoxTreeViewControl), new FrameworkPropertyMetadata(false));
+
+ public bool ShowRatingPanel
+ {
+ get { return (bool)GetValue(ShowRatingPanelProperty); }
+ set { SetValue(ShowRatingPanelProperty, value); }
+ }
+
+ public static readonly DependencyProperty SelectOnlyLeafsProperty = DependencyProperty.Register("SelectOnlyLeafs", typeof(bool), typeof(ComboBoxTreeViewControl), new FrameworkPropertyMetadata(true));
+
+ public bool SelectOnlyLeafs
+ {
+ get { return (bool)GetValue(SelectOnlyLeafsProperty); }
+ set { SetValue(SelectOnlyLeafsProperty, value); }
+ }
+
public double ParentWindowHeight
{
get { return (double) GetValue(ParentWindowHeightProperty); }
@@ -124,6 +140,14 @@ namespace BeWo.View.Controls
}
else
{
+ if (!SelectOnlyLeafs)
+ {
+ GoalCount++;
+ if (item.IsChecked)
+ {
+ selectedGoals.Add(item.GoalEntryDC);
+ }
+ }
AddCheckedGoals(item.Children, selectedGoals);
}
}
@@ -195,6 +219,11 @@ namespace BeWo.View.Controls
private void SetPopUpVisible(bool visible)
{
+ if (!ShowRatingPanel)
+ {
+ return;
+ }
+
if (lastCheckedSupportConceptGoal == null)
{
return;
@@ -202,7 +231,7 @@ namespace BeWo.View.Controls
if (lastCheckedSupportConceptGoal.Children != null && lastCheckedSupportConceptGoal.Children.Count > 0)
{
- return;
+ //return;
}
RatingPopup.IsOpen = visible;
diff --git a/BeWo/View/Controls/DPCtrlDay.cs b/BeWo/View/Controls/DPCtrlDay.cs
new file mode 100644
index 000000000..5d0f556cd
--- /dev/null
+++ b/BeWo/View/Controls/DPCtrlDay.cs
@@ -0,0 +1,127 @@
+using BeWo.View.Detail.Report;
+using BS.Shared.DataContracts;
+using BS.Shared.Extensions;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Input;
+using System.Windows.Media;
+
+namespace BeWo.View.Controls
+{
+ public class DPCtrlDay : DienstplanerControl
+ {
+ public static readonly DependencyProperty DPCtrlDayInformationProperty = DependencyProperty.Register(
+ "DPCtrlDayInformation",
+ typeof(DPCtrlDayInformation),
+ typeof(DPCtrlDay),
+ new UIPropertyMetadata(
+ (s, e) =>
+ {
+ var info = (DPCtrlDayInformation)e.NewValue;
+ var c = (DPCtrlDay)s;
+
+ if (c != null && info != null)
+ {
+ var dc = info.DienstInfoDC;
+
+ var right = info.DayOfWeek == DayOfWeek.Sunday || info.IsLastColumn;
+ var bottom = info.IsLastRow;
+
+ c.Border = new Thickness(0, 0, Convert.ToDouble(right), Convert.ToDouble(bottom));
+
+ if (!info.IsInContractRange)
+ {
+ c.Background = Brushes.Gray;
+ c.Foreground = Brushes.Red;
+ c.Text = string.Empty;
+ c.ToolTip = "Kein gültiger Arbeitsvertrag";
+ }
+ else if (info.Reason != null)
+ {
+ c.Background = Brushes.White;
+ c.Foreground = Brushes.Red;
+ c.Text = $"{info.Reason.Description[0]}";
+ c.ToolTip = $"{info.Reason.Description}";
+ }
+ else if (dc != null)
+ {
+ var bg = string.IsNullOrEmpty(dc.Farbe) ? Brushes.White : (SolidColorBrush)new BrushConverter().ConvertFrom(dc.Farbe);
+ var grey = 0.2989 * bg.Color.R + 0.5870 * bg.Color.G + 0.1140 * bg.Color.B;
+
+ c.Background = bg;
+ c.Foreground = grey < 70 ? Brushes.White : Brushes.Black;
+ c.ToolTip = new DPCtrlDienstTooltip(dc);
+ }
+ else
+ {
+ c.Background = ((int)info.DayOfWeek % 6 == 0) ? new SolidColorBrush(ColorExtensions.FromHexString("EFEFEF")) : Brushes.White;
+ c.Text = string.Empty;
+ c.ToolTip = null;
+ }
+
+ if (dc != null)
+ {
+ c.Text = $"{dc.Kurz}";
+ }
+ }
+ }));
+
+ public DPCtrlDay()
+ {
+ InitializeComponent();
+ MouseDown += DienstplanerControl_MouseDown;
+ }
+
+ public new Brush Background
+ {
+ get => BorderLight.Background;
+ set => BorderLight.Background = value;
+ }
+
+ public Thickness Border
+ {
+ get => BorderBlack.BorderThickness;
+ set => BorderBlack.BorderThickness = value;
+ }
+
+ public DPCtrlDayInformation DPCtrlDayInformation
+ {
+ get { return (DPCtrlDayInformation)GetValue(DPCtrlDayInformationProperty); }
+
+ set { SetValue(DPCtrlDayInformationProperty, value); }
+ }
+
+ private void DienstplanerControl_MouseDown(object sender, MouseButtonEventArgs e)
+ {
+ DienstplanerView entryView = null;
+
+ DependencyObject parent = VisualTreeHelper.GetParent(this);
+
+ while (parent != null && entryView == null)
+ {
+ entryView = parent as DienstplanerView;
+ var fe = parent as FrameworkElement;
+ parent = fe != null ? VisualTreeHelper.GetParent(fe) : null;
+ }
+
+ if (entryView != null)
+ {
+ entryView.DienstplanerControl_MouseDown(sender, e);
+ }
+ }
+ }
+
+ public class DPCtrlDayInformation
+ {
+ public DienstInfoDC DienstInfoDC { get; set; }
+ public AbsenceReasonDC Reason { get; set; }
+ public bool IsInContractRange { get; set; }
+ public bool IsLastRow { get; set; }
+ public bool IsLastColumn { get; set; }
+ public DayOfWeek DayOfWeek { get; set; }
+ }
+}
diff --git a/BeWo/View/Controls/DPCtrlDienstTooltip.xaml b/BeWo/View/Controls/DPCtrlDienstTooltip.xaml
new file mode 100644
index 000000000..3a698ce85
--- /dev/null
+++ b/BeWo/View/Controls/DPCtrlDienstTooltip.xaml
@@ -0,0 +1,27 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/BeWo/View/Controls/DPCtrlDienstTooltip.xaml.cs b/BeWo/View/Controls/DPCtrlDienstTooltip.xaml.cs
new file mode 100644
index 000000000..e36eb5df5
--- /dev/null
+++ b/BeWo/View/Controls/DPCtrlDienstTooltip.xaml.cs
@@ -0,0 +1,29 @@
+using System;
+using System.Collections.Generic;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Input;
+using System.Windows.Media;
+using BeWo.View.Detail;
+using BeWo.View.Detail.Report;
+using BeWo.ViewModel;
+using BS.Shared.DataContracts;
+
+namespace BeWo.View.Controls
+{
+ ///
+ /// Interaction logic for DienstplanerControl.xaml
+ ///
+ public partial class DPCtrlDienstTooltip : UserControl
+ {
+ public DPCtrlDienstTooltip(DienstInfoDC dienst)
+ {
+ InitializeComponent();
+
+ TxtDienst.Text = $"{dienst.DienstName} ({dienst.Kurz})";
+ TxtEnde.Text = dienst.Ende.ToString("HH:mm");
+ TxtPausendauer.Text = dienst.Pause.ToString();
+ TxtStart.Text = dienst.Start.ToString("HH:mm");
+ }
+ }
+}
\ No newline at end of file
diff --git a/BeWo/View/Controls/DPCtrlEmployee.cs b/BeWo/View/Controls/DPCtrlEmployee.cs
new file mode 100644
index 000000000..4b7fa10e1
--- /dev/null
+++ b/BeWo/View/Controls/DPCtrlEmployee.cs
@@ -0,0 +1,127 @@
+using BS.Shared.DataContracts;
+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 DPCtrlEmployee : DienstplanerControl
+ {
+ public static readonly DependencyProperty EmployeeInformationProperty = DependencyProperty.Register(
+ "EmployeeInformation",
+ typeof(DPCtrlEmployeeInformation),
+ typeof(DPCtrlEmployee),
+ new UIPropertyMetadata(
+ (s, e) =>
+ {
+ var information = (DPCtrlEmployeeInformation)e.NewValue;
+ var ctrl = (DPCtrlEmployee)s;
+
+ if (ctrl != null)
+ {
+ if (information != null)
+ {
+ switch (information.Row)
+ {
+ case 0:
+ 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.Text = ctrl.DisplayMember;
+
+ ctrl.ToolTip = new DPCtrlEmployeeTooltip(information.Employee, information.Contracts);
+ }
+ else
+ {
+ ctrl.ToolTip = null;
+ }
+ }
+ }));
+
+
+
+ public DPCtrlEmployee()
+ {
+ InitializeComponent();
+ FontSize = 12;
+ txt.HorizontalAlignment = HorizontalAlignment.Left;
+ }
+
+ public DPCtrlEmployeeInformation EmployeeInformation
+ {
+ get { return (DPCtrlEmployeeInformation)GetValue(EmployeeInformationProperty); }
+
+ set { SetValue(EmployeeInformationProperty, value); }
+ }
+
+ public string DisplayMember
+ {
+ get
+ {
+ var sb = new StringBuilder();
+ switch (EmployeeInformation.Row)
+ {
+ case 0: return EmployeeInformation.Employee.LastNameFirstName;
+
+ case 1:
+
+ foreach (var contract in EmployeeInformation.Contracts)
+ {
+ sb.Append(contract.EmploymentType?.Name);
+ sb.Append('/');
+ }
+
+ sb.Remove(sb.Length - 1, 1);
+
+ return sb.ToString();
+
+ case 2:
+
+ foreach (var contract in EmployeeInformation.Contracts)
+ {
+ sb.Append('(');
+
+ if (contract.EntryDate.HasValue)
+ sb.Append(contract.EntryDate.Value.ToString("dd.MM"));
+ else
+ sb.Append("k.A.");
+
+ sb.Append('-');
+
+ if (contract.ContractEndDate.HasValue)
+ sb.Append(contract.ContractEndDate.Value.ToString("dd.MM"));
+ else
+ sb.Append("unbefr.");
+
+ sb.Append(')');
+
+ sb.Append('/');
+ }
+
+ sb.Remove(sb.Length - 1, 1);
+
+ return sb.ToString();
+ }
+
+ return null;
+ }
+ }
+ }
+
+ public class DPCtrlEmployeeInformation
+ {
+ public EmployeeDC Employee { get; set; }
+ public List Contracts { get; set; }
+ public int Row { get; set; }
+ }
+}
diff --git a/BeWo/View/Controls/DPCtrlEmployeeContractTooltip.xaml b/BeWo/View/Controls/DPCtrlEmployeeContractTooltip.xaml
new file mode 100644
index 000000000..8a650a43d
--- /dev/null
+++ b/BeWo/View/Controls/DPCtrlEmployeeContractTooltip.xaml
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/BeWo/View/Controls/DPCtrlEmployeeContractTooltip.xaml.cs b/BeWo/View/Controls/DPCtrlEmployeeContractTooltip.xaml.cs
new file mode 100644
index 000000000..f59e122cd
--- /dev/null
+++ b/BeWo/View/Controls/DPCtrlEmployeeContractTooltip.xaml.cs
@@ -0,0 +1,39 @@
+using System;
+using System.Collections.Generic;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Input;
+using System.Windows.Media;
+using BeWo.View.Detail;
+using BeWo.View.Detail.Report;
+using BeWo.ViewModel;
+using BS.Shared.DataContracts;
+
+namespace BeWo.View.Controls
+{
+ ///
+ /// Interaction logic for DienstplanerControl.xaml
+ ///
+ public partial class DPCtrlEmployeeContractTooltip : UserControl
+ {
+ public DPCtrlEmployeeContractTooltip(ContractDC contract)
+ {
+ InitializeComponent();
+
+ TxtEmploymentType.Text = contract.EmploymentType.Name;
+
+ if(contract.MonthlyTotalHours != null)
+ {
+ TxtArbeitszeit.Text = $"{contract.MonthlyTotalHours.Value} Std/Monat";
+ }
+ else if(contract.WeeklyTotalHours != null)
+ {
+ TxtArbeitszeit.Text = $"{contract.WeeklyTotalHours.Value} Std/Woche";
+ }
+ else
+ {
+ TxtArbeitszeit.Text = $"k.A.";
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/BeWo/View/Controls/DPCtrlEmployeeTooltip.xaml b/BeWo/View/Controls/DPCtrlEmployeeTooltip.xaml
new file mode 100644
index 000000000..e427c29a7
--- /dev/null
+++ b/BeWo/View/Controls/DPCtrlEmployeeTooltip.xaml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/BeWo/View/Controls/DPCtrlEmployeeTooltip.xaml.cs b/BeWo/View/Controls/DPCtrlEmployeeTooltip.xaml.cs
new file mode 100644
index 000000000..e4867f7fe
--- /dev/null
+++ b/BeWo/View/Controls/DPCtrlEmployeeTooltip.xaml.cs
@@ -0,0 +1,77 @@
+using System;
+using System.Collections.Generic;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Input;
+using System.Windows.Media;
+using BeWo.View.Detail;
+using BeWo.View.Detail.Report;
+using BeWo.ViewModel;
+using BS.Shared.DataContracts;
+
+namespace BeWo.View.Controls
+{
+ ///
+ /// Interaction logic for DienstplanerControl.xaml
+ ///
+ public partial class DPCtrlEmployeeTooltip : UserControl
+ {
+ public DPCtrlEmployeeTooltip(EmployeeDC employeeDC, List contractDCs)
+ {
+ InitializeComponent();
+
+ TxtMitarbeiter.Text = employeeDC.LastNameFirstName;
+
+ var separator = new Separator();
+
+ foreach (var contract in contractDCs)
+ {
+ var sep = new Separator();
+ var txtType1 = new TextBlock();
+ var txtType2 = new TextBlock();
+ var txtArbeit1 = new TextBlock();
+ var txtArbeit2 = new TextBlock();
+
+ txtType1.Text = "Beschäftigungsart:";
+ txtType2.Text = $"{contract.EmploymentType?.Name}";
+
+ txtArbeit1.Text = "Vereinbarte Regelarbeitszeit:";
+
+ if (contract.MonthlyTotalHours != null)
+ {
+ txtArbeit2.Text = $"{contract.MonthlyTotalHours.Value} Std/Monat";
+ }
+ else if (contract.WeeklyTotalHours != null)
+ {
+ txtArbeit2.Text = $"{contract.WeeklyTotalHours.Value} Std/Woche";
+ }
+ else
+ {
+ txtArbeit2.Text = $"k.A.";
+ }
+
+ RootGrid.RowDefinitions.Add(new RowDefinition { Height = GridLength.Auto });
+ RootGrid.Children.Add(sep);
+
+ Grid.SetRow(sep, RootGrid.RowDefinitions.Count - 1);
+ Grid.SetColumnSpan(sep, 3);
+
+ RootGrid.RowDefinitions.Add(new RowDefinition { Height = GridLength.Auto });
+ RootGrid.Children.Add(txtType1);
+ RootGrid.Children.Add(txtType2);
+
+ Grid.SetRow(txtType1, RootGrid.RowDefinitions.Count - 1);
+ Grid.SetRow(txtType2, RootGrid.RowDefinitions.Count - 1);
+ Grid.SetColumn(txtType2, 2);
+
+ RootGrid.RowDefinitions.Add(new RowDefinition { Height = GridLength.Auto });
+ RootGrid.Children.Add(txtArbeit1);
+ RootGrid.Children.Add(txtArbeit2);
+
+ Grid.SetRow(txtArbeit1, RootGrid.RowDefinitions.Count - 1);
+ Grid.SetRow(txtArbeit2, RootGrid.RowDefinitions.Count - 1);
+ Grid.SetColumn(txtArbeit2, 2);
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/BeWo/View/Controls/DPCtrlIcon.cs b/BeWo/View/Controls/DPCtrlIcon.cs
new file mode 100644
index 000000000..f34852b96
--- /dev/null
+++ b/BeWo/View/Controls/DPCtrlIcon.cs
@@ -0,0 +1,68 @@
+using BS.Shared.DataContracts;
+using BS.Shared.Extensions;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Media;
+
+namespace BeWo.View.Controls
+{
+ public class DPCtrlIcon : DienstplanerControl
+ {
+ public static readonly DependencyProperty DienstValueProperty = DependencyProperty.Register(
+ "DienstValue",
+ typeof(DienstInfoDC),
+ typeof(DienstplanerControl),
+ new UIPropertyMetadata(
+ (s, e) =>
+ {
+ var dc = (DienstInfoDC)e.NewValue;
+ var c = (DPCtrlIcon)s;
+
+ if (c != null)
+ {
+ if (dc != null)
+ {
+ // rgb2gray converts RGB values to grayscale values by forming a weighted sum of the R, G, and B components:
+ // 0.2989 * R + 0.5870 * G + 0.1140 * B
+
+ var color = ColorExtensions.FromHexStringDefault(dc.Farbe, Colors.Transparent);
+ var brush = new SolidColorBrush(color);
+
+ c.BorderBlack.Background = brush;
+ c.BorderBlack.ToolTip = dc.DienstName;
+ c.Foreground = color.IsBrighter(70) ? Brushes.Black : Brushes.White;
+ c.Text = dc.Kurz;
+ }
+ else
+ {
+ c.BorderBlack.ToolTip = string.Empty;
+ c.BorderBlack.Background = Brushes.White;
+ c.Foreground = Brushes.Black;
+ c.Text = string.Empty;
+ }
+ }
+ }));
+
+ public DPCtrlIcon()
+ {
+ InitializeComponent();
+
+ BorderBlack.BorderThickness = new Thickness(1);
+ BorderBlack.CornerRadius = new CornerRadius(4);
+ BorderBlack.Visibility = Visibility.Visible;
+ BorderLight.Visibility = Visibility.Hidden;
+ FontSize = 12;
+ }
+
+ public DienstInfoDC DienstValue
+ {
+ get { return (DienstInfoDC)GetValue(DienstValueProperty); }
+
+ set { SetValue(DienstValueProperty, value); }
+ }
+ }
+}
diff --git a/BeWo/View/Controls/DPCtrlWeek.cs b/BeWo/View/Controls/DPCtrlWeek.cs
new file mode 100644
index 000000000..ae13e7d54
--- /dev/null
+++ b/BeWo/View/Controls/DPCtrlWeek.cs
@@ -0,0 +1,66 @@
+using BS.Shared.DataContracts;
+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 DPCtrlWeek : DienstplanerControl
+ {
+ public static readonly DependencyProperty DienstInfoDCListProperty = DependencyProperty.Register(
+ "DienstInfoDCList",
+ typeof(List),
+ typeof(DPCtrlWeek),
+ new UIPropertyMetadata(
+ (s, e) =>
+ {
+ var dc = (List)e.NewValue;
+ var c = (DPCtrlWeek)s;
+
+ if (c != null)
+ {
+ if (dc != null)
+ {
+ dc.RemoveAll(x => x == null);
+
+ c.BorderBlack.BorderThickness = new Thickness(0, 0, 1, 1);
+
+ double res = 0.0;
+
+ if (dc.Count != 0)
+ foreach (var x in dc)
+ {
+ res += x.DurationHours;
+ }
+
+ c.Text = res.ToString("0.##");
+ }
+ else
+ {
+ c.BorderBlack.BorderThickness = new Thickness(0, 0, 1, 0);
+
+ c.Text = "";
+ }
+ }
+ }));
+
+ public DPCtrlWeek()
+ {
+ InitializeComponent();
+
+ BorderBlack.BorderThickness = new Thickness(0, 0, 1, 0);
+ txt.TextAlignment = TextAlignment.Left;
+ txt.HorizontalAlignment = HorizontalAlignment.Left;
+ }
+
+ public List DienstInfoDCList
+ {
+ get { return (List)GetValue(DienstInfoDCListProperty); }
+
+ set { SetValue(DienstInfoDCListProperty, value); }
+ }
+ }
+}
diff --git a/BeWo/View/Controls/DienstplanerControl.xaml b/BeWo/View/Controls/DienstplanerControl.xaml
new file mode 100644
index 000000000..1f5eb4614
--- /dev/null
+++ b/BeWo/View/Controls/DienstplanerControl.xaml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/BeWo/View/Controls/DienstplanerControl.xaml.cs b/BeWo/View/Controls/DienstplanerControl.xaml.cs
new file mode 100644
index 000000000..157f4b6a8
--- /dev/null
+++ b/BeWo/View/Controls/DienstplanerControl.xaml.cs
@@ -0,0 +1,50 @@
+using System;
+using System.Collections.Generic;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Input;
+using System.Windows.Media;
+using BeWo.View.Detail;
+using BeWo.View.Detail.Report;
+using BeWo.ViewModel;
+using BS.Shared.DataContracts;
+
+namespace BeWo.View.Controls
+{
+ ///
+ /// Interaction logic for DienstplanerControl.xaml
+ ///
+ public partial class DienstplanerControl : UserControl
+ {
+ public DienstplanerControl()
+ {
+ InitializeComponent();
+
+ ToolTipService.SetShowDuration(this, 60000);
+ }
+
+ public string Text
+ {
+ get => txt.Text;
+ set => txt.Text = value;
+ }
+
+ public new double FontSize
+ {
+ get => txt.FontSize;
+ set => txt.FontSize = value;
+ }
+
+ public Border BorderLight
+ {
+ get => boLight;
+ set => boLight = value;
+ }
+
+ public Border BorderBlack
+ {
+ get => bo;
+ set => bo = value;
+ }
+ }
+}
\ No newline at end of file
diff --git a/BeWo/View/Controls/MonthPicker.xaml b/BeWo/View/Controls/MonthPicker.xaml
new file mode 100644
index 000000000..90c956d05
--- /dev/null
+++ b/BeWo/View/Controls/MonthPicker.xaml
@@ -0,0 +1,8 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/BeWo/View/Controls/MonthPicker.xaml.cs b/BeWo/View/Controls/MonthPicker.xaml.cs
new file mode 100644
index 000000000..831edea2a
--- /dev/null
+++ b/BeWo/View/Controls/MonthPicker.xaml.cs
@@ -0,0 +1,39 @@
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.Linq;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Input;
+using System.Windows.Media;
+using BeWo.View.Detail;
+using BeWo.View.Detail.Report;
+using BeWo.ViewModel;
+using BS.Shared.DataContracts;
+
+namespace BeWo.View.Controls
+{
+ ///
+ /// Interaction logic for MonthPicker.xaml
+ ///
+ public partial class MonthPicker : UserControl
+ {
+ public MonthPicker()
+ {
+ InitializeComponent();
+ _MonthPicker.ItemsSource = DateTimeFormatInfo.CurrentInfo.MonthNames.Where(s => !string.IsNullOrEmpty(s));
+ _MonthPicker.SelectedIndex = 0;
+ }
+
+ public int SelectedMonth
+ {
+ get => _MonthPicker.SelectedIndex + 1;
+ set => _MonthPicker.SelectedIndex = value - 1;
+ }
+
+ public string SelectedMonthName
+ {
+ get => (string)_MonthPicker.SelectedItem;
+ }
+ }
+}
\ No newline at end of file
diff --git a/BeWo/View/Detail/DienstView.xaml.cs b/BeWo/View/Detail/DienstView.xaml.cs
index 083fa3ff1..afdcd2c3c 100644
--- a/BeWo/View/Detail/DienstView.xaml.cs
+++ b/BeWo/View/Detail/DienstView.xaml.cs
@@ -21,9 +21,9 @@ namespace BeWo.View.Detail
{
public partial class DienstView : BeWoView
{
- private DienstListVM _ViewModel;
+ private DienstInfoListVM _ViewModel;
- public DienstView(DienstListVM listVM)
+ public DienstView(DienstInfoListVM listVM)
{
InitializeComponent();
_FarbeComboBox.ItemTemplateSelector = new ComboBoxTemplateSelector(_FarbeComboBox);
@@ -40,7 +40,7 @@ namespace BeWo.View.Detail
get { return "Dienste"; }
}
- private DienstListVM ViewModel
+ private DienstInfoListVM ViewModel
{
get { return _ViewModel; }
@@ -62,7 +62,7 @@ namespace BeWo.View.Detail
if (ViewModel.RemovedCount > 0)
{
- lToDos.Add(s => s.DeactivateDienst(ViewModel.GetRemoved().ToDictionary(dc => dc.DienstOid.Value, dc => dc.DienstVersion.Value)));
+ lToDos.Add(s => s.DeactivateDienst(ViewModel.GetRemoved().ToDictionary(dc => dc.Oid.Value, dc => dc.Version.Value)));
}
if (ViewModel.ChangedCount > 0)
@@ -88,7 +88,7 @@ namespace BeWo.View.Detail
private void DeleteButton_Click(object sender, RoutedEventArgs e)
{
- ViewModel.VMList.Remove(_GridControl.GetCurrentValue());
+ ViewModel.VMList.Remove(_GridControl.GetCurrentValue());
BeWoWpfUtils.RefreshDXGrid(_GridControl);
}
@@ -117,7 +117,7 @@ namespace BeWo.View.Detail
{
int rowHandle = data.RowHandle.Value;
- var vm = _GridControl.GetRow(rowHandle) as DienstVM;
+ var vm = _GridControl.GetRow(rowHandle) as DienstInfoVM;
if (vm != null)
{
diff --git a/BeWo/View/Detail/Report/AbwesenheitsPrintControl.xaml b/BeWo/View/Detail/Report/AbwesenheitsPrintControl.xaml
new file mode 100644
index 000000000..7de2ce625
--- /dev/null
+++ b/BeWo/View/Detail/Report/AbwesenheitsPrintControl.xaml
@@ -0,0 +1,29 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/BeWo/View/Detail/Report/AbwesenheitsPrintControl.xaml.cs b/BeWo/View/Detail/Report/AbwesenheitsPrintControl.xaml.cs
new file mode 100644
index 000000000..371efc2b6
--- /dev/null
+++ b/BeWo/View/Detail/Report/AbwesenheitsPrintControl.xaml.cs
@@ -0,0 +1,57 @@
+using DevExpress.Xpf.Core;
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.Linq;
+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.Navigation;
+using System.Windows.Shapes;
+
+namespace BeWo.View.Detail.Report
+{
+ ///
+ /// Interaktionslogik für TestEMailControl.xaml
+ ///
+ public partial class AbwesenheitsPrintControl : UserControl
+ {
+ public event Action ButtonAcceptClicked;
+ public event Action ButtonCancelClicked;
+
+ public AbwesenheitsPrintControl(DateTime dt)
+ {
+ InitializeComponent();
+ ThemeManager.SetTheme(BeWoApp.CurrentBeWo.MainWindow, Theme.Office2010Black);
+
+ var years = new List();
+ for (int i = DateTime.Now.Year + 5; i >= 2010; i--)
+ {
+ years.Add(i);
+ }
+
+ ComboJahr.ItemsSource = years;
+ ComboJahr.SelectedItem = dt.Year;
+
+ ComboMonat.ItemsSource = DateTimeFormatInfo.CurrentInfo.MonthNames.Where(s => !string.IsNullOrEmpty(s));
+ ComboMonat.SelectedIndex = dt.Month - 1;
+ }
+
+ public DateTime SelectedDate => new DateTime((int)ComboJahr.SelectedItem, ComboMonat.SelectedIndex + 1, 1);
+
+ private void ButtonAccept_OnClick(object sender, RoutedEventArgs e)
+ {
+ ButtonAcceptClicked?.Invoke();
+ }
+
+ private void ButtonCancel_OnClick(object sender, RoutedEventArgs e)
+ {
+ ButtonCancelClicked?.Invoke();
+ }
+ }
+}
diff --git a/BeWo/View/Detail/Report/AbwesenheitstabelleView.xaml b/BeWo/View/Detail/Report/AbwesenheitstabelleView.xaml
index d76ff2916..255fac032 100644
--- a/BeWo/View/Detail/Report/AbwesenheitstabelleView.xaml
+++ b/BeWo/View/Detail/Report/AbwesenheitstabelleView.xaml
@@ -5,6 +5,7 @@
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
xmlns:dxsch="http://schemas.devexpress.com/winfx/2008/xaml/scheduler"
+ xmlns:dxb="http://schemas.devexpress.com/winfx/2008/xaml/bars"
xmlns:localView="clr-namespace:BeWo.View"
xmlns:uc="clr-namespace:BeWo.Controls;assembly=BeWo.Controls"
xmlns:dxschi="http://schemas.devexpress.com/winfx/2008/xaml/scheduler/internal"
@@ -13,166 +14,166 @@
Height="Auto" Width="Auto" HorizontalAlignment="Stretch"
VerticalAlignment="Stretch" Focusable="True">
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/BeWo/View/Detail/Report/AbwesenheitstabelleView.xaml.cs b/BeWo/View/Detail/Report/AbwesenheitstabelleView.xaml.cs
index f75089e2d..0fb41c9dc 100644
--- a/BeWo/View/Detail/Report/AbwesenheitstabelleView.xaml.cs
+++ b/BeWo/View/Detail/Report/AbwesenheitstabelleView.xaml.cs
@@ -33,6 +33,7 @@ using AppointmentStorage = DevExpress.Xpf.Scheduler.AppointmentStorage;
using IAppointmentLabelStorage = DevExpress.Xpf.Scheduler.AppointmentLabelCollection;
using BeWo.Scheduler.View;
using AppointmentLabel = DevExpress.Xpf.Scheduler.AppointmentLabel;
+using System.Windows.Navigation;
namespace BeWo.View.Detail.Report
{
@@ -52,57 +53,21 @@ namespace BeWo.View.Detail.Report
{
InitializeComponent();
- _SchedulerStorage = _SchedulerControl.Storage;
- _LabelStorage = _SchedulerControl.Storage.AppointmentStorage.Labels;
- _ResourceStorage = _SchedulerControl.Storage.ResourceStorage;
- _AppointmentStorage = _SchedulerControl.Storage.AppointmentStorage;
+ InitFilter();
+ InitDateStuff();
+ InitSchedulerStuff();
- _AppointmentStorage.CustomFieldMappings.Add(new SchedulerCustomFieldMapping("AbsenceTime", "AbsenceTime"));
- _SchedulerStorage.AppointmentsInserted += _SchedularStorage_AppointmentsInserted;
- _SchedulerStorage.AppointmentInserting += _SchedularStorage_AppointmentInserting;
- _SchedulerControl.TimelineView.VerticalResourceHeaderStyle = (Style)this.FindResource("VerticalResourceHeaderStyle");
-
- IMouseHandlerService oldMouseHandler = (IMouseHandlerService)_SchedulerControl.GetService(typeof(IMouseHandlerService));
-
- if (oldMouseHandler != null)
- {
- MouseHandlerService newMouseHandler =
- new MouseHandlerService(_SchedulerControl, oldMouseHandler);
- _SchedulerControl.RemoveService(typeof(IMouseHandlerService));
- _SchedulerControl.AddService(typeof(IMouseHandlerService), newMouseHandler);
- }
-
- var kategorien = ServiceFacade.DoOperationsServiceSync(x => x.GetAllAbsenceReason());
- foreach (var item in kategorien)
- {
- FilterAbwesenheit.Items.Add(item);
- }
-
- var arbeitsarten = ServiceFacade.DoEmployeeServiceSync(x => x.GetAllEmploymentTypes());
- foreach (var item in arbeitsarten)
- {
- FilterBeschaftigungsart.Items.Add(item);
- }
-
- var td = DateTime.Today;
- _DateTimePicker.DateTime = td.AddDays(1 - td.Day);
- _SpinEdit.Text = DateTime.DaysInMonth(td.Year, td.Month).ToString();
+ linkPdfExport.NavigateUri = BeWoApp.SiteOfOrigin;
+ //_SchedulerControl.Start = new DateTime(2020, 02, 01);
}
- private void _SchedularStorage_AppointmentInserting(object sender, PersistentObjectCancelEventArgs e)
- {
-
- }
- private void _SchedularStorage_AppointmentsInserted(object sender, PersistentObjectsEventArgs e)
- {
-
- }
+ public List SelectedAbsenceReasons => FilterAbwesenheit.SelectedItems.Cast().ToList();
- private void Button_Click(object sender, RoutedEventArgs e)
- {
- Update();
- }
+ public List SelectedEmploymentTypes => FilterBeschaftigungsart.SelectedItems.Cast().ToList();
+
+
+ private void Button_Click(object sender, RoutedEventArgs e) => UpdateScheduler();
private void SchedularControl_EditAppointmentFormShowing(object sender, EditAppointmentFormEventArgs e)
{
@@ -110,7 +75,6 @@ namespace BeWo.View.Detail.Report
e.AllowResize = false;
-
e.Form = new AbwesenheitsEditView(_SchedulerControl, apt, (AbsenceTimeDC)apt.CustomFields["AbsenceTime"], _AbsenceReasonDCs);
}
@@ -121,7 +85,7 @@ namespace BeWo.View.Detail.Report
private void SchedulerControl_AppointmentViewInfoCustomizing(object sender, DevExpress.Xpf.Scheduler.AppointmentViewInfoCustomizingEventArgs e)
{
-
+
}
private void SpinEdit_EditValueChanged(object sender, DevExpress.Xpf.Editors.EditValueChangedEventArgs e)
@@ -136,50 +100,102 @@ namespace BeWo.View.Detail.Report
private void DateEdit_EditValueChanged(object sender, DevExpress.Xpf.Editors.EditValueChangedEventArgs e)
{
var dp = _DateTimePicker.DateTime;
-
+
_DateTimePicker.DateTime = dp.AddDays(1 - dp.Day);
_SpinEdit.Value = DateTime.DaysInMonth(dp.Year, dp.Month);
_SchedulerControl.Start = _DateTimePicker.DateTime;
}
-
- public void Update()
+
+ private void LinkPdfExport_OnRequestNavigate(object sender, RequestNavigateEventArgs e)
{
- _AbsenceReasonDCs = ServiceFacade.DoOperationsServiceSync(x => x
- .GetAllAbsenceReason());
+ var control = new AbwesenheitsPrintControl(_SchedulerControl.Start);
+ var beWoWindow = new BeWoWindow();
- var absenceTimes = ServiceFacade.DoOperationsServiceSync(x => x
- .GetAbsenceTimeDCsFilter(new DateTime(2000, 1, 1), new DateTime(2021, 1, 1)))
- .Where(f => f.EmployeeOid.HasValue)
- .ToList();
+ control.ButtonCancelClicked += () => beWoWindow.Close();
- var empIDs = absenceTimes.Select(x => x.EmployeeOid.Value).Distinct().ToList();
+ control.ButtonAcceptClicked += delegate
+ {
+ UpdateReportUrl(control.SelectedDate);
+ BeWoUtils.NavigateToReportUri((sender as System.Windows.Documents.Hyperlink).NavigateUri.ToString(), Translator.Translate("Abwesenheitsübersicht"));
+
+ beWoWindow.Close();
+ };
+
+ beWoWindow.Height = 200;
+ beWoWindow.MinHeight = 200;
+ beWoWindow.Width = 250;
+ beWoWindow.MinWidth = 250;
+ beWoWindow.WindowStartupLocation = WindowStartupLocation.CenterOwner;
+ beWoWindow.GroupBoxContent = control;
+ beWoWindow.Owner = BeWoApp.CurrentBeWo.MainWindow;
+ beWoWindow.rootGroupBox.Header = "Drucken";
+ beWoWindow.ShowDialog();
+ }
+
+ private void InitFilter()
+ {
+ var absenceReasons = ServiceFacade.DoOperationsServiceSync(x => x.GetAllAbsenceReason());
+ var employmentTypes = ServiceFacade.DoEmployeeServiceSync(x => x.GetAllEmploymentTypes());
+
+ FilterAbwesenheit.Items.AddRange(absenceReasons.ToArray());
+ FilterBeschaftigungsart.Items.AddRange(employmentTypes.ToArray());
+ _AbsenceReasonDCs = absenceReasons;
+ }
+
+ private void InitDateStuff()
+ {
+ var today = DateTime.Today;
+ _DateTimePicker.DateTime = today.AddDays(1 - today.Day);
+ _SpinEdit.Text = DateTime.DaysInMonth(today.Year, today.Month).ToString();
+ }
+
+ private void InitSchedulerStuff()
+ {
+ _SchedulerStorage = _SchedulerControl.Storage;
+ _LabelStorage = _SchedulerControl.Storage.AppointmentStorage.Labels;
+ _ResourceStorage = _SchedulerControl.Storage.ResourceStorage;
+ _AppointmentStorage = _SchedulerControl.Storage.AppointmentStorage;
+
+ _AppointmentStorage.CustomFieldMappings.Add(new SchedulerCustomFieldMapping("AbsenceTime", "AbsenceTime"));
+ _SchedulerControl.TimelineView.VerticalResourceHeaderStyle = (Style)this.FindResource("VerticalResourceHeaderStyle");
+
+ IMouseHandlerService oldMouseHandler = (IMouseHandlerService)_SchedulerControl.GetService(typeof(IMouseHandlerService));
+
+ if (oldMouseHandler != null)
+ {
+ MouseHandlerService newMouseHandler =
+ new MouseHandlerService(_SchedulerControl, oldMouseHandler);
+ _SchedulerControl.RemoveService(typeof(IMouseHandlerService));
+ _SchedulerControl.AddService(typeof(IMouseHandlerService), newMouseHandler);
+ }
+ }
+
+ private void UpdateScheduler()
+ {
+ var absenceReasons = ServiceFacade.DoOperationsServiceSync(x => x.GetAllAbsenceReason());
+ var tuple = ServiceFacade.DoOperationsServiceSync(x => x.GetAbsenceTimeDCEmployee21(SelectedAbsenceReasons, SelectedEmploymentTypes));
+ var absenceTimes = tuple.Item1;
+ var employees = tuple.Item2;
- var empWithAbsence = ServiceFacade.DoEmployeeServiceSync(x => x
- .GetAllEmployees()
- .Where(emp => empIDs.Contains(emp.EmployeeOid.Value)))
- .ToList()
- .OrderBy(x => x.LastNameFirstName);
-
try
{
_SchedulerStorage.BeginUpdate();
_LabelStorage.Clear();
- foreach (var reason in _AbsenceReasonDCs)
+ foreach (var reason in absenceReasons)
{
var label = _LabelStorage.CreateNewLabel(reason.AbsenceReasonOid.ToString(), reason.Description);
if (!String.IsNullOrEmpty(reason.Color))
{
- label.Color = (Color) ColorConverter.ConvertFromString(reason.Color);
+ label.Color = (Color)ColorConverter.ConvertFromString(reason.Color);
}
_LabelStorage.Add(label);
}
_ResourceStorage.Clear();
- var listEmps = FilterBeschaftigungsart.SelectedItems.Count == 0 ? empWithAbsence : empWithAbsence.Where(x => x.Contracts.Exists(y => FilterBeschaftigungsart.SelectedItems.Contains(y.EmploymentType)));
- foreach (var employee in listEmps)
+ foreach (var employee in employees)
{
var resource = _SchedulerStorage.CreateResource(employee.EmployeeOid.Value.ToString());
@@ -189,10 +205,7 @@ namespace BeWo.View.Detail.Report
}
_AppointmentStorage.Clear();
- var listAbs = (FilterAbwesenheit.SelectedItems.Count == 0 ? absenceTimes : absenceTimes.Where(x => FilterAbwesenheit.SelectedItems.Contains(x.Reason)))
- .Where(y => listEmps.Select(x => x.EmployeeOid).Contains(y.EmployeeOid));
-
- foreach (var absenceTime in listAbs)
+ foreach (var absenceTime in absenceTimes)
{
var appointment = _SchedulerStorage.CreateAppointment(AppointmentType.Normal);
@@ -207,6 +220,27 @@ namespace BeWo.View.Detail.Report
_SchedulerControl.Visibility = Visibility.Visible;
}
}
+
+ private void UpdateReportUrl(DateTime date)
+ {
+ var url = BeWoApp.SiteOfOrigin
+ + "/ReportView.aspx"
+ + "?type=" + Utils.EnumName(ReportTypes.AbsenceReport)
+ + "&dt=" + date.ToString("MM.yyyy");
+
+ if (SelectedAbsenceReasons.Any())
+ url += "&ar=" + string.Join(";", SelectedAbsenceReasons.Select(x => x.AbsenceReasonOid.Value));
+
+ if (SelectedEmploymentTypes.Any())
+ url += "&et=" + string.Join(";", SelectedEmploymentTypes.Select(x => x.EmploymentTypeOid.Value));
+
+ linkPdfExport.NavigateUri = new Uri(url);
+ }
+
+ private void _SchedulerControl_PopupMenuShowing(object sender, SchedulerMenuEventArgs e)
+ {
+ e.Handled = false;
+ }
}
public class MouseHandlerService : MouseHandlerServiceWrapper
diff --git a/BeWo/View/Detail/Report/Dienstplaner.xaml b/BeWo/View/Detail/Report/Dienstplaner.xaml
deleted file mode 100644
index 57d2ee248..000000000
--- a/BeWo/View/Detail/Report/Dienstplaner.xaml
+++ /dev/null
@@ -1,43 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/BeWo/View/Detail/Report/Dienstplaner.xaml.cs b/BeWo/View/Detail/Report/Dienstplaner.xaml.cs
deleted file mode 100644
index 02cac4193..000000000
--- a/BeWo/View/Detail/Report/Dienstplaner.xaml.cs
+++ /dev/null
@@ -1,49 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Globalization;
-using System.Linq;
-using System.Text;
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Data;
-using System.Windows.Input;
-using System.Windows.Forms;
-using System.Windows.Media;
-
-using BeWo.Controls;
-using BeWo.Core;
-using BeWo.ServiceProxy;
-using BeWo.ViewModel;
-
-using BS.Shared;
-using BS.Shared.Core;
-using BS.Shared.DataContracts;
-using BS.Shared.DataContracts.Compact;
-using BS.Shared.Extensions;
-using BS.Shared.Translation;
-
-using DevExpress.Services;
-using DevExpress.XtraScheduler;
-using DevExpress.Xpf.Scheduler;
-using DevExpress.Xpf.Scheduler.Native;
-
-using SchedulerStorage = DevExpress.Xpf.Scheduler.SchedulerStorage;
-using ResourceStorage = DevExpress.Xpf.Scheduler.ResourceStorage;
-using AppointmentStorage = DevExpress.Xpf.Scheduler.AppointmentStorage;
-using IAppointmentLabelStorage = DevExpress.Xpf.Scheduler.AppointmentLabelCollection;
-using BeWo.Scheduler.View;
-using AppointmentLabel = DevExpress.Xpf.Scheduler.AppointmentLabel;
-
-namespace BeWo.View.Detail.Report
-{
- ///
- /// Interaction logic for Dienstplaner.xaml
- ///
- public partial class Dienstplaner : BeWoView
- {
- public Dienstplaner()
- {
- InitializeComponent();
- }
- }
-}
\ No newline at end of file
diff --git a/BeWo/View/Detail/Report/DienstplanerView.xaml b/BeWo/View/Detail/Report/DienstplanerView.xaml
new file mode 100644
index 000000000..1e473a690
--- /dev/null
+++ b/BeWo/View/Detail/Report/DienstplanerView.xaml
@@ -0,0 +1,128 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/BeWo/View/Detail/Report/DienstplanerView.xaml.cs b/BeWo/View/Detail/Report/DienstplanerView.xaml.cs
new file mode 100644
index 000000000..038c75a19
--- /dev/null
+++ b/BeWo/View/Detail/Report/DienstplanerView.xaml.cs
@@ -0,0 +1,514 @@
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.Linq;
+using System.Text;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Input;
+using System.Windows.Forms;
+using System.Windows.Media;
+
+using BeWo.Controls;
+using BeWo.Core;
+using BeWo.ServiceProxy;
+using BeWo.ViewModel;
+using BeWo.View.Controls;
+
+using BS.Shared;
+using BS.Shared.Core;
+using BS.Shared.DataContracts;
+using BS.Shared.DataContracts.Compact;
+using BS.Shared.Extensions;
+using BS.Shared.Translation;
+
+using DevExpress.Xpf.Grid;
+using DevExpress.XtraGrid.Views.Grid.ViewInfo;
+using MouseEventArgs = System.Windows.Input.MouseEventArgs;
+using System.ComponentModel;
+using Button = System.Windows.Controls.Button;
+using System.Windows.Navigation;
+
+namespace BeWo.View.Detail.Report
+{
+ ///
+ /// Interaction logic for Dienstplaner.xaml
+ ///
+ public partial class DienstplanerView : BeWoView
+ {
+ private List _Wohnheime;
+ private List _DienstDCListe;
+ private List _DienstEintragListe;
+ private List _AlleDienste;
+ private Dictionary> _AbsenceTimesDict;
+
+ private GridColumn _ColumnEmp;
+ private List _ColumnDays;
+ private List _ColumnWeek;
+
+ private CompactWohnheimDC _AuswahlWohnheim;
+ private DienstZeile _AuswahlDienstZeile;
+ private DateTime _AuswahlMonat;
+ private int _AuswahlTag;
+
+ private bool _IsControlClick;
+
+ public DienstplanerView()
+ {
+ InitializeComponent();
+
+ Wohnheime = ServiceFacade.DoCustomerServiceSync(x => x.GetAllActiveWohnheimeCompact());
+
+ InitDateComboBox();
+ CreateColumns();
+
+ linkPdfExport.NavigateUri = BeWoApp.SiteOfOrigin;
+ }
+
+ #region Properties
+ public List Wohnheime
+ {
+ get { return _Wohnheime; }
+ set
+ {
+ _Wohnheime = value;
+ _WohnheimPicker.ItemsSource = value;
+ }
+ }
+
+ public CompactWohnheimDC AuswahlWohnheim
+ {
+ get => _AuswahlWohnheim;
+ set
+ {
+ _AuswahlWohnheim = value;
+ _TxtWohnheim.Content = $"{value.WohnheimName} ({AuswahlMonat.ToString("MM.yyyy")})";
+ }
+ }
+
+ public DateTime AuswahlMonat
+ {
+ get => _AuswahlMonat;
+ set => _AuswahlMonat = new DateTime(value.Year, value.Month, 1);
+ }
+
+ public DateTime Pointer => AuswahlMonat.AddDays(_AuswahlTag - 1);
+ #endregion
+
+ #region Loading
+ private void InitGridControl()
+ {
+ RefreshDienste();
+ BuildGridControlColumnDays(AuswahlMonat.Year, AuswahlMonat.Month, 1);
+ RefreshGrid();
+ ShowGrid();
+ }
+
+ private void RefreshGrid()
+ {
+ _GridControl.ItemsSource = null;
+ _GridControl.ItemsSource = _DienstEintragListe;
+ }
+
+ private void ShowGrid()
+ {
+ _GridControl.Visibility = Visibility.Visible;
+ _TxtWohnheim.Visibility = Visibility.Visible;
+ _TxtWohnheimInfo.Visibility = Visibility.Visible;
+ }
+
+ private void BuildGridControlColumnDays(int year, int month, int fixedColumns)
+ {
+ var dayCounter = 0;
+ var weekCounter = 0;
+
+ var dt = new DateTime(year, month, 1);
+ var days = DateTime.DaysInMonth(year, month);
+
+
+ while (dayCounter < days)
+ {
+ var currentDay = dt.AddDays(dayCounter);
+
+ var day = _ColumnDays[dayCounter];
+
+ day.Header = $"{new CultureInfo("de-DE").DateTimeFormat.GetDayName(currentDay.DayOfWeek).Substring(0, 2)}\n{(dayCounter + 1).ToString()}.";
+ day.Visible = true;
+ day.VisibleIndex = dayCounter + weekCounter + fixedColumns;
+
+ dayCounter++;
+
+ if (currentDay.DayOfWeek != DayOfWeek.Sunday)
+ continue;
+
+ var week = _ColumnWeek[weekCounter];
+
+ week.Header = "Wo.\nIst"; //$"{new CultureInfo("de-DE").Calendar.GetWeekOfYear(currentDay, CalendarWeekRule.FirstDay, DayOfWeek.Monday)}. Wo\nIst";
+ week.FieldName = dayCounter + "W";
+ week.Visible = true;
+ week.VisibleIndex = dayCounter + weekCounter + fixedColumns;
+
+ weekCounter++;
+ }
+
+ for (int i = dayCounter; i < _ColumnDays.Count; i++)
+ {
+ var day = _ColumnDays[i];
+
+ day.Visible = false;
+ }
+
+ for (int i = weekCounter; i < _ColumnWeek.Count; i++)
+ {
+ var week = _ColumnWeek[i];
+
+ week.Visible = false;
+ }
+ }
+
+ private void CreateColumns()
+ {
+ var dayControlTemplate = (ControlTemplate)FindResource("ctrlDay");
+ var weekControlTemplate = (ControlTemplate)FindResource("ctrlWeek");
+ var empControlTemplate = (ControlTemplate)FindResource("ctrlEmp");
+
+ _ColumnEmp = NewGridColumnUnbound("Mitarbeiter", "emp", "EM:", 200, 200, DevExpress.Data.UnboundColumnType.Object, empControlTemplate, DevExpress.Utils.DefaultBoolean.True); //NewGridColumn("Mitarbeiter", "Header", double.NaN, 100);
+ _ColumnEmp.Fixed = FixedStyle.Left;
+
+ _ColumnDays = new List();
+ _ColumnWeek = new List();
+
+ for (int i = 1; i <= 31; i++)
+ {
+ _ColumnDays.Add(NewGridColumnUnbound(string.Empty, i.ToString(), $"DA:", 28, 28, DevExpress.Data.UnboundColumnType.Object, dayControlTemplate, DevExpress.Utils.DefaultBoolean.False));
+ }
+
+ for (int i = 1; i <= 5; i++)
+ {
+ _ColumnWeek.Add(NewGridColumnUnbound("Wo.\nIst", string.Empty, $"WE:", 60, 40, DevExpress.Data.UnboundColumnType.Object, weekControlTemplate, DevExpress.Utils.DefaultBoolean.False));
+ }
+
+ _GridControl.Columns.Add(_ColumnEmp);
+ _GridControl.Columns.AddRange(_ColumnDays);
+ _GridControl.Columns.AddRange(_ColumnWeek);
+ }
+
+ private void InitDateComboBox()
+ {
+ var year = new List();
+ for (int i = 1900; i < 2100; i++)
+ {
+ year.Add(i);
+ }
+
+ _YearPicker.ItemsSource = year;
+
+ _MonthPicker.SelectedMonth = DateTime.Today.Month;
+ _YearPicker.SelectedItem = DateTime.Today.Year;
+ }
+ #endregion
+
+ private void GroupBox_MouseDown(object sender, MouseButtonEventArgs e)
+ {
+ if (!_IsControlClick)
+ {
+ _PopupPicker.IsOpen = false;
+ }
+
+ _IsControlClick = false;
+ }
+
+ private void BeWoView_Loaded(object sender, RoutedEventArgs e)
+ {
+
+ }
+
+ // Button Click
+ private void BtnAnzeigen_Click(object sender, RoutedEventArgs e)
+ {
+ _PopupPicker.IsOpen = false;
+
+ if (_WohnheimPicker.SelectedItem == null)
+ return;
+
+ AuswahlMonat = new DateTime((int)_YearPicker.SelectedItem, _MonthPicker.SelectedMonth, 1);
+
+ var year = _YearPicker.SelectedItem;
+
+ AuswahlWohnheim = _WohnheimPicker.SelectedItem as CompactWohnheimDC;
+
+ InitGridControl();
+ }
+
+ // Grid Click
+ public void DienstplanerControl_MouseDown(object sender, MouseEventArgs e)
+ {
+ _PopupPicker.IsOpen = false;
+
+ _AuswahlDienstZeile = _GridControl.GetRow(_GridControl.View.GetRowHandleByMouseEventArgs(e)) as DienstZeile;
+ _AuswahlTag = int.Parse(_GridControl.View.GetColumnByMouseEventArgs(e).FieldName);
+
+ listbox_valuepicker.ItemsSource = _AlleDienste;
+
+ _IsControlClick = true;
+ _PopupPicker.IsOpen = true;
+ }
+
+ // Popup Click
+ private void Popup_MouseDown(object sender, MouseButtonEventArgs e)
+ {
+ var oldDienst = _AuswahlDienstZeile.TryGetDienst(_AuswahlTag);
+ var newDienst = (DienstInfoDC)((Grid)sender).Tag;
+
+ _PopupPicker.IsOpen = false;
+
+ if (oldDienst == null)
+ {
+ if (!newDienst.IsPlatzhalter)
+ {
+ _AuswahlDienstZeile.AddDienst(_AuswahlTag, newDienst);
+
+ ServiceFacade.DoOperationsServiceAsync(x => x.InsertNewDienstEintrag(
+ new DienstEintragDC
+ {
+ Datum = Pointer,
+ DienstOid = newDienst.Oid.Value,
+ EmployeeOid = _AuswahlDienstZeile.Employee.EmployeeOid.Value,
+ Oid = null,
+ WohnheimOid = AuswahlWohnheim.WohnheimOid,
+ Zeile = _AuswahlDienstZeile.Zeile
+ }));
+ }
+ }
+ else
+ {
+ if (newDienst.IsPlatzhalter)
+ {
+ _AuswahlDienstZeile.RemoveDienst(_AuswahlTag);
+
+ ServiceFacade.DoOperationsServiceAsync(x => x.DeleteDienstEintrag(_AuswahlDienstZeile.Employee.EmployeeOid.Value, AuswahlWohnheim.WohnheimOid, _AuswahlDienstZeile.Zeile, Pointer));
+ }
+ else
+ {
+ if (oldDienst.Equals(newDienst))
+ return;
+
+ _AuswahlDienstZeile.RemoveDienst(_AuswahlTag);
+ _AuswahlDienstZeile.AddDienst(_AuswahlTag, newDienst);
+
+ //_AuswahlDienstZeile.UpdateDienst(_AuswahlTag, newDienst);
+ }
+ }
+ }
+
+ // Daten füllen
+ private void GridControl_CustomUnboundColumnData(object sender, GridColumnDataEventArgs e)
+ {
+ if (e.IsGetData)
+ {
+ var selZeile = _GridControl.GetRowByListIndex(e.ListSourceRowIndex) as DienstZeile;
+ var pos = 0;
+ var tag = e.Column.Tag.ToStringNullCheck();
+
+ switch (e.Column.Tag.ToString().Substring(0, 2))
+ {
+ case "DA":
+ pos = int.Parse(e.Column.FieldName);
+ var date = _AuswahlMonat.AddDays(pos - 1);
+
+ AbsenceReasonDC reason = null;
+ if (_AbsenceTimesDict.ContainsKey(selZeile.Employee.EmployeeOid.Value))
+ reason = _AbsenceTimesDict[selZeile.Employee.EmployeeOid.Value].FirstOrDefault(x =>
+ x.Start <= date && (!x.End.HasValue || x.End >= date))?.Reason;
+
+ e.Value = new DPCtrlDayInformation
+ {
+ DienstInfoDC = selZeile.TryGetDienst(pos),
+ IsLastRow = selZeile.Zeile == 2,
+ DayOfWeek = date.DayOfWeek,
+ IsLastColumn = pos == DateTime.DaysInMonth(AuswahlMonat.Year, AuswahlMonat.Month),
+ IsInContractRange = selZeile.GetContract(pos) != null,
+ Reason = reason
+ };
+ return;
+
+ case "WE":
+ 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;
+ return;
+
+ case "EM":
+ e.Value = new DPCtrlEmployeeInformation
+ {
+ Employee = selZeile.Employee,
+ Contracts = selZeile.Contracts,
+ Row = selZeile.Zeile
+ };
+ return;
+ }
+ }
+ }
+
+ private void LinkPdfExport_OnRequestNavigate(object sender, RequestNavigateEventArgs e)
+ {
+ UpdateReportUrl(_AuswahlWohnheim.WohnheimOid, _AuswahlMonat);
+ BeWoUtils.NavigateToReportUri((sender as System.Windows.Documents.Hyperlink).NavigateUri.ToString(), Translator.Translate("Dienstplan"));
+ }
+
+ private void RefreshDienste()
+ {
+ _DienstDCListe = ServiceFacade.DoOperationsServiceSync(x => x.GetDienstEintraege(AuswahlWohnheim.WohnheimOid, AuswahlMonat.Year, AuswahlMonat.Month));
+
+ _AlleDienste = ServiceFacade.DoOperationsServiceSync(x => x.GetAllDienste());
+ _AlleDienste.Insert(0, DienstInfoDC.Platzhalter);
+
+ _DienstEintragListe = _DienstDCListe
+ .SelectMany(x => DienstZeile.Init(x, _AlleDienste, RefreshGrid, AuswahlMonat))
+ .ToList();
+
+
+ var absence = ServiceFacade.DoOperationsServiceSync(x => x.GetAbsenceTimeVacationByWohnheim(AuswahlWohnheim.WohnheimOid, AuswahlMonat.Year, AuswahlMonat.Month));
+
+ var temp = new Dictionary>();
+
+ foreach (var abs in absence)
+ {
+ if (!temp.ContainsKey(abs.EmployeeOid.Value))
+ temp.Add(abs.EmployeeOid.Value, new List());
+
+ temp[abs.EmployeeOid.Value].Add(abs);
+ }
+
+ _AbsenceTimesDict = temp;
+ }
+
+ private void UpdateReportUrl(long wOid, DateTime date)
+ {
+ var url = BeWoApp.SiteOfOrigin
+ + "/ReportView.aspx"
+ + "?type=" + Utils.EnumName(ReportTypes.RosterReport)
+ + "&wid=" + wOid
+ + "&dt=" + date.ToString("MM.yyyy");
+
+ linkPdfExport.NavigateUri = new Uri(url);
+ }
+
+ #region ColumnCreate
+
+ private GridColumn NewGridColumnUnbound(string header, string fieldName, string tag, GridColumnWidth width, double minWidth, DevExpress.Data.UnboundColumnType unboundColumnType, ControlTemplate displayTemplate, DevExpress.Utils.DefaultBoolean allowResize)
+ {
+ var clmn = NewGridColumn(header, fieldName, width, minWidth, allowResize);
+
+ clmn.UnboundType = unboundColumnType;
+ clmn.Tag = tag;
+
+ if (displayTemplate != null)
+ clmn.DisplayTemplate = displayTemplate;
+
+ return clmn;
+ }
+
+ private GridColumn NewGridColumn(string header, string fieldName, GridColumnWidth width, double minWidth, DevExpress.Utils.DefaultBoolean allowResize)
+ {
+ return new GridColumn
+ {
+ AllowAutoFilter = false,
+ AllowBestFit = DevExpress.Utils.DefaultBoolean.False,
+ AllowCellMerge = false,
+ AllowColumnFiltering = DevExpress.Utils.DefaultBoolean.False,
+ AllowConditionalFormattingMenu = false,
+ AllowEditing = DevExpress.Utils.DefaultBoolean.False,
+ AllowFocus = false,
+ AllowGrouping = DevExpress.Utils.DefaultBoolean.False,
+ AllowIncrementalSearch = false,
+ AllowMoving = DevExpress.Utils.DefaultBoolean.False,
+ AllowPrinting = false,
+ AllowResizing = allowResize,
+ AllowSearchPanel = DevExpress.Utils.DefaultBoolean.False,
+ AllowSorting = DevExpress.Utils.DefaultBoolean.False,
+ Width = width,
+ MinWidth = minWidth,
+ FieldName = fieldName,
+ Header = header,
+ HorizontalHeaderContentAlignment = System.Windows.HorizontalAlignment.Center
+ };
+ }
+
+ #endregion
+
+ ///
+ /// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+ ///
+
+ public class DienstZeile
+ {
+ public event Action DienstDictUpdated;
+
+ public EmployeeDC Employee { get; set; }
+ public List Contracts { get; set; }
+ public int Zeile { get; set; }
+ public DateTime Date { get; set; }
+ private Dictionary DienstDict { get; set; }
+
+ public DienstZeile(EmployeeDC emp, List contracts, int zeile, DateTime date, Dictionary dienste)
+ {
+ Employee = emp;
+ Contracts = contracts;
+ Zeile = zeile;
+ Date = date;
+ DienstDict = dienste ?? new Dictionary();
+ }
+
+ public List GetDienstWoche(int sonntag) => DienstDict.Where(x => x.Key <= sonntag && sonntag - x.Key < 7).Select(x => x.Value).ToList();
+
+ public DienstInfoDC GetDienst(int tag) => DienstDict[tag];
+
+ public DienstInfoDC TryGetDienst(int tag) => DienstDict.ContainsKey(tag) ? DienstDict[tag] : null;
+
+ public void AddDienst(int tag, DienstInfoDC dienst)
+ {
+ DienstDict.Add(tag, dienst);
+ DienstDictUpdated?.Invoke();
+ }
+
+ public void UpdateDienst(int tag, DienstInfoDC dienst)
+ {
+ DienstDict[tag] = dienst;
+ DienstDictUpdated?.Invoke();
+ }
+
+ public void RemoveDienst(int tag)
+ {
+ DienstDict.Remove(tag);
+ DienstDictUpdated?.Invoke();
+ }
+
+ public ContractDC GetContract(int tag) => Contracts.FirstOrDefault(x => (!x.EntryDate.HasValue || x.EntryDate.Value <= Date.AddDays(tag - 1)) &&
+ (!x.ContractEndDate.HasValue || x.ContractEndDate.Value >= Date.AddDays(tag - 1)));
+
+ public static List Init(DienstBlockDC eintragDC, List dienste, Action dienstDictUpdate, DateTime date)
+ {
+ var res = new List();
+
+ for (int i = 0; i < eintragDC.DienstDictArray.Length; i++)
+ {
+ var zeileDC = eintragDC.DienstDictArray[i];
+
+ var newDic = new Dictionary();
+
+ if (zeileDC != null)
+ newDic = zeileDC.ToDictionary(k => k.Key, v => dienste.Find(x => x.Oid == v.Value));
+
+ var toAdd = new DienstZeile(eintragDC.Employee, eintragDC.Contracts, i, date, newDic);
+
+ toAdd.DienstDictUpdated += dienstDictUpdate;
+
+ res.Add(toAdd);
+ }
+
+ return res;
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/BeWo/View/Detail/Report/FlexibleReportView.xaml b/BeWo/View/Detail/Report/FlexibleReportView.xaml
index 8404f8d62..ea2648701 100644
--- a/BeWo/View/Detail/Report/FlexibleReportView.xaml
+++ b/BeWo/View/Detail/Report/FlexibleReportView.xaml
@@ -123,31 +123,31 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/BeWo/View/Detail/ServiceRecordEditView.xaml b/BeWo/View/Detail/ServiceRecordEditView.xaml
index 545e2e2b7..8c954dd49 100644
--- a/BeWo/View/Detail/ServiceRecordEditView.xaml
+++ b/BeWo/View/Detail/ServiceRecordEditView.xaml
@@ -95,7 +95,7 @@
+ Visibility="{Binding Path=IsGoalTreeVisible, Converter={StaticResource BoolVisibilityConverter}}" SelectOnlyLeafs="False" ShowRatingPanel="True"/>
diff --git a/BeWo/View/Detail/ServiceRecordEditView.xaml.cs b/BeWo/View/Detail/ServiceRecordEditView.xaml.cs
index 6aceac854..58f1a437d 100644
--- a/BeWo/View/Detail/ServiceRecordEditView.xaml.cs
+++ b/BeWo/View/Detail/ServiceRecordEditView.xaml.cs
@@ -191,6 +191,8 @@ namespace BeWo.View.Detail
Focus();
TextboxNotice.Focus();
+
+ CheckRecursive(_ServiceRecordVM.GoalTree, false);
ComboBoxTreeViewControl.TreeViewSourceList = _ServiceRecordVM.GoalTree;
ComboBoxTreeViewControl.Visibility = (_ServiceRecordVM.IsGoalTreeVisible) ? Visibility.Visible : Visibility.Collapsed;
@@ -227,6 +229,18 @@ namespace BeWo.View.Detail
}
}
+ private void CheckRecursive(List goalTree, bool wert)
+ {
+ if (goalTree != null)
+ {
+ foreach (var goal in goalTree)
+ {
+ goal.CheckRecursive = wert;
+ CheckRecursive(goal.Children, wert);
+ }
+ }
+ }
+
private void ExpandCheckedGoals(List goalTree)
{
if (goalTree != null)
diff --git a/BeWo/View/Detail/ServiceRecordView2.xaml b/BeWo/View/Detail/ServiceRecordView2.xaml
index 4f5eb2105..f03841e6d 100644
--- a/BeWo/View/Detail/ServiceRecordView2.xaml
+++ b/BeWo/View/Detail/ServiceRecordView2.xaml
@@ -659,10 +659,10 @@
-
+
-
+
-
+
+
diff --git a/BeWo/View/Detail/ServiceRecordView2.xaml.cs b/BeWo/View/Detail/ServiceRecordView2.xaml.cs
index f3ab30926..ee0ce5fa8 100644
--- a/BeWo/View/Detail/ServiceRecordView2.xaml.cs
+++ b/BeWo/View/Detail/ServiceRecordView2.xaml.cs
@@ -1398,11 +1398,8 @@ namespace BeWo.View.Detail
if (ViewModel.PrototypeVM.GoalTree != null && ViewModel.PrototypeVM.GoalTree.Count > 0)
{
- foreach (var item in ViewModel.PrototypeVM.GoalTree)
- {
- item.IsChecked = false;
- item.SetRatingType(null);
- }
+ ResetAllGoals(ViewModel.PrototypeVM.GoalTree);
+
}
ViewModel.PrototypeVM.DistanceInMeter = null;
@@ -2406,15 +2403,27 @@ namespace BeWo.View.Detail
ComboBoxTreeViewControl.ResetControl();
- foreach (var item in ViewModel.PrototypeVM.GoalTree)
- {
- item.IsChecked = false;
- item.SetRatingType(null);
- }
+ ResetAllGoals(ViewModel.PrototypeVM.GoalTree);
+
ComboBoxTreeViewControl.TreeViewSourceList = ViewModel.PrototypeVM.GoalTree;
}
+ private void ResetAllGoals(List goals)
+ {
+ if (goals != null)
+ {
+ foreach (var item in goals)
+ {
+ item.CheckRecursive = false;
+ item.IsChecked = false;
+ item.SetRatingType(null);
+
+ ResetAllGoals(item.Children);
+ }
+ }
+ }
+
private void LinkExcelExportRequestNavigate(object sender, RequestNavigateEventArgs e)
{
var list = srListBox.ItemsSource as List;
diff --git a/BeWo/View/Detail/SupportConceptGoalRatingView.xaml.cs b/BeWo/View/Detail/SupportConceptGoalRatingView.xaml.cs
index c7606a538..dcd5d7265 100644
--- a/BeWo/View/Detail/SupportConceptGoalRatingView.xaml.cs
+++ b/BeWo/View/Detail/SupportConceptGoalRatingView.xaml.cs
@@ -11,6 +11,7 @@ using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Threading;
using BeWo.Core;
+using BeWo.Core.Service;
using BeWo.ServiceProxy;
using BeWo.ViewModel;
using BeWo.ViewModel.ListViewModel;
@@ -99,29 +100,43 @@ namespace BeWo.View.Detail
ListBoxGoals.ItemsSource = null;
- var allGoallist = new List();
-
var listBoxGoals = new List();
+ var oid2EntryDict = new Dictionary();
foreach (var goal in SupportConcept.GetSelectedGoals())
{
+ var g = goal;
+
+ if (goal.Type == ValueListEntryType.SupportConceptGoalType ||
+ goal.Type == ValueListEntryType.SupportConceptIndividualGoalType)
+ {
+ if (goal.ParentOid.HasValue)
+ {
+ g = Cache.GetInstance().GetGoalEntry(goal.ParentOid.Value);
+ }
+ }
+
if (goal.Type == ValueListEntryType.SupportConceptGoalCategoryType ||
goal.Type == ValueListEntryType.SupportConceptIndividualGoalCategoryType)
{
- var item = new ListBoxGoalItem();
- item.GoalEntry = goal;
-
- SetzeGeleisteteStunden(item);
-
- listBoxGoals.Add(item);
-
-
+
}
-
+
+ if (!oid2EntryDict.ContainsKey(g.ValueListEntryOid.Value))
+ {
+ oid2EntryDict.Add(g.ValueListEntryOid.Value, true);
+
+ var item = new ListBoxGoalItem();
+ item.GoalEntry = g;
+ listBoxGoals.Add(item);
+ SetzeGeleisteteStunden(item);
+ }
+
+
}
decimal stdGesamt = 0;
foreach (var g in listBoxGoals)
@@ -138,7 +153,7 @@ namespace BeWo.View.Detail
}
}
- ListBoxGoals.ItemsSource = listBoxGoals;
+ ListBoxGoals.ItemsSource = listBoxGoals.OrderBy(g => g.GoalEntry.TypeDescription);
ListBoxGoals.SelectAll();
//if (RatingList != null && RatingList.VMList.Count > 0)
//{
diff --git a/BeWo/View/Detail/SupportConceptView.xaml b/BeWo/View/Detail/SupportConceptView.xaml
index 42e0511f2..2603d114d 100644
--- a/BeWo/View/Detail/SupportConceptView.xaml
+++ b/BeWo/View/Detail/SupportConceptView.xaml
@@ -958,7 +958,9 @@
IsChecked="{Binding Path=IsChecked, UpdateSourceTrigger=PropertyChanged}"
Grid.Column="0" Margin="3,0,3,0" VerticalAlignment="Center"
Visibility="{Binding Path=GoalType, Converter={StaticResource IndividualGoalMassnahmeUncheckPreventConverter}}"/>
-
+
+
+ Cursor="Arrow" />
@@ -72,7 +72,7 @@
-
+
@@ -89,28 +89,28 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/BeWo/View/Report/Kilometerauswertung/KilometerauslastungsView.xaml b/BeWo/View/Report/Kilometerauswertung/KilometerauslastungsView.xaml
index 196780da9..fd2a4b9ae 100644
--- a/BeWo/View/Report/Kilometerauswertung/KilometerauslastungsView.xaml
+++ b/BeWo/View/Report/Kilometerauswertung/KilometerauslastungsView.xaml
@@ -12,6 +12,7 @@
xmlns:dxp="http://schemas.devexpress.com/winfx/2008/xaml/printing"
xmlns:dxb="http://schemas.devexpress.com/winfx/2008/xaml/bars"
xmlns:dxpbars="http://schemas.devexpress.com/winfx/2008/xaml/printing/bars"
+ xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
d:DesignHeight="450" d:DesignWidth="800"
Initialized="KilometerauslastungsView_OnInitialized"
@@ -52,7 +53,7 @@
-
+
diff --git a/BeWo/ViewModel/DienstVM.cs b/BeWo/ViewModel/DienstInfoVM.cs
similarity index 87%
rename from BeWo/ViewModel/DienstVM.cs
rename to BeWo/ViewModel/DienstInfoVM.cs
index 76a88d0de..6ad2f1c34 100644
--- a/BeWo/ViewModel/DienstVM.cs
+++ b/BeWo/ViewModel/DienstInfoVM.cs
@@ -1,6 +1,7 @@
using BS.Shared;
using BS.Shared.DataContracts;
using BS.Shared.Extensions;
+using BeWo.Core;
using System;
using System.Collections.Generic;
using System.Linq;
@@ -10,7 +11,7 @@ using System.Windows.Media;
namespace BeWo.ViewModel
{
- public class DienstVM : AbstractDCMapperVM
+ public class DienstInfoVM : AbstractDCMapperVM
{
private long? _DienstOid;
private string _DienstNotice;
@@ -23,7 +24,7 @@ namespace BeWo.ViewModel
private DateTime _EndeDT;
private int _Pause;
- public DienstVM(DienstDC dienstDC) : base(dienstDC, dienstDC.DienstOid == null)
+ public DienstInfoVM(DienstInfoDC dienstDC) : base(dienstDC, dienstDC.Oid == null)
{ }
public long? DienstOid
@@ -34,7 +35,7 @@ namespace BeWo.ViewModel
if (AreDifferent(_DienstOid, value))
{
_DienstOid = value;
- StoreDirtyInformation(AreDifferent(DataContract.DienstOid, value), nameof(_DienstOid));
+ StoreDirtyInformation(AreDifferent(DataContract.Oid, value), nameof(_DienstOid));
FirePropertyChanged(nameof(_DienstOid));
}
}
@@ -48,7 +49,7 @@ namespace BeWo.ViewModel
if (AreDifferent(_DienstNotice, value))
{
_DienstNotice = value;
- StoreDirtyInformation(AreDifferent(DataContract.DienstNotice, value), nameof(_DienstNotice));
+ StoreDirtyInformation(AreDifferent(DataContract.Notice, value), nameof(_DienstNotice));
FirePropertyChanged(nameof(_DienstNotice));
}
}
@@ -62,7 +63,7 @@ namespace BeWo.ViewModel
if (AreDifferent(_DienstVersion, value))
{
_DienstVersion = value;
- StoreDirtyInformation(AreDifferent(DataContract.DienstVersion, value), nameof(_DienstVersion));
+ StoreDirtyInformation(AreDifferent(DataContract.Version, value), nameof(_DienstVersion));
FirePropertyChanged(nameof(_DienstVersion));
}
}
@@ -187,11 +188,11 @@ namespace BeWo.ViewModel
}
}
- protected override void InitByDataContract(DienstDC bDataContract)
+ protected override void InitByDataContract(DienstInfoDC bDataContract)
{
- _DienstOid = bDataContract.DienstOid;
- _DienstNotice = bDataContract.DienstNotice;
- _DienstVersion = bDataContract.DienstVersion;
+ _DienstOid = bDataContract.Oid;
+ _DienstNotice = bDataContract.Notice;
+ _DienstVersion = bDataContract.Version;
_DienstName = bDataContract.DienstName;
_Kurz = bDataContract.Kurz;
_StartDT = bDataContract.Start;
@@ -200,15 +201,15 @@ namespace BeWo.ViewModel
if (!string.IsNullOrEmpty(bDataContract.Farbe))
{
- _Farbe = (SolidColorBrush)new BrushConverter().ConvertFrom(bDataContract.Farbe);
+ _Farbe = new SolidColorBrush(ColorExtensions.FromHexStringDefault(bDataContract.Farbe, Colors.Transparent));
}
}
- protected override DienstDC MapToDataContract(DienstDC bDataContract, bool doCommit)
+ protected override DienstInfoDC MapToDataContract(DienstInfoDC bDataContract, bool doCommit)
{
- bDataContract.DienstOid = _DienstOid;
- bDataContract.DienstNotice = _DienstNotice;
- bDataContract.DienstVersion = _DienstVersion;
+ bDataContract.Oid = _DienstOid;
+ bDataContract.Notice = _DienstNotice;
+ bDataContract.Version = _DienstVersion;
bDataContract.DienstName = _DienstName;
bDataContract.Kurz = _Kurz;
bDataContract.Farbe = _FarbeString;
diff --git a/BeWo/ViewModel/ListViewModel/DienstListVM.cs b/BeWo/ViewModel/ListViewModel/DienstListVM.cs
index 243118120..4c8a9d069 100644
--- a/BeWo/ViewModel/ListViewModel/DienstListVM.cs
+++ b/BeWo/ViewModel/ListViewModel/DienstListVM.cs
@@ -10,9 +10,9 @@ using Color = System.Drawing.Color;
namespace BeWo.ViewModel.ListViewModel
{
- public class DienstListVM : AbstractDCListMapperVM
+ public class DienstInfoListVM : AbstractDCListMapperVM
{
- public DienstListVM(List pDCs): base(pDCs)
+ public DienstInfoListVM(List pDCs): base(pDCs)
{
}
diff --git a/BeWo/ViewModel/ServiceRecordVM.cs b/BeWo/ViewModel/ServiceRecordVM.cs
index cc97ad44a..007f5445d 100644
--- a/BeWo/ViewModel/ServiceRecordVM.cs
+++ b/BeWo/ViewModel/ServiceRecordVM.cs
@@ -464,7 +464,15 @@ namespace BeWo.ViewModel
realDate = realDate.Value.AddSeconds(1);
}
}
+ else
+ {
+ if (value.HasValue)
+ {
+ realDate = new DateTime(value.Value.Year, value.Value.Month, value.Value.Day, StartTime.Value.Hour, StartTime.Value.Minute, StartTime.Value.Second);
+ }
+
+ }
var x = _EditableEndDate.Value.Subtract(realDate.Value);
if (_DurationInStunden == ZeiterfassungsDauer.Minuten)
@@ -1512,6 +1520,67 @@ namespace BeWo.ViewModel
}
}
+ public String OnlyGoalString
+ {
+ get
+ {
+
+ var goals = new List();
+ foreach (var goal in SelectedGoals)
+ {
+ if (goal.Type == ValueListEntryType.SupportConceptGoalCategoryType || goal.Type == ValueListEntryType.SupportConceptIndividualGoalCategoryType)
+ {
+ if (!goals.Contains(goal))
+ {
+ goals.Add(goal);
+ }
+
+
+ }
+ else if (goal.ParentOid.HasValue)
+ {
+ var parent = Cache.GetInstance().GetGoalEntry(goal.ParentOid.Value);
+ if (parent != null && !goals.Contains(parent))
+ {
+ goals.Add(parent);
+ }
+
+ }
+ }
+
+ var goalString = "";
+ foreach (var goal in goals)
+ {
+
+ if (goalString.Length > 0)
+ goalString += ", ";
+ goalString += CreateGoalString(goal);
+ }
+
+ return goalString;
+ }
+ }
+
+ public String MassnahmenString
+ {
+ get
+ {
+ var goals = "";
+
+ foreach (var goal in SelectedGoals)
+ {
+ if (goal.Type == ValueListEntryType.SupportConceptGoalType || goal.Type == ValueListEntryType.SupportConceptIndividualGoalType)
+ {
+ if (goals.Length > 0)
+ goals += ", ";
+ goals += CreateGoalString(goal);
+ }
+ }
+
+ return goals;
+ }
+ }
+
private string CreateGoalString(ValueListEntryDC goal)
{
String name = goal.TypeDescription;
@@ -1522,8 +1591,13 @@ namespace BeWo.ViewModel
if (goal.RatingTypeOid.HasValue)
{
- code = String.Format("{0}.{1}", code,
- "Hier muss noch etwas gemacht werden!"); //goal.RatingType.RatingId);
+ var rdc = Cache.GetInstance().GetAllRatingTypeList().FirstOrDefault(r => r.RatingTypeOid == goal.RatingTypeOid);
+ if (rdc != null && rdc.RatingId.HasValue)
+ {
+ code = String.Format("{0}.{1}", code, rdc.RatingId.Value);
+ }
+
+
}
name = String.Format("{0}: {1}", code, name);
}
@@ -2028,9 +2102,15 @@ namespace BeWo.ViewModel
{
_DurationSTD = value;
-
- StoreDirtyInformation(AreDifferent(DataContract.RoundedDuration, value),
- PropertyName_DurationSTD);
+ if (_DurationInStunden == ZeiterfassungsDauer.Stunden)
+ {
+ StoreDirtyInformation(AreDifferent(DataContract.RoundedDuration, value * 60), PropertyName_DurationSTD);
+ }
+ else
+ {
+ StoreDirtyInformation(AreDifferent(DataContract.RoundedDuration, value), PropertyName_DurationSTD);
+ }
+
FirePropertyChanged(PropertyName_DurationSTD);
FirePropertyChanged(PropertyName_RoundedDuration);
@@ -2121,8 +2201,42 @@ namespace BeWo.ViewModel
GoalTree = SupportConceptService.CreateGoalTree(newList, SelectedGoals);
- //}
+ AddPropertyChangedHandler(GoalTree);
+
+
+ }
+
+ private void AddPropertyChangedHandler(List goalTree)
+ {
+ if (goalTree != null)
+ {
+ foreach (var goal in goalTree)
+ {
+ goal.PropertyChanged += (s, e) =>
+ {
+ var selectedGoal = s as SupportConceptGoalDC;
+ if (selectedGoal != null)
+ {
+ if (selectedGoal.IsChecked)
+ {
+ if (!SelectedGoals.Contains(selectedGoal.GoalEntryDC))
+ {
+ SelectedGoals.Add(selectedGoal.GoalEntryDC);
+ }
+
+ }
+ else
+ {
+ SelectedGoals.Remove(selectedGoal.GoalEntryDC);
+ }
+ }
+ };
+
+ AddPropertyChangedHandler(goal.Children);
+ }
+ }
+
}
//private bool MussGoalTreeAktualisieren(List goalCats, List goals)
@@ -2187,9 +2301,15 @@ namespace BeWo.ViewModel
}
}
Category2Services = newCategoryDict;
-
+
if (Category == null)
+ {
+ if (firstCat == null)
+ {
+ firstCat = SortedCategories.FirstOrDefault();
+ }
Category = firstCat;
+ }
}
public ServiceRecordVM Clone()
@@ -2361,8 +2481,14 @@ namespace BeWo.ViewModel
_SelectedGoals = new ObservableSortCollection(GoalService.CopyGoals(pDataContract.Goals, true), Comparer.ValueListEntryDCComparer);
}
- SelectedGoals.CollectionChanged += (s, e) => StoreDirtyInformation(!SelectedGoals.ContainsSameItemsAs(pDataContract.Goals), PropertyName_SelectedGoals);
-
+ SelectedGoals.CollectionChanged += (s, e) =>
+ {
+ int test = 0;
+ StoreDirtyInformation(!SelectedGoals.ContainsSameItemsAs(pDataContract.Goals),
+ PropertyName_SelectedGoals);
+ };
+
+
}
else
{
@@ -2622,15 +2748,21 @@ namespace BeWo.ViewModel
{
foreach (var item in goals)
{
+ if (item.IsChecked)
+ {
+ selectedGoals.Add(item.GoalEntryDC);
+ }
+
if (item.Children == null || item.Children.Count == 0)
{
- if (item.IsChecked)
- {
- selectedGoals.Add(item.GoalEntryDC);
- }
+ //if (item.IsChecked)
+ //{
+ // selectedGoals.Add(item.GoalEntryDC);
+ //}
}
else
{
+
AddCheckedGoals(item.Children, selectedGoals);
}
}
@@ -2776,6 +2908,9 @@ namespace BeWo.ViewModel
_DurationSTD = (decimal)duration;
+
+ //StoreDirtyInformation(AreDifferent(DataContract.End, (_Date.Value + _StartTime.Value.TimeOfDay).AddMinutes((double)duration)) || AreDifferent(DataContract.Start, _Date.Value + _StartTime.Value.TimeOfDay), "TIME");
+ StoreDirtyInformation(AreDifferent(DataContract.End, _EndTime) || AreDifferent(DataContract.Start, _StartTime), "TIME");
}
else if (_DurationInStunden == ZeiterfassungsDauer.Stunden)
{
@@ -2845,6 +2980,8 @@ namespace BeWo.ViewModel
duration = (double)diff.TotalHours;
_DurationSTD = (decimal)Math.Round(duration,2);
+
+ StoreDirtyInformation(AreDifferent(DataContract.End, _EndTime) || AreDifferent(DataContract.Start, _StartTime), "TIME");
}
FirePropertyChanged(PropertyName_DurationSTD);
diff --git a/BeWo/ViewModel/SupportConceptCostBearerRelVM.cs b/BeWo/ViewModel/SupportConceptCostBearerRelVM.cs
index 5c65a6917..b4af6b062 100644
--- a/BeWo/ViewModel/SupportConceptCostBearerRelVM.cs
+++ b/BeWo/ViewModel/SupportConceptCostBearerRelVM.cs
@@ -213,11 +213,11 @@ namespace BeWo.ViewModel
// this.FirePropertyChanged(PropertyName_ApprovedEndDate);
//}
- if (this.RequestedStartDate == null)
- {
- this._RequestedStartDate = value;
- this.FirePropertyChanged(PropertyName_RequestedStartDate);
- }
+ //if (this.RequestedStartDate == null)
+ //{
+ // this._RequestedStartDate = value;
+ // this.FirePropertyChanged(PropertyName_RequestedStartDate);
+ //}
// if (this.RequestedEndDate == null)
// {
diff --git a/BeWo/ViewModel/VMFactory.cs b/BeWo/ViewModel/VMFactory.cs
index 42ceecc22..bd3c1843c 100644
--- a/BeWo/ViewModel/VMFactory.cs
+++ b/BeWo/ViewModel/VMFactory.cs
@@ -460,10 +460,10 @@ namespace BeWo.ViewModel
r => pCallBack(new BudgetListVM(r.ToList())));
}
- public static void CreateDienstListVMAsync(Action pCallBack)
+ public static void CreateDienstListVMAsync(Action pCallBack)
{
ServiceFacade.DoOperationsServiceAsync(s => s.GetAllDienste(),
- r => pCallBack(new DienstListVM(r.ToList())));
+ r => pCallBack(new DienstInfoListVM(r.ToList())));
}
public static void CreateRatingTypeListVMAsync(Action pCallBack)
diff --git a/BeWo/app.config b/BeWo/app.config
index 4316fcdae..65c6e8920 100644
--- a/BeWo/app.config
+++ b/BeWo/app.config
@@ -9,7 +9,7 @@
-
+
diff --git a/BeWoPlanerMobil/BeWoPlanerMobil.csproj b/BeWoPlanerMobil/BeWoPlanerMobil.csproj
index 300901028..1787173a3 100644
--- a/BeWoPlanerMobil/BeWoPlanerMobil.csproj
+++ b/BeWoPlanerMobil/BeWoPlanerMobil.csproj
@@ -606,7 +606,7 @@
- True
+ False
False
8808
/
diff --git a/BeWoPlanerMobil/Controllers/LoginController.cs b/BeWoPlanerMobil/Controllers/LoginController.cs
index 8027344fd..f0fca0d90 100644
--- a/BeWoPlanerMobil/Controllers/LoginController.cs
+++ b/BeWoPlanerMobil/Controllers/LoginController.cs
@@ -60,7 +60,7 @@ namespace BeWoPlanerMobil.Controllers
Tenant = MobileSessionFacade.Tenant
};
- OperationsService.InsertBeWoMobilBrowserInfo(brauserInfoDC);
+ //OperationsService.InsertBeWoMobilBrowserInfo(brauserInfoDC);
AbstractModel.TimeOfLastAction = $"{DateTime.Now:yyyy-MM-dd}T{DateTime.Now:HH:mm:ss}";
@@ -76,7 +76,7 @@ namespace BeWoPlanerMobil.Controllers
Log.Info($"LoginController.Index(): Login failed! Tenant = {MobileSessionFacade.Tenant}");
ViewData[LoginErrorIndex] = Request.Browser.Browser.Equals("InternetExplorer") ?
- "Dieser Browser ist nicht mit dem mobilen BeWoPlaner komptatibel. Bitte benutzen Sie einen anderen Browser als den Internet Explorer." :
+ "Dieser Browser ist nicht mit dem mobilen BeWoPlaner kompatibel. Bitte benutzen Sie einen anderen Browser als den Internet Explorer." :
"Die Anmeldung ist fehlgeschlagen. Bitte überprüfen Sie Benutzername und Passwort.";
return View("Index");
diff --git a/Data/Data.csproj b/Data/Data.csproj
index 360b478cf..521dd1bce 100644
--- a/Data/Data.csproj
+++ b/Data/Data.csproj
@@ -139,7 +139,8 @@
-
+
+
@@ -604,7 +605,7 @@
Designer
-
+
Designer
@@ -625,6 +626,10 @@
Designer
+
+ Designer
+
+
Designer
diff --git a/Data/DefaultHibernateSessionManager.cs b/Data/DefaultHibernateSessionManager.cs
index b17f7a958..953a5738d 100644
--- a/Data/DefaultHibernateSessionManager.cs
+++ b/Data/DefaultHibernateSessionManager.cs
@@ -69,7 +69,7 @@ namespace BeWo.Data
correctBaseDirectory += splittedBaseDirectory[i] + "\\";
}
- _SessionFactories[CurrentTenant] = new Configuration().Configure(Path.Combine(correctBaseDirectory, @"Multitenancy\" + CurrentTenant + ".config")).BuildSessionFactory();
+ _SessionFactories[CurrentTenant] = new Configuration().Configure(BS.Shared.Core.Utils.CreateSavePath(correctBaseDirectory, @"Multitenancy\" + CurrentTenant + ".config")).BuildSessionFactory();
}
return _SessionFactories[CurrentTenant];
@@ -176,7 +176,7 @@ namespace BeWo.Data
public static bool TenantExists()
{
- var path = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, @"Multitenancy\" + CurrentTenant + ".config");
+ var path = BS.Shared.Core.Utils.CreateSavePath(AppDomain.CurrentDomain.BaseDirectory, @"Multitenancy\" + CurrentTenant + ".config");
return File.Exists(path);
}
diff --git a/Data/Entities/DienstEintrag.cs b/Data/Entities/DienstEintrag.cs
new file mode 100644
index 000000000..ff2b5ff3a
--- /dev/null
+++ b/Data/Entities/DienstEintrag.cs
@@ -0,0 +1,99 @@
+using System;
+using System.Collections.Generic;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using BS.Shared;
+
+namespace BeWo.Data.Entities
+{
+ public class DienstEintrag : BeWoEntityBase
+ {
+ private long _EmployeeOid;
+ private long _WohnheimOid;
+ private long _DienstOid;
+ private int _Zeile;
+ private DateTime _Datum;
+
+ public DienstEintrag()
+ {
+ _Tid = TableID.DienstEintrag;
+ }
+
+ public virtual long EmployeeOid
+ {
+ get
+ {
+ return _EmployeeOid;
+ }
+ set
+ {
+ if (AreDifferent(_EmployeeOid, value))
+ {
+ _EmployeeOid = value;
+ }
+ }
+ }
+
+ public virtual long WohnheimOid
+ {
+ get
+ {
+ return _WohnheimOid;
+ }
+ set
+ {
+ if (AreDifferent(_WohnheimOid, value))
+ {
+ _WohnheimOid = value;
+ }
+ }
+ }
+
+ public virtual long DienstOid
+ {
+ get
+ {
+ return _DienstOid;
+ }
+ set
+ {
+ if (AreDifferent(_DienstOid, value))
+ {
+ _DienstOid = value;
+ }
+ }
+ }
+
+ public virtual int Zeile
+ {
+ get
+ {
+ return _Zeile;
+ }
+ set
+ {
+ if (AreDifferent(_Zeile, value))
+ {
+ _Zeile = value;
+ }
+ }
+ }
+
+ public virtual DateTime Datum
+ {
+ get
+ {
+ return _Datum;
+ }
+ set
+ {
+ if (AreDifferent(_Datum, value))
+ {
+ _Datum = value;
+ }
+ }
+ }
+ }
+}
diff --git a/Data/Entities/Dienst.cs b/Data/Entities/DienstInfo.cs
similarity index 95%
rename from Data/Entities/Dienst.cs
rename to Data/Entities/DienstInfo.cs
index 6049f743e..7fb8523f2 100644
--- a/Data/Entities/Dienst.cs
+++ b/Data/Entities/DienstInfo.cs
@@ -8,7 +8,7 @@ using BS.Shared;
namespace BeWo.Data.Entities
{
- public class Dienst : BeWoEntityBase
+ public class DienstInfo : BeWoEntityBase
{
private string _Dienstname;
private string _Kurz;
@@ -17,9 +17,9 @@ namespace BeWo.Data.Entities
private DateTime _Ende;
private int _Pause;
- public Dienst()
+ public DienstInfo()
{
- _Tid = TableID.Dienst;
+ _Tid = TableID.DienstInfo;
}
public virtual string DienstName
diff --git a/Data/Entities/Employee.cs b/Data/Entities/Employee.cs
index f5fb0be45..339cd438f 100644
--- a/Data/Entities/Employee.cs
+++ b/Data/Entities/Employee.cs
@@ -495,6 +495,10 @@ namespace BeWo.Data.Entities
{
return Person.LastName + ", " + Person.FirstName;
}
-
- }
+
+ public override int GetHashCode()
+ {
+ return GetType().Name.GetHashCode() ^ Oid.GetHashCode();
+ }
+ }
}
\ No newline at end of file
diff --git a/Data/ICD10/ICD10DAO.cs b/Data/ICD10/ICD10DAO.cs
index 7e36a06fc..d346382a6 100644
--- a/Data/ICD10/ICD10DAO.cs
+++ b/Data/ICD10/ICD10DAO.cs
@@ -32,11 +32,11 @@ namespace BeWo.Data.ICD10
//_File = XDocument.Load(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, @"bin\ICD10\icd10gm2012syst_claml_20110923.xml"));
string file = ConfigurationManager.AppSettings.Get("ICD10File");
if (String.IsNullOrEmpty(file) ||
- !File.Exists(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, @"bin\ICD10\" + file)))
+ !File.Exists(BS.Shared.Core.Utils.CreateSavePath(AppDomain.CurrentDomain.BaseDirectory, @"bin\ICD10\" + file)))
{
file = "icd10.xml";
}
- file = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, @"bin\ICD10\" + file);
+ file = BS.Shared.Core.Utils.CreateSavePath(AppDomain.CurrentDomain.BaseDirectory, @"bin\ICD10\" + file);
_File = XDocument.Load(file);
diff --git a/Data/ICF/ICFDAO.cs b/Data/ICF/ICFDAO.cs
index 850502aab..c34a4a8ef 100644
--- a/Data/ICF/ICFDAO.cs
+++ b/Data/ICF/ICFDAO.cs
@@ -22,11 +22,11 @@ namespace BeWo.Data.ICF
{
string file = ConfigurationManager.AppSettings.Get("ICFFile");
if (String.IsNullOrEmpty(file) ||
- !File.Exists(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, @"bin\ICF\" + file)))
+ !File.Exists(BS.Shared.Core.Utils.CreateSavePath(AppDomain.CurrentDomain.BaseDirectory, @"bin\ICF\" + file)))
{
file = "icf.xml";
}
- file = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, @"bin\ICF\" + file);
+ file = BS.Shared.Core.Utils.CreateSavePath(AppDomain.CurrentDomain.BaseDirectory, @"bin\ICF\" + file);
_File = XDocument.Load(file);
//_File = XDocument.Load(@"D:\Projects\BeWoPlaner\BeWo\Data\ICF\icf.xml");
diff --git a/Data/Mappings/DienstEintrag.hbm.xml b/Data/Mappings/DienstEintrag.hbm.xml
new file mode 100644
index 000000000..c1d9034a3
--- /dev/null
+++ b/Data/Mappings/DienstEintrag.hbm.xml
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Data/Mappings/Dienst.hbm.xml b/Data/Mappings/DienstInfo.hbm.xml
similarity index 96%
rename from Data/Mappings/Dienst.hbm.xml
rename to Data/Mappings/DienstInfo.hbm.xml
index 5a39e27be..ee4929a64 100644
--- a/Data/Mappings/Dienst.hbm.xml
+++ b/Data/Mappings/DienstInfo.hbm.xml
@@ -1,6 +1,6 @@

-
+
diff --git a/Data/WCFHibernateSessionManager.cs b/Data/WCFHibernateSessionManager.cs
index 729d4f501..e13a9acae 100644
--- a/Data/WCFHibernateSessionManager.cs
+++ b/Data/WCFHibernateSessionManager.cs
@@ -52,7 +52,7 @@ namespace BeWo.Data
logger.AddAppender(new TraceAppender { Layout = new SimpleLayout() });
hierarchy.Configured = true;
#endif
- _SessionFactories[MultitenancyOperationContextExt.Current.Tenant] = new Configuration().Configure(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, @"Multitenancy\" + MultitenancyOperationContextExt.Current.Tenant + ".config")).BuildSessionFactory();
+ _SessionFactories[MultitenancyOperationContextExt.Current.Tenant] = new Configuration().Configure(BS.Shared.Core.Utils.CreateSavePath(AppDomain.CurrentDomain.BaseDirectory, @"Multitenancy\" + MultitenancyOperationContextExt.Current.Tenant + ".config")).BuildSessionFactory();
}
@@ -163,7 +163,7 @@ namespace BeWo.Data
public static bool TenantExists()
{
- String path = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, @"Multitenancy\" + MultitenancyOperationContextExt.Current.Tenant + ".config");
+ String path = BS.Shared.Core.Utils.CreateSavePath(AppDomain.CurrentDomain.BaseDirectory, @"Multitenancy\" + MultitenancyOperationContextExt.Current.Tenant + ".config");
return File.Exists(path);
}
diff --git a/Host/Download.aspx.cs b/Host/Download.aspx.cs
index 230de2fcd..61473ace1 100644
--- a/Host/Download.aspx.cs
+++ b/Host/Download.aspx.cs
@@ -24,7 +24,7 @@ public partial class Download : Page
if (SecurityUtils.CheckToken(token))
{
string lFileID = this.Request.Params["fileid"];
- string lPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, lFileID + ".tmp");
+ string lPath = BS.Shared.Core.Utils.CreateSavePath(AppDomain.CurrentDomain.BaseDirectory, lFileID + ".tmp");
using (FileStream uFileStream = File.Open(lPath, FileMode.Open))
{
diff --git a/Host/Multitenancy/demo.config b/Host/Multitenancy/demo.config
index 9bd275e8f..fc0645ed6 100644
--- a/Host/Multitenancy/demo.config
+++ b/Host/Multitenancy/demo.config
@@ -17,7 +17,7 @@
- Server=localhost;Password=root;User ID=root; Initial Catalog=1111111111
+ Server=localhost;Password=root;User ID=root; Initial Catalog=bewodemo
diff --git a/Host/ReportView.aspx.cs b/Host/ReportView.aspx.cs
index 9e13893f8..879f7e06e 100644
--- a/Host/ReportView.aspx.cs
+++ b/Host/ReportView.aspx.cs
@@ -18,6 +18,7 @@ using DevExpress.XtraPrinting;
using DevExpress.XtraReports.UI;
using Page = System.Web.UI.Page;
+using System.Globalization;
namespace Host
{
@@ -141,6 +142,12 @@ namespace Host
case ReportTypes.SBDCharacteristics:
report = CreateSBDCharacteristicsReport();
break;
+ case ReportTypes.AbsenceReport:
+ report = CreateAbsenceReport();
+ break;
+ case ReportTypes.RosterReport:
+ report = CreateRosterReport();
+ break;
default:
report = CreateQueryReport();
break;
@@ -159,8 +166,8 @@ namespace Host
Response.Write("Session ist abgelaufen! Bitte erstellen Sie den Bericht erneut. Nach Erstellen des Berichts haben Sie 10 Min. Zeit diesen auszudrucken.");
return new XtraReport();
}
-
- private XtraReport CreateTestReportKalender()
+
+ private XtraReport CreateTestReportKalender()
{
var abc = Request.Params["r"].Split('-');
var rightsList = abc.Select(r => (UserRightType)Int32.Parse(r)).ToList();
@@ -594,6 +601,29 @@ namespace Host
return reportCreator.CreateSBDCharacteristicsReport(customerOid);
}
+ private XtraReport CreateAbsenceReport()
+ {
+ DateTime dt = DateTime.ParseExact(Request.Params["dt"], "MM.yyyy", CultureInfo.InvariantCulture);
+ List absenceIDs = null;
+ List empIDs = null;
+
+ if (Request.Params["ar"] != null)
+ absenceIDs = Request.Params["ar"].Split(';').Select(long.Parse).ToList();
+
+ if (Request.Params["et"] != null)
+ absenceIDs = Request.Params["et"].Split(';').Select(long.Parse).ToList();
+
+ return reportCreator.CreateAbsenceReport(dt, absenceIDs, empIDs);
+ }
+
+ private XtraReport CreateRosterReport()
+ {
+ DateTime dt = DateTime.ParseExact(Request.Params["dt"], "MM.yyyy", CultureInfo.InvariantCulture);
+ long wOid = int.Parse(Request.Params["wid"]);
+
+ return reportCreator.CreateRosterReport(wOid, dt);
+ }
+
private AbstractReportCreator GetReportCreator()
{
String t = slicedToken["tenant"].ToString();
@@ -628,14 +658,14 @@ namespace Host
creator.ReportPath = customerDllPath;
#if DEBUG
- creator.TempPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, @"demo\temp");
+ creator.TempPath = BS.Shared.Core.Utils.CreateSavePath(AppDomain.CurrentDomain.BaseDirectory, @"demo\temp");
#else
- creator.TempPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, t + @"\temp");
+ creator.TempPath = BS.Shared.Core.Utils.CreateSavePath(AppDomain.CurrentDomain.BaseDirectory, t + @"\temp");
#endif
- return creator;
+ return creator;
}
}
}
\ No newline at end of file
diff --git a/Host/ResetPassword.aspx.cs b/Host/ResetPassword.aspx.cs
index 94dd50872..1ad4c492a 100644
--- a/Host/ResetPassword.aspx.cs
+++ b/Host/ResetPassword.aspx.cs
@@ -18,74 +18,74 @@ namespace Host
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack) return;
-
- //var c = codeTextBox.Text;
- //var param = Request.Params["v"];
- //var decodiert = SecurityUtils.DecryptString(param);
- //var blubb = decodiert.Split('&');
- //var codeoid = Convert.ToInt64(blubb[0].Split('=')[1]);
- //var pfad = blubb[1].Split('=')[1];
- //var useroid = Convert.ToInt64(blubb[2].Split('=')[1]);
- //var sessionFactory = new Configuration().Configure(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, pfad)).BuildSessionFactory();
+ //var c = codeTextBox.Text;
+ //var param = Request.Params["v"];
+ //var decodiert = SecurityUtils.DecryptString(param);
+ //var blubb = decodiert.Split('&');
+ //var codeoid = Convert.ToInt64(blubb[0].Split('=')[1]);
+ //var pfad = blubb[1].Split('=')[1];
+ //var useroid = Convert.ToInt64(blubb[2].Split('=')[1]);
- //var cs = Context.Items["nhibernate.current_session"] as ISession;
- //if (cs == null)
- //{
- // cs = sessionFactory.OpenSession();
- // Context.Items["nhibernate.current_session"] = cs;
- //}
+ //var sessionFactory = new Configuration().Configure(BS.Shared.Core.Utils.CreateSavePath(AppDomain.CurrentDomain.BaseDirectory, pfad)).BuildSessionFactory();
- //var rpi = cs.Load(codeoid);
-
- //var isGreen = rpi.Code.Equals(c);
- //if (isGreen)
- //{
- // rpi.HasToChangePW = true;
- // rpi.ResetDate = DateTime.Now;
-
- // var lTransaction = cs.BeginTransaction();
- // try
- // {
- // cs.SaveOrUpdate(rpi);
- // lTransaction.Commit();
- // }
- // catch (Exception ex)
- // {
- // lTransaction.Rollback();
- // throw ex;
- // }
- //}
-
- //ergebnisLabel.Text = isGreen ? "Ihr Passwort wurde erfolgreich zurückgesetzt und an Sie per E-Mail geschickt" : "Ihr Passwort konnte nicht zurückgesetzt werden. Bitte überprüfen Sie den Code und versuchen es später nochmal.";
- //ergebnisLabel.ForeColor = isGreen ? System.Drawing.Color.Green : System.Drawing.Color.Red;
- //ergebnisLabel.Visible = true;
-
- //var neuesPasswort = SecurityUtils.CreateRandomString(8, false, true);
+ //var cs = Context.Items["nhibernate.current_session"] as ISession;
+ //if (cs == null)
+ //{
+ // cs = sessionFactory.OpenSession();
+ // Context.Items["nhibernate.current_session"] = cs;
+ //}
- //var user = cs.Load(useroid);
- //user.ChangePassword(neuesPasswort);
- //var email = user.Employee.Person.Contacts.FirstOrDefault(fod => fod.Type == ContactType.business_Mail).Value;
+ //var rpi = cs.Load(codeoid);
- //var text = string.Format("Sehr geehrter BeWoPlaner Benutzer,\nIhr neues Passwort lautet {0}. Bitte ändern Sie dieses umgehend bei der nächsten Anmeldung.", neuesPasswort);
+ //var isGreen = rpi.Code.Equals(c);
+ //if (isGreen)
+ //{
+ // rpi.HasToChangePW = true;
+ // rpi.ResetDate = DateTime.Now;
- //Utils.SendMail("Passwort zurückgesetzt", text, email);
-
- //var lTransaction2 = cs.BeginTransaction();
- //try
- //{
- // cs.SaveOrUpdate(user);
- // lTransaction2.Commit();
- //}
- //catch (Exception ex)
- //{
- // lTransaction2.Rollback();
- // throw ex;
- //}
+ // var lTransaction = cs.BeginTransaction();
+ // try
+ // {
+ // cs.SaveOrUpdate(rpi);
+ // lTransaction.Commit();
+ // }
+ // catch (Exception ex)
+ // {
+ // lTransaction.Rollback();
+ // throw ex;
+ // }
+ //}
- //cs.Close();
- //Context.Items.Remove("nhibernate.current_session");
- //sessionFactory.Close();
- }
- }
+ //ergebnisLabel.Text = isGreen ? "Ihr Passwort wurde erfolgreich zurückgesetzt und an Sie per E-Mail geschickt" : "Ihr Passwort konnte nicht zurückgesetzt werden. Bitte überprüfen Sie den Code und versuchen es später nochmal.";
+ //ergebnisLabel.ForeColor = isGreen ? System.Drawing.Color.Green : System.Drawing.Color.Red;
+ //ergebnisLabel.Visible = true;
+
+ //var neuesPasswort = SecurityUtils.CreateRandomString(8, false, true);
+
+ //var user = cs.Load(useroid);
+ //user.ChangePassword(neuesPasswort);
+ //var email = user.Employee.Person.Contacts.FirstOrDefault(fod => fod.Type == ContactType.business_Mail).Value;
+
+ //var text = string.Format("Sehr geehrter BeWoPlaner Benutzer,\nIhr neues Passwort lautet {0}. Bitte ändern Sie dieses umgehend bei der nächsten Anmeldung.", neuesPasswort);
+
+ //Utils.SendMail("Passwort zurückgesetzt", text, email);
+
+ //var lTransaction2 = cs.BeginTransaction();
+ //try
+ //{
+ // cs.SaveOrUpdate(user);
+ // lTransaction2.Commit();
+ //}
+ //catch (Exception ex)
+ //{
+ // lTransaction2.Rollback();
+ // throw ex;
+ //}
+
+ //cs.Close();
+ //Context.Items.Remove("nhibernate.current_session");
+ //sessionFactory.Close();
+ }
+ }
}
\ No newline at end of file
diff --git a/Model/Changes_2020_02_26 Dienst zu DienstInfo geändert.txt b/Model/Changes_2020_02_26 Dienst zu DienstInfo geändert.txt
new file mode 100644
index 000000000..55c23aa26
--- /dev/null
+++ b/Model/Changes_2020_02_26 Dienst zu DienstInfo geändert.txt
@@ -0,0 +1,2 @@
+ALTER TABLE `bewodemo`.`dienst`
+RENAME TO `bewodemo`.`dienstinfo` ;
diff --git a/Model/Changes_2020_02_26 Diensteinträge hinzugefügt.txt b/Model/Changes_2020_02_26 Diensteinträge hinzugefügt.txt
new file mode 100644
index 000000000..289a440b5
--- /dev/null
+++ b/Model/Changes_2020_02_26 Diensteinträge hinzugefügt.txt
@@ -0,0 +1,18 @@
+CREATE TABLE `diensteintrag` (
+ `Oid` bigint(19) NOT NULL AUTO_INCREMENT,
+ `Tid` int(10) DEFAULT NULL,
+ `IsActive` tinyint(4) DEFAULT NULL,
+ `Notice` varchar(1024) DEFAULT NULL,
+ `InsTs` datetime DEFAULT NULL,
+ `InsUser` varchar(256) DEFAULT NULL,
+ `Version` bigint(19) DEFAULT NULL,
+ `UdpUser` varchar(256) DEFAULT NULL,
+ `SystemEntryID` int(10) DEFAULT NULL,
+
+ `EmployeeOid` bigint(19) DEFAULT NULL,
+ `WohnheimOid` bigint(19) DEFAULT NULL,
+ `DienstOid` bigint(19) DEFAULT NULL,
+ `Zeile` int(10) DEFAULT NULL,
+ `Datum` datetime DEFAULT NULL,
+ PRIMARY KEY (`Oid`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
\ No newline at end of file
diff --git a/Report/AbstractReportCreator.cs b/Report/AbstractReportCreator.cs
index d4613cf1c..dcfeeb66c 100644
--- a/Report/AbstractReportCreator.cs
+++ b/Report/AbstractReportCreator.cs
@@ -76,6 +76,8 @@ namespace BeWo.Report
public abstract XtraReport CreateCustomReport(long employeeOid, String reportName);
+ public abstract XtraReport CreateAbsenceReport(DateTime dt, List abs, List empTypes);
+ public abstract XtraReport CreateRosterReport(long wOid, DateTime dt);
public abstract XtraReport CreateKilometerauswertung(long customerOid, DateTime rangeDate);
public abstract XtraReport CreateKilometerauswertungForAllCustomers(List customerOids, DateTime rangeDate);
diff --git a/Report/DefaultReportCreator.cs b/Report/DefaultReportCreator.cs
index 2a73b9d2b..445b03c9a 100644
--- a/Report/DefaultReportCreator.cs
+++ b/Report/DefaultReportCreator.cs
@@ -1,5 +1,6 @@

+
using System;
using System.Collections.Generic;
using System.Data;
@@ -24,356 +25,356 @@ using DevExpress.XtraReports.UI;
namespace BeWo.Report
{
- public class DefaultReportCreator : AbstractReportCreator
- {
- public IBeWoReport FindReportImp()
- {
- return FindReportImp(null, null);
- }
+ public class DefaultReportCreator : AbstractReportCreator
+ {
+ public IBeWoReport FindReportImp()
+ {
+ return FindReportImp(null, null);
+ }
- public IBeWoReport FindReportImp(string specificReportId)
- {
- return this.FindReportImp(specificReportId, null);
- }
+ public IBeWoReport FindReportImp(string specificReportId)
+ {
+ return this.FindReportImp(specificReportId, null);
+ }
- public IBeWoReport FindReportImp(string specificReportId, string typename)
- {
- IBeWoReport result = null;
+ public IBeWoReport FindReportImp(string specificReportId, string typename)
+ {
+ IBeWoReport result = null;
- Type[] lAllReportTypes = null;
+ Type[] lAllReportTypes = null;
- if (Tenant != null && File.Exists(ReportPath))
- {
- lAllReportTypes = Assembly.LoadFrom(ReportPath).GetTypes();
- result = FindReportImp(lAllReportTypes, specificReportId, typename, true);
- }
+ if (Tenant != null && File.Exists(ReportPath))
+ {
+ lAllReportTypes = Assembly.LoadFrom(ReportPath).GetTypes();
+ result = FindReportImp(lAllReportTypes, specificReportId, typename, true);
+ }
-
- if (result == null)
- {
- lAllReportTypes = typeof(IBeWoReport).Assembly.GetTypes();
- result = FindReportImp(lAllReportTypes, specificReportId, typename, false);
- }
- return result;
- }
+ if (result == null)
+ {
+ lAllReportTypes = typeof(IBeWoReport).Assembly.GetTypes();
+ result = FindReportImp(lAllReportTypes, specificReportId, typename, false);
+ }
- public IBeWoReport FindReportImp(Type[] lAllReportTypes, string specificReportId, string typename, bool doNotUseReportsWithIdentifier)
- {
- IBeWoReport result = null;
+ return result;
+ }
- if (!string.IsNullOrEmpty(specificReportId) && !string.IsNullOrEmpty(typename))
- {
- var cbSpecific = lAllReportTypes
- .Where(i => typeof(IBeWoReport).IsAssignableFrom(i))
- .FirstOrDefault(t => t.GetCustomAttributes(typeof(IDSpecificClassAttribute), true)
- .ToList()
- .Exists(i =>
- {
- var attr = (IDSpecificClassAttribute)i;
- if (attr.Identifiers != null)
- return attr.Identifiers.Contains(specificReportId);
- if (!String.IsNullOrEmpty(attr.Identifier))
- return attr.Identifier.Equals(specificReportId);
- return false;
+ public IBeWoReport FindReportImp(Type[] lAllReportTypes, string specificReportId, string typename, bool doNotUseReportsWithIdentifier)
+ {
+ IBeWoReport result = null;
- }
- ) && t.FullName == typename);
- if (cbSpecific != null)
- result = Activator.CreateInstance(cbSpecific) as IBeWoReport;
- }
+ if (!string.IsNullOrEmpty(specificReportId) && !string.IsNullOrEmpty(typename))
+ {
+ var cbSpecific = lAllReportTypes
+ .Where(i => typeof(IBeWoReport).IsAssignableFrom(i))
+ .FirstOrDefault(t => t.GetCustomAttributes(typeof(IDSpecificClassAttribute), true)
+ .ToList()
+ .Exists(i =>
+ {
+ var attr = (IDSpecificClassAttribute)i;
+ if (attr.Identifiers != null)
+ return attr.Identifiers.Contains(specificReportId);
+ if (!String.IsNullOrEmpty(attr.Identifier))
+ return attr.Identifier.Equals(specificReportId);
+ return false;
- if (!string.IsNullOrEmpty(typename))
- {
- var cbSpecific = lAllReportTypes.FirstOrDefault(t => t.FullName == typename);
- if (cbSpecific != null)
- result = Activator.CreateInstance(cbSpecific) as IBeWoReport;
- }
+ }
+ ) && t.FullName == typename);
+ if (cbSpecific != null)
+ result = Activator.CreateInstance(cbSpecific) as IBeWoReport;
+ }
- if (!string.IsNullOrEmpty(specificReportId))
- {
- var cbSpecific = lAllReportTypes
- .Where(i => typeof(IBeWoReport).IsAssignableFrom(i))
- .FirstOrDefault(t => t.GetCustomAttributes(typeof(IDSpecificClassAttribute), true)
- .ToList()
- .Exists(i =>
- {
- var attr = (IDSpecificClassAttribute)i;
- if (attr.Identifiers != null)
- return attr.Identifiers.Contains(specificReportId);
- if (!String.IsNullOrEmpty(attr.Identifier))
- return attr.Identifier.Equals(specificReportId);
- return false;
+ if (!string.IsNullOrEmpty(typename))
+ {
+ var cbSpecific = lAllReportTypes.FirstOrDefault(t => t.FullName == typename);
+ if (cbSpecific != null)
+ result = Activator.CreateInstance(cbSpecific) as IBeWoReport;
+ }
- }
- ));
- if (cbSpecific != null)
- result = Activator.CreateInstance(cbSpecific) as IBeWoReport;
- }
+ if (!string.IsNullOrEmpty(specificReportId))
+ {
+ var cbSpecific = lAllReportTypes
+ .Where(i => typeof(IBeWoReport).IsAssignableFrom(i))
+ .FirstOrDefault(t => t.GetCustomAttributes(typeof(IDSpecificClassAttribute), true)
+ .ToList()
+ .Exists(i =>
+ {
+ var attr = (IDSpecificClassAttribute)i;
+ if (attr.Identifiers != null)
+ return attr.Identifiers.Contains(specificReportId);
+ if (!String.IsNullOrEmpty(attr.Identifier))
+ return attr.Identifier.Equals(specificReportId);
+ return false;
- if (result == null)
- {
- foreach (var iType in lAllReportTypes)
- if (typeof(IBeWoReport).IsAssignableFrom(iType))
- if (iType.Name == specificReportId)
- result = Activator.CreateInstance(iType) as IBeWoReport;
- }
+ }
+ ));
+ if (cbSpecific != null)
+ result = Activator.CreateInstance(cbSpecific) as IBeWoReport;
+ }
- if (result == null)
- {
- var list = lAllReportTypes.Where(t => typeof(IBeWoReport).IsAssignableFrom(t)).ToList();
+ if (result == null)
+ {
+ foreach (var iType in lAllReportTypes)
+ if (typeof(IBeWoReport).IsAssignableFrom(iType))
+ if (iType.Name == specificReportId)
+ result = Activator.CreateInstance(iType) as IBeWoReport;
+ }
- if (list.Count == 1)
- {
- var type = list[0];
- if (doNotUseReportsWithIdentifier)
- {
- var attrs = type.GetCustomAttributes(typeof(IDSpecificClassAttribute), true);
- if (attrs.Length == 0)
- return Activator.CreateInstance(type) as IBeWoReport;
- }
- else
- {
- result = Activator.CreateInstance(type) as IBeWoReport;
- }
-
- }
- else if (list.Count > 1)
- {
- foreach (var type in list)
- {
- var attrs = type.GetCustomAttributes(typeof (IDSpecificClassAttribute), true);
- if (attrs.Length == 0)
- return Activator.CreateInstance(type) as IBeWoReport;
- }
- if (!doNotUseReportsWithIdentifier)
- {
- result = Activator.CreateInstance(list[0]) as IBeWoReport;
- }
- }
+ if (result == null)
+ {
+ var list = lAllReportTypes.Where(t => typeof(IBeWoReport).IsAssignableFrom(t)).ToList();
- }
+ if (list.Count == 1)
+ {
+ var type = list[0];
+ if (doNotUseReportsWithIdentifier)
+ {
+ var attrs = type.GetCustomAttributes(typeof(IDSpecificClassAttribute), true);
+ if (attrs.Length == 0)
+ return Activator.CreateInstance(type) as IBeWoReport;
+ }
+ else
+ {
+ result = Activator.CreateInstance(type) as IBeWoReport;
+ }
- return result;
- }
+ }
+ else if (list.Count > 1)
+ {
+ foreach (var type in list)
+ {
+ var attrs = type.GetCustomAttributes(typeof(IDSpecificClassAttribute), true);
+ if (attrs.Length == 0)
+ return Activator.CreateInstance(type) as IBeWoReport;
+ }
+ if (!doNotUseReportsWithIdentifier)
+ {
+ result = Activator.CreateInstance(list[0]) as IBeWoReport;
+ }
+ }
- public override XtraReport CreateCustomerDataReport(long customerOid)
- {
- var lCustomerDataReport = FindReportImp();
- lCustomerDataReport.SetReportDataSource(CustomerDataRO.Create(MapperFactory.CustomerDC_Customer.MapToNewDC(DAOFactory.GenericDAO.LoadByID(customerOid))));
- return lCustomerDataReport as XtraReport;
- }
+ }
- public override XtraReport CreateCustomerInvoiceReport(long invoiceOid)
- {
+ return result;
+ }
- IBeWoReport lInvoiceCustomerReport = FindReportImp();
- lInvoiceCustomerReport.SetReportDataSource(InvoiceCustomerRO.Create(MapperFactory.InvoiceBaseDC_InvoiceBase.MapToNewDC(DAOFactory.GenericDAO.LoadByID(invoiceOid))));
- return lInvoiceCustomerReport as XtraReport;
- }
+ public override XtraReport CreateCustomerDataReport(long customerOid)
+ {
+ var lCustomerDataReport = FindReportImp();
+ lCustomerDataReport.SetReportDataSource(CustomerDataRO.Create(MapperFactory.CustomerDC_Customer.MapToNewDC(DAOFactory.GenericDAO.LoadByID(customerOid))));
+ return lCustomerDataReport as XtraReport;
+ }
- public override XtraReport CreateAssessmentSheetReport(long customerOid, int month, int year)
- {
- IBeWoReport report = FindReportImp();
- report.SetReportDataSource(AssessmentSheetRO.Create(DAOFactory.GenericDAO.LoadByID(customerOid), new DateTime(year, month, 1)));
- return report as XtraReport;
- }
+ public override XtraReport CreateCustomerInvoiceReport(long invoiceOid)
+ {
+
+ IBeWoReport lInvoiceCustomerReport = FindReportImp();
+ lInvoiceCustomerReport.SetReportDataSource(InvoiceCustomerRO.Create(MapperFactory.InvoiceBaseDC_InvoiceBase.MapToNewDC(DAOFactory.GenericDAO.LoadByID(invoiceOid))));
+ return lInvoiceCustomerReport as XtraReport;
+ }
+
+ public override XtraReport CreateAssessmentSheetReport(long customerOid, int month, int year)
+ {
+ IBeWoReport