483 lines
14 KiB
C#
483 lines
14 KiB
C#
|
|
|||
|
using Ease.Core.Model;
|
|||
|
|
|||
|
|
|||
|
using System;
|
|||
|
using System.Collections.Generic;
|
|||
|
using System.Data;
|
|||
|
|
|||
|
namespace HRM.BO
|
|||
|
{
|
|||
|
#region FSTran
|
|||
|
public class FSTran : AuditTrailBase
|
|||
|
{
|
|||
|
#region Declarations
|
|||
|
|
|||
|
private double _changeTaxAmount;
|
|||
|
private DateTime _discontinueDate;
|
|||
|
private int _employeeID;
|
|||
|
private DateTime? _lastSalaryPaidMonth;
|
|||
|
private double _netAmount;
|
|||
|
private DateTime _noticeDate;
|
|||
|
private string _remarks;
|
|||
|
private DateTime _settlementDate;
|
|||
|
private double _taxAmount;
|
|||
|
private bool _isMaximumInvestment;
|
|||
|
private int _shortNoticePeriod;
|
|||
|
private bool _isSubmit;
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
#region Constructor
|
|||
|
|
|||
|
|
|||
|
public FSTran()
|
|||
|
{
|
|||
|
_changeTaxAmount = 0.0;
|
|||
|
_employeeID = 0;
|
|||
|
_lastSalaryPaidMonth = null;
|
|||
|
_netAmount = 0.0;
|
|||
|
_remarks = "";
|
|||
|
_taxAmount = 0.0;
|
|||
|
_isMaximumInvestment = false;
|
|||
|
_isSubmit = false;
|
|||
|
_shortNoticePeriod = 0;
|
|||
|
}
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
#region Properties
|
|||
|
#region ShortNoticePeriod : int
|
|||
|
public int ShortNoticePeriod
|
|||
|
{
|
|||
|
get { return _shortNoticePeriod; }
|
|||
|
set { _shortNoticePeriod = value; }
|
|||
|
}
|
|||
|
#endregion
|
|||
|
|
|||
|
#region ChangeTaxAmount : double
|
|||
|
public double ChangeTaxAmount
|
|||
|
{
|
|||
|
get { return _changeTaxAmount; }
|
|||
|
set {_changeTaxAmount = value; }
|
|||
|
}
|
|||
|
#endregion
|
|||
|
|
|||
|
#region DiscontinueDate : DateTime
|
|||
|
public DateTime DiscontinueDate
|
|||
|
{
|
|||
|
get { return _discontinueDate; }
|
|||
|
set { _discontinueDate = value; }
|
|||
|
}
|
|||
|
#endregion
|
|||
|
|
|||
|
#region EmployeeID
|
|||
|
public int EmployeeID
|
|||
|
{
|
|||
|
get
|
|||
|
{
|
|||
|
return _employeeID;
|
|||
|
}
|
|||
|
set
|
|||
|
{
|
|||
|
|
|||
|
_employeeID = value;
|
|||
|
}
|
|||
|
}
|
|||
|
#endregion
|
|||
|
|
|||
|
#region LastSalaryPaidMonth : DateTime
|
|||
|
public DateTime? LastSalaryPaidMonth
|
|||
|
{
|
|||
|
get { return _lastSalaryPaidMonth; }
|
|||
|
set { _lastSalaryPaidMonth = value; }
|
|||
|
}
|
|||
|
#endregion
|
|||
|
|
|||
|
#region NoticeDate : DateTime
|
|||
|
public DateTime NoticeDate
|
|||
|
{
|
|||
|
get { return _noticeDate; }
|
|||
|
set { _noticeDate = value; }
|
|||
|
}
|
|||
|
#endregion
|
|||
|
|
|||
|
#region SettlementDate : DateTime
|
|||
|
public DateTime SettlementDate
|
|||
|
{
|
|||
|
get { return _settlementDate; }
|
|||
|
set { _settlementDate = value; }
|
|||
|
}
|
|||
|
#endregion
|
|||
|
|
|||
|
#region Remarks : string
|
|||
|
public string Remarks
|
|||
|
{
|
|||
|
get { return _remarks; }
|
|||
|
set { _remarks = value; }
|
|||
|
}
|
|||
|
#endregion
|
|||
|
|
|||
|
#region NetAmount : double
|
|||
|
public double NetAmount
|
|||
|
{
|
|||
|
get { return _netAmount; }
|
|||
|
set { _netAmount = value; }
|
|||
|
}
|
|||
|
#endregion
|
|||
|
|
|||
|
#region TaxAmount : double
|
|||
|
public double TaxAmount
|
|||
|
{
|
|||
|
get { return _taxAmount; }
|
|||
|
set { _taxAmount = value; }
|
|||
|
}
|
|||
|
|
|||
|
private List<IncomeTax> _incomeTax = null;
|
|||
|
public List<IncomeTax> IncomeTaxcoll
|
|||
|
{
|
|||
|
get
|
|||
|
{
|
|||
|
return _incomeTax;
|
|||
|
}
|
|||
|
set
|
|||
|
{
|
|||
|
_incomeTax = value;
|
|||
|
}
|
|||
|
}
|
|||
|
#endregion
|
|||
|
|
|||
|
#region IsMaximumInvestment : bool
|
|||
|
public bool IsMaximumInvestment
|
|||
|
{
|
|||
|
get { return _isMaximumInvestment; }
|
|||
|
set { _isMaximumInvestment = value; }
|
|||
|
}
|
|||
|
#endregion
|
|||
|
|
|||
|
#region IsSubmit : bool
|
|||
|
public bool IsSubmit
|
|||
|
{
|
|||
|
get { return _isSubmit; }
|
|||
|
set { _isSubmit = value; }
|
|||
|
}
|
|||
|
#endregion
|
|||
|
|
|||
|
public List<FSTranDetail> Details { get; set; }
|
|||
|
public int? EssEntryEmpID { get; set; }
|
|||
|
public string EmployeeNo { get; set; }
|
|||
|
public string EmployeeName { get; set; }
|
|||
|
public int ResignationReqId { get; set; }
|
|||
|
|
|||
|
//#region Tran Detail : Tran Detail
|
|||
|
|
|||
|
//private List<FSTranDetail> _details;
|
|||
|
//public List<FSTranDetail> Details
|
|||
|
//{
|
|||
|
// get
|
|||
|
// {
|
|||
|
// // _details = new List<FSTranDetail>();
|
|||
|
// if (_details == null)
|
|||
|
// {
|
|||
|
// _details = new List<FSTranDetail>();
|
|||
|
// _details = FSTranDetail.GetDetail(this.ID);
|
|||
|
// }
|
|||
|
// return _details;
|
|||
|
// }
|
|||
|
// set
|
|||
|
// {
|
|||
|
// _details = value;
|
|||
|
// }
|
|||
|
//}
|
|||
|
//#endregion
|
|||
|
|
|||
|
//#region Service Factory IFSTranService : IFSTranService
|
|||
|
|
|||
|
//internal static IFSTranService Service
|
|||
|
//{
|
|||
|
// get { return Services.Factory.CreateService<IFSTranService>(typeof(IFSTranService)); }
|
|||
|
//}
|
|||
|
|
|||
|
//#endregion
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
//#region Functions
|
|||
|
|
|||
|
//public static FSTran Get(int nID)
|
|||
|
//{
|
|||
|
// FSTran oFSTran = null;
|
|||
|
// #region Cache Header
|
|||
|
// oFSTran = (FSTran)_cache["Get", nID];
|
|||
|
// if (oFSTran != null)
|
|||
|
// return oFSTran;
|
|||
|
// #endregion
|
|||
|
// oFSTran = FSTran.Service.Get(nID);
|
|||
|
// #region Cache Footer
|
|||
|
// _cache.Add(oFSTran, "Get", nID);
|
|||
|
// #endregion
|
|||
|
// return oFSTran;
|
|||
|
//}
|
|||
|
//public static FSTran Get(int nEmpID)
|
|||
|
//{
|
|||
|
// FSTran oFSTran = null;
|
|||
|
// #region Cache Header
|
|||
|
// oFSTran = (FSTran)_cache["Get", nEmpID];
|
|||
|
// if (oFSTran != null)
|
|||
|
// return oFSTran;
|
|||
|
// #endregion
|
|||
|
// oFSTran = FSTran.Service.Get(nEmpID);
|
|||
|
// #region Cache Footer
|
|||
|
// _cache.Add(oFSTran, "Get", nEmpID);
|
|||
|
// #endregion
|
|||
|
// return oFSTran;
|
|||
|
//}
|
|||
|
//public static List<FSTran> Get()
|
|||
|
//{
|
|||
|
// #region Cache Header
|
|||
|
// List<FSTran> FSTrans = _cache["Get"] as List<FSTran>;
|
|||
|
// if (FSTrans != null)
|
|||
|
// return FSTrans;
|
|||
|
// #endregion
|
|||
|
// try
|
|||
|
// {
|
|||
|
// FSTrans = Service.Get();
|
|||
|
// }
|
|||
|
// catch (ServiceException e)
|
|||
|
// {
|
|||
|
// throw new Exception(e.Message, e);
|
|||
|
// }
|
|||
|
// #region Cache Footer
|
|||
|
// _cache.Add(FSTrans, "Get");
|
|||
|
// #endregion
|
|||
|
// return FSTrans;
|
|||
|
//}
|
|||
|
//public static List<FSTran> Get(DateTime dFromDate, DateTime dToDate)
|
|||
|
//{
|
|||
|
// #region Cache Header
|
|||
|
// List<FSTran> FSTrans = _cache["Get", dFromDate, dToDate] as List<FSTran>;
|
|||
|
// if (FSTrans != null)
|
|||
|
// return FSTrans;
|
|||
|
// #endregion
|
|||
|
// try
|
|||
|
// {
|
|||
|
// FSTrans = Service.Get(dFromDate, dToDate);
|
|||
|
// }
|
|||
|
// catch (ServiceException e)
|
|||
|
// {
|
|||
|
// throw new Exception(e.Message, e);
|
|||
|
// }
|
|||
|
// #region Cache Footer
|
|||
|
// _cache.Add(FSTrans, "Get", dFromDate, dToDate);
|
|||
|
// #endregion
|
|||
|
// return FSTrans;
|
|||
|
//}
|
|||
|
|
|||
|
//public static List<FSTran> Get(EnumStatus status)
|
|||
|
//{
|
|||
|
// #region Cache Header
|
|||
|
|
|||
|
// List<FSTran> FSTrans = _cache["Get", status] as List<FSTran>;
|
|||
|
// if (FSTrans != null)
|
|||
|
// return FSTrans;
|
|||
|
|
|||
|
// #endregion
|
|||
|
|
|||
|
// try
|
|||
|
// {
|
|||
|
// FSTrans = Service.Get(status);
|
|||
|
// }
|
|||
|
// catch (ServiceException e)
|
|||
|
// {
|
|||
|
// throw new Exception(e.Message, e);
|
|||
|
// }
|
|||
|
|
|||
|
// #region Cache Footer
|
|||
|
|
|||
|
// _cache.Add(FSTrans, "Get", status);
|
|||
|
|
|||
|
// #endregion
|
|||
|
|
|||
|
// return FSTrans;
|
|||
|
//}
|
|||
|
//public static List<FSTran> Get(string sEmpIDs)
|
|||
|
//{
|
|||
|
// #region Cache Header
|
|||
|
|
|||
|
// List<FSTran> FSTrans = _cache["Get", sEmpIDs] as List<FSTran>;
|
|||
|
// if (FSTrans != null)
|
|||
|
// return FSTrans;
|
|||
|
|
|||
|
// #endregion
|
|||
|
|
|||
|
// try
|
|||
|
// {
|
|||
|
// FSTrans = Service.Get(sEmpIDs);
|
|||
|
// }
|
|||
|
// catch (ServiceException e)
|
|||
|
// {
|
|||
|
// throw new Exception(e.Message, e);
|
|||
|
// }
|
|||
|
|
|||
|
// #region Cache Footer
|
|||
|
|
|||
|
// _cache.Add(FSTrans, "Get", sEmpIDs);
|
|||
|
|
|||
|
// #endregion
|
|||
|
|
|||
|
// return FSTrans;
|
|||
|
//}
|
|||
|
//public int Save()
|
|||
|
//{
|
|||
|
// this.SetAuditTrailProperties();
|
|||
|
// return FSTran.Service.Save(this);
|
|||
|
//}
|
|||
|
|
|||
|
//public double GetAmount(EnumFSItemCode fsCode)
|
|||
|
//{
|
|||
|
// double nAmount=0;
|
|||
|
// foreach (FSTranDetail odetail in this.Details)
|
|||
|
// {
|
|||
|
// if (odetail.ItemCode == fsCode)
|
|||
|
// {
|
|||
|
// if(odetail.Side == EnumSide.Add)
|
|||
|
// nAmount = nAmount + odetail.Amount;
|
|||
|
// else
|
|||
|
// nAmount = nAmount - odetail.Amount;
|
|||
|
// }
|
|||
|
// }
|
|||
|
// return nAmount;
|
|||
|
//}
|
|||
|
|
|||
|
//public double GetAmount(EnumFSItemCode fsCode, int nItemID)
|
|||
|
//{
|
|||
|
// double nAmount = 0;
|
|||
|
// foreach (FSTranDetail odetail in this.Details)
|
|||
|
// {
|
|||
|
// if (odetail.ItemCode == fsCode && nItemID== odetail.ItemID)
|
|||
|
// {
|
|||
|
// if (odetail.AmountType == EnumValueType.Amount)
|
|||
|
// {
|
|||
|
// if (odetail.Side == EnumSide.Add)
|
|||
|
// nAmount = nAmount + odetail.Amount;
|
|||
|
// else
|
|||
|
// nAmount = nAmount - odetail.Amount;
|
|||
|
// }
|
|||
|
// }
|
|||
|
// }
|
|||
|
// return nAmount;
|
|||
|
//}
|
|||
|
//public double GetLeaveAmount(EnumFSItemCode fsCode)
|
|||
|
//{
|
|||
|
// double nAmount = 0;
|
|||
|
// foreach (FSTranDetail odetail in this.Details)
|
|||
|
// {
|
|||
|
// if (odetail.ItemCode == fsCode)
|
|||
|
// {
|
|||
|
// if (odetail.AmountType == EnumValueType.Amount)
|
|||
|
// {
|
|||
|
// if (odetail.Side == EnumSide.Add)
|
|||
|
// nAmount = nAmount + odetail.ChangedValue;
|
|||
|
// else
|
|||
|
// nAmount = nAmount - odetail.ChangedValue;
|
|||
|
// }
|
|||
|
// }
|
|||
|
// }
|
|||
|
// return nAmount;
|
|||
|
//}
|
|||
|
//public double GetLFAAmount(EnumFSItemCode fsCode, int nItemID)
|
|||
|
//{
|
|||
|
// double nAmount = 0;
|
|||
|
// foreach (FSTranDetail odetail in this.Details)
|
|||
|
// {
|
|||
|
// if (odetail.ItemCode == fsCode)
|
|||
|
// {
|
|||
|
// if (odetail.AmountType == EnumValueType.Amount)
|
|||
|
// {
|
|||
|
// if (odetail.Side == EnumSide.Add)
|
|||
|
// nAmount = nAmount + odetail.ChangedValue;
|
|||
|
// else
|
|||
|
// nAmount = nAmount - odetail.ChangedValue;
|
|||
|
// }
|
|||
|
// }
|
|||
|
// }
|
|||
|
// return nAmount;
|
|||
|
//}
|
|||
|
|
|||
|
//public void Delete(int id)
|
|||
|
//{
|
|||
|
// FSTran.Service.Delete(id);
|
|||
|
//}
|
|||
|
|
|||
|
//public static double GetPFAmount(string sEmployeeNo)
|
|||
|
//{
|
|||
|
// return Service.GetPFAmount(sEmployeeNo);
|
|||
|
//}
|
|||
|
//#endregion
|
|||
|
|
|||
|
}
|
|||
|
#endregion
|
|||
|
|
|||
|
public class ProportionateSalaryFill
|
|||
|
{
|
|||
|
public string AllowanceItemID { get; set; }
|
|||
|
public string AllowanceName { get; set; }
|
|||
|
public double AllowanceFracValue { get; set; }
|
|||
|
public double AllowanceActualFracValue { get; set; }
|
|||
|
public string DeductItemID { get; set; }
|
|||
|
public string DeductName { get; set; }
|
|||
|
public double FracDeductValue { get; set; }
|
|||
|
public double ActualFracDeductValue{ get; set; }
|
|||
|
}
|
|||
|
|
|||
|
public class GrossSalaryList
|
|||
|
{
|
|||
|
public string AllowanceItemID { get; set; }
|
|||
|
public string AllowanceName { get; set; }
|
|||
|
public double AllowanceGrossValue { get; set; }
|
|||
|
public double ActualGrossValue { get; set; }
|
|||
|
public string DeductItemID { get; set; }
|
|||
|
public string DeductName { get; set; }
|
|||
|
public double DeductGrossValue { get; set; }
|
|||
|
public double ActualGrossDeductValue { get; set; }
|
|||
|
}
|
|||
|
|
|||
|
public class GratuityCount
|
|||
|
{
|
|||
|
public string GratuityAmount { get; set; }
|
|||
|
public string ServiceLength { get; set; }
|
|||
|
}
|
|||
|
|
|||
|
public class PFCount
|
|||
|
{
|
|||
|
public string PFAmount { get; set; }
|
|||
|
public string CPFAmount { get; set; }
|
|||
|
public string PFLoan { get; set; }
|
|||
|
public string PFLoanInterest { get; set; }
|
|||
|
public string PFLaps { get; set; }
|
|||
|
public string WPPFAmount { get; set; }
|
|||
|
public string WPPFTaxAmount { get; set; }
|
|||
|
}
|
|||
|
|
|||
|
#region IFSTran Service
|
|||
|
|
|||
|
public interface IFSTranService
|
|||
|
{
|
|||
|
FSTran Get(int id);
|
|||
|
FSTran GetWithEmpID(int nEmpID);
|
|||
|
List<FSTran> Get();
|
|||
|
List<FSTran> Get(EnumStatus status);
|
|||
|
List<FSTran> Get(DateTime dFromDate, DateTime dToDate, bool withDetail);
|
|||
|
List<FSTran> Get(string sEmpIDs);
|
|||
|
int Save(FSTran item);
|
|||
|
void Delete(int id);
|
|||
|
double GetPFAmount(string sEmployeeNo);
|
|||
|
FSTran GetByEmpdId(int nEmpID);
|
|||
|
DataSet GetEmpPaymentAdvice(int settlementAdviceId);
|
|||
|
List<IncomeTax> CalculateTax(FSTran otran, int userID, int payrolltypeid);
|
|||
|
List<FSTran> GetByEmpIdForRegEmployee(int empid);
|
|||
|
}
|
|||
|
|
|||
|
#endregion
|
|||
|
}
|