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 items) { //this.SetAuditTrailProperties(); UploadEncashAmount.Service.Save(items); } public void Delete(ID id) { UploadEncashAmount.Service.Delete(id); } #endregion #region Collection Functions public static ObjectsTemplate Get() { #region Cache Header ObjectsTemplate UploadEncashAmounts = _cache["Get"] as ObjectsTemplate; if (UploadEncashAmounts != null) return UploadEncashAmounts; #endregion UploadEncashAmounts = UploadEncashAmount.Service.Get(); #region Cache Footer _cache.Add(UploadEncashAmounts, "Get"); #endregion return UploadEncashAmounts; } public static ObjectsTemplate Get(ID EmpID) { #region Cache Header ObjectsTemplate UploadEncashAmounts = _cache["Get", EmpID] as ObjectsTemplate; 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(typeof(IUploadEncashAmountService)); } } #endregion } #endregion #region IUploadEncashAmount Service public interface IUploadEncashAmountService { ObjectsTemplate Get(); ObjectsTemplate Get(ID EmpID); void Save(ObjectsTemplate items); void Delete(ID id); } #endregion }