EchoTex_Payroll/HRM.BO/SearchReport/ReportAuthorization.cs

217 lines
5.3 KiB
C#
Raw Normal View History

2024-10-14 10:01:49 +06:00

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<IReportAuthorizationService>(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<ReportAuthorization> Get()
//{
// #region Cache Header
// List<ReportAuthorization> reportAuthorizations = _cache["Get"] as List<ReportAuthorization>;
// 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<ReportAuthorization> GetByReportID(int reportID)
//{
// #region Cache Header
// List<ReportAuthorization> reportAuthorizations = _cache["GetByReportID"] as List<ReportAuthorization>;
// 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<ReportAuthorization> Get();
List<ReportAuthorization> GetByReportID(int reportID);
ReportAuthorization Get(int reportID, int position);
int Save(ReportAuthorization item);
void Delete(int id);
}
#endregion
}