284 lines
7.4 KiB
C#
284 lines
7.4 KiB
C#
|
|
using Ease.Core.Model;
|
|
|
|
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Data;
|
|
|
|
namespace HRM.BO
|
|
{
|
|
#region FSTranDetail
|
|
|
|
public class FSTranDetail : AuditTrailBase
|
|
{
|
|
#region Declarations
|
|
|
|
private double _amount;
|
|
private EnumValueType _amountType;
|
|
private double _changedValue;
|
|
private string _description;
|
|
private EnumFSTranType _fsTranType;
|
|
private EnumFSItemCode _itemCode;
|
|
private int _itemID;
|
|
private string _remarks;
|
|
private EnumSide _side;
|
|
private int _tranID;
|
|
|
|
#endregion
|
|
|
|
#region Constructor
|
|
|
|
|
|
public FSTranDetail()
|
|
{
|
|
_amount = 0.0;
|
|
_amountType = EnumValueType.Amount;
|
|
_changedValue = 0.0;
|
|
_description = "";
|
|
_fsTranType = EnumFSTranType.FSReceivable;
|
|
_itemCode = EnumFSItemCode.Gross;
|
|
_remarks = "";
|
|
_itemID = 0;
|
|
_side = EnumSide.Add;
|
|
_tranID = 0;
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region Properties
|
|
|
|
#region Amount : double
|
|
public double Amount
|
|
{
|
|
get { return _amount; }
|
|
set { _amount = value; }
|
|
}
|
|
#endregion
|
|
#region AmountType : EnumValueType
|
|
public EnumValueType AmountType
|
|
{
|
|
get { return _amountType; }
|
|
set
|
|
{
|
|
|
|
_amountType = value;
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
#region FsTranType : EnumFSTranType
|
|
public EnumFSTranType FsTranType
|
|
{
|
|
get { return _fsTranType; }
|
|
set
|
|
{
|
|
|
|
_fsTranType = value;
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
#region ItemCode : EnumFSItemCode
|
|
public EnumFSItemCode ItemCode
|
|
{
|
|
get { return _itemCode; }
|
|
set
|
|
{
|
|
|
|
_itemCode = value;
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
#region Side : EnumSide
|
|
public EnumSide Side
|
|
{
|
|
get { return _side; }
|
|
set
|
|
{
|
|
|
|
_side = value;
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
#region TranID
|
|
public int TranID
|
|
{
|
|
get
|
|
{
|
|
return _tranID;
|
|
}
|
|
set
|
|
{
|
|
|
|
_tranID = value;
|
|
}
|
|
}
|
|
#endregion
|
|
#region Remarks : string
|
|
public string Remarks
|
|
{
|
|
get { return _remarks; }
|
|
set { _remarks = value; }
|
|
}
|
|
#endregion
|
|
#region Description : string
|
|
public string Description
|
|
{
|
|
get { return _description; }
|
|
set { _description = value; }
|
|
}
|
|
#endregion
|
|
#region ChangedValue : double
|
|
public double ChangedValue
|
|
{
|
|
get { return _changedValue; }
|
|
set { _changedValue = value; }
|
|
}
|
|
#endregion
|
|
#region ItemID : int
|
|
public int? ItemID { get; set; }
|
|
public int? ReferenceItemID { get; set; }
|
|
#endregion
|
|
|
|
#region Property IncomeTaxItemType : enumIncomeTaxItemType
|
|
|
|
private enumIncomeTaxItemType _incomeTaxItemType;
|
|
public enumIncomeTaxItemType IncomeTaxItemType
|
|
{
|
|
get { return _incomeTaxItemType; }
|
|
set
|
|
{
|
|
|
|
_incomeTaxItemType = value;
|
|
}
|
|
}
|
|
|
|
#endregion Property IncomeTaxItemType : enumIncomeTaxItemType
|
|
|
|
|
|
|
|
//#region Service Factory IFSTranDetailService : IFSTranDetailService
|
|
|
|
//internal static IFSTranDetailService Service
|
|
//{
|
|
// get { return Services.Factory.CreateService<IFSTranDetailService>(typeof(IFSTranDetailService)); }
|
|
//}
|
|
|
|
//#endregion
|
|
|
|
#endregion
|
|
|
|
//#region Functions
|
|
|
|
//public static FSTranDetail Get(int nID)
|
|
//{
|
|
// FSTranDetail oFSTranDetail = null;
|
|
// #region Cache Header
|
|
// oFSTranDetail = (FSTranDetail)_cache["Get", nID];
|
|
// if (oFSTranDetail != null)
|
|
// return oFSTranDetail;
|
|
// #endregion
|
|
// oFSTranDetail = FSTranDetail.Service.Get(nID);
|
|
// #region Cache Footer
|
|
// _cache.Add(oFSTranDetail, "Get", nID);
|
|
// #endregion
|
|
// return oFSTranDetail;
|
|
//}
|
|
|
|
//public static List<FSTranDetail> Get()
|
|
//{
|
|
// #region Cache Header
|
|
// List<FSTranDetail> FSTranDetails = _cache["Get"] as List<FSTranDetail>;
|
|
// if (FSTranDetails != null)
|
|
// return FSTranDetails;
|
|
// #endregion
|
|
// try
|
|
// {
|
|
// FSTranDetails = Service.Get();
|
|
// }
|
|
// catch (ServiceException e)
|
|
// {
|
|
// throw new Exception(e.Message, e);
|
|
// }
|
|
// #region Cache Footer
|
|
// _cache.Add(FSTranDetails, "Get");
|
|
// #endregion
|
|
// return FSTranDetails;
|
|
//}
|
|
//public static List<FSTranDetail> GetDetail(int nTranID)
|
|
//{
|
|
// #region Cache Header
|
|
// List<FSTranDetail> FSTranDetails = _cache["GetDetail", nTranID] as List<FSTranDetail>;
|
|
// if (FSTranDetails != null)
|
|
// return FSTranDetails;
|
|
// #endregion
|
|
// try
|
|
// {
|
|
// FSTranDetails = Service.GetDetail(nTranID);
|
|
// }
|
|
// catch (ServiceException e)
|
|
// {
|
|
// throw new Exception(e.Message, e);
|
|
// }
|
|
// #region Cache Footer
|
|
// _cache.Add(FSTranDetails, "GetDetail", nTranID);
|
|
// #endregion
|
|
// return FSTranDetails;
|
|
//}
|
|
//public static List<FSTranDetail> GetDetailByEmp(int nEmpID)
|
|
//{
|
|
// #region Cache Header
|
|
// List<FSTranDetail> FSTranDetails = _cache["GetDetailByEmp", nEmpID] as List<FSTranDetail>;
|
|
// if (FSTranDetails != null)
|
|
// return FSTranDetails;
|
|
// #endregion
|
|
// try
|
|
// {
|
|
// FSTranDetails = Service.GetDetailByEmp(nEmpID);
|
|
// }
|
|
// catch (ServiceException e)
|
|
// {
|
|
// throw new Exception(e.Message, e);
|
|
// }
|
|
// #region Cache Footer
|
|
// _cache.Add(FSTranDetails, "GetDetailByEmp", nEmpID);
|
|
// #endregion
|
|
// return FSTranDetails;
|
|
//}
|
|
|
|
//public int Save()
|
|
//{
|
|
// this.SetAuditTrailProperties();
|
|
// return FSTranDetail.Service.Save(this);
|
|
//}
|
|
|
|
//public void Delete(int id)
|
|
//{
|
|
// FSTranDetail.Service.Delete(id);
|
|
//}
|
|
//#endregion
|
|
|
|
}
|
|
#endregion
|
|
|
|
#region IFSTranDetail Service
|
|
|
|
public interface IFSTranDetailService
|
|
{
|
|
FSTranDetail Get(int id);
|
|
List<FSTranDetail> GetDetail(int nTranID);
|
|
List<FSTranDetail> GetDetailByEmp(int nEmpID);
|
|
List<FSTranDetail> Get();
|
|
FSTranDetail GetFinalSettlement(int id);
|
|
int Save(FSTranDetail item);
|
|
void Delete(int id);
|
|
void DeleteByUserId(int userId, int trandId);
|
|
List<FSTranDetail> GetDetailAmountType(int nTranID);
|
|
}
|
|
|
|
#endregion
|
|
}
|