EchoTex_Payroll/HRM.BO/Budget/EmployeeAppraisal.cs

383 lines
8.8 KiB
C#
Raw Normal View History

2024-10-14 10:01:49 +06:00
using Ease.Core.Model;
using System;
using System.Collections.Generic;
using System.Data;
namespace HRM.BO
{
// public enum EnumappStatus
// {
// Not_completed_by_manager=1,
// Already_completed_by_manager=2,
// Not_yet_completed_by_HR=3,
// Alredy_completed_by_HR=4
//Manualy select
// }
public class EmployeeAppraisal : AuditTrailBase
{
#region constructor
public EmployeeAppraisal()
{
_employeeID = 0;
_appraisalYear = DateTime.MinValue;
_MKTSurveyID = 0;
_currentBasic = 0;
_surveyON = EnumSurveyOn.Basic;
_budgetAmount = 0;
_MKTAmount = 0;
_LMID = 0;
_LMChangePercent = 0;
_LMChangeAmount = 0;
_LMRemarks = string.Empty;
_HRApproveID = 0;
_HRChangePercent = 0;
_HRChangeAmount = 0;
_HRRemarks = string.Empty;
_ISLMDone = false;
_ISHRDone = false;
_AppraisalPointID = 0;
_AppraisalPointRate = 0;
}
#endregion
#region Properties
#region EmployeeID
private int _employeeID;
public int EmployeeID
{
get { return _employeeID; }
set { _employeeID = value; }
}
#endregion
#region AppraisalYear
private DateTime _appraisalYear;
public DateTime AppraisalYear
{
get { return _appraisalYear; }
set { _appraisalYear = value; }
}
#endregion
#region MKTSurveyID
private int _MKTSurveyID;
public int MKTSurveyID
{
get { return _MKTSurveyID; }
set { _MKTSurveyID = value; }
}
#endregion
#region CurrentBasic
private double _currentBasic;
public double CurrentBasic
{
get { return _currentBasic; }
set { _currentBasic = value; }
}
#endregion
#region SurveyON
private EnumSurveyOn _surveyON;
public EnumSurveyOn SurveyON
{
get { return _surveyON; }
set { _surveyON = value; }
}
#endregion
#region BudgetAmount
private double _budgetAmount;
public double BudgetAmount
{
get { return _budgetAmount; }
set { _budgetAmount = value; }
}
#endregion
#region MKTAmount
private double _MKTAmount;
public double MKTAmount
{
get { return _MKTAmount; }
set { _MKTAmount = value; }
}
#endregion
#region LMID
private int _LMID;
public int LMID
{
get { return _LMID; }
set { _LMID = value; }
}
#endregion
#region LMChangePercent
private double _LMChangePercent;
public double LMChangePercent
{
get { return _LMChangePercent; }
set { _LMChangePercent = value; }
}
#endregion
#region LMChangeAmount
private double _LMChangeAmount;
public double LMChangeAmount
{
get { return _LMChangeAmount; }
set { _LMChangeAmount = value; }
}
#endregion
#region LMRemarks
private string _LMRemarks;
public string LMRemarks
{
get { return _LMRemarks; }
set { _LMRemarks = value; }
}
#endregion
#region HRApproveID
private int _HRApproveID;
public int HRApproveID
{
get { return _HRApproveID; }
set { _HRApproveID = value; }
}
#endregion
#region HRChangePercent
private double _HRChangePercent;
public double HRChangePercent
{
get { return _HRChangePercent; }
set { _HRChangePercent = value; }
}
#endregion
#region HRChangeAmount
private double _HRChangeAmount;
public double HRChangeAmount
{
get { return _HRChangeAmount; }
set { _HRChangeAmount = value; }
}
#endregion
#region HRRemarks
private string _HRRemarks;
public string HRRemarks
{
get { return _HRRemarks; }
set { _HRRemarks = value; }
}
#endregion
#region ISLMDone
private bool _ISLMDone;
public bool ISLMDone
{
get { return _ISLMDone; }
set { _ISLMDone = value; }
}
#endregion
#region ISHRDone
private bool _ISHRDone;
public bool ISHRDone
{
get { return _ISHRDone; }
set { _ISHRDone = value; }
}
#endregion
#region AppraisalPointID
private int _AppraisalPointID;
public int AppraisalPointID
{
get { return _AppraisalPointID; }
set { _AppraisalPointID = value; }
}
#endregion
#region AppraisalPointRate
private double _AppraisalPointRate;
public double AppraisalPointRate
{
get { return _AppraisalPointRate; }
set { _AppraisalPointRate = value; }
}
#endregion
#endregion
//#region Service Factory IEmployeeAppraisalService : IEmployeeAppraisalService
//internal static IEmployeeAppraisalService Service
//{
// get { return Services.Factory.CreateService<IEmployeeAppraisalService>(typeof(IEmployeeAppraisalService)); }
//}
//#endregion
public AppraisalPoint AppraisalPoint { get; set; }
public Employee Employee { get; set; }
// private AppraisalPoint _appraisalPoint;
// public AppraisalPoint AppraisalPoint
// {
// get
// {
// if (_appraisalPoint == null && !this.AppraisalPointID.IsUnassigned && this.AppraisalPointID.Integer > 0)
// {
//// _appraisalPoint = AppraisalPoint.Get(this.ID);
// }
// return _appraisalPoint;
// }
// set
// {
// _appraisalPoint = value;
// }
// }
//private Employee _employee;
//public Employee Employee
//{
// get
// {
// if (this.EmployeeID!=null && !this.EmployeeID.IsUnassigned)
// {
// _employee = Employee.Get(this.EmployeeID); // # get by budget master id
// }
// return this._employee;
// }
// set
// {
// _employee = value;
// }
//}
//#region Functions
//#region Get
//public static List<EmployeeAppraisal> Get(EnumStatus status)
//{
// return EmployeeAppraisal.Service.Get(status);
//}
//public static List<EmployeeAppraisal> Get(DateTime AppYear)
//{
// return EmployeeAppraisal.Service.Get(AppYear);
//}
//#endregion
//#region Save
//public int Save()
//{
// this.SetAuditTrailProperties();
// return EmployeeAppraisal.Service.Save(this);
//}
//public static void Save(List<EmployeeAppraisal> empappraisals)
//{
// foreach (EmployeeAppraisal item in empappraisals)
// {
// item.SetAuditTrailProperties();
// }
// EmployeeAppraisal.Service.Save(empappraisals);
//}
//#endregion
//#region Delete
//public static void Delete(int id)
//{
// EmployeeAppraisal.Service.Delete(id);
//}
//#endregion
//#endregion
}
#region IEmployeeAppraisalService
public interface IEmployeeAppraisalService
{
EmployeeAppraisal Get(int employeeId);
List<EmployeeAppraisal> Get(EnumStatus status);
List<EmployeeAppraisal> Get(DateTime AppraisalYear);
List<EmployeeAppraisal> GetAppraisalDataFromObjSet(int LMId, DateTime AppraisalYear);
List<EmployeeAppraisal> Get(int LMId, DateTime AppraisalYear);
List<EmployeeAppraisal> GetByLM(int LMId, DateTime AppraisalYear);
List<EmployeeAppraisal> GetPreviouslySavedData(int LMId, DateTime AppraisalYear);
int Save(EmployeeAppraisal item);
void Save(List<EmployeeAppraisal> items);
void Save(List<EmployeeAppraisal> newItems, List<EmployeeAppraisal> oldItems, CurrentUser user);
void Delete(int id);
void DeleteByEmployeeId(int empID);
}
#endregion
}