214 lines
5.2 KiB
C#
214 lines
5.2 KiB
C#
using Ease.Core.Model;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Data;
|
|
|
|
namespace HRM.BO
|
|
{
|
|
#region ProdBonusParameter
|
|
|
|
public class ProdBonusParameter : BasicBaseObject
|
|
{
|
|
#region Constructor
|
|
|
|
#region Input validator
|
|
|
|
#endregion
|
|
|
|
public ProdBonusParameter()
|
|
{
|
|
_itemType = EnumBonusItemType.Department;
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region Properties
|
|
|
|
#region ProdBonusSetupID : Int
|
|
|
|
private int _prodBonusSetupID;
|
|
|
|
public int ProdBonusSetupID
|
|
{
|
|
get { return _prodBonusSetupID; }
|
|
set { _prodBonusSetupID = value; }
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region ProdBonusLineID : Int
|
|
|
|
private int _prodBonusLineID;
|
|
|
|
public int ProdBonusLineID
|
|
{
|
|
get { return _prodBonusLineID; }
|
|
set { _prodBonusLineID = value; }
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region ItemID : int
|
|
|
|
private int _itemID;
|
|
|
|
public int ItemID
|
|
{
|
|
get { return _itemID; }
|
|
set { _itemID = value; }
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region ItemType : EnumBonusItemType
|
|
|
|
private EnumBonusItemType _itemType;
|
|
|
|
public EnumBonusItemType ItemType
|
|
{
|
|
get { return _itemType; }
|
|
set { _itemType = value; }
|
|
}
|
|
|
|
#endregion
|
|
|
|
//#region Service Factory IProdBonusParameterService : IProdBonusParameterService
|
|
|
|
//internal static IProdBonusParameterService Service
|
|
//{
|
|
// get { return Services.Factory.CreateService<IProdBonusParameterService>(typeof(IProdBonusParameterService)); }
|
|
//}
|
|
|
|
//#endregion
|
|
|
|
#endregion
|
|
|
|
//#region Functions
|
|
|
|
//public static ProdBonusParameter Get(int nID)
|
|
//{
|
|
// ProdBonusParameter oProdBonusParameter = null;
|
|
// #region Cache Header
|
|
// oProdBonusParameter = (ProdBonusParameter)_cache["Get", nID];
|
|
// if (oProdBonusParameter != null)
|
|
// return oProdBonusParameter;
|
|
// #endregion
|
|
// oProdBonusParameter = ProdBonusParameter.Service.Get(nID);
|
|
// #region Cache Footer
|
|
// _cache.Add(oProdBonusParameter, "Get", nID);
|
|
// #endregion
|
|
// return oProdBonusParameter;
|
|
//}
|
|
|
|
//public static List<ProdBonusParameter> Get()
|
|
//{
|
|
// #region Cache Header
|
|
|
|
// List<ProdBonusParameter> ProdBonusParameters = _cache["Get"] as List<ProdBonusParameter>;
|
|
// if (ProdBonusParameters != null)
|
|
// return ProdBonusParameters;
|
|
|
|
// #endregion
|
|
|
|
// try
|
|
// {
|
|
// ProdBonusParameters = Service.Get();
|
|
// }
|
|
// catch (ServiceException e)
|
|
// {
|
|
// throw new Exception(e.Message, e);
|
|
// }
|
|
|
|
// #region Cache Footer
|
|
|
|
// _cache.Add(ProdBonusParameters, "Get");
|
|
|
|
// #endregion
|
|
|
|
// return ProdBonusParameters;
|
|
//}
|
|
//public static List<ProdBonusParameter> Get(int nSetupID)
|
|
//{
|
|
// #region Cache Header
|
|
|
|
// List<ProdBonusParameter> ProdBonusParameters = _cache["Get"] as List<ProdBonusParameter>;
|
|
// if (ProdBonusParameters != null)
|
|
// return ProdBonusParameters;
|
|
|
|
// #endregion
|
|
|
|
// try
|
|
// {
|
|
// ProdBonusParameters = Service.Get(nSetupID);
|
|
// }
|
|
// catch (ServiceException e)
|
|
// {
|
|
// throw new Exception(e.Message, e);
|
|
// }
|
|
|
|
// #region Cache Footer
|
|
|
|
// _cache.Add(ProdBonusParameters, "Get");
|
|
|
|
// #endregion
|
|
|
|
// return ProdBonusParameters;
|
|
//}
|
|
|
|
//public static List<ProdBonusParameter> Get(EnumStatus status)
|
|
//{
|
|
// #region Cache Header
|
|
|
|
// List<ProdBonusParameter> ProdBonusParameters = _cache["Get", status] as List<ProdBonusParameter>;
|
|
// if (ProdBonusParameters != null)
|
|
// return ProdBonusParameters;
|
|
|
|
// #endregion
|
|
|
|
// try
|
|
// {
|
|
// // ProdBonusParameters = Service.Get(status);
|
|
// }
|
|
// catch (ServiceException e)
|
|
// {
|
|
// throw new Exception(e.Message, e);
|
|
// }
|
|
|
|
// #region Cache Footer
|
|
|
|
// _cache.Add(ProdBonusParameters, "Get", status);
|
|
|
|
// #endregion
|
|
|
|
// return ProdBonusParameters;
|
|
//}
|
|
|
|
//public int Save()
|
|
//{
|
|
// this.SetAuditTrailProperties();
|
|
// return ProdBonusParameter.Service.Save(this);
|
|
//}
|
|
|
|
//public void Delete(int id)
|
|
//{
|
|
// ProdBonusParameter.Service.Delete(id);
|
|
//}
|
|
//#endregion
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region IProdBonusParameter Service
|
|
|
|
public interface IProdBonusParameterService
|
|
{
|
|
ProdBonusParameter Get(int id);
|
|
List<ProdBonusParameter> Get();
|
|
List<ProdBonusParameter> GetWithSetupID(int nSetupID);
|
|
List<ProdBonusParameter> GetByLineID(int lineID);
|
|
int Save(ProdBonusParameter item);
|
|
void Delete(int id);
|
|
}
|
|
|
|
#endregion
|
|
} |