178 lines
4.2 KiB
C#
178 lines
4.2 KiB
C#
|
|
|||
|
using Ease.Core.Model;
|
|||
|
|
|||
|
|
|||
|
|
|||
|
using System;
|
|||
|
using System.Collections.Generic;
|
|||
|
using System.Data;
|
|||
|
using System.IO;
|
|||
|
using System.Reflection;
|
|||
|
|
|||
|
namespace HRM.BO
|
|||
|
{
|
|||
|
public class SurveyCategory:BasicBaseObject
|
|||
|
{
|
|||
|
#region Constructor
|
|||
|
|
|||
|
|
|||
|
public SurveyCategory()
|
|||
|
{
|
|||
|
_categoryID = 0;
|
|||
|
_code = string.Empty;
|
|||
|
_description = string.Empty;
|
|||
|
_status = EnumStatus.Active;
|
|||
|
}
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
#region Properties
|
|||
|
|
|||
|
#region CategoryID : ID
|
|||
|
|
|||
|
private int _categoryID;
|
|||
|
public int CategoryID
|
|||
|
{
|
|||
|
get { return _categoryID; }
|
|||
|
set
|
|||
|
{
|
|||
|
|
|||
|
_categoryID = value;
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
#region code : string
|
|||
|
|
|||
|
private string _code;
|
|||
|
public string Code
|
|||
|
{
|
|||
|
get { return _code; }
|
|||
|
set
|
|||
|
{
|
|||
|
|
|||
|
_code = value;
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
#region Description : string
|
|||
|
|
|||
|
private string _description;
|
|||
|
public string Description
|
|||
|
{
|
|||
|
get { return _description; }
|
|||
|
set
|
|||
|
{
|
|||
|
|
|||
|
_description = value;
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
#region Service Factory ISurveyCategoryService : ISurveyCategoryService
|
|||
|
|
|||
|
internal static ISurveyCategoryService Service
|
|||
|
{
|
|||
|
get { return Services.Factory.CreateService<ISurveyCategoryService>(typeof(ISurveyCategoryService)); }
|
|||
|
}
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
//#region Functions
|
|||
|
|
|||
|
//public string GetNextCode()
|
|||
|
//{
|
|||
|
// return SurveyCategory.Service.GetNextCode();
|
|||
|
//}
|
|||
|
|
|||
|
//public static SurveyCategory Get(int nID)
|
|||
|
//{
|
|||
|
// SurveyCategory oSurveyCategory = null;
|
|||
|
// #region Cache Header
|
|||
|
// oSurveyCategory = (SurveyCategory)_cache["Get", nID];
|
|||
|
// if (oSurveyCategory != null)
|
|||
|
// return oSurveyCategory;
|
|||
|
// #endregion
|
|||
|
// oSurveyCategory = SurveyCategory.Service.Get(nID);
|
|||
|
// #region Cache Footer
|
|||
|
// _cache.Add(oSurveyCategory, "Get", nID);
|
|||
|
// #endregion
|
|||
|
// return oSurveyCategory;
|
|||
|
//}
|
|||
|
|
|||
|
//public static SurveyCategory Get(string sCode)
|
|||
|
//{
|
|||
|
// SurveyCategory oSurveyCategory = null;
|
|||
|
// #region Cache Header
|
|||
|
// oSurveyCategory = (SurveyCategory)_cache["Get", sCode];
|
|||
|
// if (oSurveyCategory != null)
|
|||
|
// return oSurveyCategory;
|
|||
|
// #endregion
|
|||
|
// oSurveyCategory = SurveyCategory.Service.Get(sCode);
|
|||
|
// #region Cache Footer
|
|||
|
// _cache.Add(oSurveyCategory, "Get", sCode);
|
|||
|
// #endregion
|
|||
|
// return oSurveyCategory;
|
|||
|
//}
|
|||
|
|
|||
|
//public static List<SurveyCategory> Get(EnumStatus status)
|
|||
|
//{
|
|||
|
// #region Cache Header
|
|||
|
|
|||
|
// List<SurveyCategory> SurveyCategorys = _cache["Get",status] as List<SurveyCategory>;
|
|||
|
// if (SurveyCategorys != null)
|
|||
|
// return SurveyCategorys;
|
|||
|
|
|||
|
// #endregion
|
|||
|
|
|||
|
// try
|
|||
|
// {
|
|||
|
// SurveyCategorys = Service.Get(status);
|
|||
|
// }
|
|||
|
// catch (ServiceException e)
|
|||
|
// {
|
|||
|
// throw new Exception(e.Message, e);
|
|||
|
// }
|
|||
|
|
|||
|
// #region Cache Footer
|
|||
|
|
|||
|
// _cache.Add(SurveyCategorys, "Get",status);
|
|||
|
|
|||
|
// #endregion
|
|||
|
|
|||
|
// return SurveyCategorys;
|
|||
|
//}
|
|||
|
//public int Save()
|
|||
|
//{
|
|||
|
// this.SetAuditTrailProperties();
|
|||
|
// return SurveyCategory.Service.Save(this);
|
|||
|
//}
|
|||
|
|
|||
|
//public void Delete(int id)
|
|||
|
//{
|
|||
|
// SurveyCategory.Service.Delete(id);
|
|||
|
//}
|
|||
|
//#endregion
|
|||
|
|
|||
|
}
|
|||
|
#region ISurveyCategory Service
|
|||
|
|
|||
|
public interface ISurveyCategoryService
|
|||
|
{
|
|||
|
SurveyCategory Get(int id);
|
|||
|
List<SurveyCategory> Get(EnumStatus status);
|
|||
|
int Save(SurveyCategory item);
|
|||
|
void Delete(int id);
|
|||
|
SurveyCategory Get(string sCode);
|
|||
|
string GetNextCode();
|
|||
|
}
|
|||
|
|
|||
|
#endregion
|
|||
|
}
|