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