339 lines
7.5 KiB
C#
339 lines
7.5 KiB
C#
using Ease.Core.Model;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Data;
|
|
|
|
|
|
namespace HRM.BO
|
|
{
|
|
#region ErrorSuccessLog
|
|
|
|
public class ErrorSuccessLog : BasicBaseObject
|
|
{
|
|
#region Constructor
|
|
|
|
public ErrorSuccessLog()
|
|
{
|
|
_OperationDate = DateTime.Today;
|
|
_ReceiveStatus = EnumReceiveStatus.Success;
|
|
_IsLogRead = false;
|
|
_ViewName = "";
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region Properties
|
|
|
|
#region OperationDate : Datetime
|
|
|
|
private DateTime _OperationDate;
|
|
|
|
public DateTime OperationDate
|
|
{
|
|
get { return _OperationDate; }
|
|
set { _OperationDate = value; }
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region ReceiveStatus : EnumReceiveStatus
|
|
|
|
private EnumReceiveStatus _ReceiveStatus;
|
|
|
|
public EnumReceiveStatus ReceiveStatus
|
|
{
|
|
get { return _ReceiveStatus; }
|
|
set { _ReceiveStatus = value; }
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region IsLogRead : bool
|
|
|
|
private bool _IsLogRead;
|
|
|
|
public bool IsLogRead
|
|
{
|
|
get { return _IsLogRead; }
|
|
set { _IsLogRead = value; }
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region ViewName : string
|
|
|
|
private string _ViewName;
|
|
|
|
public string ViewName
|
|
{
|
|
get { return _ViewName; }
|
|
set { _ViewName = value; }
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region ErrorLogDetails : ErrorLogDetails
|
|
|
|
private List<ErrorLogDetail> _ErrorLogdetails;
|
|
|
|
public List<ErrorLogDetail> ErrorLogDetails
|
|
{
|
|
get
|
|
{
|
|
//if (this.ID.IsUnassigned == false && this.ID.Integer > 0)
|
|
//{
|
|
// _ErrorLogdetails = new List<ErrorLogDetail>();
|
|
// _ErrorLogdetails = GetErrorLogDetails(this.ID);
|
|
//}
|
|
return _ErrorLogdetails;
|
|
}
|
|
set { _ErrorLogdetails = value; }
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region ErrorLogDetails : ErrorLogDetails
|
|
|
|
private List<SuccessLogDetail> _SuccessLogDetails;
|
|
|
|
public List<SuccessLogDetail> SuccessLogDetails
|
|
{
|
|
get
|
|
{
|
|
//if (this.int != null)
|
|
//{
|
|
// _SuccessLogDetails = new List<SuccessLogDetail>();
|
|
// _SuccessLogDetails = GetSuccessLogDetails(this.ID);
|
|
//}
|
|
return _SuccessLogDetails;
|
|
}
|
|
set { _SuccessLogDetails = value; }
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region Service Factory IErrorSuccessLogService : IErrorSuccessLogService
|
|
|
|
internal static IErrorSuccessLogService Service
|
|
{
|
|
get { return Services.Factory.CreateService<IErrorSuccessLogService>(typeof(IErrorSuccessLogService)); }
|
|
}
|
|
|
|
#endregion
|
|
|
|
#endregion
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region IErrorSuccessLog Service
|
|
|
|
public interface IErrorSuccessLogService
|
|
{
|
|
ErrorSuccessLog Get(int id);
|
|
List<ErrorSuccessLog> Get();
|
|
List<ErrorLogDetail> GetErrorLogDetails(int id);
|
|
List<SuccessLogDetail> GetSuccessLogDetails(int id);
|
|
List<ErrorSuccessLog> GetByStatus(bool sts);
|
|
List<ErrorSuccessLog> GetByStatus(bool sts, DateTime fromDate, DateTime toDate);
|
|
int Save(ErrorSuccessLog item);
|
|
void Update(ErrorSuccessLog item);
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region ErrorLogDetail
|
|
|
|
public class ErrorLogDetail : BasicBaseObject
|
|
{
|
|
public ErrorLogDetail()
|
|
{
|
|
_ErrorSuccessLogID = 0;
|
|
_EmployeeID = 0;
|
|
_EmployeePIN = "";
|
|
_EmployeeName = "";
|
|
_ErrorType = EnumErrorType.BasicData;
|
|
_ErrorDescription = "";
|
|
}
|
|
|
|
#region ErrorSuccessLogID : ID
|
|
|
|
private int _ErrorSuccessLogID;
|
|
|
|
public int ErrorSuccessLogID
|
|
{
|
|
get { return _ErrorSuccessLogID; }
|
|
set { _ErrorSuccessLogID = value; }
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region EmployeeID : ID
|
|
|
|
private int _EmployeeID;
|
|
|
|
public int EmployeeID
|
|
{
|
|
get { return _EmployeeID; }
|
|
set { _EmployeeID = value; }
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region ErrorType : EnumErrorType
|
|
|
|
private EnumErrorType _ErrorType;
|
|
|
|
public EnumErrorType ErrorType
|
|
{
|
|
get { return _ErrorType; }
|
|
set { _ErrorType = value; }
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region EmployeeName : string
|
|
|
|
private string _EmployeeName;
|
|
|
|
public string EmployeeName
|
|
{
|
|
get { return _EmployeeName; }
|
|
set { _EmployeeName = value; }
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region EmployeePIN : string
|
|
|
|
private string _EmployeePIN;
|
|
|
|
public string EmployeePIN
|
|
{
|
|
get { return _EmployeePIN; }
|
|
set { _EmployeePIN = value; }
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region ErrorDescription : string
|
|
|
|
private string _ErrorDescription;
|
|
|
|
public string ErrorDescription
|
|
{
|
|
get { return _ErrorDescription; }
|
|
set { _ErrorDescription = value; }
|
|
}
|
|
|
|
#endregion
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region SuccessLogDetail
|
|
|
|
public class SuccessLogDetail : BasicBaseObject
|
|
{
|
|
public SuccessLogDetail()
|
|
{
|
|
_ErrorSuccessLogID = 0;
|
|
_EmployeeID = 0;
|
|
_EmployeePIN = "";
|
|
_EmployeeName = "";
|
|
_SuccessDescription = "";
|
|
}
|
|
|
|
#region ErrorSuccessLogID : ID
|
|
|
|
private int _ErrorSuccessLogID;
|
|
|
|
public int ErrorSuccessLogID
|
|
{
|
|
get { return _ErrorSuccessLogID; }
|
|
set { _ErrorSuccessLogID = value; }
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region EmployeeID : ID
|
|
|
|
private int _EmployeeID;
|
|
|
|
public int EmployeeID
|
|
{
|
|
get { return _EmployeeID; }
|
|
set { _EmployeeID = value; }
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region EmployeeName : string
|
|
|
|
private string _EmployeeName;
|
|
|
|
public string EmployeeName
|
|
{
|
|
get { return _EmployeeName; }
|
|
set { _EmployeeName = value; }
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region EmployeePIN : string
|
|
|
|
private string _EmployeePIN;
|
|
|
|
public string EmployeePIN
|
|
{
|
|
get { return _EmployeePIN; }
|
|
set { _EmployeePIN = value; }
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region SuccessDescription : string
|
|
|
|
private string _SuccessDescription;
|
|
|
|
public string SuccessDescription
|
|
{
|
|
get { return _SuccessDescription; }
|
|
set { _SuccessDescription = value; }
|
|
}
|
|
|
|
#endregion
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region SuccessorErrorList
|
|
|
|
public class SuccessorErrorList
|
|
{
|
|
public SuccessorErrorList()
|
|
{
|
|
}
|
|
|
|
public int RowNo { get; set; }
|
|
public string EmployeeNo { get; set; }
|
|
public string Message { get; set; }
|
|
public string ControlName { get; set; }
|
|
public EnumSAPProcessStatus Status { get; set; }
|
|
public DateTime UploadDate { get; set; }
|
|
public EnumDataIntegrationType Type { get; set; }
|
|
public string BatchId { get; set; }
|
|
}
|
|
|
|
public class IntregraionReponse
|
|
{
|
|
public IntregraionReponse() { }
|
|
public string ReturnCode { get ; set; }
|
|
public string ReturnName { get; set; }
|
|
public string InternalError { get; set; }
|
|
public List<SuccessorErrorList> Details { get; set; } = new List<SuccessorErrorList>();
|
|
|
|
}
|
|
}
|
|
|
|
#endregion |