182 lines
5.0 KiB
C#
182 lines
5.0 KiB
C#
|
using System;
|
|||
|
using Ease.CoreV35.Caching;
|
|||
|
using Ease.CoreV35.Model;
|
|||
|
|
|||
|
namespace Payroll.BO
|
|||
|
{
|
|||
|
#region class TrainingScheduleAttn
|
|||
|
|
|||
|
[Serializable]
|
|||
|
public class TrainingScheduleAttn : AuditTrailBase
|
|||
|
{
|
|||
|
#region Cache Store
|
|||
|
private static Cache _cache = new Cache(typeof(TrainingScheduleAttn));
|
|||
|
#endregion
|
|||
|
|
|||
|
#region Constructor
|
|||
|
public TrainingScheduleAttn()
|
|||
|
{
|
|||
|
_trainingScheduleID = null;
|
|||
|
_tSDateID = null;
|
|||
|
_employeeID = null;
|
|||
|
}
|
|||
|
#endregion
|
|||
|
|
|||
|
#region Properties
|
|||
|
|
|||
|
#region Property TrainingScheduleID : ID
|
|||
|
|
|||
|
private ID _trainingScheduleID;
|
|||
|
public ID TrainingScheduleID
|
|||
|
{
|
|||
|
get
|
|||
|
{
|
|||
|
return _trainingScheduleID;
|
|||
|
}
|
|||
|
set
|
|||
|
{
|
|||
|
_trainingScheduleID = value;
|
|||
|
base.SetObjectStateModified();
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
#region Property TSDateID : ID
|
|||
|
|
|||
|
private ID _tSDateID;
|
|||
|
public ID TSDateID
|
|||
|
{
|
|||
|
get
|
|||
|
{
|
|||
|
return _tSDateID;
|
|||
|
}
|
|||
|
set
|
|||
|
{
|
|||
|
_tSDateID = value;
|
|||
|
base.SetObjectStateModified();
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
#region Property EmployeeID : ID
|
|||
|
|
|||
|
private ID _employeeID;
|
|||
|
public ID EmployeeID
|
|||
|
{
|
|||
|
get
|
|||
|
{
|
|||
|
return _employeeID;
|
|||
|
}
|
|||
|
set
|
|||
|
{
|
|||
|
_employeeID = value;
|
|||
|
base.SetObjectStateModified();
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
#region Functions
|
|||
|
|
|||
|
public static TrainingScheduleAttn Get(int nTrainingScheduleAttnID)
|
|||
|
{
|
|||
|
TrainingScheduleAttn onTrainingScheduleAttn = null;
|
|||
|
#region Cache Header
|
|||
|
onTrainingScheduleAttn = (TrainingScheduleAttn)_cache["Get", nTrainingScheduleAttnID];
|
|||
|
if (onTrainingScheduleAttn != null)
|
|||
|
return onTrainingScheduleAttn;
|
|||
|
#endregion
|
|||
|
onTrainingScheduleAttn = Service.Get(ID.FromInteger(nTrainingScheduleAttnID));
|
|||
|
#region Cache Footer
|
|||
|
_cache.Add(onTrainingScheduleAttn, "Get", nTrainingScheduleAttnID);
|
|||
|
#endregion
|
|||
|
return onTrainingScheduleAttn;
|
|||
|
}
|
|||
|
|
|||
|
public ID Save()
|
|||
|
{
|
|||
|
this.SetAuditTrailProperties();
|
|||
|
return Service.Save(this);
|
|||
|
}
|
|||
|
|
|||
|
public static bool DoesTrainingScheduleAttnExists(ID trainingScheduleDateID)
|
|||
|
{
|
|||
|
return Service.DoesTrainingScheduleAttnExists(trainingScheduleDateID);
|
|||
|
}
|
|||
|
public void Delete()
|
|||
|
{
|
|||
|
Service.Delete(ID);
|
|||
|
}
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
#region Collection Functions
|
|||
|
|
|||
|
public static ObjectsTemplate<TrainingScheduleAttn> Get()
|
|||
|
{
|
|||
|
ObjectsTemplate<TrainingScheduleAttn> oTrainingScheduleAttns = null;
|
|||
|
#region Cache Header
|
|||
|
oTrainingScheduleAttns = (ObjectsTemplate<TrainingScheduleAttn>)_cache["Get"];
|
|||
|
if (oTrainingScheduleAttns != null)
|
|||
|
return oTrainingScheduleAttns;
|
|||
|
#endregion
|
|||
|
oTrainingScheduleAttns = Service.Get();
|
|||
|
#region Cache Footer
|
|||
|
_cache.Add(oTrainingScheduleAttns, "Get");
|
|||
|
#endregion
|
|||
|
return oTrainingScheduleAttns;
|
|||
|
}
|
|||
|
|
|||
|
public static ObjectsTemplate<TrainingScheduleAttn> GetByTrainingScheduleID(ID trainingScheduleID)
|
|||
|
{
|
|||
|
ObjectsTemplate<TrainingScheduleAttn> oTrainingScheduleAttns = null;
|
|||
|
#region Cache Header
|
|||
|
oTrainingScheduleAttns = (ObjectsTemplate<TrainingScheduleAttn>)_cache["Get"];
|
|||
|
if (oTrainingScheduleAttns != null)
|
|||
|
return oTrainingScheduleAttns;
|
|||
|
#endregion
|
|||
|
oTrainingScheduleAttns = Service.GetByTrainingScheduleID(trainingScheduleID);
|
|||
|
#region Cache Footer
|
|||
|
_cache.Add(oTrainingScheduleAttns, "Get");
|
|||
|
#endregion
|
|||
|
return oTrainingScheduleAttns;
|
|||
|
}
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
#region Service Factory
|
|||
|
|
|||
|
internal static ITrainingScheduleAttnService Service
|
|||
|
{
|
|||
|
get
|
|||
|
{
|
|||
|
return Services.Factory.CreateService<ITrainingScheduleAttnService>(typeof(ITrainingScheduleAttnService));
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
#region ITrainingScheduleAttn Service
|
|||
|
|
|||
|
public interface ITrainingScheduleAttnService
|
|||
|
{
|
|||
|
TrainingScheduleAttn Get(ID scheduleAttnId);
|
|||
|
ObjectsTemplate<TrainingScheduleAttn> Get();
|
|||
|
ID Save(TrainingScheduleAttn oTrainingScheduleAttn);
|
|||
|
void Delete(ID id);
|
|||
|
bool DoesTrainingScheduleAttnExists(ID trainingScheduleDateID);
|
|||
|
ObjectsTemplate<TrainingScheduleAttn> GetByTrainingScheduleID(ID trainingScheduleId);
|
|||
|
ObjectsTemplate<TrainingScheduleAttn> GetByTrainingScheduleDateID(ID trainingScheduleDateID);
|
|||
|
}
|
|||
|
|
|||
|
#endregion
|
|||
|
}
|