228 lines
5.7 KiB
C#
228 lines
5.7 KiB
C#
|
|
using Ease.Core.Model;
|
|
|
|
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Data;
|
|
|
|
namespace HRM.BO
|
|
{
|
|
#region IREmployee
|
|
public class IREmployee : UpdateAuditTrail//, IworkflowInterface
|
|
{
|
|
#region Constructor
|
|
public IREmployee()
|
|
{
|
|
_nPositionId = 0;
|
|
_nEmployeeID = 0;
|
|
_dAppliedDate = DateTime.MinValue;
|
|
_sDescription = string.Empty;
|
|
_bIsSelected = false;
|
|
}
|
|
#endregion
|
|
|
|
#region Properties
|
|
|
|
#region PositionID : ID
|
|
private int _nPositionId;
|
|
public int PositionID
|
|
{
|
|
get { return _nPositionId; }
|
|
set
|
|
{
|
|
|
|
_nPositionId = value;
|
|
}
|
|
}
|
|
#endregion
|
|
|
|
#region WfStatus : enumwfStatus
|
|
|
|
private EnumwfStatus _eWfStatus;
|
|
public EnumwfStatus WfStatus
|
|
{
|
|
get { return _eWfStatus; }
|
|
set { _eWfStatus = value; }
|
|
}
|
|
#endregion
|
|
|
|
#region EmployeeID : ID
|
|
private int _nEmployeeID;
|
|
public int EmployeeID
|
|
{
|
|
get { return _nEmployeeID; }
|
|
set
|
|
{
|
|
|
|
_nEmployeeID = value;
|
|
}
|
|
}
|
|
#endregion
|
|
|
|
public Employee Employee { get; set; }
|
|
|
|
//#region Employee
|
|
|
|
|
|
//private Employee _employee;
|
|
//public Employee Employee
|
|
//{
|
|
// get
|
|
// {
|
|
// if (_employee == null && _nEmployeeID != null)
|
|
// {
|
|
// //_employee = new Employee();
|
|
// _employee = Employee.Get(_nEmployeeID);
|
|
// }
|
|
// return _employee;
|
|
// }
|
|
// set
|
|
// {
|
|
// _employee = value;
|
|
// }
|
|
//}
|
|
//#endregion
|
|
|
|
#region AppliedDate : DateTime
|
|
|
|
private DateTime _dAppliedDate;
|
|
public DateTime AppliedDate
|
|
{
|
|
get { return _dAppliedDate; }
|
|
set
|
|
{
|
|
|
|
_dAppliedDate = value;
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region Description : string
|
|
|
|
private string _sDescription;
|
|
public string Description
|
|
{
|
|
get { return _sDescription; }
|
|
set
|
|
{
|
|
|
|
_sDescription = value;
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region IsSelected : bool
|
|
|
|
private bool _bIsSelected;
|
|
public bool IsSelected
|
|
{
|
|
get { return _bIsSelected; }
|
|
set
|
|
{
|
|
|
|
_bIsSelected = value;
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region IworkflowInterface Members
|
|
|
|
/// <summary>
|
|
/// this property is used for work flow, which return leave description
|
|
/// </summary>
|
|
public string ObjectDescription
|
|
{
|
|
get
|
|
{
|
|
string str = "";
|
|
//str = " " + this.Employee.Name + ", " + this.Employee.DescriptionText
|
|
// + " has applied for the position " + this.PositionID;
|
|
return str;
|
|
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// this property is used for work flow, it's a constant value
|
|
/// </summary>
|
|
public int SetupID
|
|
{
|
|
get { return (4); }
|
|
}
|
|
/// <summary>
|
|
/// this property is used for work flow, which return leave entry id
|
|
/// </summary>
|
|
public int ObjectID
|
|
{
|
|
get { return this.ID; }
|
|
}
|
|
|
|
#endregion
|
|
|
|
#endregion
|
|
|
|
//#region Service Factory IInternalRecruitmentService : IInternalRecruitmentService
|
|
|
|
//internal static IInternalRecruitmentService Service
|
|
//{
|
|
// get { return Services.Factory.CreateService<IInternalRecruitmentService>(typeof(IInternalRecruitmentService)); }
|
|
//}
|
|
|
|
//#endregion
|
|
|
|
//public int SaveIrEmployee()
|
|
//{
|
|
// this.SetAuditTrailProperties();
|
|
// return InternalRecruitment.Service.SaveIrEmployee(this);
|
|
//}
|
|
|
|
//public static IREmployee Get(int positionID, int empid)
|
|
//{
|
|
// IREmployee oIREmployee = null;
|
|
// #region Cache Header
|
|
// oIREmployee = (IREmployee)_cache["Get", positionID, empid];
|
|
// if (oIREmployee != null)
|
|
// return oIREmployee;
|
|
// #endregion
|
|
// oIREmployee = InternalRecruitment.Service.Get(positionID, empid);
|
|
// #region Cache Footer
|
|
// _cache.Add(oIREmployee, "Get", positionID, empid);
|
|
// #endregion
|
|
// return oIREmployee;
|
|
//}
|
|
//public int GetStatusbyWf(enumwfStatus wfstatus)
|
|
//{
|
|
|
|
// return (int)this.WfStatus;
|
|
//}
|
|
//public IREmployee Get(int irempid)
|
|
//{
|
|
// IREmployee oIREmployee = null;
|
|
// #region Cache Header
|
|
// oIREmployee = (IREmployee)_cache["Get", irempid];
|
|
// if (oIREmployee != null)
|
|
// return oIREmployee;
|
|
// #endregion
|
|
// oIREmployee = InternalRecruitment.Service.GetIrempID(irempid);
|
|
// #region Cache Footer
|
|
// _cache.Add(oIREmployee, "Get", irempid);
|
|
// #endregion
|
|
// return oIREmployee;
|
|
//}
|
|
|
|
//public List<PendingJobDetail> GetDetails()
|
|
//{
|
|
// List<PendingJobDetail> oPJDetails = new List<PendingJobDetail>();
|
|
|
|
// // Add more description as needed
|
|
// oPJDetails.Add(new PendingJobDetail() { Type = "Position", Value = PositionID.Integer.ToString() });
|
|
|
|
// return oPJDetails;
|
|
//}
|
|
}
|
|
#endregion
|
|
}
|