291 lines
8.4 KiB
C#
291 lines
8.4 KiB
C#
|
|
using Ease.Core.Model;
|
|
|
|
|
|
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Data;
|
|
using System.IO;
|
|
using System.Reflection;
|
|
|
|
namespace HRM.BO
|
|
{
|
|
public class DelegateResponsibility: BasicBaseObject
|
|
{
|
|
#region Constructor
|
|
public DelegateResponsibility()
|
|
{
|
|
_isleave = false;
|
|
_isLoan = false;
|
|
_isAttendance = false;
|
|
_isUnlimited = false;
|
|
_isAccepted = false;
|
|
_fromEmployeeID = 0;
|
|
_toEmployeeID = 0;
|
|
_fromDate=DateTime.MinValue;
|
|
_toDate=DateTime.MinValue;
|
|
_acceptDate=DateTime.MinValue;
|
|
_remarks=string.Empty;
|
|
_isRead = false;
|
|
this.Status = EnumStatus.Active;
|
|
}
|
|
#endregion
|
|
|
|
#region Properties
|
|
|
|
#region FromEmployeeID
|
|
private int _fromEmployeeID;
|
|
public int FromEmployeeID
|
|
{
|
|
get { return _fromEmployeeID; }
|
|
set { _fromEmployeeID = value; }
|
|
}
|
|
#endregion
|
|
|
|
#region ToEmployeeID
|
|
private int _toEmployeeID;
|
|
public int ToEmployeeID
|
|
{
|
|
get { return _toEmployeeID; }
|
|
set { _toEmployeeID = value; }
|
|
}
|
|
#endregion
|
|
|
|
#region FromDate : DateTime
|
|
private DateTime _fromDate;
|
|
public DateTime FromDate
|
|
{
|
|
get { return _fromDate; }
|
|
set
|
|
{
|
|
_fromDate = value;
|
|
}
|
|
}
|
|
#endregion
|
|
|
|
#region ToDate : DateTime
|
|
private DateTime _toDate;
|
|
public DateTime ToDate
|
|
{
|
|
get { return _toDate; }
|
|
set
|
|
{
|
|
_toDate = value;
|
|
}
|
|
}
|
|
#endregion
|
|
|
|
#region AcceptDate : DateTime
|
|
private DateTime _acceptDate;
|
|
public DateTime AcceptDate
|
|
{
|
|
get { return _acceptDate; }
|
|
set
|
|
{
|
|
_acceptDate = value;
|
|
}
|
|
}
|
|
#endregion
|
|
|
|
#region IsAccepted
|
|
private bool _isAccepted;
|
|
public bool IsAccepted
|
|
{
|
|
get { return _isAccepted; }
|
|
set { _isAccepted = value; }
|
|
}
|
|
#endregion
|
|
|
|
#region IsLoan
|
|
private bool _isLoan;
|
|
public bool IsLoan
|
|
{
|
|
get { return _isLoan; }
|
|
set { _isLoan = value; }
|
|
}
|
|
#endregion
|
|
|
|
#region IsLeave
|
|
private bool _isleave;
|
|
public bool IsLeave
|
|
{
|
|
get { return _isleave; }
|
|
set { _isleave = value; }
|
|
}
|
|
#endregion
|
|
|
|
#region IsAttendance
|
|
private bool _isAttendance;
|
|
public bool IsAttendance
|
|
{
|
|
get { return _isAttendance; }
|
|
set { _isAttendance = value; }
|
|
}
|
|
#endregion
|
|
|
|
#region IsUnlimited
|
|
private bool _isUnlimited;
|
|
public bool IsUnlimited
|
|
{
|
|
get { return _isUnlimited; }
|
|
set { _isUnlimited = value; }
|
|
}
|
|
#endregion
|
|
|
|
#region IsRead
|
|
private bool _isRead;
|
|
public bool IsRead
|
|
{
|
|
get { return _isRead; }
|
|
set { _isRead = value; }
|
|
}
|
|
#endregion
|
|
|
|
#region Remarks
|
|
private string _remarks;
|
|
public string Remarks
|
|
{
|
|
get { return _remarks; }
|
|
set { _remarks = value; }
|
|
}
|
|
#endregion
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
//#region Functions
|
|
|
|
//public static List<DelegateResponsibility> Get()
|
|
//{
|
|
// List<DelegateResponsibility> delegateRes = null;
|
|
// #region Cache Header
|
|
// delegateRes = (List<DelegateResponsibility>)_cache["Get"];
|
|
// if (delegateRes != null)
|
|
// return delegateRes;
|
|
// #endregion
|
|
// delegateRes = DelegateResponsibility.Service.Get(SystemInformation.CurrentSysInfo.PayrollTypeID.Integer);
|
|
// #region Cache Footer
|
|
// _cache.Add(delegateRes, "Get");
|
|
// #endregion
|
|
// return delegateRes;
|
|
//}
|
|
|
|
//public static List<DelegateResponsibility> Get(string ids)
|
|
//{
|
|
// List<DelegateResponsibility> batGrandTags = null;
|
|
// #region Cache Header
|
|
// batGrandTags = (List<DelegateResponsibility>)_cache["Get"];
|
|
// if (batGrandTags != null)
|
|
// return batGrandTags;
|
|
// #endregion
|
|
// batGrandTags = DelegateResponsibility.Service.Get(ids,SystemInformation.CurrentSysInfo.PayrollTypeID.Integer);
|
|
// #region Cache Footer
|
|
// _cache.Add(batGrandTags, "Get");
|
|
// #endregion
|
|
// return batGrandTags;
|
|
//}
|
|
|
|
//public static List<DelegateResponsibility> GetByEmployeeID(int empID)
|
|
//{
|
|
// List<DelegateResponsibility> delegateRes = null;
|
|
// #region Cache Header
|
|
// delegateRes = (List<DelegateResponsibility>)_cache["GetByEmployeeID", empID];
|
|
// if (delegateRes != null)
|
|
// return delegateRes;
|
|
// #endregion
|
|
// delegateRes = DelegateResponsibility.Service.GetByEmployeeID(empID);
|
|
// #region Cache Footer
|
|
// _cache.Add(delegateRes, "GetByEmployeeID", empID);
|
|
// #endregion
|
|
// return delegateRes;
|
|
//}
|
|
//public void Save(List<DelegateResponsibility> batGrandTags)
|
|
//{
|
|
// foreach (DelegateResponsibility taging in batGrandTags)
|
|
// {
|
|
// taging.SetAuditTrailProperties();
|
|
// }
|
|
// DelegateResponsibility.Service.Save(batGrandTags);
|
|
//}
|
|
//public void Save()
|
|
//{
|
|
// this.SetAuditTrailProperties();
|
|
// DelegateResponsibility.Service.Save(this);
|
|
//}
|
|
//public void UpdateReadStatus(Ease.CoreV35.Model.int objID, bool isRead)
|
|
//{
|
|
// DelegateResponsibility.Service.UpdateReadStatus(objID,isRead);
|
|
//}
|
|
|
|
//public void UpdateStatus(Ease.CoreV35.Model.int objID, EnumStatus status)
|
|
//{
|
|
// DelegateResponsibility.Service.UpdateStatus(objID, status);
|
|
//}
|
|
//public void Delete(string employeeID)
|
|
//{
|
|
// DelegateResponsibility.Service.Delete(employeeID);
|
|
//}
|
|
|
|
//public static DelegateResponsibility Get(int employeeID)
|
|
//{
|
|
// DelegateResponsibility batGrandTags = null;
|
|
// #region Cache Header
|
|
// batGrandTags = (DelegateResponsibility)_cache["Get"];
|
|
// if (batGrandTags != null)
|
|
// return batGrandTags;
|
|
// #endregion
|
|
// batGrandTags = DelegateResponsibility.Service.Get(employeeID,SystemInformation.CurrentSysInfo.PayrollTypeID.Integer);
|
|
// #region Cache Footer
|
|
// _cache.Add(batGrandTags, "Get");
|
|
// #endregion
|
|
// return batGrandTags;
|
|
//}
|
|
//public static DelegateResponsibility Get(int id)
|
|
//{
|
|
// DelegateResponsibility delegateRes = null;
|
|
// #region Cache Header
|
|
// delegateRes = (DelegateResponsibility)_cache["Get", id];
|
|
// if (delegateRes != null)
|
|
// return delegateRes;
|
|
// #endregion
|
|
// delegateRes = DelegateResponsibility.Service.Get(id);
|
|
// #region Cache Footer
|
|
// _cache.Add(delegateRes, "Get", id);
|
|
// #endregion
|
|
// return delegateRes;
|
|
//}
|
|
|
|
//#endregion
|
|
|
|
//#region Service Factory
|
|
//internal static IDelegateResponsibilityService Service
|
|
//{
|
|
// get { return Services.Factory.CreateService<IDelegateResponsibilityService>(typeof(IDelegateResponsibilityService)); }
|
|
//}
|
|
//#endregion
|
|
|
|
|
|
}
|
|
|
|
public interface IDelegateResponsibilityService
|
|
{
|
|
DelegateResponsibility Get(int employeeID, int payrollTypeID);
|
|
List<DelegateResponsibility> GetWithPayrollType(int payrollTypeID);
|
|
List<DelegateResponsibility> Get(string ids, int payrollTypeID);
|
|
List<DelegateResponsibility> GetByEmployeeID(int empID);
|
|
|
|
DelegateResponsibility Get(int id);
|
|
void Save(List<DelegateResponsibility> batGrandTags);
|
|
void Delete(string employeeId);
|
|
|
|
void Save(DelegateResponsibility delegateResponsibility);
|
|
|
|
void UpdateReadStatus(int objID, bool isRead);
|
|
|
|
void UpdateStatus(int objID, EnumStatus status);
|
|
}
|
|
|
|
}
|