EchoTex_Payroll/HRM.BO/RewardStatement/RewardStatementParameterIndividual.cs
2024-10-14 10:01:49 +06:00

210 lines
6.6 KiB
C#

using Ease.Core.Model;
using System;
using System.Collections.Generic;
using System.Data;
namespace HRM.BO
{
#region RewardStatementParameterIndividual
public class RewardStatementParameterIndividual : BasicBaseObject
{
#region Constructor
public RewardStatementParameterIndividual()
{
_rewardStatementParameterID = 0;
_employeeId = 0;
Employee = null;
_basicAmount = 0.0;
_flatAmount = 0.0;
_gcAmount = 0.0;
}
#endregion
#region Properties
#region RewardStatementParameterID
private int _rewardStatementParameterID;
public int RewardStatementParameterID
{
get { return _rewardStatementParameterID; }
set { _rewardStatementParameterID = value; }
}
#endregion
#region EmployeeID
private int _employeeId;
public int EmployeeID
{
get { return _employeeId; }
set { _employeeId = value; }
}
#endregion
#region BasicAmount
private double _basicAmount;
public double BasicAmount
{
get { return _basicAmount; }
set { _basicAmount = value; }
}
#endregion
#region FlatAmount
private double _flatAmount;
public double FlatAmount
{
get { return _flatAmount; }
set { _flatAmount = value; }
}
#endregion
#region GCAmount
private double _gcAmount;
public double GCAmount
{
get { return _gcAmount; }
set { _gcAmount = value; }
}
#endregion
public Employee Employee { get; set; }
//#region Employee : Employee
//private Employee _employee;
//public Employee Employee
//{
// get
// {
// if (_employeeId.Integer > 0 && _employee == null)
// {
// _employee = new Employee();
// _employee = Employee.Get(_employeeId);
// }
// return this._employee;
// }
// set
// {
// _employee = value;
// }
//}
//#endregion
#endregion
//#region Functions
//public RewardStatementParameterIndividual Get(int id)
//{
// RewardStatementParameterIndividual oRewardStatementParameterIndividual = null;
// #region Cache Header
// oRewardStatementParameterIndividual = (RewardStatementParameterIndividual)_cache["Get", id];
// if (oRewardStatementParameterIndividual != null)
// return oRewardStatementParameterIndividual;
// #endregion
// oRewardStatementParameterIndividual = RewardStatementParameterIndividual.Service.Get(id);
// #region Cache Footer
// _cache.Add(oRewardStatementParameterIndividual, "Get", id);
// #endregion
// return oRewardStatementParameterIndividual;
//}
//public static List<RewardStatementParameterIndividual> Get()
//{
// #region Cache Header
// List<RewardStatementParameterIndividual> RewardStatementParameterIndividuals = _cache["Get"] as List<RewardStatementParameterIndividual>;
// if (RewardStatementParameterIndividuals != null)
// return RewardStatementParameterIndividuals;
// #endregion
// try
// {
// RewardStatementParameterIndividuals = Service.Get();
// }
// catch (ServiceException e)
// {
// throw new Exception(e.Message, e);
// }
// #region Cache Footer
// _cache.Add(RewardStatementParameterIndividuals, "Get");
// #endregion
// return RewardStatementParameterIndividuals;
//}
//public static List<RewardStatementParameterIndividual> GetByParameterID(int nParameterID)
//{
// #region Cache Header
// List<RewardStatementParameterIndividual> RewardStatementParameterIndividuals = _cache["GetByParameterID"] as List<RewardStatementParameterIndividual>;
// if (RewardStatementParameterIndividuals != null)
// return RewardStatementParameterIndividuals;
// #endregion
// try
// {
// RewardStatementParameterIndividuals = Service.GetByParameterID(nParameterID);
// }
// catch (ServiceException e)
// {
// throw new Exception(e.Message, e);
// }
// #region Cache Footer
// _cache.Add(RewardStatementParameterIndividuals, "GetByParameterID");
// #endregion
// return RewardStatementParameterIndividuals;
//}
//public int Save()
//{
// this.SetAuditTrailProperties();
// return RewardStatementParameterIndividual.Service.Save(this);
//}
//public void Delete()
//{
// RewardStatementParameterIndividual.Service.Delete(this.ID);
//}
//public static void BulkSave(List<RewardStatementParameterIndividual> oParams)
//{
// foreach (RewardStatementParameterIndividual item in oParams)
// {
// item.SetAuditTrailProperties();
// }
// RewardStatementParameterIndividual.Service.BulkSave(oParams);
//}
//#endregion
//#region Service Factory
//internal static IRewardStatementParameterIndividualService Service
//{
// get
// {
// return Services.Factory.CreateService<IRewardStatementParameterIndividualService>(typeof(IRewardStatementParameterIndividualService));
// }
//}
//#endregion
}
#endregion
#region IRewardStatementParameterIndividual Service
public interface IRewardStatementParameterIndividualService
{
RewardStatementParameterIndividual Get(int id);
List<RewardStatementParameterIndividual> Get();
List<RewardStatementParameterIndividual> GetByParameterID(int nParameterID);
RewardStatementParameterIndividual Get(int nParameterID, int EmployeeID);
int Save(RewardStatementParameterIndividual oRewardStatementParameterIndividual);
void Delete(int id);
void BulkSave(List<RewardStatementParameterIndividual> oParams);
}
#endregion
}