Exemplo n.º 1
0
        public PublishReportResponse PublishReport(PublishReportRequest Request)
        {
            try
            {
                PublishReportResponse result = new PublishReportResponse();
                Epi.Web.Interfaces.DataInterfaces.IReportDao IReportDao = new EF.EntityReportDao();



                Epi.Web.BLL.Report Implementation = new Epi.Web.BLL.Report(IReportDao);

                ReportInfoBO ReportInfoBO = Mapper.ToReportInfoBO(Request.ReportInfo);

                Implementation.PublishReport(ReportInfoBO);

                result.Message = "The report was successfully published";
                var ReportInfo = new ReportInfoDTO();
                ReportInfo.ReportURL = ConfigurationManager.AppSettings["ReportURL"] + Request.ReportInfo.ReportId;
                result.Reports       = new List <ReportInfoDTO>();
                result.Reports.Add(ReportInfo);
                return(result);
            }
            catch (Exception ex)
            {
                CustomFaultException customFaultException = new CustomFaultException();
                customFaultException.CustomMessage = ex.Message;
                customFaultException.Source        = ex.Source;
                customFaultException.StackTrace    = ex.StackTrace;
                customFaultException.HelpLink      = ex.HelpLink;
                throw new FaultException <CustomFaultException>(customFaultException);
            }
        }
Exemplo n.º 2
0
        public PublishReportResponse DeleteReport(PublishReportRequest Request)
        {
            try
            {
                PublishReportResponse result = new PublishReportResponse();
                Epi.Web.Interfaces.DataInterfaces.IReportDao IReportDao = new EF.EntityReportDao();



                Epi.Web.BLL.Report Implementation = new Epi.Web.BLL.Report(IReportDao);

                ReportInfoBO ReportInfoBO = Mapper.ToReportInfoBO(Request.ReportInfo);

                Implementation.DeleteReport(ReportInfoBO);

                result.Message = "The report was successfully Deleted";
                return(result);
            }
            catch (Exception ex)
            {
                CustomFaultException customFaultException = new CustomFaultException();
                customFaultException.CustomMessage = ex.Message;
                customFaultException.Source        = ex.Source;
                customFaultException.StackTrace    = ex.StackTrace;
                customFaultException.HelpLink      = ex.HelpLink;
                throw new FaultException <CustomFaultException>(customFaultException);
            }
        }
Exemplo n.º 3
0
        public PublishReportResponse GetSurveyReport(PublishReportRequest publishReportRequest)
        {
            PublishReportResponse PublishReportResponse = new PublishReportResponse();

            try
            {
                Epi.Web.Interfaces.DataInterfaces.IReportDao IReportDao = new EF.EntityReportDao();



                Epi.Web.BLL.Report Implementation = new Epi.Web.BLL.Report(IReportDao);



                var Result = Implementation.GetReport(publishReportRequest.ReportInfo.ReportId.ToString());

                foreach (var item in Result)
                {
                    PublishReportResponse.Reports.Add(Mapper.ToReportInfoDTO(item));
                }



                return(PublishReportResponse);
            }
            catch (Exception ex)
            {
                CustomFaultException customFaultException = new CustomFaultException();
                customFaultException.CustomMessage = ex.Message;
                customFaultException.Source        = ex.Source;
                customFaultException.StackTrace    = ex.StackTrace;
                customFaultException.HelpLink      = ex.HelpLink;
                throw new FaultException <CustomFaultException>(customFaultException);
            }
        }