using Ease.Core.Model; using System; using System.Collections.Generic; using System.Data; namespace HRM.BO { public class SalaryEmpCostCenter :AuditTrailBase { #region Constructor public SalaryEmpCostCenter() { _salaryMontlyID = 0; _costCenterID = 0; _percentage = 0.0; _employeeID = 0; } #endregion #region Properties #region salaryMontlyID : ID private int _salaryMontlyID; public int SalaryMontlyID { get { return _salaryMontlyID; } set { _salaryMontlyID = value; } } #endregion #region costCenterID : ID private int _costCenterID; public int CostCenterID { get { return _costCenterID; } set { _costCenterID = value; } } #endregion #region percentage : double private double _percentage; public double Percentage { get { return _percentage; } set { _percentage = value; } } #endregion #region employeeID : ID private int _employeeID; public int EmployeeID { get { return _employeeID; } set { _employeeID = value; } } #endregion #region Service Factory ISalaryMonthlyService : ISalaryMonthlyService internal static ISalaryMonthlyService Service { get { return Services.Factory.CreateService(typeof(ISalaryMonthlyService)); } } #endregion #endregion //#region Functions ////public static List GetEmpCostCenter(int nID) ////{ //// List oSalaryEmpCostCenter = null; //// #region Cache Header //// oSalaryEmpCostCenter = (List)_cache["GetEmpCostCenter", nID]; //// if (oSalaryEmpCostCenter != null) //// return oSalaryEmpCostCenter; //// #endregion //// oSalaryEmpCostCenter = SalaryMonthly.Service.GetEmpCostCenter(nID); //// #region Cache Footer //// _cache.Add(oSalaryEmpCostCenter, "GetEmpCostCenter", nID); //// #endregion //// return oSalaryEmpCostCenter; ////} //public static double InvolvedPercent(List salaryEmpCostCenters, int nCostCenterID) //{ // foreach (SalaryEmpCostCenter item in salaryEmpCostCenters) // { // if (item.CostCenterID == nCostCenterID) // { // return item.Percentage; // } // } // return 0; //} //public static double InvolvedPercent(List salaryEmpCostCenters, int nCostCenterID, int employeeID) //{ // foreach (SalaryEmpCostCenter item in salaryEmpCostCenters) // { // if (item.CostCenterID == nCostCenterID && item.EmployeeID == employeeID) // { // return item.Percentage; // } // } // return 0; //} ////public static int GetEmpID(List salaryEmpCostCenters, int nCostCenterID) ////{ //// foreach (SalaryEmpCostCenter item in salaryEmpCostCenters) //// { //// if (item.CostCenterID == nCostCenterID) //// { //// return item.EmployeeID.Integer; //// } //// } //// return 0; ////} //#endregion } }