CEL_Payroll/Payroll.BO/SAPLookUp/SAPDataDump.cs
2024-09-17 14:30:13 +06:00

410 lines
8.6 KiB
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Ease.CoreV35;
using Ease.CoreV35.Model;
using Ease.CoreV35.Caching;
namespace Payroll.BO
{
#region SAPDataDump
[Serializable]
public class SAPDataDump : AuditTrailBase
{
#region Cache Store
private static Cache _cache = new Cache(typeof(SAPDataDump));
#endregion
#region Constructor
public SAPDataDump()
{
_BankAccountNo=string.Empty;
_BankCode = string.Empty;
_BasicSalary=0;
_BirthDate=DateTime.MinValue;
_ConfirmationDate = DateTime.MinValue;
_CostCenterCode = string.Empty;
_DesignationCode = string.Empty;
_DiscontinueEffectDate = DateTime.MinValue;
_EmailAddress = string.Empty;
_EmployeeID=null;
_FileName = string.Empty;
_GDDBID = string.Empty;
_Gender=EnumGender.None;
_JoiningDate = DateTime.MinValue;
_LastName = string.Empty;
_LocalJobGrade = string.Empty;
_LocationCode = string.Empty;
_MaritalStatus=EnumMaritalStatus.None;
_NationalityCode = string.Empty;
_ReHiringDate = DateTime.MinValue;
_ReligionCode = string.Empty;
_TIN = string.Empty;
}
#endregion
#region Properties
#region EmployeeID : ID
private ID _EmployeeID;
public ID EmployeeID
{
get { return _EmployeeID; }
set { _EmployeeID = value; }
}
#endregion
#region First Name : string
private string _FirstName;
public string FirstName
{
get { return _FirstName; }
set { _FirstName = value; }
}
#endregion
#region Last Name : string
private string _LastName;
public string LastName
{
get { return _LastName; }
set { _LastName = value; }
}
#endregion
#region Email address : string
private string _EmailAddress;
public string EmailAddress
{
get { return _EmailAddress; }
set { _EmailAddress = value; }
}
#endregion
#region GDDB ID : string
private string _GDDBID;
public string GDDBID
{
get { return _GDDBID; }
set { _GDDBID = value; }
}
#endregion
#region Birth Date : DateTime
private DateTime _BirthDate;
public DateTime BirthDate
{
get { return _BirthDate; }
set { _BirthDate = value; }
}
#endregion
#region Joining date : DateTime
private DateTime _JoiningDate;
public DateTime JoiningDate
{
get { return _JoiningDate; }
set { _JoiningDate = value; }
}
#endregion
#region Re hiring date : DateTime
private DateTime _ReHiringDate;
public DateTime ReHiringDate
{
get { return _ReHiringDate; }
set { _ReHiringDate = value; }
}
#endregion
#region Religion Code : string
private string _ReligionCode;
public string ReligionCode
{
get { return _ReligionCode; }
set { _ReligionCode = value; }
}
#endregion
#region Gender : EnumGender
private EnumGender _Gender;
public EnumGender Gender
{
get { return _Gender; }
set { _Gender = value; }
}
#endregion
#region Marital Status : EnumMaritalStatus
private EnumMaritalStatus _MaritalStatus;
public EnumMaritalStatus MaritalStatus
{
get { return _MaritalStatus; }
set { _MaritalStatus = value; }
}
#endregion
#region Nationality Code : string
private string _NationalityCode;
public string NationalityCode
{
get { return _NationalityCode; }
set { _NationalityCode = value; }
}
#endregion
#region TIN : string
private string _TIN;
public string TIN
{
get { return _TIN; }
set { _TIN = value; }
}
#endregion
#region Local Job Grade : string
private string _LocalJobGrade;
public string LocalJobGrade
{
get { return _LocalJobGrade; }
set { _LocalJobGrade = value; }
}
#endregion
#region Basic Salary : double
private double _BasicSalary;
public double BasicSalary
{
get { return _BasicSalary; }
set { _BasicSalary = value; }
}
#endregion
#region LocationCode : string
private string _LocationCode;
public string LocationCode
{
get { return _LocationCode; }
set { _LocationCode = value; }
}
#endregion
#region DesignationCode : string
private string _DesignationCode;
public string DesignationCode
{
get { return _DesignationCode; }
set { _DesignationCode = value; }
}
#endregion
#region CostCenterCode : string
private string _CostCenterCode;
public string CostCenterCode
{
get { return _CostCenterCode; }
set { _CostCenterCode = value; }
}
#endregion
#region BankCode : string
private string _BankCode;
public string BankCode
{
get { return _BankCode; }
set { _BankCode = value; }
}
#endregion
#region BankAccountNo : string
private string _BankAccountNo;
public string BankAccountNo
{
get { return _BankAccountNo; }
set { _BankAccountNo = value; }
}
#endregion
#region ConfirmationDate : DateTime
private DateTime _ConfirmationDate;
public DateTime ConfirmationDate
{
get { return _ConfirmationDate; }
set { _ConfirmationDate = value; }
}
#endregion
#region DiscontinueEffectDate : DateTime
private DateTime _DiscontinueEffectDate;
public DateTime DiscontinueEffectDate
{
get { return _DiscontinueEffectDate; }
set { _DiscontinueEffectDate = value; }
}
#endregion
#region FileName : string
private string _FileName;
public string FileName
{
get { return _FileName; }
set { _FileName = value; }
}
#endregion
#endregion
#region Funcions
public static SAPDataDump Get(ID id)
{
SAPDataDump oSAPDataDump=null;
#region Cache Header
oSAPDataDump = (SAPDataDump)_cache["Get", id];
if (oSAPDataDump != null)
return oSAPDataDump;
#endregion
oSAPDataDump = Service.Get(id);
#region Cache Footer
_cache.Add(oSAPDataDump, "Get", id);
#endregion
return oSAPDataDump;
}
public static ObjectsTemplate<SAPDataDump> Get()
{
ObjectsTemplate<SAPDataDump> oSAPDataDump = null;
#region Cache Header
oSAPDataDump = (ObjectsTemplate<SAPDataDump>)_cache["Get"];
if (oSAPDataDump != null)
return oSAPDataDump;
#endregion
oSAPDataDump=Service.Get();
#region Cache Footer
_cache.Add(oSAPDataDump, "Get");
#endregion
return oSAPDataDump;
}
public ID Save()
{
this.SetAuditTrailProperties();
return Service.Save(this);
}
public void Delete(ID id)
{
Service.Delete(id);
}
#endregion
#region Service Factory Service : ISAPDataDumpService
internal static ISAPDataDumpService Service
{
get { return Services.Factory.CreateService<ISAPDataDumpService>(typeof(ISAPDataDumpService)); }
}
#endregion
}
#endregion
#region ISAPDataDump Service
public interface ISAPDataDumpService
{
SAPDataDump Get(ID id);
ObjectsTemplate<SAPDataDump> Get();
ID Save(SAPDataDump item);
void Delete(ID id);
}
#endregion
}