EchoTex_Payroll/HRM.BO/SearchReport/ReportItem.cs

526 lines
11 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 ReportItem
public class ReportItem : BasicBaseObject
{
#region Constructor
public ReportItem()
{
_reportID = 0;
_name = string.Empty;
_reportType = string.Empty;
_defaultHeader = string.Empty;
_userHeader1 = string.Empty;
_userHeader2 = string.Empty;
_chronology = 0;
_searchFrom = 0;
_itemType = 0;
_isCompanyInfo = false;
_isDateMonth = false;
_isSearchCriteria = false;
_isGroupEachPage = false;
_isPageNo = false;
_isDateTime = false;
_isGroupbyCriteria = false;
_bankNeeded = false;
_isSignatoriesEachPageFooter = false;
_progressBar = 0;
_iNSQL = string.Empty;
_searchItems = string.Empty;
}
#endregion
#region Properties
#region ReportAuthorization
private List<ReportAuthorization> _reportAuthorization;
public List<ReportAuthorization> ReportAuthors
{
get
{
if (_reportAuthorization == null)
{
_reportAuthorization = new List<ReportAuthorization>();
}
return _reportAuthorization;
}
set { _reportAuthorization = value; }
}
#endregion
#region reportID : ID
private int _reportID;
public int ReportID
{
get { return _reportID; }
set
{
_reportID = value;
}
}
#endregion
#region name : string
private string _name;
public string Name
{
get { return _name; }
set
{
_name = value;
}
}
#endregion
#region defaultHeader : string
private string _defaultHeader;
public string DefaultHeader
{
get { return _defaultHeader; }
set
{
_defaultHeader = value;
}
}
#endregion
#region userHeader1 : string
private string _userHeader1;
public string UserHeader1
{
get { return _userHeader1; }
set
{
_userHeader1 = value;
}
}
#endregion
#region userHeader2 : string
private string _userHeader2;
public string UserHeader2
{
get { return _userHeader2; }
set
{
_userHeader2 = value;
}
}
#endregion
#region chronology : EnumChronology
private EnumChronology _chronology;
public EnumChronology Chronology
{
get { return _chronology; }
set
{
_chronology = value;
}
}
#endregion
#region searchFrom : EnumSearchFromTable
private EnumSearchFrom _searchFrom;
public EnumSearchFrom SearchFrom
{
get { return _searchFrom; }
set
{
_searchFrom = value;
}
}
#endregion
#region itemType : EnumReportItemType
private EnumReportItemType _itemType;
public EnumReportItemType ItemType
{
get { return _itemType; }
set
{
_itemType = value;
}
}
#endregion
#region bankNeeded : bool
private bool _bankNeeded;
public bool BankNeeded
{
get { return _bankNeeded; }
set
{
_bankNeeded = value;
}
}
#endregion
#region isCompanyInfo : bool
private bool _isCompanyInfo;
public bool IsCompanyInfo
{
get { return _isCompanyInfo; }
set
{
_isCompanyInfo = value;
}
}
#endregion
#region isPageNo : bool
private bool _isPageNo;
public bool IsPageNo
{
get { return _isPageNo; }
set
{
_isPageNo = value;
}
}
#endregion
#region isDateMonth : bool
private bool _isDateMonth;
public bool IsDateMonth
{
get { return _isDateMonth; }
set
{
_isDateMonth = value;
}
}
#endregion
#region isSearchCriteria : bool
private bool _isSearchCriteria;
public bool IsSearchCriteria
{
get { return _isSearchCriteria; }
set
{
_isSearchCriteria = value;
}
}
#endregion
#region isGroupbyCriteria : bool
private bool _isGroupbyCriteria;
public bool IsGroupbyCriteria
{
get { return _isGroupbyCriteria; }
set
{
_isGroupbyCriteria = value;
}
}
#endregion
#region isSignatoriesEachPageFooter : bool
private bool _isSignatoriesEachPageFooter;
public bool IsSignatoriesEachPageFooter
{
get { return _isSignatoriesEachPageFooter; }
set
{
_isSignatoriesEachPageFooter = value;
}
}
#endregion
#region isDateTime : bool
private bool _isDateTime;
public bool IsDateTime
{
get { return _isDateTime; }
set
{
_isDateTime = value;
}
}
#endregion
#region isGroupEachPage : bool
private bool _isGroupEachPage;
public bool IsGroupEachPage
{
get { return _isGroupEachPage; }
set
{
_isGroupEachPage = value;
}
}
#endregion
#region iNSQL : string
private string _iNSQL;
public string INSQL
{
get { return _iNSQL; }
set
{
_iNSQL = value;
}
}
#endregion
#region searchItems : string
private string _searchItems;
public string SearchItems
{
get { return _searchItems; }
set
{
_searchItems = value;
}
}
#endregion
#region groupby : string
private string _groupby;
public string Groupby
{
get { return _groupby; }
set
{
_groupby = value;
}
}
#endregion
#region progressBar : int
private int _progressBar;
public int ProgressBar
{
get { return _progressBar; }
set
{
_progressBar = value;
}
}
#endregion
#region reportType : string
private string _reportType;
public string ReportType
{
get { return _reportType; }
set
{
_reportType = value;
}
}
#endregion
#region Object name : string
private string _objectName;
public string ObjectName
{
get { return _objectName; }
set
{
_objectName = value;
}
}
#endregion
#region Function name : string
private string _functionName;
public string FunctionName
{
get { return _functionName; }
set
{
_functionName = value;
}
}
#endregion
//#region Service Factory IReportItemService : IReportItemService
//internal static IReportItemService Service
//{
// get { return Services.Factory.CreateService<IReportItemService>(typeof(IReportItemService)); }
//}
//#endregion
#endregion
//#region Functions
//public static ReportItem Get(int nID)
//{
// ReportItem oReportItem = null;
// #region Cache Header
// oReportItem = (ReportItem)_cache["Get", nID];
// if (oReportItem != null)
// return oReportItem;
// #endregion
// oReportItem = ReportItem.Service.Get(nID);
// #region Cache Footer
// _cache.Add(oReportItem, "Get", nID);
// #endregion
// return oReportItem;
//}
//public static ReportItem GetByReportType(int reportID)
//{
// ReportItem oReportItem = null;
// #region Cache Header
// oReportItem = (ReportItem)_cache["GetByReportType", reportID];
// if(oReportItem != null)
// return oReportItem;
// #endregion
// oReportItem = ReportItem.Service.GetByReportType(reportID);
// #region Cache Footer
// _cache.Add(oReportItem, "GetByReportType", reportID);
// #endregion
// return oReportItem;
//}
//public static List<ReportItem> Get()
//{
// #region Cache Header
// List<ReportItem> reportItems = _cache["Get"] as List<ReportItem>;
// if (reportItems != null)
// return reportItems;
// #endregion
// try
// {
// reportItems = Service.Get();
// }
// catch (ServiceException e)
// {
// throw new Exception(e.Message, e);
// }
// #region Cache Footer
// _cache.Add(reportItems, "Get");
// #endregion
// return reportItems;
//}
//public int Save()
//{
// base.SetAuditTrailProperties();
// return ReportItem.Service.Save(this);
//}
//public void Delete()
//{
// ReportItem.Service.Delete(ID);
//}
//#endregion
//public static bool IsExist(int ReportID)
//{
// return ReportItem.Service.IsExist(ReportID);
//}
}
#endregion
#region IReportItem Service
public interface IReportItemService
{
ReportItem Get(int id);
List<ReportItem> Get();
int Save(ReportItem item);
void Delete(int id);
bool IsExist(int ReportID);
ReportItem GetByReportType(int reportID);
}
#endregion
}