EchoTex_Payroll/HRM.BO/Leave/EmployeeShortLeave.cs
2024-10-14 10:01:49 +06:00

146 lines
4.3 KiB
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Ease.Core;
using Ease.Core.Model;
using System.Data;
namespace HRM.BO
{
public class EmployeeShortLeave: BasicBaseObject
{
#region Constructor
public EmployeeShortLeave()
{
}
#endregion
#region Properties
public int EmployeeID { get; set; }
public string Description { get; set; }
public DateTime FromDate { get; set; }
public DateTime ToDate { get; set; }
public EnumShortLeaveType ShortLeaveType { get; set; }
public bool WillReturn { get; set; }
#endregion
//#region Functions
//public EmployeeShortLeave Get()
//{
// EmployeeShortLeave esLeave = null;
// #region Cache Header
// esLeave = (EmployeeShortLeave)_cache["Get"];
// if (esLeave != null)
// return esLeave;
// #endregion
// esLeave = EmployeeShortLeave.Service.Get();
// #region Cache Footer
// _cache.Add(esLeave, "Get");
// #endregion
// return esLeave;
//}
//public EmployeeShortLeave Get(ID sLeaveID)
//{
// EmployeeShortLeave esLeave = null;
// #region Cache Header
// esLeave = (EmployeeShortLeave)_cache["Get", sLeaveID];
// if (esLeave != null)
// return esLeave;
// #endregion
// esLeave = EmployeeShortLeave.Service.Get(sLeaveID);
// #region Cache Footer
// _cache.Add(esLeave, "Get", sLeaveID);
// #endregion
// return esLeave;
//}
//public EmployeeShortLeave GetByType(int sLType)
//{
// EmployeeShortLeave esLeave = null;
// #region Cache Header
// esLeave = (EmployeeShortLeave)_cache["Get", sLType];
// if (esLeave != null)
// return esLeave;
// #endregion
// esLeave = EmployeeShortLeave.Service.GetByType(sLType);
// #region Cache Footer
// _cache.Add(esLeave, "Get", sLType);
// #endregion
// return esLeave;
//}
//public EmployeeShortLeave GetByEmpID(int employeeID)
//{
// EmployeeShortLeave esLeave = null;
// #region Cache Header
// esLeave = (EmployeeShortLeave)_cache["Get", employeeID];
// if (esLeave != null)
// return esLeave;
// #endregion
// esLeave = EmployeeShortLeave.Service.GetByEmpID(employeeID);
// #region Cache Footer
// _cache.Add(esLeave, "Get", employeeID);
// #endregion
// return esLeave;
//}
//public ID Save()
//{
// this.SetAuditTrailProperties();
// return EmployeeShortLeave.Service.Save(this);
//}
//public void Delete(ID id)
//{
// EmployeeShortLeave.Service.Delete(id);
//}
////public void Delete()
////{
//// EmployeeShortLeave.Service.Delete(this.ID);
////}
//public static List<EmployeeShortLeave> GetByEmp(int employeeID)
//{
// List<EmployeeShortLeave> Leaves = null;
// Leaves = EmployeeShortLeave.Service.GetByEmp(employeeID);
// return Leaves;
//}
//public static DataSet GetEmployeeWiseShortLeaveReport(int empId)
//{
// return EmployeeShortLeave.Service.GetEmployeeWiseShortLeaveReport(empId);
//}
//#endregion
//#region Service Factory
//internal static IEmployeeShortLeaveService Service
//{
// get { return Services.Factory.CreateService<IEmployeeShortLeaveService>(typeof(IEmployeeShortLeaveService)); }
//}
//#endregion
}
#region IEmployeeShortLeave Service
public interface IEmployeeShortLeaveService
{
EmployeeShortLeave Get();
EmployeeShortLeave Get(int id);
EmployeeShortLeave GetByType(int sLType);
EmployeeShortLeave GetByEmpID(int employeeID);
List<EmployeeShortLeave> GetByEmp(int employeeID);
DataSet GetEmployeeWiseShortLeaveReport(int empId);
int Save(EmployeeShortLeave oLeave);
void Delete(int id);
}
#endregion
}