using Ease.Core.Model; using System; using System.Collections.Generic; using System.Data; using System.IO; using System.Reflection; namespace HRM.BO { public class QuestionCategory:BasicBaseObject { #region Constructor public QuestionCategory() { _questionCategoryID = 0; _code = string.Empty; _description = string.Empty; _status = EnumStatus.Active; } #endregion #region Properties #region QuestionCategoryID : ID private int _questionCategoryID; public int QuestionCategoryID { get { return _questionCategoryID; } set { _questionCategoryID = 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 IQuestionCategoryService : IQuestionCategoryService internal static IQuestionCategoryService Service { get { return Services.Factory.CreateService(typeof(IQuestionCategoryService)); } } #endregion #endregion //#region Functions //public string GetNextCode() //{ // return QuestionCategory.Service.GetNextCode(); //} //public static QuestionCategory Get(int nID) //{ // QuestionCategory oQuestionCategory = null; // #region Cache Header // oQuestionCategory = (QuestionCategory)_cache["Get", nID]; // if (oQuestionCategory != null) // return oQuestionCategory; // #endregion // oQuestionCategory = QuestionCategory.Service.Get(nID); // #region Cache Footer // _cache.Add(oQuestionCategory, "Get", nID); // #endregion // return oQuestionCategory; //} //public static QuestionCategory Get(string sCode) //{ // QuestionCategory oQuestionCategory = null; // #region Cache Header // oQuestionCategory = (QuestionCategory)_cache["Get", sCode]; // if (oQuestionCategory != null) // return oQuestionCategory; // #endregion // oQuestionCategory = QuestionCategory.Service.Get(sCode); // #region Cache Footer // _cache.Add(oQuestionCategory, "Get", sCode); // #endregion // return oQuestionCategory; //} //public static List Get(EnumStatus status) //{ // #region Cache Header // List QuestionCategorys = _cache["Get",status] as List; // if (QuestionCategorys != null) // return QuestionCategorys; // #endregion // try // { // QuestionCategorys = Service.Get(status); // } // catch (ServiceException e) // { // throw new Exception(e.Message, e); // } // #region Cache Footer // _cache.Add(QuestionCategorys, "Get",status); // #endregion // return QuestionCategorys; //} //public int Save() //{ // this.SetAuditTrailProperties(); // return QuestionCategory.Service.Save(this); //} //public void Delete(int id) //{ // QuestionCategory.Service.Delete(id); //} //#endregion } #region IQuestionCategory Service public interface IQuestionCategoryService { QuestionCategory Get(int id); List Get(EnumStatus status); int Save(QuestionCategory item); void Delete(int id); QuestionCategory Get(string sCode); string GetNextCode(); } #endregion }