MH: AssistenzaReports Meldung beim Speichern der Zeiterfassung ohne Zeiten
SupportOID=167514
This commit is contained in:
@@ -154,6 +154,7 @@
|
||||
<Compile Include="Quittierungsbeleg.designer.cs">
|
||||
<DependentUpon>Quittierungsbeleg.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Service\CustomServiceRecordValidator.cs" />
|
||||
<Compile Include="Service\CustomVacationService.cs" />
|
||||
<Compile Include="SettlementReport2.cs">
|
||||
<SubType>Component</SubType>
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
using BeWo.Service.Plugins;
|
||||
using BS.Shared.DataContracts;
|
||||
using BS.Shared.Extensions;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace AssistenzaReports.Service
|
||||
{
|
||||
public class CustomServiceRecordValidator : ServiceRecordValidator
|
||||
{
|
||||
public override List<ServiceRecordValidationResultDC> ValidateServiceRecord(ServiceRecordDC newServiceRecord, SupportConceptStatisticsDC statisticsXX, int maxDaysEditServiceRecordsAllowed, IList<long> employeeOids, IList<long> cb2scOids)
|
||||
{
|
||||
var list = base.ValidateServiceRecord(newServiceRecord, statisticsXX, maxDaysEditServiceRecordsAllowed, employeeOids, cb2scOids);
|
||||
|
||||
if (newServiceRecord.Start == null && newServiceRecord.End == null ||
|
||||
newServiceRecord.Start.HasValue && newServiceRecord.Start.Value.Second == 1 &&
|
||||
newServiceRecord.End.HasValue && newServiceRecord.End.Value.Second == 1)
|
||||
{
|
||||
list.Add(new ServiceRecordValidationResultDC()
|
||||
{
|
||||
Allow = false,
|
||||
ResultType = BS.Shared.ServiceRecordValidationResult.Custom,
|
||||
Message = "Sie können den Eintrag nicht speichern, ohne eine Start- und Endzeit einzugeben."
|
||||
});
|
||||
}
|
||||
|
||||
return list;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user