EchoTex_Payroll/HRM.BO/HRBasic/ExtraCurricularActivity.cs

146 lines
4.5 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 ExtraCurricularActivity
public class ExtraCurricularActivity : BasicBaseObject
{
#region constructor
public ExtraCurricularActivity()
{
Code = string.Empty;
Description = string.Empty;
Status = EnumStatus.Active;
}
#endregion
#region properties
public string Code { get; set; }
public string Description { get; set; }
//#region Service Factory IExtraCurricularActivityService : IExtraCurricularActivityService
//internal static IExtraCurricularActivityService Service
//{
// get { return Services.Factory.CreateService<IExtraCurricularActivityService>(typeof(IExtraCurricularActivityService)); }
//}
//#endregion
#endregion
//#region Function
//public static ExtraCurricularActivity Get(ID nID)
//{
// ExtraCurricularActivity oExtraCurricularActivity = null;
// #region Cache Header
// oExtraCurricularActivity = (ExtraCurricularActivity)_cache["Get", nID];
// if (oExtraCurricularActivity != null)
// return oExtraCurricularActivity;
// #endregion
// oExtraCurricularActivity = ExtraCurricularActivity.Service.Get(nID);
// #region Cache Footer
// _cache.Add(oExtraCurricularActivity, "Get", nID);
// #endregion
// return oExtraCurricularActivity;
//}
//public static ExtraCurricularActivity Get(string sCode)
//{
// ExtraCurricularActivity oExtraCurricularActivity = null;
// #region Cache Header
// oExtraCurricularActivity = (ExtraCurricularActivity)_cache["Get", sCode];
// if (oExtraCurricularActivity != null)
// return oExtraCurricularActivity;
// #endregion
// oExtraCurricularActivity = ExtraCurricularActivity.Service.Get(sCode);
// #region Cache Footer
// _cache.Add(oExtraCurricularActivity, "Get", sCode);
// #endregion
// return oExtraCurricularActivity;
//}
//public static List<ExtraCurricularActivity> Get()
//{
// #region cache header
// List<ExtraCurricularActivity> extraCurricularActivities = _cache["Get"] as List<ExtraCurricularActivity>;
// if (extraCurricularActivities != null)
// return extraCurricularActivities;
// #endregion
// try
// {
// extraCurricularActivities = Service.Get();
// }
// catch (ServiceException e)
// {
// throw new Exception(e.Message, e);
// }
// #region cache footer
// _cache.Add(extraCurricularActivities, "Get");
// #endregion
// return extraCurricularActivities;
//}
//public static List<ExtraCurricularActivity> Get(EnumStatus status)
//{
// #region Cache Header
// List<ExtraCurricularActivity> extraCurricularActivities = _cache["Get", status] as List<ExtraCurricularActivity>;
// if (extraCurricularActivities != null)
// return extraCurricularActivities;
// #endregion
// try
// {
// extraCurricularActivities = Service.Get(status);
// }
// catch (ServiceException e)
// {
// throw new Exception(e.Message, e);
// }
// #region Cache Footer
// _cache.Add(extraCurricularActivities, "Get", status);
// #endregion
// return extraCurricularActivities;
//}
//public ID Save()
//{
// this.SetAuditTrailProperties();
// return ExtraCurricularActivity.Service.Save(this);
//}
//public void Delete(ID id)
//{
// ExtraCurricularActivity.Service.Delete(id);
//}
//#endregion
}
#endregion
#region IExtraCurricularActivity Service
public interface IExtraCurricularActivityService
{
ExtraCurricularActivity Get(int id);
ExtraCurricularActivity Get(string sCode);
List<ExtraCurricularActivity> Get();
List<ExtraCurricularActivity> Get(EnumStatus status);
int Save(ExtraCurricularActivity item);
void Delete(int id);
}
#endregion
}