470 lines
15 KiB
C#
470 lines
15 KiB
C#
|
using System;
|
|||
|
using System.Collections.Generic;
|
|||
|
using System.Data;
|
|||
|
using System.Linq;
|
|||
|
|
|||
|
|
|||
|
namespace HRM.BO
|
|||
|
{
|
|||
|
public class ArrearProcess : AuditTrailBase
|
|||
|
{
|
|||
|
#region Constructor
|
|||
|
|
|||
|
public ArrearProcess()
|
|||
|
{
|
|||
|
_dProcessDate = DateTime.MinValue;
|
|||
|
_sProcessDescription = string.Empty;
|
|||
|
_dProcessMonth = DateTime.MinValue;
|
|||
|
_bIsApproved = false;
|
|||
|
_iApprovedBy = 0;
|
|||
|
_iPayrollTypeID = 0;
|
|||
|
ArrearProcessDetails = new List<ArrearProcessDetail>();
|
|||
|
}
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
#region Properties
|
|||
|
|
|||
|
#region ProcessDate : DateTime
|
|||
|
|
|||
|
private DateTime _dProcessDate;
|
|||
|
|
|||
|
public DateTime ProcessDate
|
|||
|
{
|
|||
|
get { return _dProcessDate; }
|
|||
|
set { _dProcessDate = value; }
|
|||
|
}
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
#region ProcessDescription : string
|
|||
|
|
|||
|
private string _sProcessDescription;
|
|||
|
|
|||
|
public string ProcessDescription
|
|||
|
{
|
|||
|
get { return _sProcessDescription; }
|
|||
|
set { _sProcessDescription = value; }
|
|||
|
}
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
#region ProcessMonth : DateTime
|
|||
|
|
|||
|
private DateTime _dProcessMonth;
|
|||
|
|
|||
|
public DateTime ProcessMonth
|
|||
|
{
|
|||
|
get { return _dProcessMonth; }
|
|||
|
set { _dProcessMonth = value; }
|
|||
|
}
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
#region IsApproved : bool
|
|||
|
|
|||
|
private bool _bIsApproved;
|
|||
|
|
|||
|
public bool IsApproved
|
|||
|
{
|
|||
|
get { return _bIsApproved; }
|
|||
|
set { _bIsApproved = value; }
|
|||
|
}
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
#region ApprovedBy : ID
|
|||
|
|
|||
|
private int _iApprovedBy;
|
|||
|
|
|||
|
public int ApprovedBy
|
|||
|
{
|
|||
|
get { return _iApprovedBy; }
|
|||
|
set { _iApprovedBy = value; }
|
|||
|
}
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
#region PayrollTypeID : ID
|
|||
|
|
|||
|
private int _iPayrollTypeID;
|
|||
|
|
|||
|
public int PayrollTypeID
|
|||
|
{
|
|||
|
get { return _iPayrollTypeID; }
|
|||
|
set { _iPayrollTypeID = value; }
|
|||
|
}
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
public List<ArrearProcessDetail> ArrearProcessDetails { get; set; }
|
|||
|
|
|||
|
//#region ArrearProcessDetails : List<ArrearProcessDetail>
|
|||
|
|
|||
|
//private List<ArrearProcessDetail> _oArrearProcessDetails;
|
|||
|
//public List<ArrearProcessDetail> ArrearProcessDetails
|
|||
|
//{
|
|||
|
// get
|
|||
|
// {
|
|||
|
// if (this.int != null && _oArrearProcessDetails == null)
|
|||
|
// {
|
|||
|
// _oArrearProcessDetails = ArrearProcess.Service.GetArrearProcessDetails(this.ID);
|
|||
|
// }
|
|||
|
// return _oArrearProcessDetails;
|
|||
|
// }
|
|||
|
// set { _oArrearProcessDetails = value; }
|
|||
|
//}
|
|||
|
|
|||
|
//#endregion
|
|||
|
|
|||
|
//#region Service Factory
|
|||
|
//internal static IArrearProcessService Service
|
|||
|
//{
|
|||
|
// get { return Services.Factory.CreateService<IArrearProcessService>(typeof(IArrearProcessService)); }
|
|||
|
//}
|
|||
|
//#endregion
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
//#region Functions
|
|||
|
|
|||
|
//public static ArrearProcess Get(int nID)
|
|||
|
//{
|
|||
|
// ArrearProcess oArrearProcess = null;
|
|||
|
// #region Cache Header
|
|||
|
// oArrearProcess = (ArrearProcess)_cache["Get", nID];
|
|||
|
// if (oArrearProcess != null)
|
|||
|
// return oArrearProcess;
|
|||
|
// #endregion
|
|||
|
// oArrearProcess = ArrearProcess.Service.Get(nID);
|
|||
|
// #region Cache Footer
|
|||
|
// _cache.Add(oArrearProcess, "Get", nID);
|
|||
|
// #endregion
|
|||
|
// return oArrearProcess;
|
|||
|
//}
|
|||
|
|
|||
|
//public static List<ArrearProcess> Get()
|
|||
|
//{
|
|||
|
// #region Cache Header
|
|||
|
|
|||
|
// List<ArrearProcess> arrearProcesses = _cache["Get"] as List<ArrearProcess>;
|
|||
|
// if (arrearProcesses != null)
|
|||
|
// return arrearProcesses;
|
|||
|
|
|||
|
// #endregion
|
|||
|
|
|||
|
// try
|
|||
|
// {
|
|||
|
// arrearProcesses = ArrearProcess.Service.Get(SystemInformation.CurrentSysInfo.PayrollTypeID.Integer);
|
|||
|
// }
|
|||
|
// catch (ServiceException e)
|
|||
|
// {
|
|||
|
// throw new Exception(e.Message, e);
|
|||
|
// }
|
|||
|
|
|||
|
// #region Cache Footer
|
|||
|
|
|||
|
// _cache.Add(arrearProcesses, "Get");
|
|||
|
|
|||
|
// #endregion
|
|||
|
|
|||
|
// return arrearProcesses;
|
|||
|
//}
|
|||
|
|
|||
|
//public static List<ArrearProcess> Get(DateTime processMonth)
|
|||
|
//{
|
|||
|
// #region Cache Header
|
|||
|
|
|||
|
// List<ArrearProcess> arrearProcesses = _cache["Get", processMonth] as List<ArrearProcess>;
|
|||
|
// if (arrearProcesses != null)
|
|||
|
// return arrearProcesses;
|
|||
|
|
|||
|
// #endregion
|
|||
|
|
|||
|
// try
|
|||
|
// {
|
|||
|
// arrearProcesses = ArrearProcess.Service.Get(processMonth, SystemInformation.CurrentSysInfo.PayrollTypeID.Integer);
|
|||
|
// }
|
|||
|
// catch (ServiceException e)
|
|||
|
// {
|
|||
|
// throw new Exception(e.Message, e);
|
|||
|
// }
|
|||
|
|
|||
|
// #region Cache Footer
|
|||
|
|
|||
|
// _cache.Add(arrearProcesses, "Get", processMonth);
|
|||
|
|
|||
|
// #endregion
|
|||
|
|
|||
|
// return arrearProcesses;
|
|||
|
//}
|
|||
|
|
|||
|
//public static List<ArrearProcessDetail> GetArrearProcessDetails(string sEmpID, DateTime startDate, DateTime endDate)
|
|||
|
//{
|
|||
|
// #region Cache Header
|
|||
|
|
|||
|
// List<ArrearProcessDetail> arrearProcessDetails = _cache["GetArrearProcessDetails", sEmpID, startDate, endDate] as List<ArrearProcessDetail>;
|
|||
|
// if (arrearProcessDetails != null)
|
|||
|
// return arrearProcessDetails;
|
|||
|
|
|||
|
// #endregion
|
|||
|
|
|||
|
// try
|
|||
|
// {
|
|||
|
// arrearProcessDetails = Service.GetArrearProcessDetails(sEmpID, startDate, endDate);
|
|||
|
// }
|
|||
|
// catch (ServiceException e)
|
|||
|
// {
|
|||
|
// throw new Exception(e.Message, e);
|
|||
|
// }
|
|||
|
|
|||
|
// #region Cache Footer
|
|||
|
|
|||
|
// _cache.Add(arrearProcessDetails, "GetArrearProcessDetails", sEmpID, startDate, endDate);
|
|||
|
|
|||
|
// #endregion
|
|||
|
|
|||
|
// return arrearProcessDetails;
|
|||
|
//}
|
|||
|
//public static DataSet GetArrearProcessDetailsByCCID(string sCCID, DateTime startDate, DateTime endDate)
|
|||
|
//{
|
|||
|
// DataSet ds = null;
|
|||
|
|
|||
|
// try
|
|||
|
// {
|
|||
|
// ds = Service.GetArrearProcessDetailsByCCID(sCCID, startDate, endDate, SystemInformation.CurrentSysInfo.PayrollTypeID.Integer);
|
|||
|
// }
|
|||
|
// catch (Exception e)
|
|||
|
// {
|
|||
|
// throw new Exception(e.Message, e);
|
|||
|
// }
|
|||
|
// return ds;
|
|||
|
//}
|
|||
|
//public static DataSet GetArrearProcessDetailsByCCIDAndEmpID2(string sCCID, DateTime startDate, DateTime endDate, string sEmpIDs)
|
|||
|
//{
|
|||
|
// DataSet ds = null;
|
|||
|
|
|||
|
// try
|
|||
|
// {
|
|||
|
// ds = Service.GetArrearProcessDetailsByCCIDAndEmpID2(sCCID, startDate, endDate, sEmpIDs);
|
|||
|
// }
|
|||
|
// catch (Exception e)
|
|||
|
// {
|
|||
|
// throw new Exception(e.Message, e);
|
|||
|
// }
|
|||
|
// return ds;
|
|||
|
//}
|
|||
|
//public static DataSet GetArrearProcessDetailsByCCIDAndEmpID3(string sCCID, DateTime startDate, DateTime endDate, string sEmpIDs)
|
|||
|
//{
|
|||
|
// DataSet ds = null;
|
|||
|
|
|||
|
// try
|
|||
|
// {
|
|||
|
// ds = Service.GetArrearProcessDetailsByCCIDAndEmpID3(sCCID, startDate, endDate, sEmpIDs);
|
|||
|
// }
|
|||
|
// catch (Exception e)
|
|||
|
// {
|
|||
|
// throw new Exception(e.Message, e);
|
|||
|
// }
|
|||
|
// return ds;
|
|||
|
//}
|
|||
|
//public static DataSet GetArrPrssDetailsByCstIDEmpIDLocAndDeptWise(string sCCID, DateTime startDate, DateTime endDate, string sEmpIDs)
|
|||
|
//{
|
|||
|
// DataSet ds = null;
|
|||
|
|
|||
|
// try
|
|||
|
// {
|
|||
|
// ds = Service.GetArrPrssDetailsByCstIDEmpIDLocAndDeptWise(sCCID, startDate, endDate, sEmpIDs);
|
|||
|
// }
|
|||
|
// catch (Exception e)
|
|||
|
// {
|
|||
|
// throw new Exception(e.Message, e);
|
|||
|
// }
|
|||
|
// return ds;
|
|||
|
//}
|
|||
|
//public static DataSet GetArrearProcessDetailsByCCIDAndEmpID(string sCCID, DateTime startDate, DateTime endDate, string sEmpIDs)
|
|||
|
//{
|
|||
|
// DataSet ds = null;
|
|||
|
|
|||
|
// try
|
|||
|
// {
|
|||
|
// ds = Service.GetArrearProcessDetailsByCCIDAndEmpID(sCCID, startDate, endDate, sEmpIDs, SystemInformation.CurrentSysInfo.PayrollTypeID.Integer);
|
|||
|
// }
|
|||
|
// catch (Exception e)
|
|||
|
// {
|
|||
|
// throw new Exception(e.Message, e);
|
|||
|
// }
|
|||
|
// return ds;
|
|||
|
//}
|
|||
|
//public static List<ArrearProcessDetailItem> GetDetailItems(int nEmpID, DateTime processMonth)
|
|||
|
//{
|
|||
|
// #region Cache Header
|
|||
|
|
|||
|
// List<ArrearProcessDetailItem> arrearProcesses = _cache["Get", nEmpID, processMonth] as List<ArrearProcessDetailItem>;
|
|||
|
// if (arrearProcesses != null)
|
|||
|
// return arrearProcesses;
|
|||
|
|
|||
|
// #endregion
|
|||
|
|
|||
|
// try
|
|||
|
// {
|
|||
|
// arrearProcesses = ArrearProcess.Service.GetDetailItems(nEmpID, processMonth, SystemInformation.CurrentSysInfo.PayrollTypeID.Integer);
|
|||
|
// }
|
|||
|
// catch (ServiceException e)
|
|||
|
// {
|
|||
|
// throw new Exception(e.Message, e);
|
|||
|
// }
|
|||
|
|
|||
|
// #region Cache Footer
|
|||
|
|
|||
|
// _cache.Add(arrearProcesses, "Get", nEmpID, processMonth);
|
|||
|
|
|||
|
// #endregion
|
|||
|
|
|||
|
// return arrearProcesses;
|
|||
|
//}
|
|||
|
//public static DataSet GetDetailItems(string sEmpIDs, DateTime processMonth, int ItemType, int ItemID)
|
|||
|
//{
|
|||
|
// DataSet ds = null;
|
|||
|
|
|||
|
// try
|
|||
|
// {
|
|||
|
// ds = ArrearProcess.Service.GetDetailItems(sEmpIDs, processMonth, ItemType, ItemID, SystemInformation.CurrentSysInfo.PayrollTypeID.Integer);
|
|||
|
// }
|
|||
|
// catch (Exception e)
|
|||
|
// {
|
|||
|
// throw new Exception(e.Message, e);
|
|||
|
// }
|
|||
|
// return ds;
|
|||
|
|
|||
|
//}
|
|||
|
//public static List<ArrearProcessDetail> GetDetails(int arrearProcessId, int nEmpID)
|
|||
|
//{
|
|||
|
// #region Cache Header
|
|||
|
|
|||
|
// List<ArrearProcessDetail> arrearProcesses = _cache["Get", arrearProcessId, nEmpID] as List<ArrearProcessDetail>;
|
|||
|
// if (arrearProcesses != null)
|
|||
|
// return arrearProcesses;
|
|||
|
|
|||
|
// #endregion
|
|||
|
|
|||
|
// try
|
|||
|
// {
|
|||
|
// arrearProcesses = ArrearProcess.Service.GetDetails(arrearProcessId, nEmpID);
|
|||
|
// }
|
|||
|
// catch (ServiceException e)
|
|||
|
// {
|
|||
|
// throw new Exception(e.Message, e);
|
|||
|
// }
|
|||
|
|
|||
|
// #region Cache Footer
|
|||
|
|
|||
|
// _cache.Add(arrearProcesses, "Get", arrearProcessId, nEmpID);
|
|||
|
|
|||
|
// #endregion
|
|||
|
|
|||
|
// return arrearProcesses;
|
|||
|
//}
|
|||
|
|
|||
|
|
|||
|
//public static List<ArrearProcessDetail> GetDetails(int arrearProcessId, string nEmpID)
|
|||
|
//{
|
|||
|
// #region Cache Header
|
|||
|
|
|||
|
// List<ArrearProcessDetail> arrearProcesses = _cache["Get", arrearProcessId, nEmpID] as List<ArrearProcessDetail>;
|
|||
|
// if (arrearProcesses != null)
|
|||
|
// return arrearProcesses;
|
|||
|
|
|||
|
// #endregion
|
|||
|
|
|||
|
// try
|
|||
|
// {
|
|||
|
// arrearProcesses = ArrearProcess.Service.GetDetails(arrearProcessId, nEmpID);
|
|||
|
// }
|
|||
|
// catch (ServiceException e)
|
|||
|
// {
|
|||
|
// throw new Exception(e.Message, e);
|
|||
|
// }
|
|||
|
|
|||
|
// #region Cache Footer
|
|||
|
|
|||
|
// _cache.Add(arrearProcesses, "Get", arrearProcessId, nEmpID);
|
|||
|
|
|||
|
// #endregion
|
|||
|
|
|||
|
// return arrearProcesses;
|
|||
|
//}
|
|||
|
|
|||
|
//public int Save()
|
|||
|
//{
|
|||
|
// this.SetAuditTrailProperties();
|
|||
|
// return ArrearProcess.Service.Save(this);
|
|||
|
//}
|
|||
|
////public int SaveDetailItem(List<ArrearProcessDetailItem> ArrearProcessDetailItems, List<IncomeTax> updTaxColl)
|
|||
|
////{
|
|||
|
//// return ArrearProcess.Service.SaveDetailItem(ArrearProcessDetailItems, updTaxColl);
|
|||
|
////}
|
|||
|
//public int SaveDetailItem(List<ArrearProcessDetailItem> ArrearProcessDetailItems)
|
|||
|
//{
|
|||
|
// return ArrearProcess.Service.SaveDetailItem(ArrearProcessDetailItems);
|
|||
|
//}
|
|||
|
//public static void Delete(ArrearProcess oAP)
|
|||
|
//{
|
|||
|
// ArrearProcess.Service.Delete(oAP);
|
|||
|
//}
|
|||
|
//public bool IsExist(DateTime dMonth)
|
|||
|
//{
|
|||
|
// return ArrearProcess.Service.IsExist(dMonth, SystemInformation.CurrentSysInfo.PayrollTypeID.Integer);
|
|||
|
//}
|
|||
|
|
|||
|
//public static void Approve(ArrearProcess prc)
|
|||
|
//{
|
|||
|
// ArrearProcess.Service.Approve(prc, SystemInformation.CurrentSysInfo.PayrollTypeID.Integer, SystemInformation.CurrentSysInfo.NextPayProcessDate);
|
|||
|
//}
|
|||
|
//#endregion
|
|||
|
}
|
|||
|
|
|||
|
#region IHRRequest Service
|
|||
|
|
|||
|
public interface IArrearProcessService
|
|||
|
{
|
|||
|
ArrearProcess Get(int ArrearProcessID);
|
|||
|
List<ArrearProcess> GetWithPayrollType(int payrollTypeID);
|
|||
|
List<ArrearProcess> Get(DateTime processMonth, int payrollTypeID);
|
|||
|
int Save(ArrearProcess oItem);
|
|||
|
void Delete(ArrearProcess oAP);
|
|||
|
List<ArrearProcessDetail> GetArrearProcessDetails(int ArrearProcessID);
|
|||
|
List<ArrearProcessDetailItem> GetArrearProcessDetailItems(int ArrearProcessDetailID);
|
|||
|
List<ArrearProcessCostDist> GetArrearProcessCostDists(int ArrearProcessDetailID);
|
|||
|
List<ArrearProcessDetailItem> GetDetailItems(int nEmpID, DateTime processMonth, int payrollTypeID);
|
|||
|
DataSet GetDetailItems(string sEmpIDs, DateTime processMonth, int ItemType, int ItemID, int payrollTypeID);
|
|||
|
|
|||
|
void Approve(ArrearProcess oAP, int payrollTypeID, DateTime nextPayProcessDate);
|
|||
|
|
|||
|
//int SaveDetailItem(List<ArrearProcessDetailItem> ArrearProcessDetailItems, List<IncomeTax> updTaxColl);
|
|||
|
int SaveDetailItem(List<ArrearProcessDetailItem> ArrearProcessDetailItems);
|
|||
|
|
|||
|
bool IsExist(DateTime dMonth, int payrollTypeID);
|
|||
|
|
|||
|
List<ArrearProcessDetail> GetArrearProcessDetails(string sEmpID, DateTime startDate, DateTime endDate);
|
|||
|
DataSet GetArrearProcessDetailsByCCID(string sCCID, DateTime startDate, DateTime endDate, int payrollTypeID);
|
|||
|
|
|||
|
DataSet GetArrearProcessDetailsByCCIDAndEmpID(string sCCID, DateTime startDate, DateTime endDate,
|
|||
|
string sEmpIDs, int payrollTypeID);
|
|||
|
|
|||
|
DataSet GetArrearProcessDetailsByCCIDAndEmpID2(string sCCID, DateTime startDate, DateTime endDate,
|
|||
|
string sEmpIDs);
|
|||
|
|
|||
|
DataSet GetArrearProcessDetailsByCCIDAndEmpID3(string sCCID, DateTime startDate, DateTime endDate,
|
|||
|
string sEmpIDs);
|
|||
|
|
|||
|
DataSet GetArrPrssDetailsByCstIDEmpIDLocAndDeptWise(string sCCID, DateTime startDate, DateTime endDate,
|
|||
|
string sEmpIDs);
|
|||
|
|
|||
|
List<ArrearProcessDetail> GetDetails(int arrearProcessId, string nEmpID);
|
|||
|
List<ArrearProcessDetail> GetDetails(int arrearProcessId, int nEmpID);
|
|||
|
List<ArrearProcessDetailItemMonthly> GetArrearProcessDetailItemMonthlys(int ArrearProcessDetailItemID);
|
|||
|
}
|
|||
|
|
|||
|
#endregion
|
|||
|
}
|