227 lines
4.9 KiB
C#
227 lines
4.9 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;
|
|||
|
using System.Data;
|
|||
|
|
|||
|
namespace Payroll.BO
|
|||
|
{
|
|||
|
#region PFTransaction
|
|||
|
|
|||
|
[Serializable]
|
|||
|
public class PFException : AuditTrailBase
|
|||
|
{
|
|||
|
#region Cache Store
|
|||
|
|
|||
|
private static Cache _cache = new Cache(typeof(PFException));
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
#region Constructor
|
|||
|
|
|||
|
public PFException()
|
|||
|
{
|
|||
|
_employeeID = null;
|
|||
|
_startDate = DateTime.MinValue;
|
|||
|
_cPFPercent = 0;
|
|||
|
_ePFPercent = 0;
|
|||
|
_ePFAmount = 0;
|
|||
|
_cPFAmount = 0;
|
|||
|
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
#region Properties
|
|||
|
|
|||
|
#region EmployeeID : ID
|
|||
|
|
|||
|
private ID _employeeID;
|
|||
|
public ID EmployeeID
|
|||
|
{
|
|||
|
get { return _employeeID; }
|
|||
|
set
|
|||
|
{
|
|||
|
base.OnPropertyChange<ID>("EmployeeID", _employeeID, value);
|
|||
|
_employeeID = value;
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
#region EPFPercent : double
|
|||
|
|
|||
|
private double _ePFPercent;
|
|||
|
public double EPFPercent
|
|||
|
{
|
|||
|
get { return _ePFPercent; }
|
|||
|
set
|
|||
|
{
|
|||
|
base.OnPropertyChange<double>("EPFPercent", _ePFPercent, value);
|
|||
|
_ePFPercent = value;
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
#region CPFPercent : double
|
|||
|
|
|||
|
private double _cPFPercent;
|
|||
|
public double CPFPercent
|
|||
|
{
|
|||
|
get { return _cPFPercent; }
|
|||
|
set
|
|||
|
{
|
|||
|
base.OnPropertyChange<double>("CPFPercent", _cPFPercent, value);
|
|||
|
_cPFPercent = value;
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
#region EPFAmount : double
|
|||
|
|
|||
|
private double _ePFAmount;
|
|||
|
public double EPFAmount
|
|||
|
{
|
|||
|
get { return _ePFAmount; }
|
|||
|
set
|
|||
|
{
|
|||
|
base.OnPropertyChange<double>("EPFAmount", _ePFAmount, value);
|
|||
|
_ePFAmount = value;
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
#region CPFAmount : double
|
|||
|
|
|||
|
private double _cPFAmount;
|
|||
|
public double CPFAmount
|
|||
|
{
|
|||
|
get { return _cPFAmount; }
|
|||
|
set
|
|||
|
{
|
|||
|
base.OnPropertyChange<double>("CPFAmount", _cPFAmount, value);
|
|||
|
_cPFAmount = value;
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
#region StartDate : DateTime
|
|||
|
|
|||
|
private DateTime _startDate;
|
|||
|
public DateTime StartDate
|
|||
|
{
|
|||
|
get { return _startDate; }
|
|||
|
set
|
|||
|
{
|
|||
|
base.OnPropertyChange<DateTime>("StartDate", _startDate, value);
|
|||
|
_startDate = value;
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
#region Service Factory IPFExceptionService : IPFExceptionService
|
|||
|
|
|||
|
internal static IPFExceptionService Service
|
|||
|
{
|
|||
|
get { return Services.Factory.CreateService<IPFExceptionService>(typeof(IPFExceptionService)); }
|
|||
|
}
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
#region Functions
|
|||
|
|
|||
|
public static ObjectsTemplate<PFException> Get()
|
|||
|
{
|
|||
|
#region Cache Header
|
|||
|
|
|||
|
ObjectsTemplate<PFException> pFExceptions = _cache["Get"] as ObjectsTemplate<PFException>;
|
|||
|
if (pFExceptions != null)
|
|||
|
return pFExceptions;
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
try
|
|||
|
{
|
|||
|
pFExceptions = Service.Get();
|
|||
|
}
|
|||
|
catch (ServiceException e)
|
|||
|
{
|
|||
|
throw new Exception(e.Message, e);
|
|||
|
}
|
|||
|
|
|||
|
#region Cache Footer
|
|||
|
|
|||
|
_cache.Add(pFExceptions, "Get");
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
return pFExceptions;
|
|||
|
}
|
|||
|
public PFException Get(ID PFExceptionID)
|
|||
|
{
|
|||
|
#region Cache Header
|
|||
|
|
|||
|
PFException pFException = _cache["Get", PFExceptionID] as PFException;
|
|||
|
if (pFException != null)
|
|||
|
return pFException;
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
try
|
|||
|
{
|
|||
|
pFException = Service.Get(PFExceptionID);
|
|||
|
}
|
|||
|
catch (ServiceException e)
|
|||
|
{
|
|||
|
throw new Exception(e.Message, e);
|
|||
|
}
|
|||
|
|
|||
|
#region Cache Footer
|
|||
|
|
|||
|
_cache.Add(pFException, "Get", PFExceptionID);
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
return pFException;
|
|||
|
}
|
|||
|
public ID Save()
|
|||
|
{
|
|||
|
this.SetAuditTrailProperties();
|
|||
|
return PFException.Service.Save(this);
|
|||
|
}
|
|||
|
public void Delete()
|
|||
|
{
|
|||
|
PFException.Service.Delete(this.ID);
|
|||
|
}
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
}
|
|||
|
#endregion
|
|||
|
|
|||
|
#region IPFException Service
|
|||
|
|
|||
|
public interface IPFExceptionService
|
|||
|
{
|
|||
|
ObjectsTemplate<PFException> Get();
|
|||
|
PFException Get(ID PFExceptionID);
|
|||
|
|
|||
|
ID Save(PFException item);
|
|||
|
void Delete(ID PFExceptionID);
|
|||
|
}
|
|||
|
|
|||
|
#endregion
|
|||
|
}
|