Files
BeWoPlaner/Service/ServiceImplementations/AdminServiceImp.cs

51 lines
1.2 KiB
C#
Raw Normal View History

using BeWo.Data.Access;
using BeWo.Service.ServiceContracts;
2025-02-25 15:56:15 +01:00
using BS.Shared.Core;
2025-02-25 14:49:31 +01:00
using BS.Shared.DataContracts.AdminService;
using DevExpress.Pdf.Native.BouncyCastle.Ocsp;
2025-02-20 18:39:11 +01:00
using System;
using System.Collections.Generic;
using System.Linq;
using System.ServiceModel;
using System.Text;
using System.Threading.Tasks;
namespace BeWo.Service.ServiceImplementations
{
[ServiceBehavior(InstanceContextMode = InstanceContextMode.PerCall, ConcurrencyMode = ConcurrencyMode.Single)]
public class AdminServiceImp : IAdminService
{
public string Test()
{
return "Test erfolgreich!";
}
2025-02-21 11:56:28 +01:00
public string Echo(string echo)
{
return echo;
}
2025-02-25 14:49:31 +01:00
public object GetGkvAbrechnungSumme(AdminServiceSumReqDC request)
{
2025-02-25 14:49:31 +01:00
if (request == null)
{
2025-02-25 15:56:15 +01:00
throw new ArgumentException("request darf nicht null sein");
}
2025-02-25 15:56:15 +01:00
if(!Utils.TryParseISO8601(request.Start, out var start))
{
2025-02-25 15:56:15 +01:00
throw new ArgumentException("start entspricht nicht ISO8601 Norm.");
}
2025-02-25 15:56:15 +01:00
if (!Utils.TryParseISO8601(request.End, out var end))
2025-02-25 14:49:31 +01:00
{
2025-02-25 15:56:15 +01:00
throw new ArgumentException("end entspricht nicht ISO8601 Norm.");
2025-02-25 14:49:31 +01:00
}
2025-02-25 15:56:15 +01:00
var sum = DAOFactory.ScriptDAO.GetGkvSumByDateRange(start, end);
2025-02-25 15:56:15 +01:00
return sum?.ToString("0.00");
}
2025-02-20 18:39:11 +01:00
}
}