242 lines
5.7 KiB
C#
242 lines
5.7 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using Ease.CoreV35.Caching;
|
|
using Ease.CoreV35.Model;
|
|
|
|
namespace Payroll.BO
|
|
{
|
|
#region Class TrainingSchEmpCost
|
|
[Serializable]
|
|
public class TrainingSchEmpCost : AuditTrailBase
|
|
{
|
|
#region Cache Store
|
|
private static Cache _cache = new Cache(typeof(TrainingSchEmpCost));
|
|
#endregion
|
|
|
|
#region Constructor
|
|
public TrainingSchEmpCost()
|
|
{
|
|
_costHdID = 0;
|
|
_amount = 0;
|
|
_trunDate = DateTime.MinValue;
|
|
_remarks = string.Empty;
|
|
_employeeID = 0;
|
|
// _trainSchEmpID = 0;
|
|
|
|
}
|
|
#endregion
|
|
|
|
#region Properties
|
|
#region Property CostHdID : int
|
|
|
|
private int _costHdID;
|
|
public int CostHdID
|
|
{
|
|
get
|
|
{
|
|
return _costHdID;
|
|
}
|
|
|
|
set
|
|
{
|
|
_costHdID = value;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region Property Amount : double
|
|
|
|
private double _amount;
|
|
public double Amount
|
|
{
|
|
get
|
|
{
|
|
return _amount;
|
|
}
|
|
|
|
set
|
|
{
|
|
_amount = value;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region Property TrunDate : DateTime
|
|
|
|
private DateTime _trunDate;
|
|
|
|
public DateTime TrunDate
|
|
{
|
|
get
|
|
{
|
|
return _trunDate;
|
|
}
|
|
set
|
|
{
|
|
_trunDate = value;
|
|
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region Property Remarks : string
|
|
|
|
private string _remarks;
|
|
public string Remarks
|
|
{
|
|
get
|
|
{
|
|
return _remarks;
|
|
}
|
|
set
|
|
{
|
|
_remarks = value;
|
|
base.SetObjectStateModified();
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
#region Property EmployeeID : int
|
|
|
|
private int _employeeID;
|
|
public int EmployeeID
|
|
{
|
|
get
|
|
{
|
|
return _employeeID;
|
|
}
|
|
|
|
set
|
|
{
|
|
_employeeID = value;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#endregion
|
|
#region Property TrainSchEmpID : int
|
|
|
|
private int _trainSchEmpID;
|
|
public int TrainSchEmpID
|
|
{
|
|
get
|
|
{
|
|
return _trainSchEmpID;
|
|
}
|
|
|
|
set
|
|
{
|
|
_trainSchEmpID = value;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#endregion
|
|
|
|
#endregion
|
|
|
|
#region Functions
|
|
|
|
public static TrainingSchEmpCost Get(int nID)
|
|
{
|
|
TrainingSchEmpCost oTrainingSchEmpCost = null;
|
|
#region Cache Header
|
|
oTrainingSchEmpCost = (TrainingSchEmpCost)_cache["Get", nID];
|
|
if (oTrainingSchEmpCost != null)
|
|
return oTrainingSchEmpCost;
|
|
#endregion
|
|
oTrainingSchEmpCost = TrainingSchEmpCost.Service.Get(ID.FromInteger(nID));
|
|
#region Cache Footer
|
|
_cache.Add(oTrainingSchEmpCost, "Get", nID);
|
|
#endregion
|
|
return oTrainingSchEmpCost;
|
|
}
|
|
|
|
public static ObjectsTemplate<TrainingSchEmpCost> GetByTrainingScheduleEmpID(ID empID, ID trainSchEmpID)
|
|
{
|
|
ObjectsTemplate<TrainingSchEmpCost> oTrainingSchEmpCosts = null;
|
|
|
|
oTrainingSchEmpCosts = TrainingSchEmpCost.Service.GetByTrainingScheduleEmpID(empID, trainSchEmpID);
|
|
|
|
return oTrainingSchEmpCosts;
|
|
}
|
|
public ID Save()
|
|
{
|
|
this.SetAuditTrailProperties();
|
|
return TrainingSchEmpCost.Service.Save(this);
|
|
}
|
|
|
|
public static void SaveTrainingSheduleCost(ObjectsTemplate<TrainingSchEmpCost> tsec)
|
|
{
|
|
Service.SaveTrainingSheduleCost(tsec);
|
|
}
|
|
public static void Delete(ID id)
|
|
{
|
|
TrainingSchEmpCost.Service.Delete(id);
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region Collection Functions
|
|
|
|
public static ObjectsTemplate<TrainingSchEmpCost> Get()
|
|
{
|
|
ObjectsTemplate<TrainingSchEmpCost> oTrainingSchEmpCosts = null;
|
|
#region Cache Header
|
|
oTrainingSchEmpCosts = (ObjectsTemplate<TrainingSchEmpCost>)_cache["Get"];
|
|
if (oTrainingSchEmpCosts != null)
|
|
return oTrainingSchEmpCosts;
|
|
#endregion
|
|
oTrainingSchEmpCosts = TrainingSchEmpCost.Service.Get();
|
|
#region Cache Footer
|
|
_cache.Add(oTrainingSchEmpCosts, "Get");
|
|
#endregion
|
|
return oTrainingSchEmpCosts;
|
|
}
|
|
#endregion
|
|
|
|
#region Service Factory
|
|
internal static ITrainingSchEmpCostService Service
|
|
{
|
|
get
|
|
{
|
|
return Services.Factory.CreateService<ITrainingSchEmpCostService>(typeof(ITrainingSchEmpCostService));
|
|
}
|
|
}
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
public static ObjectsTemplate<TrainingSchEmpCost> GetCostWithoutParent()
|
|
{
|
|
return Service.GetCostWithoutParent();
|
|
}
|
|
}
|
|
#endregion
|
|
#region ITrainingSchEmpCostService Service
|
|
public interface ITrainingSchEmpCostService
|
|
{
|
|
TrainingSchEmpCost Get(ID id);
|
|
ObjectsTemplate<TrainingSchEmpCost> Get();
|
|
ID Save(TrainingSchEmpCost oTrainingSchEmpCost);
|
|
void Delete(ID id);
|
|
|
|
ObjectsTemplate<TrainingSchEmpCost> GetByTrainingScheduleEmpID(ID iD, ID trainSchEmpID);
|
|
void SaveTrainingSheduleCost(ObjectsTemplate<TrainingSchEmpCost> tsec);
|
|
ObjectsTemplate<TrainingSchEmpCost> GetCostWithoutParent();
|
|
}
|
|
#endregion
|
|
}
|