using System; using System.Collections.Generic; namespace HRM.BO { #region class HRJoiningQuestionary public class HRJoiningQuestionary : BasicBaseObject { #region Constructor public HRJoiningQuestionary() { QuestionIndex = 0; IsPrimary = EnumIsPrimary.NO; Description = string.Empty; QuestionNo = string.Empty; AnsDatatype = EnumAnswerType.None; } #endregion #region Properties public int QuestionIndex { get; set; } public EnumIsPrimary IsPrimary { get; set; } public string Description { get; set; } public string QuestionNo { get; set; } public EnumAnswerType AnsDatatype { get; set; } //#region Service Factory IHRJoiningQuestionaryService : IHRJoiningQuestionaryService //internal static IHRJoiningQuestionaryService Service //{ // get { return Services.Factory.CreateService(typeof(IHRJoiningQuestionaryService)); } //} //#endregion #endregion //#region Function(s) //#region Get //public static HRJoiningQuestionary Get(ID nID) //{ // HRJoiningQuestionary oHRJoiningQuestionary = null; // #region Cache Header // oHRJoiningQuestionary = (HRJoiningQuestionary)_cache["Get", nID]; // if (oHRJoiningQuestionary != null) // return oHRJoiningQuestionary; // #endregion // try // { // oHRJoiningQuestionary = Service.Get(nID); // } // catch (ServiceException e) // { // throw new Exception(e.Message, e); // } // #region Cache Footer // _cache.Add(oHRJoiningQuestionary, "Get", nID); // #endregion // return oHRJoiningQuestionary; //} //public static List Get(EnumStatus status) //{ // List oHRJoiningQuestionaries = null; // #region Cache Header // oHRJoiningQuestionaries = _cache["Get"] as List; // if (oHRJoiningQuestionaries != null) // return oHRJoiningQuestionaries; // #endregion // try // { // oHRJoiningQuestionaries = Service.Get(status); // } // catch (ServiceException e) // { // throw new Exception(e.Message, e); // } // #region Cache Footer // _cache.Add(oHRJoiningQuestionaries, "Get"); // #endregion // return oHRJoiningQuestionaries; //} //public static List GetByQuestionNo(string sQuesNo) //{ // List oHRJoiningQuestionaries = null; // #region Cache Header // oHRJoiningQuestionaries = _cache["Get"] as List; // if (oHRJoiningQuestionaries != null) // return oHRJoiningQuestionaries; // #endregion // try // { // oHRJoiningQuestionaries = Service.GetByQuestionNo(sQuesNo); // } // catch (ServiceException e) // { // throw new Exception(e.Message, e); // } // #region Cache Footer // _cache.Add(oHRJoiningQuestionaries, "Get"); // #endregion // return oHRJoiningQuestionaries; //} //#endregion //#region Save //public ID Save() //{ // //SetAuditTrailProperties(); // return Service.Save(this); //} //#endregion //#region Delete //public void Delete(ID id) //{ // Service.Delete(id); //} //#endregion //#endregion } #endregion #region IHRJoiningQuestionaryService public interface IHRJoiningQuestionaryService { HRJoiningQuestionary Get(int nID); List Get(EnumStatus status); List GetByQuestionNo(String sEmpNo); int Save(HRJoiningQuestionary item); void Delete(int id); } #endregion }