Exemple #1
0
        /// <summary>
        /// Печатная форма отказа
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public ActionResult ExpDocumentRejectFormPdf(int productSeriesId, Guid id, int pid)
        {
            var report = new StiReport();
            var path   = System.Web.HttpContext.Current.Server.MapPath("~/Reports/Mrts/OBK/OBKExpRejectDocument.mrt");

            report.Load(path);
            report.Compile();
            report.RegBusinessObject("rm", expRepo.GetExpRejectFormData(id, productSeriesId, pid));
            report.Render(false);
            var stream = new MemoryStream();

            report.ExportDocument(StiExportFormat.Word2007, stream);
            stream.Position = 0;
            return(File(stream, "application/msword", $"Уведомление об отказе.docx"));
        }