Esempio n. 1
0
 public PublishReportResponse GetSurveyReportList(PublishReportRequest publishReportRequest)
 {
     try
     {
         PublishReportResponse Response = _iDataService.GetSurveyReportList(publishReportRequest);
         return(Response);
     }
     catch (FaultException <CustomFaultException> cfe)
     {
         throw cfe;
     }
     catch (FaultException fe)
     {
         throw fe;
     }
     catch (CommunicationException ce)
     {
         throw ce;
     }
     catch (TimeoutException te)
     {
         throw te;
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Esempio 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);
            }
        }
Esempio n. 3
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);
            }
        }
Esempio n. 4
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);
            }
        }
Esempio n. 5
0
        public ActionResult Index(string reportid)
        {
            ReportModel Model = new ReportModel();

            try
            {
                PublishReportRequest PublishReportRequest = new PublishReportRequest();
                PublishReportRequest.ReportInfo.ReportId = reportid;
                PublishReportRequest.IncludHTML          = false;

                PublishReportResponse result = _isurveyFacade.GetSurveyReport(PublishReportRequest);



                Model.DateCreated = result.Reports[0].CreatedDate.ToString();
                Model.Reportid    = result.Reports[0].ReportId;
                StringBuilder html = new StringBuilder();
                foreach (var Gadget in result.Reports[0].Gadgets)
                {
                    html.Append(Gadget.GadgetHtml);
                }
                Model.ReportHtml = html.ToString();

                return(View(Model));;
            }
            catch (Exception ex)
            {
                return(Json(false));
            }
        }
Esempio n. 6
0
        public ActionResult Index(string reportid)
        {
            ReportModel Model = new ReportModel();

            try
            {
                if (!string.IsNullOrEmpty(WebConfigurationManager.AppSettings["Report_API_URL"].ToString()))
                {
                    RefeshReport(reportid);
                }
                //dba3faf6-4417-4f6d-920a-e3d6b680932a
                Epi.Web.Common.Helper.SqlHelper.GetReportXml(reportid);


                PublishReportRequest PublishReportRequest = new PublishReportRequest();
                PublishReportRequest.ReportInfo.ReportId = reportid;
                PublishReportRequest.IncludHTML          = false;

                PublishReportResponse result = _isurveyFacade.GetSurveyReport(PublishReportRequest);



                Model.DateCreated = result.Reports[0].CreatedDate.ToString();
                Model.Reportid    = result.Reports[0].ReportId;
                StringBuilder html = new StringBuilder();
                foreach (var Gadget in result.Reports[0].Gadgets)
                {
                    html.Append(Gadget.GadgetHtml);
                }
                Model.ReportHtml = html.ToString();

                return(View(Model));;
            }
            catch (Exception ex)
            {
                return(Json(false));
            }
        }
Esempio n. 7
0
 public void Insert(PublishReportResponse t)
 {
     throw new NotImplementedException();
 }