Files
BeWoPlaner/Data/Utils/ServiceRecord2SignatureStates.cs
Christian 1234388bfb - Neue Einstellungen beim Mandator
- History für Abwesenheiten
- History überarbeitet
- Berichte für Einträge ohne Unterschriften
2025-03-16 20:42:21 +01:00

44 lines
1.8 KiB
C#

using BeWo.Data.Entities;
using BS.Shared;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BeWo.Data.Utils
{
public class ServiceRecord2SignatureStates
{
public ServiceRecord ServiceRecord { get; }
public SignatureStateType? SingleSignatureStateType { get; set; }
public SignatureStateType? CustomerMonthlySignatureStateType { get; set; }
public SignatureStateType? EmployeeMonthlySignatreStateType { get; set; }
/// <summary>
/// Erzeugt das Objekt mit den SignatureStates. Wird als Wert eines States null übergeben, wird beim Erzeugen des ServiceRecordHistory-Eintrags der Wert des vorherigen ServiceRecordHistory-Eintrags genommen, falls vorhanden.
/// </summary>
/// <param name="serviceRecord"></param>
/// <param name="singleSignatureStateType"></param>
/// <param name="customerMonthlySignatureStateType"></param>
/// <param name="employeeMonthlySignatreStateType"></param>
public ServiceRecord2SignatureStates(ServiceRecord serviceRecord, SignatureStateType? singleSignatureStateType, SignatureStateType? customerMonthlySignatureStateType, SignatureStateType? employeeMonthlySignatreStateType)
{
ServiceRecord = serviceRecord;
SingleSignatureStateType = singleSignatureStateType;
CustomerMonthlySignatureStateType = customerMonthlySignatureStateType;
EmployeeMonthlySignatreStateType = employeeMonthlySignatreStateType;
}
public override bool Equals(object obj)
{
if (obj is ServiceRecord2SignatureStates sr2Ss && sr2Ss.ServiceRecord != null)
{
return ServiceRecord?.Equals(sr2Ss.ServiceRecord) ?? false;
}
return false;
}
}
}