CEL_Payroll/Payroll.BO/Leave/UploadEncashAmount.cs

143 lines
3.9 KiB
C#
Raw Permalink Normal View History

2024-09-17 14:30:13 +06:00
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 UploadEncashAmount
[Serializable]
public class UploadEncashAmount : BasicBaseObject
{
#region Cache Store
private static Cache _cache = new Cache(typeof(UploadEncashAmount));
#endregion
#region Constructor
public UploadEncashAmount()
{
_nEmpID = null;
_nLeaveID = null;
_days = 0;
_basicSalary = 0.0;
_leaveYear = 0;
}
#endregion
#region Properties
#region EmployeeID
private ID _nEmpID;
public ID EmployeeID
{
get { return _nEmpID; }
set { _nEmpID = value; }
}
#endregion
#region LeaveID
private ID _nLeaveID;
public ID LeaveID
{
get { return _nLeaveID; }
set { _nLeaveID = value; }
}
#endregion
#region Days
private int _days;
public int Days
{
get { return _days; }
set { _days = value; }
}
#endregion
#region LeaveYear
private int _leaveYear;
public int LeaveYear
{
get { return _leaveYear; }
set { _leaveYear = value; }
}
#endregion
#region BasicSalary
private double _basicSalary;
public double BasicSalary
{
get { return _basicSalary; }
set { _basicSalary = value; }
}
#endregion
#endregion
#region Functions
public void Save(ObjectsTemplate<UploadEncashAmount> items)
{
//this.SetAuditTrailProperties();
UploadEncashAmount.Service.Save(items);
}
public void Delete(ID id)
{
UploadEncashAmount.Service.Delete(id);
}
#endregion
#region Collection Functions
public static ObjectsTemplate<UploadEncashAmount> Get()
{
#region Cache Header
ObjectsTemplate<UploadEncashAmount> UploadEncashAmounts = _cache["Get"] as ObjectsTemplate<UploadEncashAmount>;
if (UploadEncashAmounts != null)
return UploadEncashAmounts;
#endregion
UploadEncashAmounts = UploadEncashAmount.Service.Get();
#region Cache Footer
_cache.Add(UploadEncashAmounts, "Get");
#endregion
return UploadEncashAmounts;
}
public static ObjectsTemplate<UploadEncashAmount> Get(ID EmpID)
{
#region Cache Header
ObjectsTemplate<UploadEncashAmount> UploadEncashAmounts = _cache["Get", EmpID] as ObjectsTemplate<UploadEncashAmount>;
if (UploadEncashAmounts != null)
return UploadEncashAmounts;
#endregion
UploadEncashAmounts = UploadEncashAmount.Service.Get(EmpID);
#region Cache Footer
_cache.Add(UploadEncashAmounts, "Get", EmpID);
#endregion
return UploadEncashAmounts;
}
#endregion
#region Service Factory
internal static IUploadEncashAmountService Service
{
get { return Services.Factory.CreateService<IUploadEncashAmountService>(typeof(IUploadEncashAmountService)); }
}
#endregion
}
#endregion
#region IUploadEncashAmount Service
public interface IUploadEncashAmountService
{
ObjectsTemplate<UploadEncashAmount> Get();
ObjectsTemplate<UploadEncashAmount> Get(ID EmpID);
void Save(ObjectsTemplate<UploadEncashAmount> items);
void Delete(ID id);
}
#endregion
}