diff --git a/BeWo/BeWo.csproj b/BeWo/BeWo.csproj
index 26cdfa6fe..8ed9d7433 100644
--- a/BeWo/BeWo.csproj
+++ b/BeWo/BeWo.csproj
@@ -147,6 +147,7 @@
DataTemplates.xaml
+
@@ -154,6 +155,7 @@
+
@@ -206,6 +208,9 @@
DatenbereinigungView.xaml
+
+ TeamFolderRightView.xaml
+
RtfEditView.xaml
@@ -342,6 +347,10 @@
MSBuild:Compile
Designer
+
+ MSBuild:Compile
+ Designer
+
MSBuild:Compile
Designer
diff --git a/BeWo/BeWoApp.xaml.cs b/BeWo/BeWoApp.xaml.cs
index 302a615e5..0831c6042 100644
--- a/BeWo/BeWoApp.xaml.cs
+++ b/BeWo/BeWoApp.xaml.cs
@@ -660,7 +660,8 @@ namespace BeWo
AppSettings.ShowAI = true;
AppSettings.ShowAIVoice = true;
-
+ AppSettings.ShowVorlagen = true;
+
AppSettings.ShowWorktime = true;
AppSettings.ShowPersehImport = true;
AppSettings.ShowWohnhilfe = true;
diff --git a/BeWo/MainControl.xaml.cs b/BeWo/MainControl.xaml.cs
index 10911d214..305b70604 100644
--- a/BeWo/MainControl.xaml.cs
+++ b/BeWo/MainControl.xaml.cs
@@ -154,7 +154,7 @@ namespace BeWo
AufOffeneTerminePruefen();
- //BeWoApp.InitBlubb();
+ //BeWoApp.InitBlubb();
#if !DEBUG
if (this.button_Scheduler.Visibility == Visibility.Visible && !BeWoApp.AppSettings.IsSchedulerAllowed)
@@ -176,7 +176,7 @@ namespace BeWo
}
- if (BeWoApp.LoggedOnUser != null && BeWoApp.LoggedOnUser.HasRight(UserRightType.DocumentsAllowViewAll) && BeWoApp.AppSettings.ShowVorlagen)
+ if (BeWoApp.LoggedOnUser != null && BeWoApp.LoggedOnUser.HasRight(UserRightType.DocumentsAllowViewAll) && BeWoApp.AppSettings.ShowVorlagen && (BeWoApp.LoggedOnUser.HasRight(UserRightType.VorlagenViewAll) || BeWoApp.LoggedOnUser.HasRight(UserRightType.VorlagenViewOwnTeams))
{
this.button_Dokumente.Visibility = Visibility.Visible;
}
@@ -187,10 +187,10 @@ namespace BeWo
#endif
#if DEBUG
- //DebugHelperViewButton.Visibility = Visibility.Visible;
+ //DebugHelperViewButton.Visibility = Visibility.Visible;
#endif
- UpdateMandator();
+ UpdateMandator();
var controlFactory = new BeWoControlFactory();
var windowFactory = new BeWoWindowFactory();
diff --git a/BeWo/ServiceProxy/GeneratedEmployeeService.cs b/BeWo/ServiceProxy/GeneratedEmployeeService.cs
index 3fab36220..a725d4136 100644
--- a/BeWo/ServiceProxy/GeneratedEmployeeService.cs
+++ b/BeWo/ServiceProxy/GeneratedEmployeeService.cs
@@ -222,6 +222,14 @@ namespace BeWo.ServiceProxy
"", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BS.Shared.Core")]
System.Collections.Generic.List GetActiveCompactEmployeesByOids(System.Collections.Generic.List employeeOids);
+ [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IEmployeeService/GetTeamRightsForFolder", ReplyAction="http://tempuri.org/IEmployeeService/GetTeamRightsForFolderResponse")]
+ [System.ServiceModel.FaultContractAttribute(typeof(BS.Shared.Core.BeWoFault), Action="http://tempuri.org/IEmployeeService/GetTeamRightsForFolderBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BS.Shared.Core")]
+ System.Collections.Generic.List GetTeamRightsForFolder(long folderOid);
+
+ [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IEmployeeService/SaveTeamFolderRights", ReplyAction="http://tempuri.org/IEmployeeService/SaveTeamFolderRightsResponse")]
+ [System.ServiceModel.FaultContractAttribute(typeof(BS.Shared.Core.BeWoFault), Action="http://tempuri.org/IEmployeeService/SaveTeamFolderRightsBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BS.Shared.Core")]
+ System.Collections.Generic.List SaveTeamFolderRights(System.Collections.Generic.List list);
+
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IEmployeeService/ArchiveEmployee", ReplyAction="http://tempuri.org/IEmployeeService/ArchiveEmployeeResponse")]
[System.ServiceModel.FaultContractAttribute(typeof(BS.Shared.Core.BeWoFault), Action="http://tempuri.org/IEmployeeService/ArchiveEmployeeBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BS.Shared.Core")]
void ArchiveEmployee(long pOid, long pVersion);
@@ -848,6 +856,16 @@ namespace BeWo.ServiceProxy
return base.Channel.GetActiveCompactEmployeesByOids(employeeOids);
}
+ public System.Collections.Generic.List GetTeamRightsForFolder(long folderOid)
+ {
+ return base.Channel.GetTeamRightsForFolder(folderOid);
+ }
+
+ public System.Collections.Generic.List SaveTeamFolderRights(System.Collections.Generic.List list)
+ {
+ return base.Channel.SaveTeamFolderRights(list);
+ }
+
public void ArchiveEmployee(long pOid, long pVersion)
{
base.Channel.ArchiveEmployee(pOid, pVersion);
diff --git a/BeWo/ServiceProxy/GeneratedOperationsService.cs b/BeWo/ServiceProxy/GeneratedOperationsService.cs
index f4e47b03b..0e8e00812 100644
--- a/BeWo/ServiceProxy/GeneratedOperationsService.cs
+++ b/BeWo/ServiceProxy/GeneratedOperationsService.cs
@@ -17,6 +17,11 @@ namespace BeWo.ServiceProxy
public interface IOperationsService
{
+ [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/CreateRtfDocumentFromTemplate", ReplyAction="http://tempuri.org/IOperationsService/CreateRtfDocumentFromTemplateResponse")]
+ [System.ServiceModel.FaultContractAttribute(typeof(BS.Shared.Core.BeWoFault), Action="http://tempuri.org/IOperationsService/CreateRtfDocumentFromTemplateBeWoFaultFault" +
+ "", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BS.Shared.Core")]
+ string CreateRtfDocumentFromTemplate(long vorlageOid, BS.Shared.TableID objectTid, System.Collections.Generic.List objectOids);
+
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/StartAIVoice", ReplyAction="http://tempuri.org/IOperationsService/StartAIVoiceResponse")]
[System.ServiceModel.FaultContractAttribute(typeof(BS.Shared.Core.BeWoFault), Action="http://tempuri.org/IOperationsService/StartAIVoiceBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BS.Shared.Core")]
BS.Shared.DataContracts.AiVoiceDataDC StartAIVoice();
@@ -37,6 +42,10 @@ namespace BeWo.ServiceProxy
[System.ServiceModel.FaultContractAttribute(typeof(BS.Shared.Core.BeWoFault), Action="http://tempuri.org/IOperationsService/DeleteInactivePersonsBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BS.Shared.Core")]
string DeleteInactivePersons(System.Collections.Generic.List persons, bool anonymisieren);
+ [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/InsertNewDienstvertretung2", ReplyAction="http://tempuri.org/IOperationsService/InsertNewDienstvertretung2Response")]
+ [System.ServiceModel.FaultContractAttribute(typeof(BS.Shared.Core.BeWoFault), Action="http://tempuri.org/IOperationsService/InsertNewDienstvertretung2BeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BS.Shared.Core")]
+ bool InsertNewDienstvertretung2(BS.Shared.DataContracts.DienstvertretungDC dienstvertretung, System.Collections.Generic.List alleDiensteintraege, System.Collections.Generic.List alleDienstvertretungen, int day, System.DateTime pflichtStart, System.DateTime pflichtEnde);
+
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/UpdateDienstEintrag", ReplyAction="http://tempuri.org/IOperationsService/UpdateDienstEintragResponse")]
[System.ServiceModel.FaultContractAttribute(typeof(BS.Shared.Core.BeWoFault), Action="http://tempuri.org/IOperationsService/UpdateDienstEintragBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BS.Shared.Core")]
void UpdateDienstEintrag(BS.Shared.DataContracts.DienstEintragDC dienstEintrag);
@@ -378,15 +387,84 @@ namespace BeWo.ServiceProxy
[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(BS.Shared.TableID))]
+ [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.ValueListEntryType))]
+ [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.ActivationTypeId))]
+ [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.CostRatePeriodType))]
+ [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.AbsenceReasonVisibilityType))]
+ [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.Sex))]
+ [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.SubstitutionNeed))]
+ [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.ZeiterfassungsDauer))]
+ [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.AccountingIntervalType))]
+ [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.AccountingvisibilityType))]
+ [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.ScopeTypeId))]
+ [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.ServiceUnit))]
+ [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.ServiceRecordFormate))]
+ [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.ServiceRecordTypeId))]
+ [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.CostBearer2SupportConceptStatus))]
+ [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.SignatureType))]
+ [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.SystemEntryID))]
+ [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.FileAttachmentType))]
+ [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.SupportConceptApprovalInterval))]
+ [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.Bewilligungsart))]
+ [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.FamilyStatus))]
+ [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.PersonType))]
+ [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.SettingsType))]
+ [System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List))]
+ [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.UserRightType))]
+ [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.ControlType))]
+ [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.ContactType))]
+ [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.AppointmentDayOfWeek))]
+ [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.ServiceRecordValidationResult))]
+ [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.ParticipationAnswer))]
+ [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.StatementType))]
+ [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.SignatureStateType))]
+ [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.Zahlungstyp))]
+ [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.SchulbegleitenderZugehoerigkeitsTyp))]
+ [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.TokenTyp))]
+ [System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List))]
+ [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.Behinderungsart))]
+ [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.VgaTypeEnum))]
+ [System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List))]
+ [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.Merkzeichen))]
+ [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.Pflegegrad))]
+ [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.MessageType))]
+ [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.HomeViewPanelType))]
+ [System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List))]
+ [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.UiElementType))]
+ [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.Auszahlungsintervall))]
+ [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.Priority))]
+ [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.Status))]
+ [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.VertretungsStatus))]
+ [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.List))]
+ [System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.Dictionary>))]
+ [System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List))]
+ [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, decimal>))]
+ [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))]
+ [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>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.AiVoiceDataDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.ResourceDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.ValueListEntryDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.InactivePersonDC))]
- [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.DienstEintragDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.DienstvertretungDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List))]
+ [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.DienstEintragDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.ServiceRecordDC))]
@@ -553,12 +631,14 @@ namespace BeWo.ServiceProxy
[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(System.Collections.Generic.List))]
+ [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.AdditionalServiceGroupOfPeopleRelationDC))]
+ [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.AdditionalServiceDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.AdditionalServiceGroupOfPeopleDC))]
+ [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.AdditionalServiceRegionDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.AdditionalServiceBookingDC))]
- [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.AdditionalServiceRegionDC))]
- [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.AdditionalServiceDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.AdditionalServiceNoticeDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.SupportConceptStatisticsDC))]
@@ -623,60 +703,6 @@ namespace BeWo.ServiceProxy
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.ServiceRecordPeriodStatisticsInfoDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.ServiceRecordHistoryDC))]
- [System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List))]
- [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.AdditionalServiceGroupOfPeopleRelationDC))]
- [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.Core.BeWoFault))]
- [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.Core.BeWoFaultType))]
- [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.Core.DateTimeSpan))]
- [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.ValueListEntryType))]
- [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.TableID))]
- [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.ActivationTypeId))]
- [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.CostRatePeriodType))]
- [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.AbsenceReasonVisibilityType))]
- [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.Sex))]
- [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.SubstitutionNeed))]
- [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.ZeiterfassungsDauer))]
- [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.AccountingIntervalType))]
- [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.AccountingvisibilityType))]
- [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.ScopeTypeId))]
- [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.ServiceUnit))]
- [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.ServiceRecordFormate))]
- [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.ServiceRecordTypeId))]
- [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.CostBearer2SupportConceptStatus))]
- [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.SignatureType))]
- [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.SystemEntryID))]
- [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.FileAttachmentType))]
- [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.SupportConceptApprovalInterval))]
- [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.Bewilligungsart))]
- [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.FamilyStatus))]
- [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.PersonType))]
- [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.SettingsType))]
- [System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List))]
- [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.UserRightType))]
- [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.ControlType))]
- [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.ContactType))]
- [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.AppointmentDayOfWeek))]
- [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.ServiceRecordValidationResult))]
- [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.ParticipationAnswer))]
- [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.StatementType))]
- [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.SignatureStateType))]
- [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.Zahlungstyp))]
- [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.SchulbegleitenderZugehoerigkeitsTyp))]
- [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.TokenTyp))]
- [System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List))]
- [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.Behinderungsart))]
- [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.VgaTypeEnum))]
- [System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List))]
- [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.Merkzeichen))]
- [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.Pflegegrad))]
- [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.MessageType))]
- [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.HomeViewPanelType))]
- [System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List))]
- [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.UiElementType))]
- [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.Auszahlungsintervall))]
- [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.Priority))]
- [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.Status))]
- [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.VertretungsStatus))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Compact.CompactOrganisationDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Compact.CompactCustomerDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Compact.CompactEmployeeDC))]
@@ -721,26 +747,9 @@ namespace BeWo.ServiceProxy
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Wohnhilfe.Haushaltsstruktur))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Wohnhilfe.HochsterSchulabschluss))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Wohnhilfe.Staatsangehorigkeit))]
- [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.List))]
- [System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.Dictionary>))]
- [System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List))]
- [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, decimal>))]
- [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))]
- [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))]
+ [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.Core.BeWoFault))]
+ [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.Core.BeWoFaultType))]
+ [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.Core.DateTimeSpan))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Invoicing.BankAccountDC))]
string GetDakotaFileFormat(object param);
@@ -825,10 +834,9 @@ namespace BeWo.ServiceProxy
"loyeeAndCustomerBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BS.Shared.Core")]
bool HasConfirmationReceiptSignatureByDateAndEmployeeAndCustomer(out System.Collections.Generic.List confirmationReceiptSignatures, long customerOid, long employeeOid, System.DateTime start, System.DateTime end, long costBearer2SupportConceptOid);
- [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/CreateRtfDocumentFromTemplate", ReplyAction="http://tempuri.org/IOperationsService/CreateRtfDocumentFromTemplateResponse")]
- [System.ServiceModel.FaultContractAttribute(typeof(BS.Shared.Core.BeWoFault), Action="http://tempuri.org/IOperationsService/CreateRtfDocumentFromTemplateBeWoFaultFault" +
- "", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BS.Shared.Core")]
- string CreateRtfDocumentFromTemplate(long vorlageOid, BS.Shared.TableID objectTid, System.Collections.Generic.List objectOids);
+ [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/UpdateAbsenceTime", ReplyAction="http://tempuri.org/IOperationsService/UpdateAbsenceTimeResponse")]
+ [System.ServiceModel.FaultContractAttribute(typeof(BS.Shared.Core.BeWoFault), Action="http://tempuri.org/IOperationsService/UpdateAbsenceTimeBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BS.Shared.Core")]
+ void UpdateAbsenceTime(BS.Shared.DataContracts.AbsenceTimeDC abs);
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/GetAllTokens", ReplyAction="http://tempuri.org/IOperationsService/GetAllTokensResponse")]
[System.ServiceModel.FaultContractAttribute(typeof(BS.Shared.Core.BeWoFault), Action="http://tempuri.org/IOperationsService/GetAllTokensBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BS.Shared.Core")]
@@ -1190,9 +1198,12 @@ namespace BeWo.ServiceProxy
[System.ServiceModel.FaultContractAttribute(typeof(BS.Shared.Core.BeWoFault), Action="http://tempuri.org/IOperationsService/InsertNewDienstvertretungBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BS.Shared.Core")]
void InsertNewDienstvertretung(BS.Shared.DataContracts.DienstvertretungDC dienstvertretung);
- [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/InsertNewDienstvertretung2", ReplyAction="http://tempuri.org/IOperationsService/InsertNewDienstvertretung2Response")]
- [System.ServiceModel.FaultContractAttribute(typeof(BS.Shared.Core.BeWoFault), Action="http://tempuri.org/IOperationsService/InsertNewDienstvertretung2BeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BS.Shared.Core")]
- bool InsertNewDienstvertretung2(BS.Shared.DataContracts.DienstvertretungDC dienstvertretung, System.Collections.Generic.List alleDiensteintraege, System.Collections.Generic.List alleDienstvertretungen, int day, System.DateTime pflichtStart, System.DateTime pflichtEnde);
+ [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/UpdateAdditionalServiceGroupOfPeopleRelatio" +
+ "ns", ReplyAction="http://tempuri.org/IOperationsService/UpdateAdditionalServiceGroupOfPeopleRelatio" +
+ "nsResponse")]
+ [System.ServiceModel.FaultContractAttribute(typeof(BS.Shared.Core.BeWoFault), Action="http://tempuri.org/IOperationsService/UpdateAdditionalServiceGroupOfPeopleRelatio" +
+ "nsBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BS.Shared.Core")]
+ void UpdateAdditionalServiceGroupOfPeopleRelations(System.Collections.Generic.List pAdditionalServiceGroupOfPeopleRelations);
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/DeleteAdditionalServiceGroupOfPeopleRelatio" +
"n", ReplyAction="http://tempuri.org/IOperationsService/DeleteAdditionalServiceGroupOfPeopleRelatio" +
@@ -1588,10 +1599,6 @@ namespace BeWo.ServiceProxy
"t", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BS.Shared.Core")]
void UpdateVertretungAndAbsenceTime(BS.Shared.DataContracts.VertretungDC vert, BS.Shared.DataContracts.AbsenceTimeDC abs);
- [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/UpdateAbsenceTime", ReplyAction="http://tempuri.org/IOperationsService/UpdateAbsenceTimeResponse")]
- [System.ServiceModel.FaultContractAttribute(typeof(BS.Shared.Core.BeWoFault), Action="http://tempuri.org/IOperationsService/UpdateAbsenceTimeBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BS.Shared.Core")]
- void UpdateAbsenceTime(BS.Shared.DataContracts.AbsenceTimeDC abs);
-
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/DeactivateInvoices", ReplyAction="http://tempuri.org/IOperationsService/DeactivateInvoicesResponse")]
[System.ServiceModel.FaultContractAttribute(typeof(BS.Shared.Core.BeWoFault), Action="http://tempuri.org/IOperationsService/DeactivateInvoicesBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BS.Shared.Core")]
void DeactivateInvoices(System.Collections.Generic.List invoices);
@@ -1743,6 +1750,10 @@ namespace BeWo.ServiceProxy
[System.ServiceModel.FaultContractAttribute(typeof(BS.Shared.Core.BeWoFault), Action="http://tempuri.org/IOperationsService/GetFolderTreeBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BS.Shared.Core")]
System.Collections.Generic.List GetFolderTree(BS.Shared.TableID pObjectTid, long pObjectOid);
+ [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/GetFileAttachmentsForFolder", ReplyAction="http://tempuri.org/IOperationsService/GetFileAttachmentsForFolderResponse")]
+ [System.ServiceModel.FaultContractAttribute(typeof(BS.Shared.Core.BeWoFault), Action="http://tempuri.org/IOperationsService/GetFileAttachmentsForFolderBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BS.Shared.Core")]
+ System.Collections.Generic.List GetFileAttachmentsForFolder(System.Nullable folderOid, BS.Shared.TableID objectTid, long objectOid);
+
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/DeleteFolder", ReplyAction="http://tempuri.org/IOperationsService/DeleteFolderResponse")]
[System.ServiceModel.FaultContractAttribute(typeof(BS.Shared.Core.BeWoFault), Action="http://tempuri.org/IOperationsService/DeleteFolderBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BS.Shared.Core")]
void DeleteFolder(long pBeWoFolderOid, long pVersion);
@@ -1969,13 +1980,6 @@ namespace BeWo.ServiceProxy
[System.ServiceModel.FaultContractAttribute(typeof(BS.Shared.Core.BeWoFault), Action="http://tempuri.org/IOperationsService/InsertNewAdditionalServiceGroupOfPeopleRela" +
"tionsBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BS.Shared.Core")]
System.Collections.Generic.List InsertNewAdditionalServiceGroupOfPeopleRelations(System.Collections.Generic.List pAdditionalServiceGroupOfPeopleRelations);
-
- [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/UpdateAdditionalServiceGroupOfPeopleRelatio" +
- "ns", ReplyAction="http://tempuri.org/IOperationsService/UpdateAdditionalServiceGroupOfPeopleRelatio" +
- "nsResponse")]
- [System.ServiceModel.FaultContractAttribute(typeof(BS.Shared.Core.BeWoFault), Action="http://tempuri.org/IOperationsService/UpdateAdditionalServiceGroupOfPeopleRelatio" +
- "nsBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BS.Shared.Core")]
- void UpdateAdditionalServiceGroupOfPeopleRelations(System.Collections.Generic.List pAdditionalServiceGroupOfPeopleRelations);
}
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
@@ -2012,6 +2016,11 @@ namespace BeWo.ServiceProxy
{
}
+ public string CreateRtfDocumentFromTemplate(long vorlageOid, BS.Shared.TableID objectTid, System.Collections.Generic.List objectOids)
+ {
+ return base.Channel.CreateRtfDocumentFromTemplate(vorlageOid, objectTid, objectOids);
+ }
+
public BS.Shared.DataContracts.AiVoiceDataDC StartAIVoice()
{
return base.Channel.StartAIVoice();
@@ -2037,6 +2046,11 @@ namespace BeWo.ServiceProxy
return base.Channel.DeleteInactivePersons(persons, anonymisieren);
}
+ public bool InsertNewDienstvertretung2(BS.Shared.DataContracts.DienstvertretungDC dienstvertretung, System.Collections.Generic.List alleDiensteintraege, System.Collections.Generic.List alleDienstvertretungen, int day, System.DateTime pflichtStart, System.DateTime pflichtEnde)
+ {
+ return base.Channel.InsertNewDienstvertretung2(dienstvertretung, alleDiensteintraege, alleDienstvertretungen, day, pflichtStart, pflichtEnde);
+ }
+
public void UpdateDienstEintrag(BS.Shared.DataContracts.DienstEintragDC dienstEintrag)
{
base.Channel.UpdateDienstEintrag(dienstEintrag);
@@ -2457,9 +2471,9 @@ namespace BeWo.ServiceProxy
return base.Channel.HasConfirmationReceiptSignatureByDateAndEmployeeAndCustomer(out confirmationReceiptSignatures, customerOid, employeeOid, start, end, costBearer2SupportConceptOid);
}
- public string CreateRtfDocumentFromTemplate(long vorlageOid, BS.Shared.TableID objectTid, System.Collections.Generic.List objectOids)
+ public void UpdateAbsenceTime(BS.Shared.DataContracts.AbsenceTimeDC abs)
{
- return base.Channel.CreateRtfDocumentFromTemplate(vorlageOid, objectTid, objectOids);
+ base.Channel.UpdateAbsenceTime(abs);
}
public System.Collections.Generic.List GetAllTokens(BS.Shared.SchulbegleitenderZugehoerigkeitsTyp zugehoerigkeitsTyp, System.Nullable oid)
@@ -2882,9 +2896,9 @@ namespace BeWo.ServiceProxy
base.Channel.InsertNewDienstvertretung(dienstvertretung);
}
- public bool InsertNewDienstvertretung2(BS.Shared.DataContracts.DienstvertretungDC dienstvertretung, System.Collections.Generic.List alleDiensteintraege, System.Collections.Generic.List alleDienstvertretungen, int day, System.DateTime pflichtStart, System.DateTime pflichtEnde)
+ public void UpdateAdditionalServiceGroupOfPeopleRelations(System.Collections.Generic.List pAdditionalServiceGroupOfPeopleRelations)
{
- return base.Channel.InsertNewDienstvertretung2(dienstvertretung, alleDiensteintraege, alleDienstvertretungen, day, pflichtStart, pflichtEnde);
+ base.Channel.UpdateAdditionalServiceGroupOfPeopleRelations(pAdditionalServiceGroupOfPeopleRelations);
}
public void DeleteAdditionalServiceGroupOfPeopleRelation(long pDeleteAdditionalServiceGroupOfPeopleRelationOid, long pVersion)
@@ -3307,11 +3321,6 @@ namespace BeWo.ServiceProxy
base.Channel.UpdateVertretungAndAbsenceTime(vert, abs);
}
- public void UpdateAbsenceTime(BS.Shared.DataContracts.AbsenceTimeDC abs)
- {
- base.Channel.UpdateAbsenceTime(abs);
- }
-
public void DeactivateInvoices(System.Collections.Generic.List invoices)
{
base.Channel.DeactivateInvoices(invoices);
@@ -3487,6 +3496,11 @@ namespace BeWo.ServiceProxy
return base.Channel.GetFolderTree(pObjectTid, pObjectOid);
}
+ public System.Collections.Generic.List GetFileAttachmentsForFolder(System.Nullable folderOid, BS.Shared.TableID objectTid, long objectOid)
+ {
+ return base.Channel.GetFileAttachmentsForFolder(folderOid, objectTid, objectOid);
+ }
+
public void DeleteFolder(long pBeWoFolderOid, long pVersion)
{
base.Channel.DeleteFolder(pBeWoFolderOid, pVersion);
@@ -3731,10 +3745,5 @@ namespace BeWo.ServiceProxy
{
return base.Channel.InsertNewAdditionalServiceGroupOfPeopleRelations(pAdditionalServiceGroupOfPeopleRelations);
}
-
- public void UpdateAdditionalServiceGroupOfPeopleRelations(System.Collections.Generic.List pAdditionalServiceGroupOfPeopleRelations)
- {
- base.Channel.UpdateAdditionalServiceGroupOfPeopleRelations(pAdditionalServiceGroupOfPeopleRelations);
- }
}
}
diff --git a/BeWo/View/BeWoFileView.xaml b/BeWo/View/BeWoFileView.xaml
index e9f84d867..4b06691b2 100644
--- a/BeWo/View/BeWoFileView.xaml
+++ b/BeWo/View/BeWoFileView.xaml
@@ -34,6 +34,12 @@
+
+
(this._SelectedTreeNode);
@@ -562,7 +568,10 @@ namespace BeWo.View
bool enabled = false;
bool darfBearbeiten = BeWoApp.LoggedOnUser.HasRight(UserRightType.DocumentsEditFolders);
-
+ bool darfVorlagenSehen = BeWoApp.AppSettings.ShowVorlagen && (_ObjectTid == TableID.Customer);
+#if DEBUG
+ darfVorlagenSehen = true;
+#endif
if (folder != null)
{
if (folder.ParentFolder != null)
@@ -582,6 +591,18 @@ namespace BeWo.View
{
menuitem.IsEnabled = false;
}
+ if ("Vorlage".Equals(menuitem.Tag) && !darfVorlagenSehen)
+ {
+ menuitem.Visibility = Visibility.Collapsed;
+ }
+ }
+ else if (item is Separator)
+ {
+ var sep = item as Separator;
+ if ("Vorlage".Equals(sep.Tag) && !darfVorlagenSehen)
+ {
+ sep.Visibility = Visibility.Collapsed;
+ }
}
}
}
@@ -697,6 +718,22 @@ namespace BeWo.View
return null;
}
+ private void CreateNewTemplateForFolder(BeWoFolderVM child)
+ {
+ DokumentViewHelper.OpenTemplateSelectionDialog(_ObjectOid.Value, _ObjectTid, child.DataContract, UpdateSelectedFolder);
+ }
+
+ private void UpdateSelectedFolder()
+ {
+ BeWoApp.CurrentBeWo.Dispatcher.BeginInvoke(DispatcherPriority.Normal, (Action)delegate
+ {
+ var child = this.treeview.SelectedItem as BeWoFolderVM;
+
+ var files = ServiceFacade.DoOperationsServiceSync(s => s.GetFileAttachmentsForFolder(child.DataContract.BeWoFolderOid, _ObjectTid, _ObjectOid.Value));
+ child.Files = new BindingList(files.Select(f => new FileAttachmentVM(f)).ToList());
+ });
+ }
+
void DocumentWatcher_FileDeleted(long? folderOid, long? objectOid, TableID objectTid, long fileAttachmentOid)
{
if (objectOid == _ObjectOid && objectTid == _ObjectTid)
diff --git a/BeWo/View/Detail/Wohneinheit/WohneinheitBelegungSchedulerView.xaml b/BeWo/View/Detail/Wohneinheit/WohneinheitBelegungSchedulerView.xaml
index a867b3209..f4e3afa35 100644
--- a/BeWo/View/Detail/Wohneinheit/WohneinheitBelegungSchedulerView.xaml
+++ b/BeWo/View/Detail/Wohneinheit/WohneinheitBelegungSchedulerView.xaml
@@ -80,7 +80,7 @@
diff --git a/BeWo/View/Detail/Wohneinheit/WohneinheitBelegungTableView.xaml b/BeWo/View/Detail/Wohneinheit/WohneinheitBelegungTableView.xaml
index 5cc0ab893..a390a88ba 100644
--- a/BeWo/View/Detail/Wohneinheit/WohneinheitBelegungTableView.xaml
+++ b/BeWo/View/Detail/Wohneinheit/WohneinheitBelegungTableView.xaml
@@ -22,7 +22,7 @@
diff --git a/BeWo/View/Detail/WohnheimView.xaml b/BeWo/View/Detail/WohnheimView.xaml
index 90a9352ca..3aae9eccf 100644
--- a/BeWo/View/Detail/WohnheimView.xaml
+++ b/BeWo/View/Detail/WohnheimView.xaml
@@ -770,10 +770,10 @@
-
+
-
+
diff --git a/BeWo/View/Document/DokumentViewHelper.cs b/BeWo/View/Document/DokumentViewHelper.cs
index 78179fecf..f0e3c8e8e 100644
--- a/BeWo/View/Document/DokumentViewHelper.cs
+++ b/BeWo/View/Document/DokumentViewHelper.cs
@@ -5,6 +5,7 @@ using BeWo.ViewModel;
using BS.Shared;
using BS.Shared.Core;
using BS.Shared.DataContracts;
+using BS.Shared.DataContracts.Compact;
using BS.Shared.Translation;
using DevExpress.Utils;
using DevExpress.Xpf.Grid;
@@ -15,14 +16,23 @@ using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Media.Imaging;
+using System.Windows.Navigation;
using System.Windows.Threading;
namespace BeWo.View.Document
{
public class DokumentViewHelper
{
+ public static void OpenTemplateSelectionDialog(long objectOid, TableID tableId, BeWoFolderDC defaultFolderToSave, Action folderSelectedAction)
+ {
+ var alleVorlagen = ServiceFacade.DoOperationsServiceSync(s => s.GetDokumentvorlagenForType(tableId));
+ if (alleVorlagen.Count > 0)
+ {
+ DokumentViewHelper.OpenTemplateSelectionDialog(alleVorlagen, tableId, objectOid, null, defaultFolderToSave, folderSelectedAction);
+ }
+ }
- public static void OpenTemplateSelectionDialog(List alleVorlagen, TableID objectTid, long objectOid, String originalReportUri)
+ public static void OpenTemplateSelectionDialog(List alleVorlagen, TableID objectTid, long objectOid, String originalReportUri, BeWoFolderDC defaultFolderToSave, Action folderSelectedAction)
{
var alleVorlagenTabellen = ServiceFacade.DoOperationsServiceSync(s => s.GetVorlagentabelleDCs());
@@ -34,7 +44,7 @@ namespace BeWo.View.Document
var defaultBerichte = ServiceFacade.DoOperationsServiceSync(x => x.GetReportTemplates(String.Format("TemplateSelection?Tid={0}&Oid={1}", objectTid, objectOid)));
var templateFolderList = VMFactory.CreateFolderList(TableID.Vorlagentabelle, tabelle.VorlagentabelleOid.Value);
- view.InitView(tabelle, alleVorlagen, templateFolderList, null, true, false, "", defaultBerichte);
+ view.InitView(tabelle, alleVorlagen, templateFolderList, null, true, false, "", defaultBerichte, null);
//view.InitView(tabelle, alleVorlagen, templateFolderList, null, true, false, "");
var beWoWindow = BeWoWindowBuilder.GetBeWoWindow(Translator.Translate("Vorlage auswählen"), view, 500, 600);
@@ -48,7 +58,7 @@ namespace BeWo.View.Document
}
else
{
- PrintTemplate(view.SelectedTemplate, objectTid, objectOid);
+ PrintTemplate(view.SelectedTemplate, objectTid, objectOid, defaultFolderToSave, folderSelectedAction);
}
beWoWindow.Close();
@@ -58,7 +68,7 @@ namespace BeWo.View.Document
}
}
- public static BeWoFolderDC OpenAndSelectBeWoFolderSelectionDialog(TableID objectTid, long objectOid, String fileName)
+ public static BeWoFolderDC OpenAndSelectBeWoFolderSelectionDialog(TableID objectTid, long objectOid, String fileName, BeWoFolderDC defaultFolder)
{
BeWoFolderDC selectedFolder = null;
@@ -70,7 +80,7 @@ namespace BeWo.View.Document
//var tabelle = alleVorlagenTabellen.FirstOrDefault(v => v.VorlagentabelleObjectTid.HasValue && v.VorlagentabelleObjectTid.Value == (int)objectTid);
//if (tabelle != null)
//{
- view.InitView(null, null, null, customerFolderList, false, true, fileName, null);
+ view.InitView(null, null, null, customerFolderList, false, true, fileName, null, defaultFolder);
var beWoWindow = BeWoWindowBuilder.GetBeWoWindow(Translator.Translate("Ordner auswählen"), view, 500, 500);
view.ButtonCancelClicked += () => beWoWindow.Close();
@@ -455,7 +465,7 @@ namespace BeWo.View.Document
//}
- private static void PrintTemplate(DokumentvorlageDC vorlage, TableID objectTid, long objectOid)
+ private static void PrintTemplate(DokumentvorlageDC vorlage, TableID objectTid, long objectOid, BeWoFolderDC defaultFolder, Action folderSelectedAction)
{
@@ -472,14 +482,16 @@ namespace BeWo.View.Document
control.ButtonSavedClicked += () =>
{
- var selectedFolder = OpenAndSelectBeWoFolderSelectionDialog(objectTid, objectOid, vorlage.Name);
+ var selectedFolder = OpenAndSelectBeWoFolderSelectionDialog(objectTid, objectOid, vorlage.Name, defaultFolder);
+
if (selectedFolder != null)
{
var newRtfText = control.RtfText;
var filename = selectedFolder.Name;
window.Close();
- SaveRtfInBeWoFolder(selectedFolder, newRtfText, filename, objectTid, objectOid);
+ SaveRtfInBeWoFolder(defaultFolder, newRtfText, filename, objectTid, objectOid, folderSelectedAction);
+
}
};
@@ -501,7 +513,7 @@ namespace BeWo.View.Document
}
- private static void SaveRtfInBeWoFolder(BeWoFolderDC selectedFolder, string rtfText, string filename, TableID objectTid, long objectOid)
+ private static void SaveRtfInBeWoFolder(BeWoFolderDC selectedFolder, string rtfText, string filename, TableID objectTid, long objectOid, Action uploadFinished)
{
try
@@ -517,11 +529,19 @@ namespace BeWo.View.Document
{
upload.Dispose();
ms.Dispose();
+ if (uploadFinished != null)
+ {
+ uploadFinished();
+ }
},
() =>
{
upload.Dispose();
ms.Dispose();
+ if (uploadFinished != null)
+ {
+ uploadFinished();
+ }
});
}
catch (Exception ex)
diff --git a/BeWo/View/Document/DokumenteView.xaml.cs b/BeWo/View/Document/DokumenteView.xaml.cs
index 5d106fb34..59c0e61b3 100644
--- a/BeWo/View/Document/DokumenteView.xaml.cs
+++ b/BeWo/View/Document/DokumenteView.xaml.cs
@@ -1,46 +1,47 @@
+using BeWo.Core;
+using BeWo.ServiceProxy;
+using BeWo.View.Detail;
using BeWo.View.Navigation.Filter;
+using BeWo.View.Windows;
+using BeWo.ViewModel;
using BS.Shared;
+using BS.Shared.Core;
using BS.Shared.DataContracts;
+using BS.Shared.Extensions;
+using BS.Shared.Translation;
+using DevExpress.Mvvm.UI.Native;
+using DevExpress.Utils;
+using DevExpress.Xpf.Accordion;
+using DevExpress.Xpf.Grid;
+using DevExpress.Xpf.Grid.TreeList;
+using DevExpress.XtraEditors;
+using DevExpress.XtraPrinting.Native;
using System;
using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Globalization;
+using System.IO;
using System.Linq;
+using System.Runtime.CompilerServices;
+using System.Text;
using System.Windows;
using System.Windows.Controls;
+using System.Windows.Controls.Primitives;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Forms;
using System.Windows.Input;
-using DevExpress.Xpf.Accordion;
-using DevExpress.Mvvm.UI.Native;
-using BeWo.ViewModel;
-using DevExpress.XtraEditors;
-using DevExpress.Xpf.Grid.TreeList;
-using DevExpress.Xpf.Grid;
-using DevExpress.XtraPrinting.Native;
-using DevExpress.Utils;
-using System.Runtime.CompilerServices;
using System.Windows.Media;
using System.Windows.Media.Imaging;
-using System.Data;
-using BeWo.ServiceProxy;
-using BeWo.Core;
-using System.Windows.Forms;
-using MessageBox = System.Windows.MessageBox;
-using BS.Shared.Extensions;
-using BS.Shared.Core;
-using System.IO;
-using System.Windows.Threading;
-using System.Windows.Documents;
using System.Windows.Navigation;
+using System.Windows.Threading;
using ContextMenu = System.Windows.Controls.ContextMenu;
-using MenuItem = System.Windows.Controls.MenuItem;
using GroupBox = System.Windows.Controls.GroupBox;
-using System.Windows.Controls.Primitives;
+using MenuItem = System.Windows.Controls.MenuItem;
+using MessageBox = System.Windows.MessageBox;
using TextBox = System.Windows.Controls.TextBox;
-using BeWo.View.Detail;
-using System.Text;
-using BS.Shared.Translation;
-using System.Windows.Data;
-using System.Globalization;
-using System.ComponentModel;
namespace BeWo.View.Document
{
@@ -1313,7 +1314,7 @@ namespace BeWo.View.Document
//List folderDCs = new List();
if (node.Nodes.Count == 0 && vm.DocTreeItemOid.HasValue)
{
- var folderDCs = VMFactory.CreateFolderList(TableID.Vorlagentabelle, (long)vm.DocTreeItemOid);
+ var folderDCs = VMFactory.CreateFolderList(TableID.Vorlagentabelle, (long)vm.DocTreeItemOid * -1);
DokumentViewHelper.AddFolderToTreeView(template_treeview_control, folderDCs, false);
//GenerateFolderStructureForSelectedNode(node, folderDCs, true);
}
@@ -1449,7 +1450,7 @@ namespace BeWo.View.Document
}
else if (twi.Header.Equals("Berechtigungen"))
{
- this.OpenSelectRightsDialog();
+ this.OpenSelectRightsDialog(row);
}
else if (twi.Header.Equals("Löschen"))
{
@@ -1572,9 +1573,18 @@ namespace BeWo.View.Document
}
- private void OpenSelectRightsDialog()
+ private void OpenSelectRightsDialog(DocumentTreeItemVM item)
{
-
+ var teams = VMFactory.CreateTeamList();
+ var rights = ServiceFacade.DoEmployeeServiceSync(s => s.GetTeamRightsForFolder(item.DataContract.BeWoFolderDC.BeWoFolderOid.Value));
+
+ var ctrl = new TeamFolderRightView(new ViewModel.ListViewModel.TeamFolderRightListVM(rights, teams, item.DataContract.BeWoFolderDC));
+
+ var beWoWindow = BeWoWindowBuilder.GetBeWoWindow(Translator.Translate("Berechtigungen"), ctrl, 500, 800);
+
+ ctrl.CloseButtonClicked += () => beWoWindow.Close();
+
+ beWoWindow.ShowDialog();
}
diff --git a/BeWo/View/Document/SingleTemplateSelectionView.xaml.cs b/BeWo/View/Document/SingleTemplateSelectionView.xaml.cs
index 093673bde..e64360e05 100644
--- a/BeWo/View/Document/SingleTemplateSelectionView.xaml.cs
+++ b/BeWo/View/Document/SingleTemplateSelectionView.xaml.cs
@@ -25,6 +25,9 @@ using System.Linq;
using DevExpress.Xpf.Grid;
using System.Windows.Media.Imaging;
using DevExpress.Utils;
+using DevExpress.Mvvm.Native;
+using DevExpress.Xpf.Controls.ThemeKeys;
+using DevExpress.Web;
namespace BeWo.View.Document
{
@@ -48,7 +51,7 @@ namespace BeWo.View.Document
public DocumentTreeItemDC SelectedReportTemplate { get; set; }
- public void InitView(VorlagentabelleDC vt, List alleVorlagen, List allTemplateFolder, List allObjectFolder, bool showTemplateTree, bool showDocumentTree, String defaultFileName, IList defaultReports)
+ public void InitView(VorlagentabelleDC vt, List alleVorlagen, List allTemplateFolder, List allObjectFolder, bool showTemplateTree, bool showDocumentTree, String defaultFileName, IList defaultReports, BeWoFolderDC selectedDefaultFolder)
{
//tableId = tid;
@@ -77,6 +80,7 @@ namespace BeWo.View.Document
if (showDocumentTree)
{
DokumentViewHelper.CreateTemplateTreeViewItems(treelistcontrol_folderStructureForSelection, null, allObjectFolder, true);
+ SelectFolder(selectedDefaultFolder, treelistcontrol_folderStructureForSelection.View.Nodes);
}
else
{
@@ -106,6 +110,32 @@ namespace BeWo.View.Document
// ButtonCreateClicked?.Invoke();
//}
+ public void SelectFolder(BeWoFolderDC folder, TreeListNodeCollection nodes)
+ {
+ if (folder != null)
+ {
+ foreach (var item in nodes)
+ {
+ var vm = item.Content as DocumentTreeItemVM;
+ var f = vm?.DataContract?.BeWoFolderDC;
+
+ if (f != null && f.Name == folder.Name && (f.BeWoFolderOid == folder.BeWoFolderOid))
+ {
+ var node = treelistcontrol_folderStructureForSelection.View.GetNodeByRowHandle(item.RowHandle);
+ treelistcontrol_folderStructureForSelection.SelectedItem = vm;
+ treelistcontrol_folderStructureForSelection.View.FocusedRowHandle = item.RowHandle;
+ //treelistcontrol_folderStructureForSelection.SelectItem(item);
+ //treelistcontrol_folderStructureForSelection.Focus();
+ }
+ else
+ {
+ SelectFolder(folder, item.Nodes);
+ }
+
+ }
+
+ }
+ }
private void Button_CreateTemplateForSelection_Click(object sender, RoutedEventArgs e)
{
diff --git a/BeWo/View/Document/TeamFolderRightView.xaml b/BeWo/View/Document/TeamFolderRightView.xaml
new file mode 100644
index 000000000..69540f0c4
--- /dev/null
+++ b/BeWo/View/Document/TeamFolderRightView.xaml
@@ -0,0 +1,39 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/BeWo/View/Document/TeamFolderRightView.xaml.cs b/BeWo/View/Document/TeamFolderRightView.xaml.cs
new file mode 100644
index 000000000..e2a649864
--- /dev/null
+++ b/BeWo/View/Document/TeamFolderRightView.xaml.cs
@@ -0,0 +1,110 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.IO;
+using System.Linq;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Forms;
+using System.Windows.Input;
+
+using BeWo.Annotations;
+using BeWo.Core;
+using BeWo.ServiceProxy;
+using BeWo.Validation;
+using BeWo.ViewModel;
+using BeWo.ViewModel.ListViewModel;
+
+using BS.Shared;
+using BS.Shared.Core;
+using BS.Shared.DataContracts;
+using BS.Shared.Extensions;
+using BS.Shared.Translation;
+using DevExpress.Utils;
+using DevExpress.Xpf.Editors;
+using DevExpress.Xpf.Grid;
+using MessageBox = System.Windows.MessageBox;
+
+namespace BeWo.View.Document
+{
+ public partial class TeamFolderRightView : INotifyPropertyChanged
+ {
+ private TeamFolderRightListVM _ViewModel;
+
+ public event PropertyChangedEventHandler PropertyChanged;
+ public event Action CloseButtonClicked;
+
+
+ public TeamFolderRightView(TeamFolderRightListVM pViewModel)
+ {
+ InitializeComponent();
+
+ CreateRightList(pViewModel);
+
+ ViewModel = pViewModel;
+
+ ReloadViewModel();
+ }
+
+ private void CreateRightList(TeamFolderRightListVM vm)
+ {
+ foreach (var team in vm.PossibleTeams)
+ {
+ var tfr = vm.VMList.FirstOrDefault(v => v.TeamOid == team.TeamOid);
+ if (tfr == null)
+ {
+ tfr = new TeamFolderRightVM(new TeamFolderRightDC { BeWoFolderOid = vm.Folder.BeWoFolderOid.Value });
+ vm.VMList.Add(tfr);
+ }
+ tfr.Team = team;
+
+ }
+ }
+
+ private TeamFolderRightListVM ViewModel
+ {
+ get { return _ViewModel; }
+
+ set
+ {
+ _ViewModel = value;
+ root.DataContext = value;
+ }
+ }
+
+
+ private void ReloadViewModel()
+ {
+
+ }
+
+ private void ClearControls()
+ {
+ GridControlRights.ItemsSource = null;
+
+ }
+
+
+
+ private void btnSave_Click(object sender, RoutedEventArgs e)
+ {
+ var dcList = ViewModel.VMList.Select(v => v.CommitToDataContract()).ToList();
+ ServiceFacade.DoEmployeeServiceAsync(s => s.SaveTeamFolderRights(dcList));
+
+ CloseButtonClicked?.Invoke();
+ //var result = ServiceFacade.DoCustomerServiceSync(s => s.ImportSupportConcept(ViewModel));
+ //if (!String.IsNullOrEmpty(result.ImportMessage))
+ //{
+ // MessageBox.Show(result.ImportMessage, "Import", MessageBoxButton.OK, MessageBoxImage.Information);
+ //}
+ }
+
+
+ private void btnClose_Click(object sender, RoutedEventArgs e)
+ {
+ CloseButtonClicked?.Invoke();
+ }
+ }
+
+
+}
diff --git a/BeWo/ViewModel/ListViewModel/TeamFolderRightListVM.cs b/BeWo/ViewModel/ListViewModel/TeamFolderRightListVM.cs
new file mode 100644
index 000000000..9820e877e
--- /dev/null
+++ b/BeWo/ViewModel/ListViewModel/TeamFolderRightListVM.cs
@@ -0,0 +1,38 @@
+using System.Collections.Generic;
+
+using BS.Shared.DataContracts;
+using BS.Shared.DataContracts.Compact;
+
+namespace BeWo.ViewModel.ListViewModel
+{
+ public class TeamFolderRightListVM : AbstractDCListMapperVM
+ {
+ private List _PossibleTeams;
+ private BeWoFolderDC _Folder;
+
+ public TeamFolderRightListVM(IEnumerable pTeamFolderRights, List pPossibleTeams, BeWoFolderDC folder) : base(pTeamFolderRights)
+ {
+ _PossibleTeams = pPossibleTeams;
+ _Folder = folder;
+ }
+
+ public BeWoFolderDC Folder
+ {
+ get => _Folder;
+ }
+
+ public List PossibleTeams
+ {
+ get => _PossibleTeams;
+
+ set
+ {
+ if (AreDifferent(_PossibleTeams, value))
+ {
+ _PossibleTeams = value;
+ FirePropertyChanged(nameof(PossibleTeams));
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/BeWo/ViewModel/TeamFolderRightVM.cs b/BeWo/ViewModel/TeamFolderRightVM.cs
new file mode 100644
index 000000000..774a41c84
--- /dev/null
+++ b/BeWo/ViewModel/TeamFolderRightVM.cs
@@ -0,0 +1,113 @@
+using System;
+using System.ComponentModel;
+using System.Windows;
+using BeWo.Validation;
+using BS.Shared.DataContracts;
+using BS.Shared.DataContracts.Compact;
+using BS.Shared.Extensions;
+
+namespace BeWo.ViewModel
+{
+ public class TeamFolderRightVM : AbstractDCMapperVM
+ {
+ private DateTime? _End;
+
+ private string _Notice;
+
+ private CompactTeamDC _Team;
+
+ private long? _TeamOid;
+
+ private long? _BeWoFolderOid;
+
+ private bool _AllowEdit;
+
+ private bool _AllowView;
+
+ public TeamFolderRightVM(TeamFolderRightDC pDC) : base(pDC, pDC.Oid == null) {}
+
+ public CompactTeamDC Team
+ {
+ get => _Team;
+
+ set
+ {
+ _Team = value;
+ if (_Team != null)
+ {
+ TeamOid = _Team.TeamOid;
+ }
+ FirePropertyChanged(nameof(Team));
+ }
+ }
+
+ public long? TeamOid
+ {
+ get => _TeamOid;
+
+ set
+ {
+ _TeamOid = value;
+ FirePropertyChanged(nameof(TeamOid));
+ }
+ }
+
+ public long? BeWoFolderOid
+ {
+ get => _BeWoFolderOid;
+
+ set
+ {
+ _BeWoFolderOid = value;
+ FirePropertyChanged(nameof(BeWoFolderOid));
+ }
+ }
+
+ public bool AllowEdit
+ {
+ get => _AllowEdit;
+
+ set
+ {
+ if (AreDifferent(_AllowEdit, value))
+ {
+ _AllowEdit = value;
+ FirePropertyChanged(nameof(AllowEdit));
+ }
+ }
+ }
+
+ public bool AllowView
+ {
+ get => _AllowView;
+
+ set
+ {
+ if (AreDifferent(_AllowView, value))
+ {
+ _AllowView = value;
+ FirePropertyChanged(nameof(AllowView));
+ }
+ }
+ }
+
+ protected override void InitByDataContract(TeamFolderRightDC pDataContract)
+ {
+ _BeWoFolderOid = pDataContract.BeWoFolderOid;
+ _TeamOid = pDataContract.TeamOid;
+ _AllowEdit = pDataContract.AllowEdit;
+ _AllowView = pDataContract.AllowView;
+ }
+
+ protected override TeamFolderRightDC MapToDataContract(TeamFolderRightDC pDataContract, bool doCommit)
+ {
+ pDataContract.TeamOid = _TeamOid.Value;
+ pDataContract.BeWoFolderOid = _BeWoFolderOid.Value;
+ pDataContract.AllowEdit = _AllowEdit;
+ pDataContract.AllowView = _AllowView;
+
+ return pDataContract;
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/Data/Access/SearchDAO.cs b/Data/Access/SearchDAO.cs
index adb0fab2b..7d4485789 100644
--- a/Data/Access/SearchDAO.cs
+++ b/Data/Access/SearchDAO.cs
@@ -685,7 +685,24 @@ namespace BeWo.Data.Access
.List();
}
- public IList FindBeWoFolders(TableID pObjTid, long pObjOid)
+ public IEnumerable FindFileAttachmentsForFolder(long? folderOid, TableID objTid, long objOid)
+ {
+ var c = CreateCriteriaIsActive()
+ .Add(Restrictions.Eq(FileAttachmentInfo.PropertyName_ObjectOid, objOid))
+ .Add(Restrictions.Eq(FileAttachmentInfo.PropertyName_ObjectTid, objTid));
+
+ if (folderOid.HasValue)
+ {
+ c.Add(Restrictions.Eq(FileAttachmentInfo.PropertyName_BeWoFolderOid, folderOid.Value));
+ }
+ else
+ {
+ c.Add(Restrictions.IsNull(FileAttachmentInfo.PropertyName_BeWoFolderOid));
+ }
+ return c.List();
+ }
+
+ public IList FindBeWoFolders(TableID pObjTid, long pObjOid)
{
var c = CreateCriteriaIsActive()
.Add(Restrictions.Eq(BeWoFolder.PropertyName_ObjectTid, pObjTid));
@@ -6713,6 +6730,13 @@ WHERE sc.Billable = 1 and sr.StartDate >= '{0:yyyy-MM-dd}' and sr.StartDate < '{
return criteria.List().ToList();
}
+ public List GetTeamRightsForFolder(long folderOid)
+ {
+ var criteria = CreateCriteriaIsActive().Add(Restrictions.Eq(nameof(TeamFolderRight.BeWoFolderOid), folderOid));
+
+ return criteria.List().ToList();
+ }
+
}
}
diff --git a/Data/Data.csproj b/Data/Data.csproj
index 372b360a5..de9c92283 100644
--- a/Data/Data.csproj
+++ b/Data/Data.csproj
@@ -237,6 +237,7 @@
+
@@ -874,6 +875,7 @@
+
Designer
diff --git a/Data/Entities/TeamFolderRight.cs b/Data/Entities/TeamFolderRight.cs
new file mode 100644
index 000000000..f9fd7b1ef
--- /dev/null
+++ b/Data/Entities/TeamFolderRight.cs
@@ -0,0 +1,18 @@
+using BS.Shared;
+using System;
+
+namespace BeWo.Data.Entities
+{
+ public class TeamFolderRight : BeWoEntityBase
+ {
+ public TeamFolderRight()
+ {
+ this._Tid = TableID.TeamFolderRight;
+ }
+
+ public virtual long TeamOid { get; set; }
+ public virtual long BeWoFolderOid { get; set; }
+ public virtual bool AllowEdit { get; set; }
+ public virtual bool AllowView { get; set; }
+ }
+}
diff --git a/Data/Mappings/TeamFolderRight.hbm.xml b/Data/Mappings/TeamFolderRight.hbm.xml
new file mode 100644
index 000000000..d752c995d
--- /dev/null
+++ b/Data/Mappings/TeamFolderRight.hbm.xml
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Data/Security/UserRightHelper.cs b/Data/Security/UserRightHelper.cs
index 5e3a3d8f9..36c68a16b 100644
--- a/Data/Security/UserRightHelper.cs
+++ b/Data/Security/UserRightHelper.cs
@@ -16,19 +16,15 @@ namespace BeWo.Data.Security
public static string GetTenant()
{
- return MultitenancyOperationContextExt.Current?.Tenant;
+ if (MultitenancyOperationContextExt.Current != null)
+ return MultitenancyOperationContextExt.Current.Tenant;
+
+ return SessionFacade.Tenant;
}
public static Employee GetLoggedInEmployee()
{
- if (LoggedInUserOperationContextExt.Current != null)
- {
- var lLoggedInEmployee = LoggedInUserOperationContextExt.Current.User.Employee;
-
- return lLoggedInEmployee;
- }
-
- return null;
+ return GetLoggedInUser()?.Employee;
}
public static ApplicationUser GetLoggedInUserWithOid()
diff --git a/Model/Changes_2026-04-28 TeamFolderRight.txt b/Model/Changes_2026-04-28 TeamFolderRight.txt
new file mode 100644
index 000000000..8662ebd5d
--- /dev/null
+++ b/Model/Changes_2026-04-28 TeamFolderRight.txt
@@ -0,0 +1,20 @@
+INSERT INTO `.executedscripts`
+VALUES ('Changes_2026-04-28 TeamFolderRight', CURDATE());
+
+CREATE TABLE `teamfolderright` (
+`Oid` bigint NOT NULL AUTO_INCREMENT,
+`InsTs` datetime DEFAULT NULL,
+`InsUser` varchar(256) DEFAULT NULL,
+`Notice` varchar(1024) DEFAULT NULL,
+`Tid` int DEFAULT NULL,
+`UdpUser` varchar(256) DEFAULT NULL,
+`UpdTs` datetime DEFAULT NULL,
+`Version` bigint DEFAULT NULL,
+`IsActive` tinyint DEFAULT NULL,
+`SystemEntryID` int DEFAULT NULL,
+`TeamOid` bigint DEFAULT NULL,
+`BeWoFolderOid` bigint DEFAULT NULL,
+`AllowEdit` bigint DEFAULT NULL,
+`AllowView` bigint DEFAULT NULL,
+PRIMARY KEY (`Oid`)
+) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=latin1;
diff --git a/Service/DCEntityMapper/MapperFactory.cs b/Service/DCEntityMapper/MapperFactory.cs
index 46a5db0ad..6682c571e 100644
--- a/Service/DCEntityMapper/MapperFactory.cs
+++ b/Service/DCEntityMapper/MapperFactory.cs
@@ -822,5 +822,6 @@ namespace BeWo.Service.DCEntityMapper
public static GkvTransferProtokollLightDC_GkvTransferprotokollLight GkvTransferprotokollLight { get; } = new GkvTransferProtokollLightDC_GkvTransferprotokollLight();
public static OrganisationLightDC_OrganisationLight OrganisationLight { get; } = new OrganisationLightDC_OrganisationLight();
public static StoredFileDC_StoredFile StoredFile { get; } = new StoredFileDC_StoredFile();
- }
+ public static TeamFolderRightDC_TeamFolderRight TeamFolderRight { get; } = new TeamFolderRightDC_TeamFolderRight();
+ }
}
\ No newline at end of file
diff --git a/Service/DCEntityMapper/TeamFolderRightDC_TeamFolderRight.cs b/Service/DCEntityMapper/TeamFolderRightDC_TeamFolderRight.cs
new file mode 100644
index 000000000..5cecff05a
--- /dev/null
+++ b/Service/DCEntityMapper/TeamFolderRightDC_TeamFolderRight.cs
@@ -0,0 +1,44 @@
+using BeWo.Data.Entities;
+
+using BS.Shared.DataContracts;
+
+namespace BeWo.Service.DCEntityMapper
+{
+ public class TeamFolderRightDC_TeamFolderRight : AbstractIDCEntityMapper
+ {
+ public override TeamFolderRightDC MergeWithDC(TeamFolderRight pEntity, TeamFolderRightDC pDataContract)
+ {
+ pDataContract.Oid = pEntity.Oid;
+ pDataContract.Version = pEntity.Version;
+ pDataContract.TeamOid = pEntity.TeamOid;
+ pDataContract.BeWoFolderOid = pEntity.BeWoFolderOid;
+ pDataContract.AllowEdit = pEntity.AllowEdit;
+ pDataContract.AllowView = pEntity.AllowView;
+
+ return pDataContract;
+ }
+
+ public override TeamFolderRight MergeWithEntity(TeamFolderRightDC pDataContract, TeamFolderRight pEntity)
+ {
+ this.ConcurrencyCheck(pDataContract.Version, pEntity);
+
+ pEntity.Oid = pDataContract.Oid;
+ pEntity.TeamOid = pDataContract.TeamOid;
+ pEntity.BeWoFolderOid = pDataContract.BeWoFolderOid;
+ pEntity.AllowEdit = pDataContract.AllowEdit;
+ pEntity.AllowView = pDataContract.AllowView;
+
+ return pEntity;
+ }
+
+ protected override bool AreDCAndEntityEqual(TeamFolderRightDC pDC, TeamFolderRight pEntity)
+ {
+ if (pDC.Oid == null)
+ {
+ return false;
+ }
+
+ return pDC.Oid == pEntity.Oid;
+ }
+ }
+}
\ No newline at end of file
diff --git a/Service/Dokumentverwaltung/DokumentManager.cs b/Service/Dokumentverwaltung/DokumentManager.cs
index ca0dd37d4..48c1c3a1d 100644
--- a/Service/Dokumentverwaltung/DokumentManager.cs
+++ b/Service/Dokumentverwaltung/DokumentManager.cs
@@ -9,6 +9,8 @@ using System.Linq;
using System.Threading;
using BeWo.Service.Core;
using BeWo.Service.Plugins;
+using System.Drawing.Text;
+using BeWo.Data.Security;
namespace BeWo.Service.Dokumentverwaltung
{
@@ -16,17 +18,52 @@ namespace BeWo.Service.Dokumentverwaltung
{
public static List GetFolderTree(TableID pObjectTid, long pObjectOid)
{
+ bool isEditTemplate = false;
+ var objectOid = pObjectOid;
+ if (objectOid < 0)
+ {
+ objectOid *= -1;
+ isEditTemplate = true;
+ }
+ var teams = new List();
+ var folderRights = new List();
+ bool hatRechtFuerAlle = true;
+ bool hatRechtFuerTeam = true;
+ if (pObjectTid == TableID.Vorlagentabelle)
+ {
+ folderRights = DAOFactory.GenericDAO.GetAll().ToList();
+ var user = UserRightHelper.GetLoggedInUser();
+ teams = DAOFactory.SearchDAO.FindAllActiveTeamsOfEmployee(user.Employee.Oid.Value).ToList();
+
+ if (isEditTemplate)
+ {
+ hatRechtFuerAlle = UserRightHelper.UserHasRight(user, UserRightType.VorlagenEditAll);
+ hatRechtFuerTeam = UserRightHelper.UserHasRight(user, UserRightType.VorlagenEditOwnTeams);
+ }
+ else
+ {
+ hatRechtFuerAlle = UserRightHelper.UserHasRight(user, UserRightType.VorlagenViewAll);
+ hatRechtFuerTeam = UserRightHelper.UserHasRight(user, UserRightType.VorlagenViewOwnTeams);
+ }
+
+ }
+
+ IList folder = DAOFactory.SearchDAO.FindBeWoFolders(pObjectTid, objectOid);
+
- IList folder = DAOFactory.SearchDAO.FindBeWoFolders(pObjectTid, pObjectOid);
bool templateFolder = folder.Any(f => f.SystemEntryID.Equals(SystemEntryID.TemplateDirectory));
var folderDCList = new List();
foreach (BeWoFolder item in SortiereOrdner(folder))
{
- folderDCList.Add(MapperFactory.BeWoFolderDC_BeWoFolder.MapToNewDC(item));
+ if (pObjectTid != TableID.Vorlagentabelle || hatRechtFuerAlle || (hatRechtFuerTeam && HatBerechtigung(item, teams, folderRights)))
+ {
+ folderDCList.Add(MapperFactory.BeWoFolderDC_BeWoFolder.MapToNewDC(item));
+ }
+
}
- IEnumerable files = DAOFactory.SearchDAO.FindFileAttachmentInfos(pObjectTid, pObjectOid);
+ IEnumerable files = DAOFactory.SearchDAO.FindFileAttachmentInfos(pObjectTid, objectOid);
var fileDCList = new List();
foreach (FileAttachmentInfo item in files.OrderBy(f => f.Path))
@@ -36,10 +73,26 @@ namespace BeWo.Service.Dokumentverwaltung
//Thread.Sleep(500);
- return CreateFolderTree(folderDCList, fileDCList, pObjectTid, pObjectOid, templateFolder);
+ return CreateFolderTree(folderDCList, fileDCList, pObjectTid, objectOid, templateFolder);
}
+ private static bool HatBerechtigung(BeWoFolder item, List teams, List folderRights)
+ {
+ var tfr = folderRights.Where(f => teams.Select(t => t.Oid.Value).Contains(f.TeamOid)).ToList();
+ tfr = tfr.Where(f => f.BeWoFolderOid == item.Oid).ToList();
+ return tfr.Count > 0;
+
+
+ }
+
+ public static List GetFileAttachmentsForFolder(long? folderOid, TableID objectTid, long objectOid)
+ {
+
+ var list = DAOFactory.SearchDAO.FindFileAttachmentsForFolder(folderOid, objectTid, objectOid);
+ return MapperFactory.FileAttachmentDC_FileAttachmentInfo.MapToNewDCs(list);
+ }
+
private static IList SortiereOrdner(IList folder)
{
String maxNumberPrefix = "";
diff --git a/Service/Service.csproj b/Service/Service.csproj
index 2b652bd05..ce427e002 100644
--- a/Service/Service.csproj
+++ b/Service/Service.csproj
@@ -239,6 +239,7 @@
+
diff --git a/Service/ServiceContracts/IEmployeeService.cs b/Service/ServiceContracts/IEmployeeService.cs
index bb89d7afd..9a35448b0 100644
--- a/Service/ServiceContracts/IEmployeeService.cs
+++ b/Service/ServiceContracts/IEmployeeService.cs
@@ -532,5 +532,13 @@ namespace BeWo.Service.ServiceContracts
[FaultContract(typeof(BeWoFault))]
[OperationContract]
List GetActiveCompactEmployeesByOids(List employeeOids);
+
+ [FaultContract(typeof(BeWoFault))]
+ [OperationContract]
+ List GetTeamRightsForFolder(long folderOid);
+
+ [FaultContract(typeof(BeWoFault))]
+ [OperationContract]
+ List SaveTeamFolderRights(List list);
}
}
\ No newline at end of file
diff --git a/Service/ServiceContracts/IOperationsService.cs b/Service/ServiceContracts/IOperationsService.cs
index daaf5b96f..c90ea8e7a 100644
--- a/Service/ServiceContracts/IOperationsService.cs
+++ b/Service/ServiceContracts/IOperationsService.cs
@@ -154,6 +154,11 @@ namespace BeWo.Service.ServiceContracts
[OperationContract]
List GetFolderTree(TableID pObjectTid, long pObjectOid);
+ [FaultContract(typeof(BeWoFault))]
+ [OperationContract]
+
+ List GetFileAttachmentsForFolder(long? folderOid, TableID objectTid, long objectOid);
+
[FaultContract(typeof(BeWoFault))]
[OperationContract]
void DeleteFolder(long pBeWoFolderOid, long pVersion);
diff --git a/Service/ServiceImplementations/EmployeeServiceImp.cs b/Service/ServiceImplementations/EmployeeServiceImp.cs
index 4282083b4..44f4e1e3e 100644
--- a/Service/ServiceImplementations/EmployeeServiceImp.cs
+++ b/Service/ServiceImplementations/EmployeeServiceImp.cs
@@ -2369,5 +2369,35 @@ namespace BeWo.Service.ServiceImplementations
throw Utils.CreateBeWoFaultException(ex);
}
}
+
+ public List GetTeamRightsForFolder(long folderOid)
+ {
+ try
+ {
+ var rights = DAOFactory.SearchDAO.GetTeamRightsForFolder(folderOid);
+
+ return MapperFactory.TeamFolderRight.MapToNewDCs(rights);
+ }
+ catch (Exception ex)
+ {
+ throw Utils.CreateBeWoFaultException(ex);
+ }
+ }
+
+ public List SaveTeamFolderRights(List list)
+ {
+ try
+ {
+ var originals = DAOFactory.GenericDAO.LoadByIDs(list.Where(t => t.Oid.HasValue).Select(t2 => t2.Oid.Value));
+ MapperFactory.TeamFolderRight.MergeWithEntitys(list, originals);
+ DAOFactory.GenericDAO.Update(originals);
+
+ return MapperFactory.TeamFolderRight.MapToNewDCs(originals);
+ }
+ catch (Exception ex)
+ {
+ throw Utils.CreateBeWoFaultException(ex);
+ }
+ }
}
}
\ No newline at end of file
diff --git a/Shared/DataContracts/InactivePersonDC.cs b/Shared/DataContracts/InactivePersonDC.cs
index fdb1ddec0..454eb70be 100644
--- a/Shared/DataContracts/InactivePersonDC.cs
+++ b/Shared/DataContracts/InactivePersonDC.cs
@@ -19,10 +19,11 @@ namespace BS.Shared.DataContracts
[DataMember] public string PostalCode { get; set; }
[DataMember] public string Town { get; set; }
[DataMember] public DateTime? LastUsedOn { get; set; }
+ [DataMember] public DateTime? InsTs { get; set; }
[DataMember] public string Notice { get; set; }
[DataMember] public long? PersonOid { get; set; }
[DataMember] public long? ObjectOid { get; set; }
- [DataMember] public long? ObjectTid { get; set; }
+ [DataMember] public TableID ObjectTid { get; set; }
[DataMember] public bool IsChecked { get; set; }
}
}
\ No newline at end of file
diff --git a/Shared/DataContracts/TeamFolderRightDC.cs b/Shared/DataContracts/TeamFolderRightDC.cs
new file mode 100644
index 000000000..f3bfd185d
--- /dev/null
+++ b/Shared/DataContracts/TeamFolderRightDC.cs
@@ -0,0 +1,25 @@
+using System.Runtime.Serialization;
+
+namespace BS.Shared.DataContracts
+{
+ [DataContract]
+ public partial class TeamFolderRightDC : IDataContract
+ {
+ [DataMember]
+ public long? Oid { get; set; }
+
+ [DataMember]
+ public long? Version { get; set; }
+
+ [DataMember]
+ public long TeamOid { get; set; }
+
+ [DataMember]
+ public long BeWoFolderOid { get; set; }
+ [DataMember]
+ public bool AllowEdit { get; set; }
+ [DataMember]
+ public bool AllowView { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/Shared/Shared.csproj b/Shared/Shared.csproj
index 0cbbaf836..83c6b3faf 100644
--- a/Shared/Shared.csproj
+++ b/Shared/Shared.csproj
@@ -194,6 +194,7 @@
+