Frommen: Quittierungsbeleg angepasst; die Unterschriftengrafiken sind jetzt größer Fehler von Tempusdominus bei den Zeitfeldern des MoKs behoben. Quittierungsbelegmodul im MoK: Legende der Symbole hinzugefügt Validierung von Gruppenbuchungen im MoK verbessert.
99 lines
3.2 KiB
C#
99 lines
3.2 KiB
C#
using System;
|
|
|
|
namespace BS.Shared.DataContracts
|
|
{
|
|
public partial class ServiceRecordHistoryDC
|
|
{
|
|
public DateTime? StartDate
|
|
{
|
|
get
|
|
{
|
|
if (Start.HasValue && Start.Value.Second == 1)
|
|
return null;
|
|
else
|
|
{
|
|
return Start;
|
|
}
|
|
}
|
|
}
|
|
|
|
public DateTime? EndDate
|
|
{
|
|
get
|
|
{
|
|
if (Start.HasValue && Start.Value.Second == 1)
|
|
return null;
|
|
else
|
|
{
|
|
return End;
|
|
}
|
|
}
|
|
}
|
|
|
|
public string HistoryTypeString
|
|
{
|
|
get
|
|
{
|
|
switch (ChangeType)
|
|
{
|
|
case StatementType.Insert:
|
|
return "Neu angelegt";
|
|
case StatementType.Update:
|
|
return "Geändert";
|
|
case StatementType.Delete:
|
|
return "Gelöscht";
|
|
case StatementType.Signature:
|
|
return "Unterschrift";
|
|
default:
|
|
return null;
|
|
}
|
|
}
|
|
}
|
|
|
|
public string SingleSignatureStateString => TranslateSignatureState(ServiceRecordSignatureStateType);
|
|
public string CustomerMonthlySignatureStateString => TranslateSignatureState(CustomerConfirmationReceiptSignatureStateType);
|
|
public string EmployeeMonthlySignatureStateString => TranslateSignatureState(EmployeeConfirmationReceiptSignatureStateType);
|
|
|
|
private static string TranslateSignatureState(SignatureStateType signatureStateType)
|
|
{
|
|
switch(signatureStateType)
|
|
{
|
|
case SignatureStateType.None:
|
|
return "Keine";
|
|
case SignatureStateType.Valid:
|
|
return "Gültig";
|
|
case SignatureStateType.Invalid:
|
|
return "Ungültig";
|
|
case SignatureStateType.ManuallyDeleted:
|
|
return "Manuell gelöscht";
|
|
case SignatureStateType.AutomaticallyDeleted:
|
|
return "Automatisch gelöscht";
|
|
default:
|
|
return null;
|
|
}
|
|
}
|
|
|
|
public override bool Equals(object obj)
|
|
{
|
|
if(obj is ServiceRecordHistoryDC)
|
|
{
|
|
var y = (ServiceRecordHistoryDC)obj;
|
|
if (ServiceRecordOid == null && y.ServiceRecordOid == null)
|
|
return GetHashCode() == y.GetHashCode();
|
|
|
|
if (ServiceRecordOid != null && y.ServiceRecordOid != null)
|
|
return ServiceRecordOid == y.ServiceRecordOid;
|
|
}
|
|
|
|
return false;
|
|
}
|
|
|
|
public override int GetHashCode()
|
|
{
|
|
return ServiceRecordOid.HasValue
|
|
? GetType().Name.GetHashCode() ^ ServiceRecordOid.GetHashCode()
|
|
: base.GetHashCode();
|
|
}
|
|
}
|
|
}
|