EchoTex_Payroll/HRM.BO/HRBasic/EducationLevel.cs

218 lines
6.0 KiB
C#
Raw Permalink Normal View History

2024-10-14 10:01:49 +06:00

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<IEducationLevelService>(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<EducationLevel> Get()
//{
// #region cache header
// List<EducationLevel> educationLevels = _cache["Get"] as List<EducationLevel>;
// 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<EducationLevel> Get(EnumStatus status)
//{
// #region Cache Header
// List<EducationLevel> educationLevels = _cache["Get", status] as List<EducationLevel>;
// 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<EducationLevel> GetByType(ID typeID)
//{
// #region Cache Header
// List<EducationLevel> educationLevels = _cache["GetByType", typeID] as List<EducationLevel>;
// 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<EducationLevel> Get();
List<EducationLevel> GetByType(int typeID);
List<EducationLevel> Get(EnumStatus status);
EducationLevel GetByLevelID(int LevelID);
int Save(EducationLevel item);
void Delete(int id);
DataSet GetManpower(string sparam);
List<EducationLevel> GetByLevelIDs(string ids);
}
#endregion
}