CEL_Payroll/Payroll.BO/Basic/PLDailyInterest.cs
2024-09-17 14:30:13 +06:00

125 lines
3.2 KiB
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Ease.CoreV35;
using Ease.CoreV35.Model;
using Ease.CoreV35.Caching;
using System.Data.Linq.Mapping;
namespace Payroll.BO
{
#region PLDailyInterest
[Serializable]
public class PLDailyInterest : AuditTrailBase
{
#region Cache Store
private static Cache _cache = new Cache(typeof(PLDailyInterest));
#endregion
#region Constructor
public PLDailyInterest()
{
_intDate = DateTime.Today; ;
_DailyRate = 0;
_AnnualRate = 0;
}
#endregion
#region Properties
#region InterestDate : DateTime
private DateTime _intDate;
public DateTime InterestDate
{
get { return _intDate; }
set
{
base.OnPropertyChange<DateTime>("InterestDate", _intDate, value);
_intDate = value;
}
}
#endregion
#region DailyRate : double
private double _DailyRate;
public double DailyRate
{
get { return _DailyRate; }
set
{
base.OnPropertyChange<double>("_DailyRate", _DailyRate, value);
_DailyRate = value;
}
}
#endregion
#region AnnualRate : double
private double _AnnualRate;
public double AnnualRate
{
get { return _AnnualRate; }
set
{
base.OnPropertyChange<double>("AnnualRate", _AnnualRate, value);
_AnnualRate = value;
}
}
#endregion
#endregion
#region Functions
public static ObjectsTemplate<PLDailyInterest> Get(DateTime FrominterestDate,DateTime ToIntDate)
{
return PLDailyInterest.Service.Get(FrominterestDate, ToIntDate);
}
public static PLDailyInterest Get(DateTime issueDate)
{
return PLDailyInterest.Service.Get(issueDate);
}
public ID Save(DateTime FrominterestDate, DateTime ToIntDate,ObjectsTemplate<PLDailyInterest> oItems)
{
return PLDailyInterest.Service.Save(FrominterestDate, ToIntDate, oItems);
}
public void Delete(DateTime FrominterestDate, DateTime ToIntDate)
{
PLDailyInterest.Service.Delete(FrominterestDate,ToIntDate);
}
#endregion
#region Service Factory IPLDailyInterestService : IPLDailyInterestService
internal static IPLDailyInterestService Service
{
get { return Services.Factory.CreateService<IPLDailyInterestService>(typeof(IPLDailyInterestService)); }
}
#endregion
}
#endregion
#region IPLDailyInterest Service
public interface IPLDailyInterestService
{
ObjectsTemplate<PLDailyInterest> Get(DateTime FrominterestDate, DateTime ToIntDate);
PLDailyInterest Get(DateTime issueDate);
ID Save(DateTime FrominterestDate, DateTime ToIntDate, ObjectsTemplate<PLDailyInterest> oItems);
void Delete(DateTime FrominterestDate, DateTime ToIntDate);
}
#endregion
}