214 lines
7.4 KiB
C#
214 lines
7.4 KiB
C#
|
using System;
|
|||
|
using System.Collections.Generic;
|
|||
|
using System.Linq;
|
|||
|
using System.Text;
|
|||
|
using Ease.Core;
|
|||
|
using Ease.Core.Model;
|
|||
|
using System.Data;
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
namespace HRM.BO
|
|||
|
{
|
|||
|
#region OpiParameterIndividual
|
|||
|
|
|||
|
public class OpiParameterIndividual : BasicBaseObject
|
|||
|
{
|
|||
|
|
|||
|
#region Constructor
|
|||
|
public OpiParameterIndividual()
|
|||
|
{
|
|||
|
//_opiParameterID = null;
|
|||
|
//_opiItemId = null;
|
|||
|
//_opiPeriodicity = EnumOpiPeriodicity.OnceOff;
|
|||
|
//_employeeId = null;
|
|||
|
//_fromDate = DateTime.MinValue;
|
|||
|
//_toDate = DateTime.MinValue;
|
|||
|
//_arrearType = EnumArrearType.NotPresent;
|
|||
|
//_employee = null;
|
|||
|
//_individualType = EnumOPIIndivdualType.AppliedToIndividual;
|
|||
|
//_value = 0.0;
|
|||
|
//_valueType = EnumValueType.Amount;
|
|||
|
//_payrollTypeID = Payroll.BO.SystemInformation.CurrentSysInfo.PayrollTypeID;
|
|||
|
}
|
|||
|
#endregion
|
|||
|
|
|||
|
#region Properties
|
|||
|
|
|||
|
public EnumArrearType ArrearType { get; set; }
|
|||
|
|
|||
|
public int EmployeeId { get; set; }
|
|||
|
|
|||
|
public DateTime FromDate { get; set; }
|
|||
|
|
|||
|
public DateTime? ToDate { get; set; }
|
|||
|
|
|||
|
public EnumOPIIndivdualType IndividualType { get; set; }
|
|||
|
|
|||
|
public int OpiItemId { get; set; }
|
|||
|
|
|||
|
public int OpiParameterID { get; set; }
|
|||
|
public int PayrollTypeID { get; set; }
|
|||
|
|
|||
|
public EnumOpiPeriodicity OpiPeriodicity { get; set; }
|
|||
|
|
|||
|
public double Value { get; set; }
|
|||
|
|
|||
|
public EnumValueType ValueType { get; set; }
|
|||
|
|
|||
|
public Employee Employee { get; set; }
|
|||
|
public string employeeNo { get; set; }
|
|||
|
public string employeeName { get; set; }
|
|||
|
#endregion
|
|||
|
|
|||
|
//#region Functions
|
|||
|
//public OpiParameterIndividual Get(ID nOpiParameterIndividualID)
|
|||
|
//{
|
|||
|
// OpiParameterIndividual oOpiParameterIndividual = null;
|
|||
|
// #region Cache Header
|
|||
|
// oOpiParameterIndividual = (OpiParameterIndividual)_cache["Get", nOpiParameterIndividualID];
|
|||
|
// if (oOpiParameterIndividual != null)
|
|||
|
// return oOpiParameterIndividual;
|
|||
|
// #endregion
|
|||
|
// oOpiParameterIndividual = OpiParameterIndividual.Service.Get(nOpiParameterIndividualID);
|
|||
|
// #region Cache Footer
|
|||
|
// _cache.Add(oOpiParameterIndividual, "Get", nOpiParameterIndividualID);
|
|||
|
// #endregion
|
|||
|
// return oOpiParameterIndividual;
|
|||
|
//}
|
|||
|
//public static List<OpiParameterIndividual> Get()
|
|||
|
//{
|
|||
|
// #region Cache Header
|
|||
|
// List<OpiParameterIndividual> OpiParameterIndividuals = _cache["Get"] as List<OpiParameterIndividual>;
|
|||
|
// if (OpiParameterIndividuals != null)
|
|||
|
// return OpiParameterIndividuals;
|
|||
|
// #endregion
|
|||
|
// try
|
|||
|
// {
|
|||
|
// OpiParameterIndividuals = Service.Get();
|
|||
|
// }
|
|||
|
// catch (ServiceException e)
|
|||
|
// {
|
|||
|
// throw new Exception(e.Message, e);
|
|||
|
// }
|
|||
|
// #region Cache Footer
|
|||
|
// _cache.Add(OpiParameterIndividuals, "Get");
|
|||
|
// #endregion
|
|||
|
// return OpiParameterIndividuals;
|
|||
|
//}
|
|||
|
//public static List<OpiParameterIndividual> GetByParameterID(ID nParameterID)
|
|||
|
//{
|
|||
|
// #region Cache Header
|
|||
|
// List<OpiParameterIndividual> OpiParameterIndividuals = _cache["GetByParameterID"] as List<OpiParameterIndividual>;
|
|||
|
// if (OpiParameterIndividuals != null)
|
|||
|
// return OpiParameterIndividuals;
|
|||
|
// #endregion
|
|||
|
// try
|
|||
|
// {
|
|||
|
// OpiParameterIndividuals = Service.GetByParameterID(nParameterID);
|
|||
|
// }
|
|||
|
// catch (ServiceException e)
|
|||
|
// {
|
|||
|
// throw new Exception(e.Message, e);
|
|||
|
// }
|
|||
|
// #region Cache Footer
|
|||
|
// _cache.Add(OpiParameterIndividuals, "GetByParameterID");
|
|||
|
// #endregion
|
|||
|
// return OpiParameterIndividuals;
|
|||
|
//}
|
|||
|
//public static List<OpiParameterIndividual> GetIndividuals(ID nOpiPAramID, EnumOPIIndivdualType type)
|
|||
|
//{
|
|||
|
// #region Cache Header
|
|||
|
// List<OpiParameterIndividual> opiParamIndividuals = _cache["GetIndividuals", nOpiPAramID, type] as List<OpiParameterIndividual>;
|
|||
|
// if (opiParamIndividuals != null)
|
|||
|
// {
|
|||
|
// return opiParamIndividuals;
|
|||
|
// }
|
|||
|
// #endregion
|
|||
|
|
|||
|
// try
|
|||
|
// {
|
|||
|
// opiParamIndividuals = Service.GetIndividuals(nOpiPAramID, type);
|
|||
|
// }
|
|||
|
// catch (ServiceException e)
|
|||
|
// {
|
|||
|
// throw new Exception(e.Message, e);
|
|||
|
// }
|
|||
|
|
|||
|
// #region Cache Footer
|
|||
|
|
|||
|
// _cache.Add(opiParamIndividuals, "GetIndividuals", nOpiPAramID, type);
|
|||
|
|
|||
|
// #endregion
|
|||
|
|
|||
|
// return opiParamIndividuals;
|
|||
|
//}
|
|||
|
|
|||
|
//public ID Save()
|
|||
|
//{
|
|||
|
// this.SetAuditTrailProperties();
|
|||
|
// return OpiParameterIndividual.Service.Save(this);
|
|||
|
//}
|
|||
|
//public void Delete()
|
|||
|
//{
|
|||
|
// OpiParameterIndividual.Service.Delete(this.ID);
|
|||
|
//}
|
|||
|
|
|||
|
//public static void BulkSave(List<OpiParameterIndividual> oParams)
|
|||
|
//{
|
|||
|
// foreach (OpiParameterIndividual item in oParams)
|
|||
|
// {
|
|||
|
// item.SetAuditTrailProperties();
|
|||
|
// }
|
|||
|
// OpiParameterIndividual.Service.BulkSave(oParams);
|
|||
|
//}
|
|||
|
//#endregion
|
|||
|
|
|||
|
//#region Service Factory
|
|||
|
//internal static IOpiParameterIndividualService Service
|
|||
|
//{
|
|||
|
// get
|
|||
|
// {
|
|||
|
// return Services.Factory.CreateService<IOpiParameterIndividualService>(typeof(IOpiParameterIndividualService));
|
|||
|
// }
|
|||
|
//}
|
|||
|
//#endregion
|
|||
|
|
|||
|
public OpiParameterIndividual Clone()
|
|||
|
{
|
|||
|
OpiParameterIndividual opiIndividual = new OpiParameterIndividual();
|
|||
|
opiIndividual.IndividualType = this.IndividualType;
|
|||
|
opiIndividual.OpiParameterID = this.OpiParameterID;
|
|||
|
opiIndividual.OpiItemId = this.OpiItemId;
|
|||
|
opiIndividual.ArrearType = this.ArrearType;
|
|||
|
//opiIndividual.DisburseAmount = this.DisburseAmount;
|
|||
|
opiIndividual.EmployeeId = this.EmployeeId;
|
|||
|
opiIndividual.FromDate = this.FromDate;
|
|||
|
opiIndividual.Value = this.Value;
|
|||
|
opiIndividual.OpiPeriodicity = this.OpiPeriodicity;
|
|||
|
opiIndividual.SortOrder = this.SortOrder;
|
|||
|
opiIndividual.ToDate = this.ToDate;
|
|||
|
//opiIndividual.TotalAmount = this.TotalAmount;
|
|||
|
opiIndividual.ValueType = this.ValueType;
|
|||
|
return opiIndividual;
|
|||
|
}
|
|||
|
}
|
|||
|
#endregion
|
|||
|
|
|||
|
#region IOpiParameterIndividual Service
|
|||
|
public interface IOpiParameterIndividualService
|
|||
|
{
|
|||
|
OpiParameterIndividual Get(int id);
|
|||
|
List<OpiParameterIndividual> Get();
|
|||
|
List<OpiParameterIndividual> Get(DateTime fromdate, DateTime todate);
|
|||
|
List<OpiParameterIndividual> GetByParameterID(int nParameterID);
|
|||
|
List<OpiParameterIndividual> GetIndividuals(int nOpiParamID, EnumOPIIndivdualType type);
|
|||
|
OpiParameterIndividual Get(int nOpiPAramID, int EmployeeID, int opiItemID);
|
|||
|
int Save(OpiParameterIndividual oOpiParameterIndividual);
|
|||
|
void Delete(int id);
|
|||
|
void BulkSave(List<OpiParameterIndividual> oParams);
|
|||
|
}
|
|||
|
#endregion
|
|||
|
}
|