using System; using System.Collections.Generic; using System.Linq; using System.Text; using Ease.CoreV35.Model; namespace Payroll.BO { [Serializable] public class EmployeeRetirement : BasicBaseObject { #region Properties #region employeeID : ID private ID _employeeID; public ID employeeID { get { return _employeeID; } set { _employeeID = value; } } #endregion #region retirementAge : int private int _retirementAge; public int retirementAge { get { return _retirementAge; } set { _retirementAge = value; } } #endregion #endregion #region function public static ObjectsTemplate Get() { ObjectsTemplate empRetirement = new ObjectsTemplate(); try { empRetirement = EmployeeRetirement.Service.Get(); } catch (ServiceException e) { throw new Exception(e.Message, e); } return empRetirement; } public ID Save(EmployeeRetirement item) { this.SetAuditTrailProperties(); return EmployeeRetirement.Service.Save(item); } public static void SaveAll(ObjectsTemplate items) { foreach (EmployeeRetirement item in items) { EmployeeRetirement.Service.Save(item); } } public static void UpdateAll(ObjectsTemplate items) { EmployeeRetirement.Service.UpdateAll(items); } public static int GetById(ID id) { return EmployeeRetirement.Service.GetById(id); } internal static IEmployeeRetirementService Service { get { return Services.Factory.CreateService(typeof(IEmployeeRetirementService)); } } #endregion #region IEmployeeRetirement Service public interface IEmployeeRetirementService { ObjectsTemplate Get(); ID Save(EmployeeRetirement item); void SaveAll(ObjectsTemplate < EmployeeRetirement > items); void UpdateAll(ObjectsTemplate items); int GetById(ID id); } #endregion } }