31 lines
1.1 KiB
C#
31 lines
1.1 KiB
C#
using System;
|
|
using System.Linq;
|
|
using AICore.Context.Entry;
|
|
using BeWo.Data.Entities;
|
|
|
|
namespace AICore.Context.EntryMapper
|
|
{
|
|
public class ServiceRecordContextEntryMapper : BaseContextEntryMapper<ServiceRecord, ServiceRecordContextEntry>
|
|
{
|
|
public override void MergeWithObject(ServiceRecord pObject, ServiceRecordContextEntry pContext)
|
|
{
|
|
pContext.ServiceRecordOid = pObject.Oid.Value;
|
|
pContext.Start = pObject.Start;
|
|
pContext.End = pObject.End;
|
|
pContext.DurationInMinuten = pObject.DurationMinutes;
|
|
pContext.CategoryName = pObject.ServiceDescription.ServiceCategory.Name;
|
|
pContext.DescriptionName = pObject.ServiceDescription.Name;
|
|
pContext.Notice = pObject.Notice;
|
|
pContext.Notice2 = pObject.Notice2;
|
|
pContext.Notice3 = pObject.Notice3;
|
|
pContext.Notice4 = pObject.Notice4;
|
|
pContext.Notice5 = pObject.Notice5;
|
|
pContext.DistanceInMeter = pObject.DistanceInMeter;
|
|
pContext.InsertedOn = pObject.InsTs.Value;
|
|
pContext.Betrag = pObject.Betrag;
|
|
pContext.InsUser = pObject.InsUser;
|
|
pContext.Employee = pObject.Employee.Person.FirstNameLastName;
|
|
}
|
|
}
|
|
}
|