using System; using System.Collections.Generic; using System.Data; using Ease.Core.DataAccess; namespace HRM.BO { #region Class Education Level public class EducationLevel : BasicBaseObject { #region constructor public EducationLevel() { Code = string.Empty; Description = string.Empty; EducationTypeID = 0; Status = EnumStatus.Active; } #endregion #region properties public string Code { get; set; } public string Description { get; set; } public int EducationTypeID { get; set; } public EducationType EducationType { get; set; } //#region Service Factory IEducationLevelService : IEducationLevelService //internal static IEducationLevelService Service //{ // get { return Services.Factory.CreateService(typeof(IEducationLevelService)); } //} //#endregion #endregion //#region functions //public static EducationLevel Get(ID nID) //{ // EducationLevel oEducationLevel = null; // #region Cache Header // oEducationLevel = (EducationLevel)_cache["Get", nID]; // if (oEducationLevel != null) // return oEducationLevel; // #endregion // oEducationLevel = EducationLevel.Service.Get(nID); // #region Cache Footer // _cache.Add(oEducationLevel, "Get", nID); // #endregion // return oEducationLevel; //} //public static EducationLevel Get(string sCode) //{ // EducationLevel oEducationLevel = null; // #region cache header // oEducationLevel = (EducationLevel)_cache["Get", sCode]; // if (oEducationLevel != null) // return oEducationLevel; // #endregion // oEducationLevel = EducationLevel.Service.Get(sCode); // #region cache footer // _cache.Add(oEducationLevel, "Get", sCode); // #endregion // return oEducationLevel; //} //public static List Get() //{ // #region cache header // List educationLevels = _cache["Get"] as List; // if (educationLevels != null) // return educationLevels; // #endregion // try // { // educationLevels = Service.Get(); // } // catch (ServiceException e) // { // throw new Exception(e.Message, e); // } // #region cache footer // _cache.Add(educationLevels, "Get"); // #endregion // return educationLevels; //} //public static List Get(EnumStatus status) //{ // #region Cache Header // List educationLevels = _cache["Get", status] as List; // if (educationLevels != null) // return educationLevels; // #endregion // try // { // educationLevels = Service.Get(status); // } // catch (ServiceException e) // { // throw new Exception(e.Message, e); // } // #region Cache Footer // _cache.Add(educationLevels, "Get", status); // #endregion // return educationLevels; //} //public static List GetByType(ID typeID) //{ // #region Cache Header // List educationLevels = _cache["GetByType", typeID] as List; // if (educationLevels != null) // return educationLevels; // #endregion // try // { // educationLevels = Service.GetByType(typeID); // } // catch (ServiceException e) // { // throw new Exception(e.Message, e); // } // #region Cache Footer // _cache.Add(educationLevels, "GetByType", typeID); // #endregion // return educationLevels; //} //public static EducationLevel GetByLevelID(ID nLevelID) //{ // EducationLevel oEducationLevel = null; // #region Cache Header // oEducationLevel = (EducationLevel)_cache["GetByLevelID", nLevelID]; // if (oEducationLevel != null) // return oEducationLevel; // #endregion // oEducationLevel = EducationLevel.Service.GetByLevelID(nLevelID); // #region Cache Footer // _cache.Add(oEducationLevel, "GetByLevelID", nLevelID); // #endregion // return oEducationLevel; //} //public ID Save() //{ // this.SetAuditTrailProperties(); // return EducationLevel.Service.Save(this); //} //public void Delete(ID id) //{ // EducationLevel.Service.Delete(id); //} //#endregion //public static System.Data.DataSet GetManpower(string sparam) //{ // DataSet ds = null; // try // { // ds = Service.GetManpower(sparam); // } // catch (Exception e) // { // throw new Exception(e.Message, e); // } // return ds; //} } #endregion #region IEducationLevel Service public interface IEducationLevelService { EducationLevel Get(int id); EducationLevel Get(string sCode); List Get(); List GetByType(int typeID); List Get(EnumStatus status); EducationLevel GetByLevelID(int LevelID); int Save(EducationLevel item); void Delete(int id); DataSet GetManpower(string sparam); List GetByLevelIDs(string ids); } #endregion }