151 lines
4.2 KiB
C#
151 lines
4.2 KiB
C#
|
|
|||
|
using System;
|
|||
|
using System.Collections.Generic;
|
|||
|
|
|||
|
|
|||
|
namespace HRM.BO
|
|||
|
{
|
|||
|
#region class NominationPurpose
|
|||
|
public class NominationPurpose : BasicBaseObject
|
|||
|
{
|
|||
|
#region constructor
|
|||
|
|
|||
|
public NominationPurpose()
|
|||
|
{
|
|||
|
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 INominationPurposeService : INominationPurposeService
|
|||
|
|
|||
|
//internal static INominationPurposeService Service
|
|||
|
//{
|
|||
|
// get { return Services.Factory.CreateService<INominationPurposeService>(typeof(INominationPurposeService)); }
|
|||
|
//}
|
|||
|
|
|||
|
//#endregion
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
//#region Function
|
|||
|
//public static NominationPurpose Get(ID nID)
|
|||
|
//{
|
|||
|
// NominationPurpose oNominationPurpose = null;
|
|||
|
// #region Cache Header
|
|||
|
// oNominationPurpose = (NominationPurpose)_cache["Get", nID];
|
|||
|
// if (oNominationPurpose != null)
|
|||
|
// return oNominationPurpose;
|
|||
|
// #endregion
|
|||
|
// oNominationPurpose = NominationPurpose.Service.Get(nID);
|
|||
|
// #region Cache Footer
|
|||
|
// _cache.Add(oNominationPurpose, "Get", nID);
|
|||
|
// #endregion
|
|||
|
// return oNominationPurpose;
|
|||
|
//}
|
|||
|
|
|||
|
//public static NominationPurpose Get(string sCode)
|
|||
|
//{
|
|||
|
// NominationPurpose oNominationPurpose = null;
|
|||
|
// #region Cache Header
|
|||
|
// oNominationPurpose = (NominationPurpose)_cache["Get", sCode];
|
|||
|
// if (oNominationPurpose != null)
|
|||
|
// return oNominationPurpose;
|
|||
|
// #endregion
|
|||
|
// oNominationPurpose = NominationPurpose.Service.Get(sCode);
|
|||
|
// #region Cache Footer
|
|||
|
// _cache.Add(oNominationPurpose, "Get", sCode);
|
|||
|
// #endregion
|
|||
|
// return oNominationPurpose;
|
|||
|
//}
|
|||
|
|
|||
|
//public static List<NominationPurpose> Get()
|
|||
|
//{
|
|||
|
// #region cache header
|
|||
|
// List<NominationPurpose> nominationPurposes = _cache["Get"] as List<NominationPurpose>;
|
|||
|
// if (nominationPurposes != null)
|
|||
|
// return nominationPurposes;
|
|||
|
// #endregion
|
|||
|
// try
|
|||
|
// {
|
|||
|
// nominationPurposes = Service.Get();
|
|||
|
// }
|
|||
|
// catch (ServiceException e)
|
|||
|
// {
|
|||
|
// throw new Exception(e.Message, e);
|
|||
|
// }
|
|||
|
|
|||
|
// #region cache footer
|
|||
|
// _cache.Add(nominationPurposes, "Get");
|
|||
|
// #endregion
|
|||
|
|
|||
|
// return nominationPurposes;
|
|||
|
//}
|
|||
|
|
|||
|
//public static List<NominationPurpose> Get(EnumStatus status)
|
|||
|
//{
|
|||
|
// #region Cache Header
|
|||
|
|
|||
|
// List<NominationPurpose> nominationPurposes = _cache["Get", status] as List<NominationPurpose>;
|
|||
|
// if (nominationPurposes != null)
|
|||
|
// return nominationPurposes;
|
|||
|
|
|||
|
// #endregion
|
|||
|
|
|||
|
// try
|
|||
|
// {
|
|||
|
// nominationPurposes = Service.Get(status);
|
|||
|
// }
|
|||
|
// catch (ServiceException e)
|
|||
|
// {
|
|||
|
// throw new Exception(e.Message, e);
|
|||
|
// }
|
|||
|
|
|||
|
// #region Cache Footer
|
|||
|
|
|||
|
// _cache.Add(nominationPurposes, "Get", status);
|
|||
|
|
|||
|
// #endregion
|
|||
|
|
|||
|
// return nominationPurposes;
|
|||
|
//}
|
|||
|
|
|||
|
|
|||
|
//public ID Save()
|
|||
|
//{
|
|||
|
// this.SetAuditTrailProperties();
|
|||
|
// return NominationPurpose.Service.Save(this);
|
|||
|
|
|||
|
//}
|
|||
|
|
|||
|
//public void Delete(ID id)
|
|||
|
//{
|
|||
|
// NominationPurpose.Service.Delete(id);
|
|||
|
|
|||
|
//}
|
|||
|
//#endregion
|
|||
|
}
|
|||
|
#endregion
|
|||
|
|
|||
|
#region INationality Service
|
|||
|
public interface INominationPurposeService
|
|||
|
{
|
|||
|
NominationPurpose Get(int id);
|
|||
|
NominationPurpose Get(string sCode);
|
|||
|
List<NominationPurpose> Get();
|
|||
|
List<NominationPurpose> Get(EnumStatus status);
|
|||
|
List<NominationPurpose> GetListbyId(int id);
|
|||
|
int Save(NominationPurpose item);
|
|||
|
void Delete(int id);
|
|||
|
|
|||
|
}
|
|||
|
#endregion
|
|||
|
}
|