DD.WellWorkover.Cloud/AsbCloudInfrastructure/Services/DailyReport/DailyReportBlocks/SignBlock.cs
IvanovEugeniy c5785fbb5f корректировка скрипта миграции
корректировка стилей и блоков
2022-07-06 09:21:35 +05:00

52 lines
2.3 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, 5);
AddressSupervisorHead = AddressDrillMasterHead + (2, 0);
AddressSupervisor = AddressSupervisorHead + (0, 5);
AddressBlockEnd = AddressSupervisor + (0,1);
}
public override void Draw(IXLWorksheet sheet)
{
sheet.Range(AddressDrillMasterHead.RowNumber, AddressDrillMasterHead.ColumnNumber
, AddressDrillMasterHead.RowNumber, AddressDrillMasterHead.ColumnNumber + 2)
.Merge()
.SetValue("Мастер буровой ");
sheet.Range(AddressDrillMaster.RowNumber, AddressDrillMaster.ColumnNumber
, AddressDrillMaster.RowNumber, AddressDrillMaster.ColumnNumber + 2)
.Merge()
.SetValue($"{blockDto.DrillingMaster}");
sheet.Range(AddressSupervisorHead.RowNumber, AddressSupervisorHead.ColumnNumber
, AddressSupervisorHead.RowNumber, AddressSupervisorHead.ColumnNumber + 2)
.Merge()
.SetValue("Супервайзер ");
sheet.Range(AddressSupervisor.RowNumber, AddressSupervisor.ColumnNumber
, AddressSupervisor.RowNumber, AddressSupervisor.ColumnNumber + 2)
.Merge()
.SetValue($"{blockDto.Supervisor}");
}
}
}