EchoTex_Payroll/HRM.BO/PMP/PeerAppraisal.cs

231 lines
7.6 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 Ease.CoreV35;
using HRM.BO;
namespace HRM.BO
{
public class PeerAppraisal : BasicBaseObject
{
#region Constructor
public PeerAppraisal()
{
Competency = 0;
Cooparation = 0;
Resourcefulness = 0;
Productivity = 0;
Leadership = 0;
OverallRating = 0.0;
Remarks = string.Empty;
}
#endregion
#region Properties
public int EmployeeID { get; set; }
public int PMPYearID { get; set; }
public int AppraiserID { get; set; }
public int Competency { get; set; }
public int Cooparation { get; set; }
public int Resourcefulness { get; set; }
public int Productivity { get; set; }
public int Leadership { get; set; }
public double OverallRating { get; set; }
public string Remarks { get; set; }
public DateTime AppraisalDate { get; set; }
#endregion
//#region Service Factory IPMPProcessService : IPeerAppraisalService
//internal static IPeerAppraisalService Service
//{
// get { return Services.Factory.CreateService<IPeerAppraisalService>(typeof(IPeerAppraisalService)); }
//}
//#endregion
//#region Functions
//public static PeerAppraisal Get(int nID)
//{
// PeerAppraisal oPeerAppraisal = null;
// #region Cache Header
// oPeerAppraisal = (PeerAppraisal)_cache["Get", nID];
// if (oPeerAppraisal != null)
// return oPeerAppraisal;
// #endregion
// oPeerAppraisal = PeerAppraisal.Service.Get(nID);
// #region Cache Footer
// _cache.Add(oPeerAppraisal, "Get", nID);
// #endregion
// return oPeerAppraisal;
//}
//public static PeerAppraisal Get(int EmployeeID, int AppraisalID, int PMPYearID)
//{
// PeerAppraisal oPeerAppraisal = null;
// #region Cache Header
// oPeerAppraisal = (PeerAppraisal)_cache["Get", EmployeeID, AppraisalID, PMPYearID];
// if (oPeerAppraisal != null)
// return oPeerAppraisal;
// #endregion
// oPeerAppraisal = PeerAppraisal.Service.Get(EmployeeID, AppraisalID, PMPYearID);
// #region Cache Footer
// _cache.Add(oPeerAppraisal, "Get", EmployeeID, AppraisalID, PMPYearID);
// #endregion
// return oPeerAppraisal;
//}
//public static PeerAppraisal GetByEmpIdAppraiserId(int EmployeeID, int AppraisalID, int PmpYearID)
//{
// PeerAppraisal oPeerAppraisal = null;
// #region Cache Header
// oPeerAppraisal = (PeerAppraisal)_cache["GetByEmpIdAppraiserId", EmployeeID, AppraisalID];
// if (oPeerAppraisal != null)
// return oPeerAppraisal;
// #endregion
// oPeerAppraisal = PeerAppraisal.Service.GetByEmpIdAppraiserId(EmployeeID, AppraisalID, PmpYearID);
// #region Cache Footer
// _cache.Add(oPeerAppraisal, "GetByEmpIdAppraiserId", EmployeeID, AppraisalID);
// #endregion
// return oPeerAppraisal;
//}
//public static List<PeerAppraisal> GetByAppraiserId(int appraisalID, int pMPYearID)
//{
// List<PeerAppraisal> oPeerAppraisal = null;
// #region Cache Header
// oPeerAppraisal = (List<PeerAppraisal>)_cache["GetByAppraiserId", appraisalID];
// if (oPeerAppraisal != null)
// return oPeerAppraisal;
// #endregion
// oPeerAppraisal = PeerAppraisal.Service.GetByAppraiserId(appraisalID,pMPYearID);
// #region Cache Footer
// _cache.Add(oPeerAppraisal, "GetByAppraiserId", appraisalID);
// #endregion
// return oPeerAppraisal;
//}
//public static List<PeerAppraisal> GetByEmployeeID(int nID)
//{
// List<PeerAppraisal> oPeerAppraisal = null;
// #region Cache Header
// oPeerAppraisal = (List<PeerAppraisal>)_cache["GetByEmployeeID", nID];
// if (oPeerAppraisal != null)
// return oPeerAppraisal;
// #endregion
// oPeerAppraisal = PeerAppraisal.Service.GetByEmployeeID(nID);
// #region Cache Footer
// _cache.Add(oPeerAppraisal, "GetByEmployeeID", nID);
// #endregion
// return oPeerAppraisal;
//}
//public static List<Employee> GetEmployeeByPeerAppraisalsEmpId(int nID, int pmpYearID)
//{
// List<Employee> oPeerAppraisal = null;
// #region Cache Header
// oPeerAppraisal = (List<Employee>)_cache["GetEmployeeByPeerAppraisalsEmpId", nID, pmpYearID];
// if (oPeerAppraisal != null)
// return oPeerAppraisal;
// #endregion
// oPeerAppraisal = PeerAppraisal.Service.GetEmployeeByPeerAppraisalsEmpId(nID, pmpYearID);
// #region Cache Footer
// _cache.Add(oPeerAppraisal, "GetEmployeeByPeerAppraisalsEmpId", nID, pmpYearID);
// #endregion
// return oPeerAppraisal;
//}
//public static List<PeerAppraisal> Get()
//{
// #region Cache Header
// List<PeerAppraisal> oPeerAppraisal = _cache["Get"] as List<PeerAppraisal>;
// if (oPeerAppraisal != null)
// return oPeerAppraisal;
// #endregion
// try
// {
// oPeerAppraisal = Service.Get();
// }
// catch (ServiceException e)
// {
// throw new Exception(e.Message, e);
// }
// #region Cache Footer
// _cache.Add(oPeerAppraisal, "Get");
// #endregion
// return oPeerAppraisal;
//}
//public static List<PeerAppraisal> GetByPmpYearId(int pmpYearId)
//{
// List<PeerAppraisal> oPeerAppraisal = new List<PeerAppraisal>();
// try
// {
// oPeerAppraisal = Service.GetByPmpYearId(pmpYearId);
// }
// catch (ServiceException e)
// {
// throw new Exception(e.Message, e);
// }
// return oPeerAppraisal;
//}
//public int Save()
//{
// this.SetAuditTrailProperties();
// return PeerAppraisal.Service.Save(this);
//}
//public voint SavePeerApprisals(List<PeerAppraisal> peerApprisals)
//{
// this.SetAuditTrailProperties();
// PeerAppraisal.Service.SavePeerApprisals(peerApprisals);
//}
//public voint Delete(int id)
//{
// PeerAppraisal.Service.Delete(id);
//}
//#endregion
}
#region IPeerAppraisalService Service
public interface IPeerAppraisalService
{
PeerAppraisal Get(int id);
PeerAppraisal Get(int EmployeeID, int AppraisalID, int PMPYearID);
PeerAppraisal GetByEmpIdAppraiserId(int EmployeeID, int AppraisalID, int PmpYearID);
List<PeerAppraisal> GetByEmployeeID(int nID);
List<Employee> GetEmployeeByPeerAppraisalsEmpId(int nID, int pmpYearID);
List<PeerAppraisal> Get();
List<PeerAppraisal> GetByPmpYearId(int pmpYearId);
List<PeerAppraisal> GetByAppraiserId(int appraisalID, int pMPYearID);
int Save(PeerAppraisal item);
void SavePeerApprisals(List<PeerAppraisal> peerApprisals);
void Delete(int id);
}
#endregion
}