339 lines
8.8 KiB
C#
339 lines
8.8 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using Ease.Core;
|
|
using System.Data;
|
|
|
|
namespace HRM.BO
|
|
{
|
|
#region AttnProcessRunSummary
|
|
|
|
[Serializable]
|
|
public class AttnProcessRunSummary : AuditTrailBase
|
|
{
|
|
#region Constructor
|
|
|
|
public AttnProcessRunSummary()
|
|
{
|
|
_processDate = DateTime.Now;
|
|
_processMode = EnumProcessMode.Manual;
|
|
_processBy = 0;
|
|
_processStatus = EnumAttnProcessStatus.SuccessWithoutError;
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region Properties
|
|
|
|
#region ProcessDate : DateTime
|
|
|
|
private DateTime _processDate;
|
|
|
|
public DateTime ProcessDate
|
|
{
|
|
get { return _processDate; }
|
|
set { _processDate = value; }
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region ProcessMode : EnumProcessMode
|
|
|
|
private EnumProcessMode _processMode;
|
|
|
|
public EnumProcessMode ProcessMode
|
|
{
|
|
get { return _processMode; }
|
|
set
|
|
{
|
|
_processMode = value;
|
|
if (_processMode == EnumProcessMode.Manual)
|
|
{
|
|
//_processBy = User.CurrentUser.ID;
|
|
_processBy = 0;
|
|
}
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region ProcessBy : ID
|
|
|
|
private int _processBy;
|
|
|
|
public int ProcessBy
|
|
{
|
|
get { return _processBy; }
|
|
set { _processBy = value; }
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region ProcessStatus : EnumProcessStatus
|
|
|
|
private EnumAttnProcessStatus _processStatus;
|
|
|
|
public EnumAttnProcessStatus ProcessStatus
|
|
{
|
|
get { return _processStatus; }
|
|
set { _processStatus = value; }
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region payrollTypeID : ID
|
|
|
|
private int _payrollTypeID;
|
|
|
|
public int PayrollTypeID
|
|
{
|
|
get { return _payrollTypeID; }
|
|
set
|
|
{
|
|
//base.OnPropertyChange<ID>("payrollTypeID", _payrollTypeID, value);
|
|
_payrollTypeID = value;
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region Property AttnProcessRunDetails : AttnProcessRunDetail
|
|
|
|
private List<AttnProcessRunDetail> _attnProcessRunDetail;
|
|
|
|
public List<AttnProcessRunDetail> AttnProcessRunDetails
|
|
{
|
|
get
|
|
{
|
|
//if (_attnProcessRunDetail == null && !this.ID.IsUnassigned && this.ID.Integer > 0)
|
|
//{
|
|
// _attnProcessRunDetail = Service.GetAttnProcessRunDetails(this.ID);
|
|
|
|
//}
|
|
return _attnProcessRunDetail;
|
|
}
|
|
set { _attnProcessRunDetail = value; }
|
|
}
|
|
|
|
#endregion
|
|
|
|
#endregion
|
|
|
|
//#region Function
|
|
|
|
//#region Get
|
|
|
|
//public static AttnProcessRunSummary Get(ID nID)
|
|
//{
|
|
// AttnProcessRunSummary oAttnProcessRunSummary = null;
|
|
// #region Cache Header
|
|
// oAttnProcessRunSummary = (AttnProcessRunSummary)_cache["Get", nID];
|
|
// if (oAttnProcessRunSummary != null)
|
|
// return oAttnProcessRunSummary;
|
|
// #endregion
|
|
// oAttnProcessRunSummary = AttnProcessRunSummary.Service.Get(nID);
|
|
// #region Cache Footer
|
|
// _cache.Add(oAttnProcessRunSummary, "Get", nID);
|
|
// #endregion
|
|
// return oAttnProcessRunSummary;
|
|
//}
|
|
|
|
//public static ObjectsTemplate<AttnProcessRunSummary> Get()
|
|
//{
|
|
// #region Cache Header
|
|
// ObjectsTemplate<AttnProcessRunSummary> oAttnProcessRunSummary = _cache["Get"] as ObjectsTemplate<AttnProcessRunSummary>;
|
|
// if (oAttnProcessRunSummary != null)
|
|
// return oAttnProcessRunSummary;
|
|
// #endregion
|
|
// try
|
|
// {
|
|
// oAttnProcessRunSummary = Service.Get();
|
|
// }
|
|
// catch (ServiceException e)
|
|
// {
|
|
// throw new Exception(e.Message, e);
|
|
// }
|
|
// #region Cache Footer
|
|
// _cache.Add(oAttnProcessRunSummary, "Get");
|
|
// #endregion
|
|
// return oAttnProcessRunSummary;
|
|
//}
|
|
|
|
//public static ObjectsTemplate<AttnProcessRunSummary> GetByStatus(EnumProcessStatus ProcessStatus)
|
|
//{
|
|
// #region Cache Header
|
|
// ObjectsTemplate<AttnProcessRunSummary> oAttnProcessRunSummary = _cache["GetByStatus"] as ObjectsTemplate<AttnProcessRunSummary>;
|
|
// if (oAttnProcessRunSummary != null)
|
|
// return oAttnProcessRunSummary;
|
|
// #endregion
|
|
// try
|
|
// {
|
|
// oAttnProcessRunSummary = Service.GetByStatus(ProcessStatus);
|
|
// }
|
|
// catch (ServiceException e)
|
|
// {
|
|
// throw new Exception(e.Message, e);
|
|
// }
|
|
// #region Cache Footer
|
|
// _cache.Add(oAttnProcessRunSummary, "GetByStatus");
|
|
// #endregion
|
|
// return oAttnProcessRunSummary;
|
|
//}
|
|
|
|
//public static ObjectsTemplate<AttnProcessRunSummary> GetByMode(EnumProcessMode ProcessMode)
|
|
//{
|
|
// #region Cache Header
|
|
// ObjectsTemplate<AttnProcessRunSummary> oAttnProcessRunSummary = _cache["GetByMode"] as ObjectsTemplate<AttnProcessRunSummary>;
|
|
// if (oAttnProcessRunSummary != null)
|
|
// return oAttnProcessRunSummary;
|
|
// #endregion
|
|
// try
|
|
// {
|
|
// oAttnProcessRunSummary = Service.GetByMode(ProcessMode);
|
|
// }
|
|
// catch (ServiceException e)
|
|
// {
|
|
// throw new Exception(e.Message, e);
|
|
// }
|
|
// #region Cache Footer
|
|
// _cache.Add(oAttnProcessRunSummary, "GetByMode");
|
|
// #endregion
|
|
// return oAttnProcessRunSummary;
|
|
//}
|
|
|
|
//#endregion
|
|
|
|
|
|
//public ID Save()
|
|
//{
|
|
// //this.SetAuditTrailProperties();
|
|
// return Service.Save(this);
|
|
//}
|
|
|
|
//#endregion
|
|
|
|
//#region Service Factory IAttnProcessRunSummaryService : IAttnProcessRunSummaryService
|
|
|
|
//internal static IAttnProcessRunSummaryService Service
|
|
//{
|
|
// get { return Services.Factory.CreateService<IAttnProcessRunSummaryService>(typeof(IAttnProcessRunSummaryService)); }
|
|
//}
|
|
|
|
//#endregion
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region Child Class
|
|
|
|
#region AttnProcessRunDetail
|
|
|
|
[Serializable]
|
|
public class AttnProcessRunDetail : BasicBaseObject
|
|
{
|
|
#region Constructor
|
|
|
|
public AttnProcessRunDetail()
|
|
{
|
|
_employeeName = string.Empty;
|
|
_employeeNo = string.Empty;
|
|
_enumErrorType = EnumErrorType.Others;
|
|
_locationID = 0;
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region Properties
|
|
|
|
#region ProcessSummaryID : ID
|
|
|
|
private int _processSummaryID;
|
|
|
|
public int ProcessSummaryID
|
|
{
|
|
get { return _processSummaryID; }
|
|
set { _processSummaryID = value; }
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region ErrorType : EnumErrorType
|
|
|
|
private EnumErrorType _enumErrorType;
|
|
|
|
public EnumErrorType EnumErrorType
|
|
{
|
|
get { return _enumErrorType; }
|
|
set { _enumErrorType = value; }
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region EmployeeNo : string
|
|
|
|
private string _employeeNo;
|
|
|
|
public string EmployeeNo
|
|
{
|
|
get { return _employeeNo; }
|
|
set { _employeeNo = value; }
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region EmployeeName : string
|
|
|
|
private string _employeeName;
|
|
|
|
public string EmployeeName
|
|
{
|
|
get { return _employeeName; }
|
|
set { _employeeName = value; }
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region LocationID : ID
|
|
|
|
private int _locationID;
|
|
|
|
public int LocationID
|
|
{
|
|
get { return _locationID; }
|
|
set { _locationID = value; }
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region Description : string
|
|
|
|
private string _description;
|
|
|
|
public string Description
|
|
{
|
|
get { return _description; }
|
|
set { _description = value; }
|
|
}
|
|
|
|
#endregion
|
|
|
|
#endregion
|
|
}
|
|
|
|
#endregion
|
|
|
|
#endregion
|
|
|
|
//#region IAttnProcessRunSummary Service
|
|
//public interface IAttnProcessRunSummaryService
|
|
//{
|
|
// ID Save(AttnProcessRunSummary item);
|
|
// AttnProcessRunSummary Get(ID id);
|
|
// ObjectsTemplate<AttnProcessRunSummary> Get();
|
|
// ObjectsTemplate<AttnProcessRunSummary> GetByStatus(EnumProcessStatus ProcessStatus);
|
|
// ObjectsTemplate<AttnProcessRunSummary> GetByMode(EnumProcessMode ProcessMode);
|
|
// ObjectsTemplate<AttnProcessRunDetail> GetAttnProcessRunDetails(ID id);
|
|
//}
|
|
//#endregion
|
|
} |