CourseWork_BankYouBankrupt/BankYouBankrupt/BankYouBankruptBusinessLogic/BusinessLogics/ReportLoad.cs

37 lines
1.1 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using BankYouBankruptContracts.BusinessLogicsContracts;
using DocumentFormat.OpenXml.ExtendedProperties;
using Org.BouncyCastle.Asn1.Ocsp;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection.Metadata;
using System.Text;
using System.Threading.Tasks;
namespace BankYouBankruptBusinessLogic.BusinessLogics
{
public class ReportLoad : IReportLoad
{
public byte[] LoadFile(bool whoRequested)
{
string pdfFilePath;
//если пришло true, то загружаем отчёт клиента
if (whoRequested)
{
pdfFilePath = "C:\\Users\\Programmist73\\Desktop\\Практика\\2-й курс\\4-й семестр\\CourseWork_BankYouBankrupt\\BankYouBankrupt\\BankYouBankruptRestAPI\\Отчёт_поартам.pdf";
}
else
{
pdfFilePath = "C:\\Users\\Programmist73\\Desktop\\Практика\\2-й курс\\4-й семестр\\CourseWork_BankYouBankrupt\\BankYouBankrupt\\BankYouBankruptRestAPI\\Отчёт_по_счетам.pdf";
}
byte[] bytes = System.IO.File.ReadAllBytes(pdfFilePath);
System.IO.File.WriteAllBytes(pdfFilePath, bytes);
return bytes;
}
}
}