EchoTex_Payroll/HRM.BO/Gratuity/ESBProvision.cs

206 lines
5.9 KiB
C#
Raw Permalink Normal View History

2024-10-14 10:01:49 +06:00
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
namespace HRM.BO
{
#region ESBProvision
public class ESBProvision : BasicBaseObject
{
#region Constructor
public ESBProvision()
{
EmployeeID = 0;
ProcessMonthDate = DateTime.MinValue;
SalaryMonthlyID = 0;
Provision = 0.0;
ProvisionOne = 0.0;
UserID = 0;
ProvisionTwo = 0.0;
}
#endregion
#region Properties
public int EmployeeID { get; set; }
public DateTime ProcessMonthDate { get; set; }
public int SalaryMonthlyID { get; set; }
public int UserID { get; set; }
public Double Provision { get; set; }
public Double ProvisionOne { get; set; }
public Double ProvisionTwo { get; set; }
//#region Service Factory IBranchService : IBranchService
//internal static IESBProvisionService Service
//{
// get { return Services.Factory.CreateService<IESBProvisionService>(typeof(IESBProvisionService)); }
//}
//#endregion
#endregion
//#region Functions
//public static ESBProvision Get(ID nID)
//{
// ESBProvision oESBProvision = null;
// #region Cache Header
// oESBProvision = (ESBProvision)_cache["Get", nID];
// if (oESBProvision != null)
// return oESBProvision;
// #endregion
// oESBProvision = ESBProvision.Service.Get(nID);
// #region Cache Footer
// _cache.Add(oESBProvision, "Get", nID);
// #endregion
// return oESBProvision;
//}
//public static List<ESBProvision> GetProvision(DateTime dFromDate, DateTime dToDate)
//{
// #region Cache Header
// List<ESBProvision> oESBProvision = _cache["GetProvision", dFromDate, dToDate] as List<ESBProvision>;
// if (oESBProvision != null)
// return oESBProvision;
// #endregion
// try
// {
// oESBProvision = Service.GetProvision(dFromDate, dToDate);
// }
// catch (ServiceException e)
// {
// throw new Exception(e.Message, e);
// }
// #region Cache Footer
// _cache.Add(oESBProvision, "GetProvision", dFromDate, dToDate);
// #endregion
// return oESBProvision;
//}
//public static List<ESBProvision> GetProvision(int EmployeeID, DateTime dFromDate, DateTime dToDate)
//{
// #region Cache Header
// List<ESBProvision> oESBProvision = _cache["GetProvision", EmployeeID, dFromDate, dToDate] as List<ESBProvision>;
// if (oESBProvision != null)
// return oESBProvision;
// #endregion
// try
// {
// oESBProvision = Service.GetProvision(EmployeeID, dFromDate, dToDate);
// }
// catch (ServiceException e)
// {
// throw new Exception(e.Message, e);
// }
// #region Cache Footer
// _cache.Add(oESBProvision, "GetProvision", EmployeeID, dFromDate, dToDate);
// #endregion
// return oESBProvision;
//}
//public static double GetOpeningBalance(int nEmpID, DateTime dFromDate)
//{
// double nAmount = 0.0;
// nAmount = ESBProvision.Service.GetOpeningBalance(nEmpID, dFromDate);
// return nAmount;
//}
//public static DataSet GetCumulativeProv(DateTime dSMonthDate)
//{
// DataSet ds = null;
// try
// {
// ds = Service.GetCumulativeProv(dSMonthDate);
// }
// catch (Exception e)
// {
// throw new Exception(e.Message, e);
// }
// return ds;
//}
//public ID Save()
//{
// return ESBProvision.Service.Save(this);
//}
//public ID Save(TransactionContext tc)
//{
// return ESBProvision.Service.Save(tc, this);
//}
//public void Delete(ID nEmpID, ID nSalaryMonthlyID)
//{
// ESBProvision.Service.Delete(nEmpID, nSalaryMonthlyID);
//}
//public static List<ESBProvision> GetProvision(string sEmpID, DateTime GratuityMonth)
//{
// #region Cache Header
// List<ESBProvision> oESBProvision = _cache["GetProvision", sEmpID, GratuityMonth] as List<ESBProvision>;
// if (oESBProvision != null)
// return oESBProvision;
// #endregion
// try
// {
// oESBProvision = Service.GetProvision(sEmpID, GratuityMonth);
// }
// catch (ServiceException e)
// {
// throw new Exception(e.Message, e);
// }
// #region Cache Footer
// _cache.Add(oESBProvision, "GetProvision", sEmpID, GratuityMonth);
// #endregion
// return oESBProvision;
//}
//#endregion
}
#endregion
//#region IBranch Service
//public interface IESBProvisionService
//{
// ESBProvision Get(ID id);
// List<ESBProvision> GetProvision(DateTime dFromDate, DateTime dToDate);
// List<ESBProvision> GetProvision(int EmployeeID, DateTime dFromDate, DateTime dToDate);
// DataSet GetCumulativeProv(DateTime dSMonthDate);
// List<ESBProvision> GetProvision(string sEmpID, DateTime GratuityMonth);
// double GetOpeningBalance(int nEmpID, DateTime dFromDate);
// ID Save(ESBProvision item);
// ID Save(TransactionContext tc, ESBProvision item);
// void Delete(ID nEmpID, ID nSalaryMonthlyID);
//}
//#endregion
}