DD.WellWorkover.Cloud/AsbCloudInfrastructure/Services/DailyReport/DailyReportBlocks/SignBlock.cs
IvanovEugeniy 7d9a969ca6 Правка работы сервиса
Исправление ошибок формирования документа
2022-07-05 11:30:25 +05:00

44 lines
1.8 KiB
C#

using AsbCloudApp.Data.DailyReport;
using ClosedXML.Excel;
namespace AsbCloudInfrastructure.Services.DailyReport.DailyReportBlocks
{
internal class SignBlock : BlockAbstract
{
private readonly DailyReportSignDto blockDto;
public CellAddress AddressDrillMasterHead { get; }
public CellAddress AddressDrillMaster { get; }
public CellAddress AddressSupervisorHead { get; }
public CellAddress AddressSupervisor { get; }
public CellAddress[] AddressPeriodTableDataArray { get; }
public override CellAddress AddressBlockBegin { get; }
public override CellAddress AddressBlockEnd { get; }
public SignBlock(CellAddress addressBlockBegin, DailyReportSignDto blockDto)
{
AddressBlockBegin = addressBlockBegin.Copy();
this.blockDto = blockDto;
AddressDrillMasterHead = addressBlockBegin + (3, 0);
AddressDrillMaster = AddressDrillMasterHead + (0, 6);
AddressSupervisorHead = AddressDrillMasterHead + (2, 0);
AddressSupervisor = AddressSupervisorHead + (0, 6);
AddressBlockEnd = AddressSupervisor + (0,1);
}
public override void Draw(IXLWorksheet sheet)
{
sheet._Range(AddressDrillMasterHead, AddressDrillMasterHead + (0, 2))
._SetValue("Мастер буровой ");
sheet._Range(AddressDrillMaster, AddressDrillMaster + (0, 2))
._SetValue($"{blockDto.DrillingMaster}");
sheet._Range(AddressSupervisorHead, AddressSupervisorHead + (0, 2))
._SetValue("Супервайзер ");
sheet._Range(AddressSupervisor, AddressSupervisor + (0, 2))
._SetValue($"{blockDto.Supervisor}");
}
}
}