237 lines
5.8 KiB
C#
237 lines
5.8 KiB
C#
|
using System;
|
|||
|
using System.Collections.Generic;
|
|||
|
using System.Linq;
|
|||
|
using System.Text;
|
|||
|
using Ease.CoreV35;
|
|||
|
using Ease.CoreV35.Model;
|
|||
|
using Ease.CoreV35.Caching;
|
|||
|
using System.Data.Linq.Mapping;
|
|||
|
|
|||
|
namespace Payroll.BO
|
|||
|
{
|
|||
|
#region SalaryMonthlyDetail
|
|||
|
|
|||
|
[Serializable]
|
|||
|
public class SalaryMonthlyDetail :UpdateAuditTrail
|
|||
|
{
|
|||
|
#region Cache Store
|
|||
|
|
|||
|
private static Cache _cache = new Cache(typeof(SalaryMonthlyDetail));
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
#region Constructor
|
|||
|
|
|||
|
public SalaryMonthlyDetail()
|
|||
|
{
|
|||
|
_salaryMonthlyID = null;
|
|||
|
_itemID = 0;
|
|||
|
_supportID = null;
|
|||
|
_description = string.Empty;
|
|||
|
_position = 0;
|
|||
|
_calculatedAmount = 0;
|
|||
|
_changedAmount = 0;
|
|||
|
_itemCode = 0;
|
|||
|
_ADParamEmployee = null;
|
|||
|
}
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
#region Properties
|
|||
|
|
|||
|
#region salaryMonthlyID : ID
|
|||
|
|
|||
|
private ID _salaryMonthlyID;
|
|||
|
public ID SalaryMonthlyID
|
|||
|
{
|
|||
|
get { return _salaryMonthlyID; }
|
|||
|
set
|
|||
|
{
|
|||
|
base.OnPropertyChange<ID>("salaryMonthlyID", _salaryMonthlyID, value);
|
|||
|
_salaryMonthlyID = value;
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
#region itemID : int
|
|||
|
|
|||
|
private int _itemID;
|
|||
|
public int ItemID
|
|||
|
{
|
|||
|
get { return _itemID; }
|
|||
|
set
|
|||
|
{
|
|||
|
base.OnPropertyChange<int>("itemID", _itemID, value);
|
|||
|
_itemID = value;
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
#region supportID : ID
|
|||
|
|
|||
|
private ID _supportID;
|
|||
|
public ID SupportID
|
|||
|
{
|
|||
|
get { return _supportID; }
|
|||
|
set
|
|||
|
{
|
|||
|
base.OnPropertyChange<ID>("supportID", _supportID, value);
|
|||
|
_supportID = value;
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
#region description : string
|
|||
|
|
|||
|
private string _description;
|
|||
|
public string Description
|
|||
|
{
|
|||
|
get { return _description; }
|
|||
|
set
|
|||
|
{
|
|||
|
base.OnPropertyChange<string>("description", _description, value);
|
|||
|
_description = value;
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
#region position : int
|
|||
|
|
|||
|
private int _position;
|
|||
|
public int Position
|
|||
|
{
|
|||
|
get { return _position; }
|
|||
|
set
|
|||
|
{
|
|||
|
base.OnPropertyChange<int>("position", _position, value);
|
|||
|
_position = value;
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
#region calculatedAmount : double
|
|||
|
|
|||
|
private double _calculatedAmount;
|
|||
|
public double CalculatedAmount
|
|||
|
{
|
|||
|
get { return _calculatedAmount; }
|
|||
|
set
|
|||
|
{
|
|||
|
base.OnPropertyChange<double>("calculatedAmount", _calculatedAmount, value);
|
|||
|
_calculatedAmount = value;
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
#region changedAmount : double
|
|||
|
|
|||
|
private double _changedAmount;
|
|||
|
public double ChangedAmount
|
|||
|
{
|
|||
|
get { return _changedAmount; }
|
|||
|
set
|
|||
|
{
|
|||
|
base.OnPropertyChange<double>("changedAmount", _changedAmount, value);
|
|||
|
_changedAmount = value;
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
#region itemCode : EnumPaySlipItemCode
|
|||
|
|
|||
|
private EnumSalaryItemCode _itemCode;
|
|||
|
public EnumSalaryItemCode ItemCode
|
|||
|
{
|
|||
|
get { return _itemCode; }
|
|||
|
set
|
|||
|
{
|
|||
|
base.OnPropertyChange<short>("itemCode", (short)_itemCode, (short)value);
|
|||
|
_itemCode = value;
|
|||
|
}
|
|||
|
}
|
|||
|
#endregion
|
|||
|
|
|||
|
#region itemGroup : EnumPaySlipItemCode
|
|||
|
|
|||
|
private EnumSalaryGroup _itemGroupCode;
|
|||
|
public EnumSalaryGroup itemGroupCode
|
|||
|
{
|
|||
|
get { return _itemGroupCode; }
|
|||
|
set
|
|||
|
{
|
|||
|
base.OnPropertyChange<short>("ItemGroupCode", (short)_itemGroupCode, (short)value);
|
|||
|
_itemGroupCode = value;
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
private ADParameterEmployee _ADParamEmployee;
|
|||
|
public ADParameterEmployee ADParamEmployee
|
|||
|
{
|
|||
|
get { return _ADParamEmployee; }
|
|||
|
set
|
|||
|
{
|
|||
|
_ADParamEmployee = value;
|
|||
|
}
|
|||
|
}
|
|||
|
#endregion
|
|||
|
|
|||
|
|
|||
|
|
|||
|
#region Service Factory ISalaryMonthlyService : ISalaryMonthlyService
|
|||
|
|
|||
|
internal static ISalaryMonthlyService Service
|
|||
|
{
|
|||
|
get { return Services.Factory.CreateService<ISalaryMonthlyService>(typeof(ISalaryMonthlyService)); }
|
|||
|
}
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
#region Functions
|
|||
|
|
|||
|
|
|||
|
public EnumIncomeTaxItemGroup GetTaxGroupCode()
|
|||
|
{
|
|||
|
EnumIncomeTaxItemGroup itemgroup = EnumIncomeTaxItemGroup.None;
|
|||
|
switch (this.ItemCode)
|
|||
|
{
|
|||
|
case EnumSalaryItemCode.Basic_Salary:
|
|||
|
itemgroup = EnumIncomeTaxItemGroup.Basic_Salary;
|
|||
|
break;
|
|||
|
case EnumSalaryItemCode.Over_Time_Amount:
|
|||
|
itemgroup = EnumIncomeTaxItemGroup.TimeCard;
|
|||
|
break;
|
|||
|
case EnumSalaryItemCode.Bonus:
|
|||
|
itemgroup = EnumIncomeTaxItemGroup.Bonus;
|
|||
|
break;
|
|||
|
case EnumSalaryItemCode.Allowance:
|
|||
|
itemgroup = EnumIncomeTaxItemGroup.Other_Allowance;
|
|||
|
break;
|
|||
|
case EnumSalaryItemCode.Deduction:
|
|||
|
itemgroup = EnumIncomeTaxItemGroup.Other_Allowance;
|
|||
|
break;
|
|||
|
case EnumSalaryItemCode.PF_Contribution:
|
|||
|
itemgroup = EnumIncomeTaxItemGroup.Company_Contri_PF;
|
|||
|
break;
|
|||
|
default:
|
|||
|
break;
|
|||
|
}
|
|||
|
return itemgroup;
|
|||
|
}
|
|||
|
#endregion
|
|||
|
|
|||
|
}
|
|||
|
#endregion
|
|||
|
|
|||
|
}
|