96 lines
3.0 KiB
C#
96 lines
3.0 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Windows.Ink;
|
|
using BS.Shared.Core;
|
|
using BeWo.Data.Access;
|
|
using BeWo.Data.Entities;
|
|
using BS.Shared;
|
|
using BS.Shared.Extensions;
|
|
using System.Diagnostics;
|
|
using BS.Shared.DataContracts;
|
|
|
|
namespace BeWo.Service.Dienstplanung
|
|
{
|
|
public class StundenkontoServiceRecord
|
|
{
|
|
private CostBearer2SupportConcept _CostBearer2SupportConcept;
|
|
private Customer _Customer;
|
|
private Employee _Employee;
|
|
|
|
public long? ServiceRecordOid { get; set; }
|
|
public DateTime Start { get; set; }
|
|
public DateTime End { get; set; }
|
|
public decimal RoundedDuration { get; set; }
|
|
public int? GroupEmployeeCount { get; set; }
|
|
public int? GroupPersonCount { get; set; }
|
|
public decimal? GroupRoundedDuration { get; set; }
|
|
public long? GroupOid { get; set; }
|
|
public decimal DistanceInMeter { get; set; }
|
|
public decimal? Betrag { get; set; }
|
|
public ServiceDescriptionDC ServiceDescription { get; set; }
|
|
public long? CostBearer2SupportConceptOid { get; set; }
|
|
public long? CustomerOid { get; set; }
|
|
public long? EmployeeOid { get; set; }
|
|
public String Notice { get; set; }
|
|
public String Notice2 { get; set; }
|
|
public String Notice3 { get; set; }
|
|
public String InsUser { get; set; }
|
|
public DateTime? InsTs { get; set; }
|
|
public int? Relevance { get; set; }
|
|
public String Custom1 { get; set; }
|
|
|
|
//Ungerundete Minuten
|
|
public virtual double DurationMinutes
|
|
{
|
|
get
|
|
{
|
|
if (GroupOid.HasValue)
|
|
{
|
|
return (double)RoundedDuration;
|
|
}
|
|
else
|
|
{
|
|
return (End - Start).TotalMinutes;
|
|
}
|
|
}
|
|
}
|
|
|
|
public CostBearer2SupportConcept CostBearer2SupportConcept
|
|
{
|
|
get
|
|
{
|
|
if (_CostBearer2SupportConcept == null && CostBearer2SupportConceptOid.HasValue)
|
|
{
|
|
_CostBearer2SupportConcept = DAOFactory.GenericDAO.LoadByID<CostBearer2SupportConcept>(CostBearer2SupportConceptOid.Value);
|
|
}
|
|
return _CostBearer2SupportConcept;
|
|
}
|
|
}
|
|
|
|
public Customer Customer
|
|
{
|
|
get
|
|
{
|
|
if (_Customer == null && CustomerOid.HasValue)
|
|
{
|
|
_Customer = DAOFactory.GenericDAO.LoadByID<Customer>(CustomerOid.Value);
|
|
}
|
|
return _Customer;
|
|
}
|
|
}
|
|
|
|
public Employee Employee
|
|
{
|
|
get
|
|
{
|
|
if (_Employee == null && EmployeeOid.HasValue)
|
|
{
|
|
_Employee = DAOFactory.GenericDAO.LoadByID<Employee>(EmployeeOid.Value);
|
|
}
|
|
return _Employee;
|
|
}
|
|
}
|
|
|
|
}
|
|
} |