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(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 GetByAppraiserId(int appraisalID, int pMPYearID) //{ // List oPeerAppraisal = null; // #region Cache Header // oPeerAppraisal = (List)_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 GetByEmployeeID(int nID) //{ // List oPeerAppraisal = null; // #region Cache Header // oPeerAppraisal = (List)_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 GetEmployeeByPeerAppraisalsEmpId(int nID, int pmpYearID) //{ // List oPeerAppraisal = null; // #region Cache Header // oPeerAppraisal = (List)_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 Get() //{ // #region Cache Header // List oPeerAppraisal = _cache["Get"] as List; // 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 GetByPmpYearId(int pmpYearId) //{ // List oPeerAppraisal = new List(); // 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 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 GetByEmployeeID(int nID); List GetEmployeeByPeerAppraisalsEmpId(int nID, int pmpYearID); List Get(); List GetByPmpYearId(int pmpYearId); List GetByAppraiserId(int appraisalID, int pMPYearID); int Save(PeerAppraisal item); void SavePeerApprisals(List peerApprisals); void Delete(int id); } #endregion }