public void UpdateRecordStatus(SurveyAnswerRequest pRequestMessage)
 {
     try
     {
         Epi.Web.Enter.Interfaces.DataInterfaces.ISurveyResponseDao SurveyResponseDao = new EF.EntitySurveyResponseDao();
         Epi.Web.BLL.SurveyResponse Implementation = new Epi.Web.BLL.SurveyResponse(SurveyResponseDao);
         foreach (SurveyAnswerDTO DTO in pRequestMessage.SurveyAnswerList)
         {
             Implementation.UpdateRecordStatus(Mapper.ToBusinessObject(DTO));
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
        public void SetSurveyAnswerStatus(SurveyAnswerRequest pRequest)
        {
            SurveyAnswerResponse SurveyAnswerResponse = new SurveyAnswerResponse();

            Epi.Web.Enter.Interfaces.DataInterfaces.IDaoFactory        entityDaoFactory   = new EF.EntityDaoFactory();
            Epi.Web.Enter.Interfaces.DataInterfaces.ISurveyResponseDao ISurveyResponseDao = entityDaoFactory.SurveyResponseDao;
            Epi.Web.BLL.SurveyResponse Implementation   = new Epi.Web.BLL.SurveyResponse(ISurveyResponseDao);
            List <SurveyResponseBO>    SurveyAnswerList = new List <SurveyResponseBO>();

            SurveyAnswerList = Implementation.GetResponsesHierarchyIdsByRootId(pRequest.Criteria.SurveyAnswerIdList[0].ToString());

            foreach (var response in SurveyAnswerList)
            {
                var obj = Mapper.ToBusinessObject(Mapper.ToDataTransferObject(response), pRequest.Criteria.UserId);
                obj.Status = pRequest.Criteria.StatusId;
                Implementation.UpdateRecordStatus(obj);
            }
        }