using Ease.Core.Model; using System; using System.Collections.Generic; using System.Data; namespace HRM.BO { public class ObjectiveCategory : BasicBaseObject { #region Constructor public ObjectiveCategory() { this.Description = string.Empty; this.Category = EnumObjectiveCategory.Band; } #endregion #region Properties public EnumObjectiveCategory Category { get; set; } public string Description { get; set; } public int PMPYearID { get; set; } public int ObjectiveTypeID { get; set; } public List ObjectiveCategoryGrades { get; set; } //#region Property ObjectiveCategoryGrades : ObjectiveCategoryGrades //private List _objectiveCategoryGrades; //public List ObjectiveCategoryGrades //{ // get // { // if (_objectiveCategoryGrades == null && !this.ID.IsUnassigned && this.ID.Integer > 0) // { // _objectiveCategoryGrades = Service.GetObjectiveCategoryGrades(this.ID); // } // return _objectiveCategoryGrades; // } // set // { // _objectiveCategoryGrades = value; // } //} //#endregion #endregion //#region Functions //#region Get All //public static List Get() //{ // return ObjectiveCategory.Service.Get(); //} //#endregion //#region Get By ID //public static ObjectiveCategory Get(int id) //{ // return ObjectiveCategory.Service.Get(id); //} //#endregion //#region Get By Status //public static List Get(EnumStatus status) //{ // return ObjectiveCategory.Service.Get(status); //} //public static List GetByPMPyear(int nID) //{ // return ObjectiveCategory.Service.GetByPMPyear(nID); //} //#endregion //#region Save //public static void Save(List items) //{ // foreach(ObjectiveCategory item in items) // item.SetAuditTrailProperties(); // ObjectiveCategory.Service.Save(items); //} //#endregion //#region Delete //public static void Delete(int id) //{ // ObjectiveCategory.Service.Delete(id); //} //#endregion //#endregion //#region Service Factory IObjectiveCategory : IObjectiveCategory //internal static IObjectiveCategoryService Service //{ // get { return Services.Factory.CreateService(typeof(IObjectiveCategoryService)); } //} //#endregion } #region IObjectiveCategory Service public interface IObjectiveCategoryService { List Get(); List Get(EnumStatus status); ObjectiveCategory Get(int id); void Save(List items); void Save(ObjectiveCategory item); void Delete(int id); List GetObjectiveCategoryGrades(int iD); List GetByPMPyear(int nID); } #endregion }