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