using Ease.Core.Model; using System; using System.Collections.Generic; using System.Data; using System.IO; namespace HRM.BO { #region ReportAuthorization public class ReportAuthorization:AuditTrailBase { #region Constructor public ReportAuthorization() { _reportID = 0; _authorizePersionId = 0; _position = 0; } #endregion #region Properties #region ReportID : ID private int _reportID; public int ReportID { get { return _reportID; } set { _reportID = value; } } #endregion #region AuthorizePersionId : ID private int _authorizePersionId; public int AuthorizePersionId { get { return _authorizePersionId; } set { _authorizePersionId = value; } } #endregion #region position : int private int _position; public int Position { get { return _position; } set { _position = value; } } #endregion //#region Service Factory IReportAuthorizationService : IReportAuthorizationService //internal static IReportAuthorizationService Service //{ // get { return Services.Factory.CreateService(typeof(IReportAuthorizationService)); } //} //#endregion #endregion //#region Functions //public static ReportAuthorization Get(int nID) //{ // ReportAuthorization oReportAuthorization = null; // #region Cache Header // oReportAuthorization = (ReportAuthorization)_cache["Get", nID]; // if (oReportAuthorization != null) // return oReportAuthorization; // #endregion // oReportAuthorization = ReportAuthorization.Service.Get(nID); // #region Cache Footer // _cache.Add(oReportAuthorization, "Get", nID); // #endregion // return oReportAuthorization; //} //public static List Get() //{ // #region Cache Header // List reportAuthorizations = _cache["Get"] as List; // if (reportAuthorizations != null) // return reportAuthorizations; // #endregion // try // { // reportAuthorizations = Service.Get(); // } // catch (ServiceException e) // { // throw new Exception(e.Message, e); // } // #region Cache Footer // _cache.Add(reportAuthorizations, "Get"); // #endregion // return reportAuthorizations; //} //public static List GetByReportID(int reportID) //{ // #region Cache Header // List reportAuthorizations = _cache["GetByReportID"] as List; // if (reportAuthorizations != null) // return reportAuthorizations; // #endregion // try // { // reportAuthorizations = Service.GetByReportID(reportID); // } // catch (ServiceException e) // { // throw new Exception(e.Message, e); // } // #region Cache Footer // _cache.Add(reportAuthorizations, "GetByReportID"); // #endregion // return reportAuthorizations; //} //public static ReportAuthorization Get(int reportID,int position) //{ // #region Cache Header // ReportAuthorization reportAuthorization = _cache["GetByReportID"] as ReportAuthorization; // if (reportAuthorization != null) // return reportAuthorization; // #endregion // try // { // reportAuthorization = Service.Get(reportID,position); // } // catch (ServiceException e) // { // throw new Exception(e.Message, e); // } // #region Cache Footer // _cache.Add(reportAuthorization, "GetByReportID"); // #endregion // return reportAuthorization; //} //public int Save() //{ // return ReportAuthorization.Service.Save(this); //} //public void Delete() //{ // ReportAuthorization.Service.Delete(ID); //} //public void Delete(int iD) //{ // ReportAuthorization.Service.Delete(iD); //} //#endregion } #endregion #region IReportAuthorization Service public interface IReportAuthorizationService { ReportAuthorization Get(int id); List Get(); List GetByReportID(int reportID); ReportAuthorization Get(int reportID, int position); int Save(ReportAuthorization item); void Delete(int id); } #endregion }