104 lines
2.5 KiB
C#
104 lines
2.5 KiB
C#
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<EmployeeRetirement> Get()
|
|
{
|
|
ObjectsTemplate<EmployeeRetirement> empRetirement = new ObjectsTemplate<EmployeeRetirement>();
|
|
|
|
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<EmployeeRetirement> items)
|
|
{
|
|
foreach (EmployeeRetirement item in items)
|
|
{
|
|
EmployeeRetirement.Service.Save(item);
|
|
}
|
|
}
|
|
|
|
public static void UpdateAll(ObjectsTemplate<EmployeeRetirement> 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<IEmployeeRetirementService>(typeof(IEmployeeRetirementService)); }
|
|
}
|
|
#endregion
|
|
|
|
#region IEmployeeRetirement Service
|
|
|
|
public interface IEmployeeRetirementService
|
|
{
|
|
ObjectsTemplate<EmployeeRetirement> Get();
|
|
ID Save(EmployeeRetirement item);
|
|
void SaveAll(ObjectsTemplate < EmployeeRetirement > items);
|
|
void UpdateAll(ObjectsTemplate<EmployeeRetirement> items);
|
|
int GetById(ID id);
|
|
|
|
}
|
|
|
|
#endregion
|
|
|
|
}
|
|
}
|