579 lines
17 KiB
C#
579 lines
17 KiB
C#
|
using System;
|
|||
|
using System.Collections.Generic;
|
|||
|
using System.Data;
|
|||
|
|
|||
|
namespace HRM.BO
|
|||
|
{
|
|||
|
public class EmpLifeCycle : BasicBaseObject
|
|||
|
{
|
|||
|
|
|||
|
#region Constructor
|
|||
|
|
|||
|
public EmpLifeCycle()
|
|||
|
{
|
|||
|
_effectDate = DateTime.MinValue;
|
|||
|
_nodeID = null;
|
|||
|
_gradeID = null;
|
|||
|
_categoryID = null;
|
|||
|
_companyID = null;
|
|||
|
_functionID = null;
|
|||
|
_designationID = null;
|
|||
|
_costCenterID = null;
|
|||
|
_locationID = null;
|
|||
|
// Location = null;
|
|||
|
_departmentID = null;
|
|||
|
// Department = null;
|
|||
|
_employeeID = 0;
|
|||
|
_empstatus = EnumEmployeeStatus.Live;
|
|||
|
_statusDetailID = null;
|
|||
|
_remarks = "";
|
|||
|
_description = "";
|
|||
|
_salaryMonth = DateTime.Today;
|
|||
|
_gradeSalaryAssesmentID = null;
|
|||
|
_empCCID = null;
|
|||
|
EmployeeGradeSalary = null;
|
|||
|
_grossSalary = null;
|
|||
|
_basicSalary = null;
|
|||
|
_isConfirm = null;
|
|||
|
_isDiscontinue = null;
|
|||
|
_isContinue = null;
|
|||
|
_isCurrentMonthIncluded = false;
|
|||
|
_pFMemberType = null;
|
|||
|
_incrementNo = null;
|
|||
|
_isPayrollTypeChanged = false;
|
|||
|
_isTransferReceived = false;
|
|||
|
_complainID = 0;
|
|||
|
_punishmentID = 0;
|
|||
|
}
|
|||
|
|
|||
|
#endregion
|
|||
|
#region GradeSalaryAssesmentID : ID
|
|||
|
private int? _gradeSalaryAssesmentID;
|
|||
|
public int? GradeSalaryAssesmentID
|
|||
|
{
|
|||
|
get { return _gradeSalaryAssesmentID; }
|
|||
|
set { _gradeSalaryAssesmentID = value; }
|
|||
|
}
|
|||
|
#endregion
|
|||
|
#region EmpCCID : ID
|
|||
|
private int? _empCCID;
|
|||
|
public int? EmployeeCCID
|
|||
|
{
|
|||
|
get { return _empCCID; }
|
|||
|
set { _empCCID = value; }
|
|||
|
}
|
|||
|
#endregion
|
|||
|
#region Properties
|
|||
|
|
|||
|
#region EffectDate : DateTime
|
|||
|
private DateTime _effectDate;
|
|||
|
public DateTime EffectDate
|
|||
|
{
|
|||
|
get { return _effectDate; }
|
|||
|
set { _effectDate = value; }
|
|||
|
}
|
|||
|
#endregion
|
|||
|
#region NodeID : ID
|
|||
|
private int? _nodeID;
|
|||
|
public int? NodeID
|
|||
|
{
|
|||
|
get { return _nodeID; }
|
|||
|
set { _nodeID = value; }
|
|||
|
}
|
|||
|
#endregion
|
|||
|
#region CostCenterID : ID
|
|||
|
private int? _costCenterID;
|
|||
|
public int? CostCenterID
|
|||
|
{
|
|||
|
get { return _costCenterID; }
|
|||
|
set { _costCenterID = value; }
|
|||
|
}
|
|||
|
#endregion
|
|||
|
#region GradeID : ID
|
|||
|
private int? _gradeID;
|
|||
|
public int? GradeID
|
|||
|
{
|
|||
|
get { return _gradeID; }
|
|||
|
set { _gradeID = value; }
|
|||
|
}
|
|||
|
#endregion
|
|||
|
#region CategoryID : ID
|
|||
|
private int? _categoryID;
|
|||
|
public int? CategoryID
|
|||
|
{
|
|||
|
get { return _categoryID; }
|
|||
|
set { _categoryID = value; }
|
|||
|
}
|
|||
|
#endregion
|
|||
|
#region CompanyID : ID
|
|||
|
private int? _companyID;
|
|||
|
public int? CompanyID
|
|||
|
{
|
|||
|
get { return _companyID; }
|
|||
|
set { _companyID = value; }
|
|||
|
}
|
|||
|
#endregion
|
|||
|
#region FunctionID : ID
|
|||
|
private int? _functionID;
|
|||
|
public int? FunctionID
|
|||
|
{
|
|||
|
get { return _functionID; }
|
|||
|
set { _functionID = value; }
|
|||
|
}
|
|||
|
#endregion
|
|||
|
#region DesignationID : ID
|
|||
|
private int? _designationID;
|
|||
|
public int? DesignationID
|
|||
|
{
|
|||
|
get { return _designationID; }
|
|||
|
set { _designationID = value; }
|
|||
|
}
|
|||
|
#endregion
|
|||
|
#region LocationID : ID
|
|||
|
private int ?_locationID;
|
|||
|
public int? LocationID
|
|||
|
{
|
|||
|
get { return _locationID; }
|
|||
|
set { _locationID = value; }
|
|||
|
}
|
|||
|
#endregion
|
|||
|
#region DepartmentID : ID
|
|||
|
private int? _departmentID;
|
|||
|
public int? DepartmentID
|
|||
|
{
|
|||
|
get { return _departmentID; }
|
|||
|
set { _departmentID = value; }
|
|||
|
}
|
|||
|
#endregion
|
|||
|
#region IsConfirm : bool
|
|||
|
private bool? _isConfirm;
|
|||
|
public bool? IsConfirm
|
|||
|
{
|
|||
|
get { return _isConfirm; }
|
|||
|
set { _isConfirm = value; }
|
|||
|
}
|
|||
|
#endregion
|
|||
|
#region pFMemberType : EnumPFMembershipType
|
|||
|
|
|||
|
private EnumPFMembershipType? _pFMemberType;
|
|||
|
public EnumPFMembershipType? PFMemberType
|
|||
|
{
|
|||
|
get { return _pFMemberType; }
|
|||
|
set
|
|||
|
{
|
|||
|
_pFMemberType = value;
|
|||
|
}
|
|||
|
}
|
|||
|
#endregion
|
|||
|
#region EmployeeID : ID
|
|||
|
private int _employeeID;
|
|||
|
public int EmployeeID
|
|||
|
{
|
|||
|
get { return _employeeID; }
|
|||
|
set { _employeeID = value; }
|
|||
|
}
|
|||
|
#endregion
|
|||
|
#region StatusDetailID : ID
|
|||
|
private int? _statusDetailID;
|
|||
|
public int? StatusDetailID
|
|||
|
{
|
|||
|
get { return _statusDetailID; }
|
|||
|
set { _statusDetailID = value; }
|
|||
|
}
|
|||
|
#endregion
|
|||
|
#region GrossSalary : double
|
|||
|
private double? _grossSalary;
|
|||
|
public double? GrossSalary
|
|||
|
{
|
|||
|
get { return _grossSalary; }
|
|||
|
set { _grossSalary = value; }
|
|||
|
}
|
|||
|
#endregion
|
|||
|
#region BasicSalary : double
|
|||
|
private double? _basicSalary;
|
|||
|
public double? BasicSalary
|
|||
|
{
|
|||
|
get { return _basicSalary; }
|
|||
|
set { _basicSalary = value; }
|
|||
|
}
|
|||
|
#endregion
|
|||
|
#region IsDiscontinue : double
|
|||
|
private bool? _isDiscontinue;
|
|||
|
public bool? IsDiscontinue
|
|||
|
{
|
|||
|
get { return _isDiscontinue; }
|
|||
|
set { _isDiscontinue = value; }
|
|||
|
}
|
|||
|
#endregion
|
|||
|
#region IsContinue : double
|
|||
|
private bool? _isContinue;
|
|||
|
public bool? IsContinue
|
|||
|
{
|
|||
|
get { return _isContinue; }
|
|||
|
set { _isContinue = value; }
|
|||
|
}
|
|||
|
#endregion
|
|||
|
#region Status : EnumEmployeeStatus
|
|||
|
private EnumEmployeeStatus _empstatus;
|
|||
|
public EnumEmployeeStatus EmployeeStatus
|
|||
|
{
|
|||
|
get { return _empstatus; }
|
|||
|
set { _empstatus = value; }
|
|||
|
}
|
|||
|
public EmployeeStatus EmpStatusObject { get; set; }
|
|||
|
#endregion
|
|||
|
#region Remarks : string
|
|||
|
private string _remarks;
|
|||
|
public string Remarks
|
|||
|
{
|
|||
|
get { return _remarks; }
|
|||
|
set { _remarks = value; }
|
|||
|
}
|
|||
|
#endregion
|
|||
|
#region Description : string
|
|||
|
private string _description;
|
|||
|
public string Description
|
|||
|
{
|
|||
|
get { return _description; }
|
|||
|
set { _description = value; }
|
|||
|
}
|
|||
|
#endregion
|
|||
|
#region SalaryMonth : DateTime
|
|||
|
private DateTime _salaryMonth;
|
|||
|
public DateTime SalaryMonth
|
|||
|
{
|
|||
|
get { return _salaryMonth; }
|
|||
|
set { _salaryMonth = value; }
|
|||
|
}
|
|||
|
#endregion
|
|||
|
#region Gradesalaries : List<EmployeeGradeSalary>
|
|||
|
private List<EmployeeGradeSalary> _gradesalaries;
|
|||
|
public List<EmployeeGradeSalary> Gradesalaries
|
|||
|
{
|
|||
|
get { return _gradesalaries; }
|
|||
|
set { _gradesalaries = value; }
|
|||
|
}
|
|||
|
#endregion
|
|||
|
|
|||
|
#region IsCurrentMonthIncluded : bool
|
|||
|
private bool _isCurrentMonthIncluded;
|
|||
|
public bool IsCurrentMonthIncluded
|
|||
|
{
|
|||
|
get { return _isCurrentMonthIncluded; }
|
|||
|
set { _isCurrentMonthIncluded = value; }
|
|||
|
}
|
|||
|
#endregion
|
|||
|
|
|||
|
#region IncrementNo : int
|
|||
|
private int? _incrementNo;
|
|||
|
public int? IncrementNo
|
|||
|
{
|
|||
|
get { return _incrementNo; }
|
|||
|
set { _incrementNo = value; }
|
|||
|
}
|
|||
|
#endregion
|
|||
|
#region payrollTypeID : int
|
|||
|
|
|||
|
private int _payrollTypeID;
|
|||
|
public int PayrollTypeID
|
|||
|
{
|
|||
|
get { return _payrollTypeID; }
|
|||
|
set { _payrollTypeID = value; }
|
|||
|
}
|
|||
|
#endregion
|
|||
|
#region payrollTypeID : int
|
|||
|
|
|||
|
private int _punishmentID;
|
|||
|
public int PunishmentID
|
|||
|
{
|
|||
|
get { return _punishmentID; }
|
|||
|
set { _punishmentID = value; }
|
|||
|
}
|
|||
|
#endregion
|
|||
|
#region payrollTypeID : int
|
|||
|
|
|||
|
private int _complainID;
|
|||
|
public int ComplainID
|
|||
|
{
|
|||
|
get { return _complainID; }
|
|||
|
set { _complainID = value; }
|
|||
|
}
|
|||
|
#endregion
|
|||
|
|
|||
|
#region IsPayrollTypeChanged : bool
|
|||
|
private bool _isPayrollTypeChanged;
|
|||
|
public bool IsPayrollTypeChanged
|
|||
|
{
|
|||
|
get { return _isPayrollTypeChanged; }
|
|||
|
set { _isPayrollTypeChanged = value; }
|
|||
|
}
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
|
|||
|
#region IsTransferReceived : bool
|
|||
|
private bool _isTransferReceived;
|
|||
|
public bool IsTransferReceived
|
|||
|
{
|
|||
|
get { return _isTransferReceived; }
|
|||
|
set { _isTransferReceived = value; }
|
|||
|
}
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
|
|||
|
#region Employee : Employee
|
|||
|
public Employee Employee { get; set; }
|
|||
|
public HREmployee HREmployee { get; set; }
|
|||
|
public List<EmployeeCostCenter> EmployeeCostCenters { get; set; }
|
|||
|
|
|||
|
public EmployeeGradeSalary EmployeeGradeSalary { get; set; }
|
|||
|
public List<OrganogramEmployee> Orgemployees { get; set; }
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
#region HREmployee : HREmployee
|
|||
|
|
|||
|
//private HREmployee _hremployee;
|
|||
|
//public HREmployee HREmployee
|
|||
|
//{
|
|||
|
// get
|
|||
|
// {
|
|||
|
// if (_employeeID.Integer > 0 && _hremployee == null)
|
|||
|
// {
|
|||
|
// _hremployee = new HREmployee();
|
|||
|
// _hremployee = HREmployee.Get(_employeeID);
|
|||
|
// }
|
|||
|
// return this._hremployee;
|
|||
|
// }
|
|||
|
// set
|
|||
|
// {
|
|||
|
// _hremployee = value;
|
|||
|
// }
|
|||
|
//}
|
|||
|
//private List<EmployeeCostCenter> _employeeCostCenters = null;
|
|||
|
//public List<EmployeeCostCenter> EmployeeCostCenters
|
|||
|
//{
|
|||
|
// get
|
|||
|
// {
|
|||
|
// if (_costCenterID != null && !_costCenterID.IsUnassigned)
|
|||
|
// {
|
|||
|
// if (_costCenterID.Integer > 0 && _employeeCostCenters == null)
|
|||
|
// {
|
|||
|
// _employeeCostCenters = new List<EmployeeCostCenter>();
|
|||
|
// _employeeCostCenters = EmployeeCostCenter.GetByEmpIDCCID(_costCenterID, _employeeID);
|
|||
|
// }
|
|||
|
// }
|
|||
|
// return this._employeeCostCenters;
|
|||
|
// }
|
|||
|
// set
|
|||
|
// {
|
|||
|
// _employeeCostCenters = value;
|
|||
|
// }
|
|||
|
//}
|
|||
|
|
|||
|
//private EmployeeGradeSalary _employeeGradeSalary;
|
|||
|
//public EmployeeGradeSalary EmployeeGradeSalary
|
|||
|
//{
|
|||
|
// get
|
|||
|
// {
|
|||
|
// return this._employeeGradeSalary;
|
|||
|
// }
|
|||
|
// set
|
|||
|
// {
|
|||
|
// _employeeGradeSalary = value;
|
|||
|
// }
|
|||
|
//}
|
|||
|
|
|||
|
|
|||
|
//#region OrganogramEmployee : OrganogramEmployee
|
|||
|
|
|||
|
//private List<OrganogramEmployee> _orgemployees;
|
|||
|
//public List<OrganogramEmployee> Orgemployees
|
|||
|
//{
|
|||
|
// get
|
|||
|
// {
|
|||
|
// if (_nodeID != null && !_nodeID.IsUnassigned)
|
|||
|
// {
|
|||
|
// if (_nodeID.Integer > 0 && _orgemployees == null)
|
|||
|
// {
|
|||
|
// _orgemployees = new List<OrganogramEmployee>();
|
|||
|
// _orgemployees = OrganogramEmployee.Get(_nodeID);
|
|||
|
// }
|
|||
|
// }
|
|||
|
// return this._orgemployees;
|
|||
|
// }
|
|||
|
// set
|
|||
|
// {
|
|||
|
// _orgemployees = value;
|
|||
|
// }
|
|||
|
//}
|
|||
|
//#endregion
|
|||
|
|
|||
|
//#region department : Department
|
|||
|
//private Department _department;
|
|||
|
//public Department Department
|
|||
|
//{
|
|||
|
// get
|
|||
|
// {
|
|||
|
// if (_departmentID.IsUnassigned == false && _departmentID.Integer > 0 && _department == null)
|
|||
|
// {
|
|||
|
// _department = new Department();
|
|||
|
// _department = Department.Get(_departmentID);
|
|||
|
// }
|
|||
|
// return this._department;
|
|||
|
// }
|
|||
|
// set
|
|||
|
// {
|
|||
|
// _department = value;
|
|||
|
// }
|
|||
|
//}
|
|||
|
//#endregion
|
|||
|
//#region Costcenter : Costcenter
|
|||
|
//private Costcenter _costcenter;
|
|||
|
//public Costcenter Costcenter
|
|||
|
//{
|
|||
|
// get
|
|||
|
// {
|
|||
|
// if (_costCenterID.IsUnassigned == false && _costCenterID.Integer > 0 && _costcenter == null)
|
|||
|
// {
|
|||
|
// _costcenter = new Costcenter();
|
|||
|
// _costcenter = Costcenter.Get(_costCenterID);
|
|||
|
// }
|
|||
|
// return this._costcenter;
|
|||
|
// }
|
|||
|
// set
|
|||
|
// {
|
|||
|
// _costcenter = value;
|
|||
|
// }
|
|||
|
//}
|
|||
|
//#endregion
|
|||
|
//#region location : Location
|
|||
|
//private Location _location;
|
|||
|
//public Location Location
|
|||
|
//{
|
|||
|
// get
|
|||
|
// {
|
|||
|
// if (_locationID.IsUnassigned == false && _locationID.Integer > 0 && _location == null)
|
|||
|
// {
|
|||
|
// _location = new Location();
|
|||
|
// _location = Location.Get(_locationID);
|
|||
|
// }
|
|||
|
// return this._location;
|
|||
|
// }
|
|||
|
// set
|
|||
|
// {
|
|||
|
// _location = value;
|
|||
|
// }
|
|||
|
//}
|
|||
|
//#endregion
|
|||
|
//#region category : Category
|
|||
|
|
|||
|
//private Category _category;
|
|||
|
//public Category Category
|
|||
|
//{
|
|||
|
// get
|
|||
|
// {
|
|||
|
// if (_categoryID.Integer > 0 && _category == null)
|
|||
|
// {
|
|||
|
// _category = new Category();
|
|||
|
// _category = _category.Get(_categoryID);
|
|||
|
// }
|
|||
|
// return this._category;
|
|||
|
// }
|
|||
|
// set
|
|||
|
// {
|
|||
|
// _category = value;
|
|||
|
// }
|
|||
|
//}
|
|||
|
//#endregion
|
|||
|
//#region designation : Designation
|
|||
|
|
|||
|
//private Designation _designation;
|
|||
|
//public Designation Designation
|
|||
|
//{
|
|||
|
// get
|
|||
|
// {
|
|||
|
// if (_designationID.IsUnassigned == false && _designationID.Integer > 0 && _designation == null)
|
|||
|
// {
|
|||
|
// _designation = new Designation();
|
|||
|
// _designation = Designation.Get(_designationID);
|
|||
|
// }
|
|||
|
// return this._designation;
|
|||
|
// }
|
|||
|
// set
|
|||
|
// {
|
|||
|
// _designation = value;
|
|||
|
// }
|
|||
|
//}
|
|||
|
//#endregion
|
|||
|
//#region grade : Grade
|
|||
|
|
|||
|
//private Grade _grade;
|
|||
|
//public Grade Grade
|
|||
|
//{
|
|||
|
// get
|
|||
|
// {
|
|||
|
// if (_gradeID != null && !_gradeID.IsUnassigned)
|
|||
|
// {
|
|||
|
// if (_gradeID.Integer > 0 && _grade == null)
|
|||
|
// {
|
|||
|
// _grade = new Grade();
|
|||
|
// _grade = Grade.Get(_gradeID);
|
|||
|
// }
|
|||
|
// }
|
|||
|
// return this._grade;
|
|||
|
// }
|
|||
|
// set
|
|||
|
// {
|
|||
|
// _grade = value;
|
|||
|
// }
|
|||
|
//}
|
|||
|
//#endregion
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
//#region Service Factory IEmpLifeCycleService : IEmpLifeCycleService
|
|||
|
|
|||
|
//internal static IEmpLifeCycleService Service
|
|||
|
//{
|
|||
|
// get { return Services.Factory.CreateService<IEmpLifeCycleService>(typeof(IEmpLifeCycleService)); }
|
|||
|
//}
|
|||
|
|
|||
|
//#endregion
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
|
|||
|
|
|||
|
}
|
|||
|
#endregion
|
|||
|
|
|||
|
#region IEmpLifeCycle Service
|
|||
|
|
|||
|
public interface IEmpLifeCycleService
|
|||
|
{
|
|||
|
EmpLifeCycle Get(int lifecycleID);
|
|||
|
List<EmpLifeCycle> Get(EnumStatus sts, int payrollTypeID);
|
|||
|
List<EmpLifeCycle> GetEmpID(int nEmpID);
|
|||
|
List<EmpLifeCycle> GetEmpID(int nEmpID, DateTime effectDate);
|
|||
|
EmpLifeCycle GetLastPosition(int nEmpID);
|
|||
|
int Save(EmpLifeCycle item, DateTime nextPayProcessDate, int payrollTypeID);
|
|||
|
int Save(List<EmpLifeCycle> items, DateTime nextPayProcessDate);
|
|||
|
void Delete(EmpLifeCycle item, DateTime nextPayProcessDate);
|
|||
|
int GetPrvGradeId(int nEmpID, int nGradeID);
|
|||
|
int GetPrvLocationId(int nEmpID, int nLocationID);
|
|||
|
int GetPrvDesigId(int nEmpID, int nDesigID);
|
|||
|
int GetPrvRCId(int nEmpID);
|
|||
|
int? EmpPrevDesg(int employeeID);
|
|||
|
List<EmpLifeCycle> getByStatus(int p, DateTime startDate, DateTime endDate);
|
|||
|
List<EmpLifeCycle> GetByDate(DateTime from, DateTime to, int payrollTypeID);
|
|||
|
List<EmpLifeCycle> GetByCreateDate(DateTime from, DateTime to, int payrollTypeID);
|
|||
|
List<EmpLifeCycle> Get(string empIds, int statusID, DateTime fromDate, DateTime toDate, int payrollTypeID);
|
|||
|
DataSet GetDesignationChange(DateTime startDate, DateTime endDate, int payrollTypeID);
|
|||
|
}
|
|||
|
|
|||
|
#endregion
|
|||
|
}
|