EchoTex_Payroll/HRM.BO/Bonus/BonusAdjustItem.cs

156 lines
3.5 KiB
C#
Raw Normal View History

2024-10-14 10:01:49 +06:00
using Ease.Core.Model;
using System;
using System.Collections.Generic;
using System.Data;
namespace HRM.BO
{
#region BonusAdjustItem
public class BonusAdjustItem : BasicBaseObject
{
#region Constructor
public BonusAdjustItem()
{
_code = string.Empty;
_name = string.Empty;
_side = EnumSide.Deduct;
_amount = 0;
_status = EnumStatus.Active;
}
#endregion
#region Properties
#region code : string
private string _code;
public string Code
{
get { return _code; }
set { _code = value; }
}
#endregion
#region name : string
private string _name;
public string Name
{
get { return _name; }
set { _name = value; }
}
#endregion
#region Side : EnumSide
private EnumSide _side;
public EnumSide Side
{
get { return _side; }
set { _side = value; }
}
#endregion
#region Amount : Double
private double _amount;
public double Amount
{
get { return _amount; }
set { _amount = value; }
}
#endregion
//#region Service Factory IBonusAdjustItemService : IBonusAdjustItemService
//internal static IBonusAdjustItemService Service
//{
// get { return Services.Factory.CreateService<IBonusAdjustItemService>(typeof(IBonusAdjustItemService)); }
//}
//#endregion
#endregion
//#region Functions
//public static BonusAdjustItem Get(int nID)
//{
// BonusAdjustItem oBonusAdjustItem = null;
// #region Cache Header
// oBonusAdjustItem = (BonusAdjustItem)_cache["Get", nID];
// if (oBonusAdjustItem != null)
// return oBonusAdjustItem;
// #endregion
// oBonusAdjustItem = BonusAdjustItem.Service.Get(nID);
// #region Cache Footer
// _cache.Add(oBonusAdjustItem, "Get", nID);
// #endregion
// return oBonusAdjustItem;
//}
//public static List<BonusAdjustItem> Get(EnumStatus status)
//{
// #region Cache Header
// List<BonusAdjustItem> bonusAdjustItems = _cache["Get",status] as List<BonusAdjustItem>;
// if (bonusAdjustItems != null)
// return bonusAdjustItems;
// #endregion
// try
// {
// bonusAdjustItems = Service.Get(status);
// }
// catch (ServiceException e)
// {
// throw new Exception(e.Message, e);
// }
// #region Cache Footer
// _cache.Add(bonusAdjustItems, "Get",status);
// #endregion
// return bonusAdjustItems;
//}
//public int Save()
//{
// this.SetAuditTrailProperties();
// return BonusAdjustItem.Service.Save(this);
//}
//public void Delete(int ID)
//{
// BonusAdjustItem.Service.Delete(ID);
//}
//#endregion
}
#endregion
#region IBonusAdjustItem Service
public interface IBonusAdjustItemService
{
BonusAdjustItem Get(int id);
List<BonusAdjustItem> Get(EnumStatus status);
int Save(BonusAdjustItem item);
void Delete(int id);
}
#endregion
}