HRM-10/HRM.BO/HRBasic/ResultType.cs

154 lines
4.0 KiB
C#
Raw Normal View History

2026-11-03 13:06:00 +06:00

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<IResultTypeService>(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<ResultType> Get()
//{
// #region cache header
// List<ResultType> resultTypes = _cache["Get"] as List<ResultType>;
// 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<ResultType> Get(EnumStatus status)
//{
// #region Cache Header
// List<ResultType> resultTypes = _cache["Get", status] as List<ResultType>;
// 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<ResultType> Get();
List<ResultType> Get(EnumStatus status, int payrollTypeID);
List<ResultType> Get(EnumStatus status);
int Save(ResultType item);
void Delete(int id);
string GetNextCode();
}
#endregion
}