forked from ddrilling/AsbCloudServer
57 lines
2.0 KiB
C#
57 lines
2.0 KiB
C#
using System;
|
|
using AsbCloudApp.Data.DailyReportModel;
|
|
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; }
|
|
|
|
/// <summary>
|
|
/// Значение нижняя правая ячейка блока
|
|
/// </summary>
|
|
public override CellAddress AddressBlockBegin { get; }
|
|
|
|
/// <summary>
|
|
/// Значение нижняя правая ячейка блока
|
|
/// </summary>
|
|
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}");
|
|
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
|