DD.WellWorkover.Cloud/ConsoleApp1/Program.cs
IvanovEugeniy e16df1f705 изменение моделей Dto
внесение корректировок в сервис DailyReport
Убраны лишние комментарии и лишний код :
-из классов создающих блоки отчета
-из метода MakerExcel
Добавлен блок Dimensionless
2022-06-30 16:01:46 +05:00

63 lines
1.7 KiB
C#

using AsbCloudApp.Data.DailyReport;
using ClosedXML.Excel;
using System;
using System.IO;
namespace ConsoleApp1
{
class Program
{
// use ServiceFactory to make services
static void Main(/*string[] args*/)
{
var block = new DailyReportHeadDto()
{
AzimuthAngle = 12,
WellName = "WellName",
ClusterName = "clusterName",
Customer = "customer",
Contractor = "Contractor",
ReportDate = DateTime.Now,
WellDepthIntervalFinishDate = 27.5,
WellDepthIntervalStartDate = 26.5,
BottomholeDepth = 66.6
};
var block2 = new DailyReportBhaDto()
{
BHADescription = "sadasdasdasdasdasdjlaskjdaksjdlasdlalskdklj"
};
var block3 = new DailyReportTimeBalanceDto();
/*
var service = new DailyReportMakerExcel();
var stream = service.MakeReportFromBlocks(block, block2, block3,null, null, null);
var filename = "____.xlsx";
if (File.Exists(filename))
File.Delete(filename);
using var fileStream = File.OpenWrite(filename);
stream.CopyTo(fileStream);
return;
*/
//var ms = MakeReportFromBlocks(block,block3);
////File.Create("", MakeReportFromBlocks(block));
//using var file = new FileStream("file.xlsx", FileMode.Create, System.IO.FileAccess.Write);
//byte[] bytes = new byte[ms.Length];
//ms.Read(bytes, 0, (int)ms.Length);
//file.Write(bytes, 0, bytes.Length);
//ms.Close();
}
}
}