EchoTex_Payroll/HRM.BO/HRBasic/Nationality.cs

144 lines
3.8 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 Nationality
public class Nationality : BasicBaseObject
{
#region Constructor
public Nationality()
{
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 INationalityService : INationalityService
//internal static INationalityService Service
//{
// get { return Services.Factory.CreateService<INationalityService>(typeof(INationalityService)); }
//}
//#endregion
#endregion
//#region Function
//public static Nationality Get(ID nID)
//{
// Nationality oNationality = null;
// #region Cache Header
// oNationality = (Nationality)_cache["Get", nID];
// if (oNationality != null)
// return oNationality;
// #endregion
// oNationality = Nationality.Service.Get(nID);
// #region Cache Footer
// _cache.Add(oNationality, "Get", nID);
// #endregion
// return oNationality;
//}
//public static Nationality Get(string sCode)
//{
// Nationality oNationality = null;
// #region Cache Header
// oNationality = (Nationality)_cache["Get", sCode];
// if (oNationality != null)
// return oNationality;
// #endregion
// oNationality = Nationality.Service.Get(sCode);
// #region Cache Footer
// _cache.Add(oNationality, "Get", sCode);
// #endregion
// return oNationality;
//}
//public static List<Nationality> Get()
//{
// #region cache header
// List<Nationality> nationalities = _cache["Get"] as List<Nationality>;
// if (nationalities != null)
// return nationalities;
// #endregion
// try
// {
// nationalities = Service.Get();
// }
// catch (ServiceException e)
// {
// throw new Exception(e.Message, e);
// }
// #region cache footer
// _cache.Add(nationalities, "Get");
// #endregion
// return nationalities;
//}
//public static List<Nationality> Get(EnumStatus status)
//{
// #region Cache Header
// List<Nationality> nationalities = _cache["Get", status] as List<Nationality>;
// if (nationalities != null)
// return nationalities;
// #endregion
// try
// {
// nationalities = Service.Get(status);
// }
// catch (ServiceException e)
// {
// throw new Exception(e.Message, e);
// }
// #region Cache Footer
// _cache.Add(nationalities, "Get", status);
// #endregion
// return nationalities;
//}
//public ID Save()
//{
// this.SetAuditTrailProperties();
// return Nationality.Service.Save(this);
//}
//public void Delete(ID id)
//{
// Nationality.Service.Delete(id);
//}
//#endregion
}
#endregion
#region INationality Service
public interface INationalityService
{
Nationality Get(int id);
Nationality Get(string sCode);
List<Nationality> Get();
List<Nationality> Get(EnumStatus status);
int Save(Nationality item);
void Delete(int id);
}
#endregion
}