196 lines
5.5 KiB
C#
196 lines
5.5 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 TrainingNdAnalysisTimeSch
|
|
|
|
[Serializable]
|
|
public class TrainingNdAnalysisTimeSch : AuditTrailBase
|
|
{
|
|
#region Cache Store
|
|
private static Cache _cache = new Cache(typeof(TrainingNdAnalysisTimeSch));
|
|
#endregion
|
|
|
|
#region Constructor
|
|
public TrainingNdAnalysisTimeSch()
|
|
{
|
|
_trainingNeedAnalysisID = null;
|
|
_participent = 0;
|
|
_remarks = String.Empty;
|
|
_month = EnumMonths.January;
|
|
}
|
|
#endregion
|
|
|
|
#region Properties
|
|
|
|
#region Property TrainingNeedAnalysisID : ID
|
|
|
|
private ID _trainingNeedAnalysisID;
|
|
public ID TrainingNeedAnalysisID
|
|
{
|
|
get
|
|
{
|
|
return _trainingNeedAnalysisID;
|
|
}
|
|
set
|
|
{
|
|
_trainingNeedAnalysisID = value;
|
|
base.SetObjectStateModified();
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
#region Property Month: EnumMonths
|
|
private EnumMonths _month;
|
|
public EnumMonths Month
|
|
{
|
|
get { return _month; }
|
|
set { _month = value; }
|
|
}
|
|
#endregion
|
|
|
|
|
|
#region Property Participent : int
|
|
|
|
private int _participent;
|
|
public int Participent
|
|
{
|
|
get
|
|
{
|
|
return _participent;
|
|
}
|
|
|
|
set
|
|
{
|
|
_participent = value;
|
|
}
|
|
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region Property Remarks : string
|
|
|
|
private string _remarks;
|
|
public string Remarks
|
|
{
|
|
get
|
|
{
|
|
return _remarks;
|
|
}
|
|
|
|
set
|
|
{
|
|
_remarks = value;
|
|
}
|
|
|
|
}
|
|
|
|
#endregion
|
|
|
|
#endregion
|
|
|
|
#region Functions
|
|
|
|
public static TrainingNdAnalysisTimeSch Get(int nTrainingNdAnalysisTimeSchID)
|
|
{
|
|
TrainingNdAnalysisTimeSch onTrainingNdAnalysisTimeSch = null;
|
|
#region Cache Header
|
|
onTrainingNdAnalysisTimeSch = (TrainingNdAnalysisTimeSch)_cache["Get", nTrainingNdAnalysisTimeSchID];
|
|
if (onTrainingNdAnalysisTimeSch != null)
|
|
return onTrainingNdAnalysisTimeSch;
|
|
#endregion
|
|
onTrainingNdAnalysisTimeSch = Service.Get(ID.FromInteger(nTrainingNdAnalysisTimeSchID));
|
|
#region Cache Footer
|
|
_cache.Add(onTrainingNdAnalysisTimeSch, "Get", nTrainingNdAnalysisTimeSchID);
|
|
#endregion
|
|
return onTrainingNdAnalysisTimeSch;
|
|
}
|
|
|
|
public ID Save()
|
|
{
|
|
this.SetAuditTrailProperties();
|
|
return Service.Save(this);
|
|
}
|
|
|
|
public static bool DoesTrainingNdAnalysisTimeSchExists(ID nTrainingNdAnalysisTimeSchID)
|
|
{
|
|
return Service.DoesTrainingNdAnalysisTimeSchExists(nTrainingNdAnalysisTimeSchID);
|
|
}
|
|
public void Delete()
|
|
{
|
|
Service.Delete(ID);
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region Collection Functions
|
|
|
|
public static ObjectsTemplate<TrainingNdAnalysisTimeSch> Get()
|
|
{
|
|
ObjectsTemplate<TrainingNdAnalysisTimeSch> oTrainingNdAnalysisTimeSchs = null;
|
|
#region Cache Header
|
|
oTrainingNdAnalysisTimeSchs = (ObjectsTemplate<TrainingNdAnalysisTimeSch>)_cache["Get"];
|
|
if (oTrainingNdAnalysisTimeSchs != null)
|
|
return oTrainingNdAnalysisTimeSchs;
|
|
#endregion
|
|
oTrainingNdAnalysisTimeSchs = Service.Get();
|
|
#region Cache Footer
|
|
_cache.Add(oTrainingNdAnalysisTimeSchs, "Get");
|
|
#endregion
|
|
return oTrainingNdAnalysisTimeSchs;
|
|
}
|
|
|
|
public static ObjectsTemplate<TrainingNdAnalysisTimeSch> GetByTrainingNeedAnalysisID(ID trainingNeedAnalysisID)
|
|
{
|
|
ObjectsTemplate<TrainingNdAnalysisTimeSch> oTrainingNdAnalysisTimeSchs = null;
|
|
#region Cache Header
|
|
oTrainingNdAnalysisTimeSchs = (ObjectsTemplate<TrainingNdAnalysisTimeSch>)_cache["Get"];
|
|
if (oTrainingNdAnalysisTimeSchs != null)
|
|
return oTrainingNdAnalysisTimeSchs;
|
|
#endregion
|
|
oTrainingNdAnalysisTimeSchs = Service.GetByTrainingNeedAnalysisID(trainingNeedAnalysisID);
|
|
#region Cache Footer
|
|
_cache.Add(oTrainingNdAnalysisTimeSchs, "Get");
|
|
#endregion
|
|
return oTrainingNdAnalysisTimeSchs;
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region Service Factory
|
|
|
|
internal static ITrainingNdAnalysisTimeSchService Service
|
|
{
|
|
get
|
|
{
|
|
return Services.Factory.CreateService<ITrainingNdAnalysisTimeSchService>(typeof(ITrainingNdAnalysisTimeSchService));
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region ITrainingNdAnalysisTimeSch Service
|
|
|
|
public interface ITrainingNdAnalysisTimeSchService
|
|
{
|
|
TrainingNdAnalysisTimeSch Get(ID nTrainingNdAnalysisTimeSchID);
|
|
ObjectsTemplate<TrainingNdAnalysisTimeSch> Get();
|
|
ID Save(TrainingNdAnalysisTimeSch oTrainingNdAnalysisTimeSch);
|
|
void Delete(ID id);
|
|
bool DoesTrainingNdAnalysisTimeSchExists(ID nTrainingNdAnalysisTimeSchID);
|
|
ObjectsTemplate<TrainingNdAnalysisTimeSch> GetByTrainingNeedAnalysisID(ID trainingNeedAnalysisID);
|
|
|
|
}
|
|
|
|
#endregion
|
|
} |