EchoTex_Payroll/HRM.BO/HRBasic/NatureOfTraining.cs

151 lines
4.2 KiB
C#
Raw Permalink Normal View History

2024-10-14 10:01:49 +06:00

using System;
using System.Collections.Generic;
namespace HRM.BO
{
#region class Nature Of Training
public class NatureOfTraining : BasicBaseObject
{
#region constructor
public NatureOfTraining()
{
Code = string.Empty;
Name = string.Empty;
}
#endregion
#region properties
public string Code { get; set; }
public string Name { get; set; }
//#region Service Factory INatureOfTrainingService : INatureOfTrainingService
//internal static INatureOfTrainingService Service
//{
// get { return Services.Factory.CreateService<INatureOfTrainingService>(typeof(INatureOfTrainingService)); }
//}
//#endregion
#endregion
//#region Function
//public static NatureOfTraining Get(ID nID)
//{
// NatureOfTraining oNatureOfTraining = null;
// #region Cache Header
// oNatureOfTraining = (NatureOfTraining)_cache["Get", nID];
// if (oNatureOfTraining != null)
// return oNatureOfTraining;
// #endregion
// oNatureOfTraining = NatureOfTraining.Service.Get(nID);
// #region Cache Footer
// _cache.Add(oNatureOfTraining, "Get", nID);
// #endregion
// return oNatureOfTraining;
//}
//public static List<NatureOfTraining> Get()
//{
// #region cache header
// List<NatureOfTraining> natureOfTrainings = _cache["Get"] as List<NatureOfTraining>;
// if (natureOfTrainings != null)
// return natureOfTrainings;
// #endregion
// try
// {
// natureOfTrainings = Service.Get();
// }
// catch (ServiceException e)
// {
// throw new Exception(e.Message, e);
// }
// #region cache footer
// _cache.Add(natureOfTrainings, "Get");
// #endregion
// return natureOfTrainings;
//}
//public static NatureOfTraining Get(string sCode)
//{
// NatureOfTraining oNatureOfTraining = null;
// #region Cache Header
// oNatureOfTraining = (NatureOfTraining)_cache["Get", sCode];
// if (oNatureOfTraining != null)
// return oNatureOfTraining;
// #endregion
// oNatureOfTraining = NatureOfTraining.Service.Get(sCode);
// #region Cache Footer
// _cache.Add(oNatureOfTraining, "Get", sCode);
// #endregion
// return oNatureOfTraining;
//}
//public static List<NatureOfTraining> Get(EnumStatus status)
//{
// #region Cache Header
// List<NatureOfTraining> natureOfTrainings = _cache["Get", status] as List<NatureOfTraining>;
// if (natureOfTrainings != null)
// return natureOfTrainings;
// #endregion
// try
// {
// if(status==EnumStatus.Regardless)
// natureOfTrainings = Service.Get();
// else
// natureOfTrainings = Service.Get(status);
// }
// catch (ServiceException e)
// {
// throw new Exception(e.Message, e);
// }
// #region Cache Footer
// _cache.Add(natureOfTrainings, "Get", status);
// #endregion
// return natureOfTrainings;
//}
//public ID Save()
//{
// this.SetAuditTrailProperties();
// return NatureOfTraining.Service.Save(this);
//}
//public void Delete(ID id)
//{
// NatureOfTraining.Service.Delete(id);
//}
//#endregion
}
#endregion
#region INatureOfTrainingService
public interface INatureOfTrainingService
{
NatureOfTraining Get(int id);
NatureOfTraining Get(string sCode);
List<NatureOfTraining> Get();
List<NatureOfTraining> Get(EnumStatus status);
int Save(NatureOfTraining item);
void Delete(int id);
}
#endregion
}