EchoTex_Payroll/HRM.BO/Bonus/DolarRate.cs

323 lines
7.4 KiB
C#
Raw Normal View History

2024-10-14 10:01:49 +06:00
using Ease.Core.Model;
using System;
using System.Collections.Generic;
using System.Data;
namespace HRM.BO
{
public class DolarRate : AuditTrailBase
{
#region Constructor
public DolarRate()
{
_monthDate = DateTime.MinValue;
_rate = 0;
_amount = 0;
_dAPACode = string.Empty;
_dDescription = string.Empty;
_dAccountNo = string.Empty;
_cAPACode = string.Empty;
_cDescription = string.Empty;
_cAccountNo = string.Empty;
_HBInterestRate = 0;
_PersonalInterestRate = 0;
_VehicleInterestRate = 0;
}
#endregion
#region Properties
#region HBInterestRate : double
private double _HBInterestRate;
public double HBInterestRate
{
get { return _HBInterestRate; }
set { _HBInterestRate = value; }
}
#endregion
#region PersonalInterestRate : double
private double _PersonalInterestRate;
public double PersonalInterestRate
{
get { return _PersonalInterestRate; }
set { _PersonalInterestRate = value; }
}
#endregion
#region VehicleInterestRate : double
private double _VehicleInterestRate;
public double VehicleInterestRate
{
get { return _VehicleInterestRate; }
set { _VehicleInterestRate = value; }
}
#endregion
#region MonthDate : DateTime
private DateTime _monthDate;
public DateTime MonthDate
{
get { return _monthDate; }
set { _monthDate = value; }
}
#endregion
#region Rate : double
private double _rate;
public double Rate
{
get { return _rate; }
set { _rate = value; }
}
#endregion
#region Amount : double
private double _amount;
public double Amount
{
get { return _amount; }
set { _amount = value; }
}
#endregion
#region DAPACode : string
private string _dAPACode;
public string DAPACode
{
get { return _dAPACode; }
set { _dAPACode = value; }
}
#endregion
#region DDescription : string
private string _dDescription;
public string DDescription
{
get { return _dDescription; }
set { _dDescription = value; }
}
#endregion
#region DAccountNo : string
private string _dAccountNo;
public string DAccountNo
{
get { return _dAccountNo; }
set { _dAccountNo = value; }
}
#endregion
#region CAPACode : string
private string _cAPACode;
public string CAPACode
{
get { return _cAPACode; }
set { _cAPACode = value; }
}
#endregion
#region CDescription : string
private string _cDescription;
public string CDescription
{
get { return _cDescription; }
set { _cDescription = value; }
}
#endregion
#region CAccountNo : string
private string _cAccountNo;
public string CAccountNo
{
get { return _cAccountNo; }
set { _cAccountNo = value; }
}
#endregion
#region Service Factory IPFTransactionService : IPFTransactionService
internal static IDolarRateService Service
{
get { return Services.Factory.CreateService<IDolarRateService>(typeof(IDolarRateService)); }
}
#endregion
#endregion
// #region Functions
// public DolarRate Get(DateTime dMonthDate)
// {
// DolarRate oDolarRate = null;
// #region Cache Header
// oDolarRate = (DolarRate)_cache["Get", dMonthDate];
// if (oDolarRate != null)
// return oDolarRate;
// #endregion
// oDolarRate = DolarRate.Service.Get(dMonthDate);
// #region Cache Footer
// _cache.Add(oDolarRate, "Get", dMonthDate);
// #endregion
// return oDolarRate;
// }
// public static List<DolarRate> Get()
// {
// #region cache header
// List<DolarRate> DolarRates = _cache["Get"] as List<DolarRate>;
// if (DolarRates != null)
// return DolarRates;
// #endregion
// try
// {
// DolarRates = Service.Get();
// }
// catch (ServiceException e)
// {
// throw new Exception(e.Message, e);
// }
// #region cache footer
// _cache.Add(DolarRates, "Get");
// #endregion
// return DolarRates;
// }
// public static List<DolarRate> GetLastSixMonth()
// {
// #region cache header
// List<DolarRate> DolarRates = _cache["GetLastSixMonth"] as List<DolarRate>;
// if (DolarRates != null)
// return DolarRates;
// #endregion
// try
// {
// DolarRates = Service.GetLastSixMonth();
// }
// catch (ServiceException e)
// {
// throw new Exception(e.Message, e);
// }
// #region cache footer
// _cache.Add(DolarRates, "GetLastSixMonth");
// #endregion
// return DolarRates;
// }
////public static List<DolarRate> GetByCategory(int categoryID)
//// {
//// #region Cache Header
//// List<DolarRate> DolarRates = _cache["Get", categoryID] as List<DolarRate>;
//// if (DolarRates != null)
//// return DolarRates;
//// #endregion
//// try
//// {
//// DolarRates = Service.GetByCategory(categoryID);
//// }
//// catch (ServiceException e)
//// {
//// throw new Exception(e.Message, e);
//// }
//// #region Cache Footer
//// _cache.Add(DolarRates, "Get", categoryID);
//// #endregion
//// return DolarRates;
//// }
// //public bool IsTagged()
// //{
// // if (this.IsNew || this.ID.IsUnassigned)
// // return false;
// // return Service.IsTagged(this.ID);
// //}
// public void Save()
// {
// base.SetAuditTrailProperties();
// DolarRate.Service.Save(this);
// }
// public void Delete(DateTime dMonthDate)
// {
// DolarRate.Service.Delete(dMonthDate);
// }
// public void Delete()
// {
// DolarRate.Service.Delete(ID);
// }
// #endregion
}
#region IDolarRate Service
public interface IDolarRateService
{
DolarRate Get(DateTime dMonthDate);
List<DolarRate> Get();
List<DolarRate> GetLastSixMonth();
//List<DolarRate> GetByCategory(int categoryID);
void Save(DolarRate item);
void Delete(DateTime dMonthDate);
void Delete(int ID);
}
#endregion
}