using System; using Ease.Core.Model; using System; using System.Collections.Generic; using System.Data; using System.Linq; namespace HRM.BO { #region UnAuthorizeLeave public class UnAuthorizeLeave : BasicBaseObject { #region Constructor public UnAuthorizeLeave() { _name = string.Empty; _code = string.Empty; _nameInBangla = string.Empty; this.Status = EnumStatus.Active; } #endregion #region Properties #region name : string private string _name; public string Name { get { return _name; } set { _name = value; } } #endregion #region NameInBangla : string private string _nameInBangla; public string NameInBangla { get { return _nameInBangla; } set { _nameInBangla = value; } } #endregion public int PayrollTypeID { get; set; } #region code : string private string _code; public string Code { get { return _code; } set { _code = value; } } #endregion #region UserID : int private int _userID; public int UserID { get { return _userID; } set { _userID = value; } } #endregion //#region Service Factory IUnAuthorizeLeaveService : IUnAuthorizeLeaveService //internal static IUnAuthorizeLeaveService Service //{ // get { return Services.Factory.CreateService(typeof(IUnAuthorizeLeaveService)); } //} //#endregion #endregion //#region Functions //public static UnAuthorizeLeave Get(int nID) //{ // UnAuthorizeLeave oUnAuthorizeLeave = null; // #region Cache Header // oUnAuthorizeLeave = (UnAuthorizeLeave)_cache["Get", nID]; // if (oUnAuthorizeLeave != null) // return oUnAuthorizeLeave; // #endregion // oUnAuthorizeLeave = UnAuthorizeLeave.Service.Get(nID); // #region Cache Footer // _cache.Add(oUnAuthorizeLeave, "Get", nID); // #endregion // return oUnAuthorizeLeave; //} //public static UnAuthorizeLeave Get(string sCode) //{ // UnAuthorizeLeave oUnAuthorizeLeave = null; // #region Cache Header // oUnAuthorizeLeave = (UnAuthorizeLeave)_cache["Get", sCode]; // if (oUnAuthorizeLeave != null) // return oUnAuthorizeLeave; // #endregion // oUnAuthorizeLeave = UnAuthorizeLeave.Service.Get(sCode); // #region Cache Footer // _cache.Add(oUnAuthorizeLeave, "Get", sCode); // #endregion // return oUnAuthorizeLeave; //} //public static List Get() //{ // #region Cache Header // List unAuthorizeLeaves = _cache["Get"] as List; // if (unAuthorizeLeaves != null) // return unAuthorizeLeaves; // #endregion // try // { // unAuthorizeLeaves = Service.Get(); // } // catch (ServiceException e) // { // throw new Exception(e.Message, e); // } // #region Cache Footer // _cache.Add(unAuthorizeLeaves, "Get"); // #endregion // return unAuthorizeLeaves; //} //public int Save() //{ // base.SetAuditTrailProperties(); // return UnAuthorizeLeave.Service.Save(this); //} //public void Delete() //{ // UnAuthorizeLeave.Service.Delete(ID); //} //#endregion } #endregion #region IUnAuthorizeLeave Service public interface IUnAuthorizeLeaveService { UnAuthorizeLeave Get(int id); List Get(); int Save(UnAuthorizeLeave item); void Delete(int id); UnAuthorizeLeave Get(string sCode); } #endregion }