public SurveyControlsResponse GetSurveyControlsList(SurveyControlsRequest pRequestMessage) { SurveyControlsResponse SurveyControlsResponse = new SurveyControlsResponse(); try { Interfaces.DataInterfaces.ISurveyInfoDao ISurveyInfoDao = new EntitySurveyInfoDao(); SurveyInfo Implementation = new BLL.SurveyInfo(ISurveyInfoDao); SurveyControlsResponse = Implementation.GetSurveyControlsforApi(pRequestMessage.SurveyId); } catch (Exception ex) { SurveyControlsResponse.Message = "Error"; throw ex; } return(SurveyControlsResponse); }
public List <SourceTableDTO> GetSourceTables(string SurveyId) { //List<SourceTableBO> list = new List<SourceTableBO>(); SourceTablesResponse SourceTables = new SourceTablesResponse(); SurveyControlsResponse SurveyControlsResponse = new SurveyControlsResponse(); try { Interfaces.DataInterfaces.ISurveyInfoDao ISurveyInfoDao = new EntitySurveyInfoDao(); SurveyInfo Implementation = new BLL.SurveyInfo(ISurveyInfoDao); SourceTables.List = Common.ObjectMapping.Mapper.ToSourceTableDTO(Implementation.GetSourceTables(SurveyId)); } catch (Exception ex) { SurveyControlsResponse.Message = "Error"; throw ex; } return(SourceTables.List); }
/// <summary> /// Validate Header information coming from the request /// </summary> /// <param name="SurveyId"></param> /// <returns>response </returns> public SurveyInfoBO GetSurveyInfoById(string SurveyId) { Interfaces.DataInterfaces.ISurveyInfoDao surveyInfoDao = new EF.EntitySurveyInfoDao(); BLL.SurveyInfo SurveyInfo = new BLL.SurveyInfo(surveyInfoDao); try { var surveyInfo = SurveyInfo.GetSurveyInfoById(SurveyId); if (surveyInfo != null) { Interfaces.DataInterfaces.IOrganizationDao OrgDao = new EF.EntityOrganizationDao(); BLL.Organization Organization = new BLL.Organization(OrgDao); var OrgBo = Organization.GetOrganizationById(surveyInfo.OrganizationId); surveyInfo.OrganizationKey = new Guid(OrgBo.OrganizationKey); } return(surveyInfo); } catch (Exception ex) { return(null); } }