28 lines
710 B
C#
28 lines
710 B
C#
using BS.Shared.Services;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace BeWoNordeifel.Calculation
|
|
{
|
|
public class CustomLWLCalculations : LWLCalculations
|
|
{
|
|
// Wie LVR
|
|
public override int GetRoundedDuration(int minuteInterval, decimal durationInMinutes)
|
|
{
|
|
decimal lRoundedDuration = durationInMinutes;
|
|
|
|
if (minuteInterval > 0)
|
|
{
|
|
lRoundedDuration = durationInMinutes % minuteInterval != 0
|
|
? durationInMinutes + (minuteInterval - (durationInMinutes % minuteInterval))
|
|
: durationInMinutes;
|
|
}
|
|
|
|
return (int)Math.Round(lRoundedDuration, 0, MidpointRounding.AwayFromZero);
|
|
}
|
|
}
|
|
}
|