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 /// /// this property is used for work flow, which return leave description /// public string ObjectDescription { get { string str = ""; //str = " " + this.Employee.Name + ", " + this.Employee.DescriptionText // + " has applied for the position " + this.PositionID; return str; } } /// /// this property is used for work flow, it's a constant value /// public int SetupID { get { return (4); } } /// /// this property is used for work flow, which return leave entry id /// public int ObjectID { get { return this.ID; } } #endregion #endregion //#region Service Factory IInternalRecruitmentService : IInternalRecruitmentService //internal static IInternalRecruitmentService Service //{ // get { return Services.Factory.CreateService(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 GetDetails() //{ // List oPJDetails = new List(); // // Add more description as needed // oPJDetails.Add(new PendingJobDetail() { Type = "Position", Value = PositionID.Integer.ToString() }); // return oPJDetails; //} } #endregion }