242 lines
5.9 KiB
C#
242 lines
5.9 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;
|
|||
|
using System.Data.Linq.Mapping;
|
|||
|
|
|||
|
namespace Payroll.BO
|
|||
|
{
|
|||
|
#region Loan Parameter
|
|||
|
|
|||
|
[Serializable]
|
|||
|
public class LoanEmployeeDoc : AuditTrailBase
|
|||
|
{
|
|||
|
#region Cache Store
|
|||
|
|
|||
|
private static Cache _cache = new Cache(typeof(LoanEmployeeDoc));
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
#region Constructor
|
|||
|
public LoanEmployeeDoc()
|
|||
|
{
|
|||
|
_hrDocID = null;
|
|||
|
_loanIssueID = null;
|
|||
|
_employeeID = null;
|
|||
|
_hrID = null;
|
|||
|
_hrReceiveDate = DateTime.MinValue;
|
|||
|
_fileNo = string.Empty;
|
|||
|
_safeNo = string.Empty;
|
|||
|
_hrRemarks = string.Empty;
|
|||
|
_empReceiveDate = DateTime.MinValue;
|
|||
|
_empReceiveRemarks = string.Empty;
|
|||
|
}
|
|||
|
#endregion
|
|||
|
|
|||
|
#region Properties
|
|||
|
#region HRDocID : ID
|
|||
|
private ID _hrDocID;
|
|||
|
public ID HRDocID
|
|||
|
{
|
|||
|
get { return _hrDocID; }
|
|||
|
set
|
|||
|
{
|
|||
|
base.OnPropertyChange<ID>("hrDocID", _hrDocID, value);
|
|||
|
_hrDocID = value;
|
|||
|
}
|
|||
|
}
|
|||
|
#endregion
|
|||
|
|
|||
|
#region LoanIssueID : ID
|
|||
|
|
|||
|
private ID _loanIssueID;
|
|||
|
public ID LoanIssueID
|
|||
|
{
|
|||
|
get { return _loanIssueID; }
|
|||
|
set
|
|||
|
{
|
|||
|
base.OnPropertyChange<ID>("LoanIssueID", _loanIssueID, value);
|
|||
|
_loanIssueID = value;
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
#region EmployeeID : ID
|
|||
|
|
|||
|
private ID _employeeID;
|
|||
|
public ID EmployeeID
|
|||
|
{
|
|||
|
get { return _employeeID; }
|
|||
|
set
|
|||
|
{
|
|||
|
base.OnPropertyChange<ID>("EmployeeID", _employeeID, value);
|
|||
|
_employeeID = value;
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
#region HRID : ID
|
|||
|
|
|||
|
private ID _hrID;
|
|||
|
public ID HRID
|
|||
|
{
|
|||
|
get { return _hrID; }
|
|||
|
set
|
|||
|
{
|
|||
|
base.OnPropertyChange<ID>("hrID", _hrID, value);
|
|||
|
_hrID = value;
|
|||
|
}
|
|||
|
}
|
|||
|
#endregion
|
|||
|
|
|||
|
#region HRReceiveDate : DateTime
|
|||
|
private DateTime _hrReceiveDate;
|
|||
|
public DateTime HRReceiveDate
|
|||
|
{
|
|||
|
get { return _hrReceiveDate; }
|
|||
|
set
|
|||
|
{
|
|||
|
base.OnPropertyChange<DateTime>("hrReceiveDate", _hrReceiveDate, value);
|
|||
|
_hrReceiveDate = value;
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
#region FileNo : string
|
|||
|
private string _fileNo;
|
|||
|
public string FileNo
|
|||
|
{
|
|||
|
get { return _fileNo; }
|
|||
|
set
|
|||
|
{
|
|||
|
base.OnPropertyChange<string>("fileNo", _fileNo, value);
|
|||
|
_fileNo = value;
|
|||
|
}
|
|||
|
}
|
|||
|
#endregion
|
|||
|
|
|||
|
#region SafeNo : string
|
|||
|
private string _safeNo;
|
|||
|
public string SafeNo
|
|||
|
{
|
|||
|
get { return _safeNo; }
|
|||
|
set
|
|||
|
{
|
|||
|
base.OnPropertyChange<string>("safeNo", _safeNo, value);
|
|||
|
_safeNo = value;
|
|||
|
}
|
|||
|
}
|
|||
|
#endregion
|
|||
|
|
|||
|
#region HRRemarks : string
|
|||
|
private string _hrRemarks;
|
|||
|
public string HRRemarks
|
|||
|
{
|
|||
|
get { return _hrRemarks; }
|
|||
|
set
|
|||
|
{
|
|||
|
base.OnPropertyChange<string>("hrRemarks", _hrRemarks, value);
|
|||
|
_hrRemarks = value;
|
|||
|
}
|
|||
|
}
|
|||
|
#endregion
|
|||
|
|
|||
|
#region EmpReceiveDate : string
|
|||
|
private DateTime _empReceiveDate;
|
|||
|
public DateTime EmpReceiveDate
|
|||
|
{
|
|||
|
get { return _empReceiveDate; }
|
|||
|
set
|
|||
|
{
|
|||
|
base.OnPropertyChange<DateTime>("empReceiveDate", _empReceiveDate, value);
|
|||
|
_empReceiveDate = value;
|
|||
|
}
|
|||
|
}
|
|||
|
#endregion
|
|||
|
|
|||
|
#region EmpReceiveRemarks : string
|
|||
|
private string _empReceiveRemarks;
|
|||
|
public string EmpReceiveRemarks
|
|||
|
{
|
|||
|
get { return _empReceiveRemarks; }
|
|||
|
set
|
|||
|
{
|
|||
|
base.OnPropertyChange<string>("empReceiveRemarks", _empReceiveRemarks, value);
|
|||
|
_empReceiveRemarks = value;
|
|||
|
}
|
|||
|
}
|
|||
|
#endregion
|
|||
|
#endregion
|
|||
|
|
|||
|
#region Service Factory ILoanEmployeeDocService : ILoanEmployeeDocService
|
|||
|
|
|||
|
internal static ILoanEmployeeDocService Service
|
|||
|
{
|
|||
|
get { return Services.Factory.CreateService<ILoanEmployeeDocService>(typeof(ILoanEmployeeDocService)); }
|
|||
|
}
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
#region Functions
|
|||
|
public static LoanEmployeeDoc Get(ID nID)
|
|||
|
{
|
|||
|
LoanEmployeeDoc oLoanEmployeeDoc = null;
|
|||
|
#region Cache Header
|
|||
|
oLoanEmployeeDoc = (LoanEmployeeDoc)_cache["Get", nID];
|
|||
|
if (oLoanEmployeeDoc != null)
|
|||
|
return oLoanEmployeeDoc;
|
|||
|
#endregion
|
|||
|
oLoanEmployeeDoc = LoanEmployeeDoc.Service.Get(nID);
|
|||
|
#region Cache Footer
|
|||
|
_cache.Add(oLoanEmployeeDoc, "Get", nID);
|
|||
|
#endregion
|
|||
|
return oLoanEmployeeDoc;
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
public static ObjectsTemplate<LoanEmployeeDoc> GetbyIssueId(ID issueid)
|
|||
|
{
|
|||
|
ObjectsTemplate<LoanEmployeeDoc> loanEmployeeDocs = null;
|
|||
|
|
|||
|
|
|||
|
try
|
|||
|
{
|
|||
|
loanEmployeeDocs = Service.GetbyIssueId(issueid);
|
|||
|
}
|
|||
|
catch (ServiceException e)
|
|||
|
{
|
|||
|
throw new Exception(e.Message, e);
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
|
|||
|
return loanEmployeeDocs;
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
public void Delete()
|
|||
|
{
|
|||
|
LoanEmployeeDoc.Service.Delete(ID);
|
|||
|
}
|
|||
|
#endregion
|
|||
|
}
|
|||
|
#endregion
|
|||
|
|
|||
|
#region ILoanEmployeeDocService Service
|
|||
|
|
|||
|
public interface ILoanEmployeeDocService
|
|||
|
{
|
|||
|
LoanEmployeeDoc Get(ID id);
|
|||
|
ObjectsTemplate<LoanEmployeeDoc> GetbyIssueId(ID issueid);
|
|||
|
void Delete(ID id);
|
|||
|
}
|
|||
|
|
|||
|
#endregion
|
|||
|
}
|