using Ease.Core.Model; using System; using System.Collections.Generic; using System.Data; using System.IO; using System.Reflection; namespace HRM.BO { public class SurveyAnswerCount : AuditTrailBase { #region Constructor public SurveyAnswerCount() { _surveyID = 0; _questionID = 0; _answerID = 0; _hitCount = 0; } #endregion #region Properties #region SurveyID : ID private int _surveyID; public int SurveyID { get { return _surveyID; } set { _surveyID = value; } } #endregion #region QuestionID : int private int _questionID; public int QuestionID { get { return _questionID; } set { _questionID = value; } } #endregion #region AnswerID : int private int _answerID; public int AnswerID { get { return _answerID; } set { _answerID = value; } } #endregion #region HitCount : int private int _hitCount; public int HitCount { get { return _hitCount; } set { _hitCount = value; } } #endregion #region Service Factory IPFTransactionService : IPFTransactionService internal static ISurveyAnswerCountService Service { get { return Services.Factory.CreateService(typeof(ISurveyAnswerCountService)); } } #endregion #endregion //#region Functions //public SurveyAnswerCount GetSurveyAnswerCount(int surveyId, int nQuestionId, int nAnswerId) //{ // SurveyAnswerCount oSurveyAnswerCount = null; // #region Cache Header // oSurveyAnswerCount = (SurveyAnswerCount)_cache["GetSurveyAnswerCount", surveyId, nQuestionId, nAnswerId]; // if (oSurveyAnswerCount != null) // return oSurveyAnswerCount; // #endregion // oSurveyAnswerCount = SurveyAnswerCount.Service.GetSurveyAnswerCount(surveyId, nQuestionId, nAnswerId); // #region Cache Footer // _cache.Add(oSurveyAnswerCount, "GetSurveyAnswerCount", surveyId, nQuestionId, nAnswerId); // #endregion // return oSurveyAnswerCount; //} //public static List GetSurveyAnswerCount() //{ // #region cache header // List SurveyAnswerCounts = _cache["GetSurveyAnswerCount"] as List; // if (SurveyAnswerCounts != null) // return SurveyAnswerCounts; // #endregion // try // { // SurveyAnswerCounts = Service.GetSurveyAnswerCount(); // } // catch (ServiceException e) // { // throw new Exception(e.Message, e); // } // #region cache footer // _cache.Add(SurveyAnswerCounts, "GetSurveyAnswerCount"); // #endregion // return SurveyAnswerCounts; //} //public static List GetSurveyAnswerCount(int surveyId) //{ // #region Cache Header // List SurveyAnswerCounts = _cache["GetSurveyAnswerCount", surveyId] as List; // if (SurveyAnswerCounts != null) // return SurveyAnswerCounts; // #endregion // try // { // SurveyAnswerCounts = Service.GetSurveyAnswerCount(surveyId); // } // catch (ServiceException e) // { // throw new Exception(e.Message, e); // } // #region Cache Footer // _cache.Add(SurveyAnswerCounts, "GetSurveyAnswerCount", surveyId); // #endregion // return SurveyAnswerCounts; //} //public int Save() //{ // base.SetAuditTrailProperties(); // return SurveyAnswerCount.Service.Save(this); //} //public void Delete(int id) //{ // SurveyAnswerCount.Service.Delete(id); //} //#endregion } #region ISurveyAnswerCount Service public interface ISurveyAnswerCountService { List GetSurveyAnswerCount(int surveyId); SurveyAnswerCount GetSurveyAnswerCount(int surveyId, int nQuestionId, int nAnswerId); List GetSurveyAnswerCount(); int Save(SurveyAnswerCount item); void Delete(int id); } #endregion }