151 lines
3.7 KiB
C#
151 lines
3.7 KiB
C#
|
|
using System;
|
|
using System.Collections.Generic;
|
|
|
|
namespace HRM.BO
|
|
{
|
|
#region class Division
|
|
public class Division : BasicBaseObject
|
|
{
|
|
#region constructor
|
|
public Division()
|
|
{
|
|
Code = string.Empty;
|
|
Name = string.Empty;
|
|
Status = EnumStatus.Active;
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
#region properties
|
|
|
|
public string Code { get; set; }
|
|
public string Name { get; set; }
|
|
|
|
//#region Service Factory IDivisionService : IDivisionService
|
|
|
|
//internal static IDivisionService Service
|
|
//{
|
|
// get { return Services.Factory.CreateService<IDivisionService>(typeof(IDivisionService)); }
|
|
//}
|
|
|
|
//#endregion
|
|
|
|
#endregion
|
|
|
|
//#region Function
|
|
//public static Division Get(ID nID)
|
|
//{
|
|
// Division oDivision = null;
|
|
// #region Cache Header
|
|
// oDivision = (Division)_cache["Get", nID];
|
|
// if (oDivision != null)
|
|
// return oDivision;
|
|
// #endregion
|
|
// oDivision = Division.Service.Get(nID);
|
|
// #region Cache Footer
|
|
// _cache.Add(oDivision, "Get", nID);
|
|
// #endregion
|
|
// return oDivision;
|
|
//}
|
|
|
|
//public static Division Get(string sCode)
|
|
//{
|
|
// Division oDivision = null;
|
|
// #region Cache Header
|
|
// oDivision = (Division)_cache["Get", sCode];
|
|
// if (oDivision != null)
|
|
// return oDivision;
|
|
// #endregion
|
|
// oDivision = Division.Service.Get(sCode);
|
|
// #region Cache Footer
|
|
// _cache.Add(oDivision, "Get", sCode);
|
|
// #endregion
|
|
// return oDivision;
|
|
//}
|
|
|
|
//public static List<Division> Get()
|
|
//{
|
|
// #region cache header
|
|
// List<Division> countries = _cache["Get"] as List<Division>;
|
|
// if (countries != null)
|
|
// return countries;
|
|
// #endregion
|
|
// try
|
|
// {
|
|
// countries = Service.Get();
|
|
// }
|
|
// catch (ServiceException e)
|
|
// {
|
|
// throw new Exception(e.Message, e);
|
|
// }
|
|
|
|
// #region cache footer
|
|
// _cache.Add(countries, "Get");
|
|
// #endregion
|
|
|
|
// return countries;
|
|
//}
|
|
|
|
//public static List<Division> Get(EnumStatus status)
|
|
//{
|
|
// #region Cache Header
|
|
|
|
// List<Division> countries = _cache["Get", status] as List<Division>;
|
|
// if (countries != null)
|
|
// return countries;
|
|
|
|
// #endregion
|
|
|
|
// try
|
|
// {
|
|
// countries = Service.Get(status);
|
|
// }
|
|
// catch (ServiceException e)
|
|
// {
|
|
// throw new Exception(e.Message, e);
|
|
// }
|
|
|
|
// #region Cache Footer
|
|
|
|
// _cache.Add(countries, "Get", status);
|
|
|
|
// #endregion
|
|
|
|
// return countries;
|
|
//}
|
|
|
|
//public ID Save()
|
|
//{
|
|
// this.SetAuditTrailProperties();
|
|
// return Division.Service.Save(this);
|
|
|
|
//}
|
|
|
|
//public void Delete(ID id)
|
|
//{
|
|
// Division.Service.Delete(id);
|
|
|
|
//}
|
|
|
|
//#endregion
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region IDivision Service
|
|
public interface IDivisionService
|
|
{
|
|
Division Get(int id);
|
|
Division Get(string sCode);
|
|
List<Division> Get();
|
|
List<Division> Get(EnumStatus status);
|
|
List<Division> Get(EnumStatus status, int payrollTypeId);
|
|
int Save(Division item);
|
|
void Delete(int id);
|
|
|
|
}
|
|
#endregion
|
|
}
|