Exemple #1
0
        /// <summary>
        /// Создание xml Word
        /// </summary>
        /// <param name="package"></param>
        /// <param name="template"></param>
        /// <param name="obj"></param>
        public void CreateWord(WordprocessingDocument package, EfDatabaseTelephoneHelp.TelephoneHelp template, object obj)
        {
            MainDocumentPart mainDocumentPart = package.AddMainDocumentPart();

            DocumentFormat.OpenXml.Wordprocessing.Document document = new DocumentFormat.OpenXml.Wordprocessing.Document();
            PageSetting   settingpage    = new PageSetting();
            DocumentsFull documentInvoce = new DocumentsFull();

            document.Append(settingpage.DocumentSettingVertical());
            document.Append(documentInvoce.DocumentsTelephoneHelp(template));
            mainDocumentPart.Document = document;
        }
Exemple #2
0
        /// <summary>
        /// Создать документ
        /// </summary>
        /// <param name="package">Пакет</param>
        /// <param name="template">Шаблон</param>
        /// <param name="obj">Объект</param>
        public void CreateWord(WordprocessingDocument package, QrCodeOffice template, object obj = null)
        {
            MainDocumentPart mainDocumentPart = package.AddMainDocumentPart();

            DocumentFormat.OpenXml.Wordprocessing.Document document = new DocumentFormat.OpenXml.Wordprocessing.Document();
            PageSetting   settingPage    = new PageSetting();
            DocumentsFull documentInvoce = new DocumentsFull();

            document.Append(settingPage.DocumentSettingVertical());
            document.Append(documentInvoce.StickerOffice(template, mainDocumentPart));
            mainDocumentPart.Document = document;
        }
Exemple #3
0
        public void CreateWord(WordprocessingDocument package, CardFaceUl template, object obj)
        {
            MainDocumentPart mainDocumentPart = package.AddMainDocumentPart();

            DocumentFormat.OpenXml.Wordprocessing.Document document = new DocumentFormat.OpenXml.Wordprocessing.Document();
            PageSetting      settingPage     = new PageSetting();
            DocumentsPreChek documentInvoice = new DocumentsPreChek();

            document.Append(settingPage.DocumentSettingVertical(new PageMargin()
            {
                Top = 1135, Right = 567, Bottom = 567, Left = 1135
            }));
            document.Append(documentInvoice.GenerateReportNote(template));
            mainDocumentPart.Document = document;
        }
Exemple #4
0
        /// <summary>
        /// Создание выписки выгрузки данных
        /// </summary>
        /// <param name="package">Пакет</param>
        /// <param name="template">Шаблон</param>
        /// <param name="obj">Объект</param>
        public void CreateWord(WordprocessingDocument package, Statement template, object obj = null)
        {
            MainDocumentPart mainDocumentPart = package.AddMainDocumentPart();

            DocumentFormat.OpenXml.Wordprocessing.Document document = new DocumentFormat.OpenXml.Wordprocessing.Document();
            PageSetting settingPage = new PageSetting();
            GenerateStatementPreCheck documentStatement = new GenerateStatementPreCheck();

            document.Append(settingPage.DocumentSettingVertical(new PageMargin()
            {
                Top = 1135, Right = 567, Bottom = 567, Left = 1135
            }));
            document.Append(documentStatement.GenerateStatementNote(template));
            mainDocumentPart.Document = document;
        }
Exemple #5
0
        public void CreateWord(WordprocessingDocument package, Act[] template, object obj = null)
        {
            MainDocumentPart mainDocumentPart = package.AddMainDocumentPart();

            DocumentFormat.OpenXml.Wordprocessing.Document document = new DocumentFormat.OpenXml.Wordprocessing.Document();
            PageSetting   settingPage     = new PageSetting();
            DocumentsFull documentInvoice = new DocumentsFull();

            document.Append(settingPage.DocumentSettingVertical(new PageMargin()
            {
                Top = 567, Right = 963, Bottom = 567, Left = 1020
            }));
            document.Append(documentInvoice.Act(template));
            mainDocumentPart.Document = document;
        }
Exemple #6
0
        public void CreateWord(WordprocessingDocument package, Book template, object obj)
        {
            MainDocumentPart mainDocumentPart = package.AddMainDocumentPart();

            DocumentFormat.OpenXml.Wordprocessing.Document document = new DocumentFormat.OpenXml.Wordprocessing.Document();
            ImagePart image = mainDocumentPart.AddImagePart(ImagePartType.Jpeg);

            using (FileStream file = new FileStream(template.BareCodeBook.FullPathSave, FileMode.Open))
            {
                image.FeedData(file);
            }
            PageSetting   settingpage    = new PageSetting();
            DocumentsFull documentInvoce = new DocumentsFull();

            document.Append(settingpage.DocumentSettingVertical());
            document.Append(documentInvoce.BookAccounting(template, mainDocumentPart.GetIdOfPart(image)));
            mainDocumentPart.Document = document;
        }