using System; using System.Collections.Generic; using System.Linq; using System.Text; using HRM.BO; namespace Payroll.BO { #region ClaimPayment public class ClaimPayment : BasicBaseObject { #region Constructor public ClaimPayment() { IsAnnualDisbursment = false; IsActualPayment = false; PayrollTypeID = null; MaxServiceLength = 0; MonthDifference = 0; NoOfDependent = 0; IsNotMaximum = false; } #endregion #region Properties public bool IsAnnualDisbursment { get; set;} public bool IsActualPayment { get; set; } public bool IsNotMaximum { get; set;} public EnumClaimType ClaimType { get; set;} public double MaxServiceLength { get; set; } public int MonthDifference { get; set;} public int NoOfDependent { get; set;} public int? PayrollTypeID { get; set; } public List ClaimPaymentGrades { get; set; } #endregion #region Functions //public static ClaimPayment Get(ID nID) //{ // ClaimPayment oClaimPayment = null; // #region Cache Header // oClaimPayment = (ClaimPayment)_cache["Get", nID]; // if (oClaimPayment != null) // return oClaimPayment; // #endregion // oClaimPayment = ClaimPayment.Service.Get(nID); // #region Cache Footer // _cache.Add(oClaimPayment, "Get", nID); // #endregion // return oClaimPayment; //} //public static ObjectsTemplate Get(EnumStatus status) //{ // #region Cache Header // ObjectsTemplate oClaimPayments = _cache["Get", status] as ObjectsTemplate; // if (oClaimPayments != null) // return oClaimPayments; // #endregion // try // { // oClaimPayments = Service.Get(status, SystemInformation.CurrentSysInfo.PayrollTypeID.Integer); // } // catch (ServiceException e) // { // throw new Exception(e.Message, e); // } // #region Cache Footer // _cache.Add(oClaimPayments, "Get", status); // #endregion // return oClaimPayments; //} //public void Save(ObjectsTemplate oClaimPayments) //{ // oClaimPayments.ForEach(o => o.SetAuditTrailProperties()); // ClaimPayment.Service.Save(oClaimPayments); //} //public ID Save() //{ // this.SetAuditTrailProperties(); // return ClaimPayment.Service.Save(this); //} //public void Delete(ID id) //{ // ClaimPayment.Service.Delete(ID); //} //public void DeleteByType(EnumClaimType claimType) //{ // ClaimPayment.Service.DeleteByType(claimType); //} #endregion } #endregion #region IClaimPaymentService Service public interface IClaimPaymentService { void DeleteByType(EnumClaimType claimType); void Save(List oClaimPayments); ClaimPayment Get(int id); List Get(EnumStatus status, int iD); List GetClaimPaymentGrades(int iD); int Save(ClaimPayment item); void Delete(int id); } #endregion }