EchoTex_Payroll/HRM.BO/Survey/SurveyOrganization.cs

242 lines
6.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;
using System.Reflection;
namespace HRM.BO
{
public class SurveyOrganization: AuditTrailBase
{
#region Constructor
public SurveyOrganization()
{
_surveyID = 0;
_gradeID = 0;
_companyID = 0;
_departmentID = 0;
_locationID = 0;
}
#endregion
#region Properties
#region SurveyID : ID
private int _surveyID;
public int SurveyID
{
get { return _surveyID; }
set
{
_surveyID = value;
}
}
#endregion
#region GradeID : ID
private int _gradeID;
public int GradeID
{
get { return _gradeID; }
set
{
_gradeID = value;
}
}
#endregion
#region CompanyID : ID
private int _companyID;
public int CompanyID
{
get { return _companyID; }
set
{
_companyID = value;
}
}
#endregion
#region DepartmentID : ID
private int _departmentID;
public int DepartmentID
{
get { return _departmentID; }
set
{
_departmentID = value;
}
}
#endregion
#region LocationID : ID
private int _locationID;
public int LocationID
{
get { return _locationID; }
set
{
_locationID = value;
}
}
#endregion
#region Service Factory IPFTransactionService : IPFTransactionService
internal static ISurveyOrganizationService Service
{
get { return Services.Factory.CreateService<ISurveyOrganizationService>(typeof(ISurveyOrganizationService)); }
}
#endregion
#endregion
//#region Functions
//public SurveyOrganization Get(int nID)
//{
// SurveyOrganization oSurveyOrganization = null;
// #region Cache Header
// oSurveyOrganization = (SurveyOrganization)_cache["Get", ID];
// if (oSurveyOrganization != null)
// return oSurveyOrganization;
// #endregion
// oSurveyOrganization = SurveyOrganization.Service.Get(nID);
// #region Cache Footer
// _cache.Add(oSurveyOrganization, "Get", ID);
// #endregion
// return oSurveyOrganization;
//}
//public static List<SurveyOrganization> Get()
//{
// #region cache header
// List<SurveyOrganization> SurveyOrganizations = _cache["Get"] as List<SurveyOrganization>;
// if (SurveyOrganizations != null)
// return SurveyOrganizations;
// #endregion
// try
// {
// SurveyOrganizations = Service.Get();
// }
// catch (ServiceException e)
// {
// throw new Exception(e.Message, e);
// }
// #region cache footer
// _cache.Add(SurveyOrganizations, "Get");
// #endregion
// return SurveyOrganizations;
//}
//public static List<SurveyOrganization> Get(EnumStatus status)
//{
// #region Cache Header
// List<SurveyOrganization> SurveyOrganizations = _cache["Get", status] as List<SurveyOrganization>;
// if (SurveyOrganizations != null)
// return SurveyOrganizations;
// #endregion
// try
// {
// SurveyOrganizations = Service.Get(status);
// }
// catch (ServiceException e)
// {
// throw new Exception(e.Message, e);
// }
// #region Cache Footer
// _cache.Add(SurveyOrganizations, "Get", status);
// #endregion
// return SurveyOrganizations;
//}
//public static List<SurveyOrganization> GetSurveyOrganization(int surveyId)
//{
// #region Cache Header
// List<SurveyOrganization> SurveyOrganizations = _cache["GetSurveyOrganization", surveyId] as List<SurveyOrganization>;
// if (SurveyOrganizations != null)
// return SurveyOrganizations;
// #endregion
// try
// {
// SurveyOrganizations = Service.GetSurveyOrganization(surveyId);
// }
// catch (ServiceException e)
// {
// throw new Exception(e.Message, e);
// }
// #region Cache Footer
// _cache.Add(SurveyOrganizations, "GetSurveyOrganization", surveyId);
// #endregion
// return SurveyOrganizations;
//}
//public int Save()
//{
// base.SetAuditTrailProperties();
// return SurveyOrganization.Service.Save(this);
//}
//public void Delete(int id)
//{
// SurveyOrganization.Service.Delete(id);
//}
//#endregion
}
#region ISurveyOrganization Service
public interface ISurveyOrganizationService
{
SurveyOrganization Get(int id);
List<SurveyOrganization> Get();
List<SurveyOrganization> GetSurveyOrganization(int surveyId);
List<SurveyOrganization> Get(EnumStatus status);
int Save(SurveyOrganization item);
void Delete(int id);
}
#endregion
}