using System; using System.Collections.Generic; namespace HRM.BO { #region EducationType public class EducationType : BasicBaseObject { #region Constructor public EducationType() { Code = string.Empty; Description = string.Empty; Status = EnumStatus.Active; } #endregion #region Properties public string Code { get; set; } public string Description { get; set; } //public bool BoardRequired { get; set; } //public bool FixedSubject { get; set; } public int ResultType { get; set; } //#region Service Factory IEducationTypeService : IEducationTypeService //internal static IEducationTypeService Service //{ // get { return Services.Factory.CreateService(typeof(IEducationTypeService)); } //} //#endregion #endregion //#region functions //public static EducationType Get(ID nID) //{ // EducationType oEducationType = null; // #region Cache Header // oEducationType = (EducationType)_cache["Get", nID]; // if (oEducationType != null) // return oEducationType; // #endregion // oEducationType = EducationType.Service.Get(nID); // #region Cache Footer // _cache.Add(oEducationType, "Get", nID); // #endregion // return oEducationType; //} //public static EducationType Get(string sCode) //{ // EducationType oEducationType = null; // #region cache header // oEducationType = (EducationType)_cache["Get", sCode]; // if (oEducationType != null) // return oEducationType; // #endregion // oEducationType = EducationType.Service.Get(sCode); // #region cache footer // _cache.Add(oEducationType, "Get", sCode); // #endregion // return oEducationType; //} //public static List Get() //{ // #region cache header // List educationTypes = _cache["Get"] as List; // if (educationTypes != null) // return educationTypes; // #endregion // try // { // educationTypes = Service.Get(); // } // catch (ServiceException e) // { // throw new Exception(e.Message, e); // } // #region cache footer // _cache.Add(educationTypes, "Get"); // #endregion // return educationTypes; //} //public static List Get(EnumStatus status) //{ // #region Cache Header // List educationTypes = _cache["Get", status] as List; // if (educationTypes != null) // return educationTypes; // #endregion // try // { // educationTypes = Service.Get(status); // } // catch (ServiceException e) // { // throw new Exception(e.Message, e); // } // #region Cache Footer // _cache.Add(educationTypes, "Get", status); // #endregion // return educationTypes; //} //public ID Save() //{ // this.SetAuditTrailProperties(); // return EducationType.Service.Save(this); //} //public void Delete(ID id) //{ // EducationType.Service.Delete(id); //} //#endregion } #endregion #region IEducationType Service public interface IEducationTypeService { EducationType Get(int id); EducationType Get(string sCode); List Get(); List Get(EnumStatus status, int payrollTypeID); List Get(EnumStatus status); int Save(EducationType item); void Delete(int id); string GetNextCode(); } #endregion }