kreta/Kreta.BusinessLogic/Helpers/IntezmenyConfigHelper.cs
2024-03-13 00:33:46 +01:00

22 lines
768 B
C#

using System;
using Kreta.Core.ConnectionType;
using Kreta.DataAccessManual;
using Kreta.Enums.ManualEnums;
namespace Kreta.BusinessLogic.Helpers
{
public class IntezmenyConfigHelper : LogicBase
{
public IntezmenyConfigHelper(IConnectionType connectionType) : base(connectionType) { }
public T GetIntezmenyConfig<T>(IntezmenyConfigModulEnum modulName, IntezmenyConfigTipusEnum configName)
{
return Dal.CustomConnection.Run(ConnectionType, h =>
{
var dal = h.IntezmenyConfigDAL();
object value = dal.GetIntezmenyConfig(IntezmenyId, modulName.ToString(), configName.ToString());
return (T)Convert.ChangeType(value, typeof(T));
});
}
}
}