using Ease.Core.Model; using System; using System.Collections.Generic; using System.Data; namespace HRM.BO { public class ObjectiveType : BasicBaseObject { #region Constructor public ObjectiveType() { Code = string.Empty; Name = string.Empty; Description = string.Empty; Status = EnumStatus.Active; IsCompanyObjective = false; IsLeadership = false; IsFixedTarget = false; Instruction1 = null; Instruction2 = null; Instruction3 = null; } #endregion #region Properties public string Code { get; set; } public string Name { get; set; } public string Description { get; set; } public bool IsCompanyObjective { get; set; } public bool IsLeadership { get; set; } public bool IsFixedTarget { get; set; } public EnumObjectiveType Type { get; set; } public int PayrollTypeID { get; set; } public string Instruction1 { get; set; } public string Instruction2 { get; set; } public string Instruction3 { get; set; } //#region Service Factory IObjectiveTypeService : IObjectiveTypeService //internal static IObjectiveTypeService Service //{ // get { return Services.Factory.CreateService(typeof(IObjectiveTypeService)); } //} //#endregion #endregion //#region Functions //public static ObjectiveType Get(int nID) //{ // ObjectiveType oFunction = null; // #region Cache Header // oFunction = (ObjectiveType)_cache["Get", nID]; // if (oFunction != null) // return oFunction; // #endregion // oFunction = ObjectiveType.Service.Get(nID); // #region Cache Footer // _cache.Add(oFunction, "Get", nID); // #endregion // return oFunction; //} //public static ObjectiveType Get(string sCode) //{ // ObjectiveType oFunction = null; // #region Cache Header // oFunction = (ObjectiveType)_cache["Get", sCode]; // if (oFunction != null) // return oFunction; // #endregion // oFunction = ObjectiveType.Service.Get(sCode); // #region Cache Footer // _cache.Add(oFunction, "Get", sCode); // #endregion // return oFunction; //} //public static List Get(EnumStatus status) //{ // #region Cache Header // List ObjectTypes = _cache["Get", status] as List; // if (ObjectTypes != null) // return ObjectTypes; // #endregion // try // { // ObjectTypes = Service.Get(status); // } // catch (ServiceException e) // { // throw new Exception(e.Message, e); // } // #region Cache Footer // _cache.Add(ObjectTypes, "Get", status); // #endregion // return ObjectTypes; //} // public static ObjectiveType GetCompanyObjective() //{ // ObjectiveType oFunction = null; // #region Cache Header // oFunction = (ObjectiveType)_cache["GetCompanyObjective"]; // if (oFunction != null) // return oFunction; // #endregion // oFunction = ObjectiveType.Service.GetCompanyObjective(); // #region Cache Footer // _cache.Add(oFunction, "GetCompanyObjective"); // #endregion // return oFunction; //} //public int Save() //{ // base.SetAuditTrailProperties(); // return ObjectiveType.Service.Save(this); //} //public void Delete(int id) //{ // ObjectiveType.Service.Delete(id); //} //#endregion } #region IObjectiveType Service public interface IObjectiveTypeService { ObjectiveType Get(int id); ObjectiveType Get(string sCode); List Get(EnumStatus status); List Get(EnumStatus status, int payrolltypeid); int Save(ObjectiveType item); void Delete(int id); ObjectiveType GetCompanyObjective(); } #endregion }