using Ease.Core.Model; using Org.BouncyCastle.Asn1.Mozilla; using System; using System.Collections.Generic; using System.Data; namespace HRM.BO { public class ObjectiveSet : BasicBaseObject { public ObjectiveSet() { this.OverallOBRating = 0.00; this.OverallValuesRating = 0.0; this.OBEmpComplete = EnumObjectiveFlowStatus.Draft_For_Employee; this.obLmComplete = EnumObjectiveFlowStatus.Not_Yet_Initiated; this.MYEmpComplete = EnumObjectiveFlowStatus.Not_Yet_Initiated; this.MYLMComplete = EnumObjectiveFlowStatus.Not_Yet_Initiated; ; this.YEEmpComplete = EnumObjectiveFlowStatus.Not_Yet_Initiated; ; this.YELmComplete = EnumObjectiveFlowStatus.Not_Yet_Initiated; this.YESecondLMComplete = EnumObjectiveFlowStatus.Not_Yet_Initiated; this.DevelopmentPlanSubmit = EnumObjectiveFlowStatus.Not_Yet_Initiated; this.LMDevelopmentPlanSubmit = EnumObjectiveFlowStatus.Not_Yet_Initiated; this.OverallEmpComments = string.Empty; this.OverallLMComments = string.Empty; this.OverallSecondLMComments = string.Empty; this.OBEmpCompleteDate = null; this.obLmCompleteDate = null; this.IsEditing = false; this.ProgressStatus = 0.0; this.UnreadEmployeeMessage = 0; this.MYEmpAgreed = EnumObjectiveFlowStatus.Not_yet_Agreed; this.YEEmpAgreed = EnumObjectiveFlowStatus.Not_yet_Agreed; this.DirectorAgreed = false; this.IsLMRecommend = false; this.OverallDirectorComments = string.Empty; this.SecondLMAgreed = false; this.IsSecondLMRecommend = false; this.IsDirectorRecommend = false; this.YEDirectorCmplete = EnumObjectiveFlowStatus.Not_Yet_Initiated; this.NotificationStatus = EnumPMSNotificationStatus.None; this.ObjectiveUpdateStatus = EnumObjectiveFlowStatus.Not_Yet_Initiated; } public int PMPYearID { get; set; } public int EmployeeID { get; set; } public int PayrollTypeID { get; set; } public int lmID { get; set; } // objective setting public EnumObjectiveFlowStatus OBEmpComplete { get; set; } public EnumObjectiveFlowStatus obLmComplete { get; set; } public EnumObjectiveFlowStatus obSecondLmComplete { get; set; } public DateTime? OBEmpCompleteDate { get; set; } public DateTime? obLmCompleteDate { get; set; } public DateTime? obSecondLmCompleteDate { get; set; } //Mid Year Review public EnumObjectiveFlowStatus MYEmpComplete { get; set; } public EnumObjectiveFlowStatus MYLMComplete { get; set; } public DateTime? MYEmpCompleteDate { get; set; } public DateTime? MYLMCompleteDate { get; set; } public EnumObjectiveFlowStatus MYEmpAgreed { get; set; } // Year End Review public EnumObjectiveFlowStatus editApproveStatusLM { get; set; } public EnumObjectiveFlowStatus YEEmpComplete { get; set; } public EnumObjectiveFlowStatus YELmComplete { get; set; } public EnumObjectiveFlowStatus YESecondLMComplete { get; set; } public DateTime? YEEmpCompleteDate { get; set; } public DateTime YELMCompleteDate { get; set; } public DateTime YESecondLMCompleteDate { get; set; } public EnumObjectiveFlowStatus YEEmpAgreed { get; set; } public EnumObjectiveFlowStatus YEDirectorCmplete { get; set; } // Year end self assessment public double EMPObjAchive { get; set; } // for example 70% of total objective percentage total public double EMPValueAchive { get; set; } // for example 70% of total value percentage total public double EMPObjRating { get; set; } // rating after slab, 3 public double EMPValueRating { get; set; } // rating after slab 4 public double EMPRating { get; set; } // overall rating after slab, 3.5 // Year end line manager assessment public double LMObjAchive { get; set; } public double LMValueAchive { get; set; } public double LMObjRating { get; set; } public double LMValueRating { get; set; } public double LMRating { get; set; } // Year end second line manager assessment public double? SecondLMAchive { get; set; } public double? SecondLMObjRating { get; set; } public double? SecondLMValueRating { get; set; } public double? SecondLMOverallRating { get; set; } public double OverallOBAchive { get; set; } public double OverallOBRating { get; set; } public double OverallValueAchive { get; set; } public double OverallValuesRating { get; set; } public double OverallPMPRating { get; set; } public EnumObjectiveFlowStatus DevelopmentPlanSubmit { get; set; } public EnumObjectiveFlowStatus DevPlanEmpStatus { get; set; } public EnumObjectiveFlowStatus DevPlanLMStatus { get; set; } public EnumObjectiveFlowStatus LMDevelopmentPlanSubmit { get; set; } public string OverallEmpComments { get; set; } public string OverallLMComments { get; set; } public string OverallSecondLMComments { get; set; } public string OverallDirectorComments { get; set; } public string RevertComment { get; set; } public double? OverAllAchievement { get; set; } public string OverAllRating { get; set; } public EnumAssessRating? ObjAssessRatingLM { get; set; } public EnumAssessRating? LeadershipAssessRatingLM { get; set; } public string AssessmentRemarksLM { get; set; } public bool AssessmentSubmitLM { get; set; } public EnumAssessRating? ObjAssessRating2ndLM { get; set; } public EnumAssessRating? LeadershipAssessRating2ndLM { get; set; } public string AssessmentRemarks2ndLM { get; set; } public bool AssessmentSubmit2ndLM { get; set; } public bool DirectorAgreed { get; set; } public bool IsLMRecommend { get; set; } public bool SecondLMAgreed { get; set; } public bool IsSecondLMRecommend { get; set; } public bool IsDirectorRecommend { get; set; } public int AuthorizedOBEmployeeID { get; set; } public int AuthorizedDPEmployeeID { get; set; } public int AuthorizedMYEmployeeID { get; set; } public int AuthorizedYEEmployeeID { get; set; } public EnumPMSNotificationStatus NotificationStatus { get; set; } public bool IsEditing { get; set; } public ObjectiveSetRemarks ObjectiveSetRemarks { get; set; } public List Objectives { get; set; } public List ObjectiveSetRemarksList { get; set; } public List YearEndRecomendations { get; set; } public List ValuesRatings { get; set; } public PMPProcess PMPProcess { get; set; } //public double? SecondLMAchive { get; set; } //public double? SecondLMObjRating { get; set; } //public double? SecondLMValueRating { get; set; } //public double? SecondLMOverallRating { get; set; } public double ProgressStatus { get; set; } public int UnreadEmployeeMessage { get; set; } public int? IDPLMID { get; set; } public DateTime? IDPLMRDate { get; set; } public int? IDPLMUserID { get; set; } public enumIDPStatus? IDPLMStatus { get; set; } public int? IDPSecondLMID { get; set; } public DateTime? IDPSecondLMRDate { get; set; } public enumIDPStatus? IDPSecondLMStatus { get; set; } public DateTime? IDPEmployeeDate { get; set; } public enumIDPStatus? IDPEmployeeStatus { get; set; } public int PreCalibrationRating { get; set; } public string KeyPerformance { get; set; } public string Strength { get; set; } public string Opportunity { get; set; } public string IDPLMRemarks { get; set; } public EnumObjectiveFlowStatus? ObjectiveUpdateStatus { get; set; } public string? CareerExpectations { get; set; } /// /// Transient (not persisted on ObjectiveSet). The line manager's reason for rejecting a /// pending outside-of-settings KPI change; carried through RejectObjectiveHistory only. /// public string ObjectiveUpdateRejectRemarks { get; set; } } #region IObjectiveSetService Service public interface IObjectiveSetService { List Get(); ObjectiveSet Get(int id); ObjectiveSet GetObjectiveSetWithChild(int empId, int pmpId, bool withMessage); int Save(ObjectiveSet item); void SubmitObjectivetoLineManager(ObjectiveSet item, int userID); void ApproveObjectiveByLineManager(ObjectiveSet item, int userID); void ApproveObjectiveBySecondLineManager(ObjectiveSet item, int userID); void RevertObjectiveByLineManager(ObjectiveSet item, int userID); void RevertObjectiveBySecondLineManager(ObjectiveSet item, int userID); void SubmitMidYearReviewtoLineManager(ObjectiveSet item, int userID); void ApproveMidYearReviewByLineManager(ObjectiveSet item, int userID); void RevertMidYearReviewByLineManager(ObjectiveSet item, int userID); void SubmitYearEndReviewtoLineManager(ObjectiveSet item, int userID); void YearEndReviewByLineManager(ObjectiveSet item, int userID); void SubmitSecondLMassessment(ObjectiveSet item, int userID); void EndEditModeOfObjective(ObjectiveSet item); void SaveWithChild(ObjectiveSet item); void Delete(int id); List GetByObjectiveSetID(int iD); List GetByPMPYear(int nPMPYearID, string InEmpSQL); List GetByPMPYear(int nPMPYearID); List GetByPMPYear(int nPMPYearID, int nPayrollTypeID); List GetObjectiveSetRemarks(int iD); List GetYearEndRecomendations(int iD); ObjectiveSet GetByEmployeeID(int EmpiD, int pmpYID); List GetByEmployeeID(int EmpiD); DataTable GetByLineManagerID(int pmpYear,bool isFirstLM, int LineManagerID); List GetByEmpIds(int pmpYearId, string empIds); List GetObjectiveSetByDepartment(int deptId, int pmpYearId); void UpdateObjectivesetForReplace(ObjectiveSet sObjName); void UpdateObjectivesetStatus(int objID, EnumPMSNotificationStatus status); void UpdateObjectiveForReplace(Objective sObjName); void UpdateObjectiveEmployeeForReplace(ObjectiveEmployees sObjName); void UpdateOldObjectiveFlag(Objective sObj); DataTable GetObjectivesetByPMPyears(string pmpYearIDs, int payrolltypeID); List GetByPMPYearForLeadership(int nPMPYearID, bool? isCompleted); void SubmitDevelopmentPlan(int objectiveSetID, bool isFirstLM, enumIDPStatus status, string CareerExpectations); void approveDevelopmentPlan(int objectiveSetID, int currentUserID); void rejectDevelopmentPlan(int objectiveSetID, int currentUserID); DataTable GetSearchIDPDashboard(int? pmpYearID, int? lmid, int? secondLmid, bool? isCompleted, bool? isNotYetCompleted, string type); DataTable GetByLoggedInEmployee(int pmpYear, bool isEmployee, int employeeid); void UpdateLineManagerRemarks(int objectivesetid, string remarks); } #endregion }