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 { #region LeaveException public class LeaveException : BasicBaseObject { #region Constructor public LeaveException() { //_nEmployeeID = 0; //_dStartDate = DateTime.Today; //_dEndDate = DateTime.Today; //_nLeaveID = 0; //_nOpeningBalance = 0; //_nMaxDays = 0; //_nCFDays = 0; } #endregion #region Properties public int EmployeeID { get; set; } public DateTime StartDate { get; set; } public DateTime EndDate { get; set; } public int LeaveID { get; set; } public double OpeningBalance { get; set; } public double MaxDays { get; set; } public double CFDays { get; set; } public string EmployeeNo { get; set; } public string EmployeeName { get; set; } public string LeaveName { get; set; } #endregion //#region Functions //public ID Save() //{ // this.SetAuditTrailProperties(); // return LeaveException.Service.Save(this); //} //public void DeleteByLeaveID() //{ // LeaveException.Service.DeleteByLeaveID(this.LeaveID); //} //public void Delete() //{ // LeaveException.Service.DeleteItem(this.ID.Integer); //} //public static List Get(DateTime dFrom,DateTime dTo) //{ // #region Cache Header // List Leaves = _cache["Get"] as List; // if (Leaves != null) // return Leaves; // #endregion // Leaves = LeaveException.Service.Get(dFrom, dTo); // #region Cache Footer // _cache.Add(Leaves, "Get"); // #endregion // return Leaves; //} //public static List GetByEmpID(int nLeaveID,int nEmpID) //{ // #region Cache Header // List Leaves = _cache["GetByEmpID"] as List; // if (Leaves != null) // return Leaves; // #endregion // Leaves = LeaveException.Service.GetByEmpID(nLeaveID,nEmpID); // #region Cache Footer // _cache.Add(Leaves, "GetByEmpID"); // #endregion // return Leaves; //} //#endregion //#region Service Factory //internal static ILeaveExceptionService Service //{ // get { return Services.Factory.CreateService(typeof(ILeaveExceptionService)); } //} //#endregion } #endregion #region ILeaveException Service public interface ILeaveExceptionService { int Save(LeaveException oLeave); void DeleteByEmpID(int nLeaveID); void DeleteItem(int nID); List Get(); List Get(DateTime dFrom, DateTime dTo); List GetByEmpID(int nLeaveID, int nEmpID); } #endregion }