исправление ошибки

This commit is contained in:
evasina2312@gmail.com 2023-04-18 14:24:35 +04:00
parent 48cb1ded9c
commit 831bc7d429
3 changed files with 31 additions and 26 deletions

View File

@ -79,6 +79,7 @@ namespace ComputersShopView
_logger.LogInformation("Сохранение списка заказов на период {From}-{To}", dateTimePickerFrom.Value.ToShortDateString(), dateTimePickerTo.Value.ToShortDateString());
MessageBox.Show("Выполнено", "Успех", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
catch (Exception ex)
{
_logger.LogError(ex, "Ошибка сохранения списка заказов на период");

View File

@ -17,9 +17,11 @@ namespace ComputersShopBusinessLogic.OfficePackage
});
CreateParagraph(new PdfParagraph
{
Text = $"с{ info.DateFrom.ToShortDateString() } по { info.DateTo.ToShortDateString() }", Style = "Normal", ParagraphAlignment = PdfParagraphAlignmentType.Center
Text = $"с{info.DateFrom.ToShortDateString()} по {info.DateTo.ToShortDateString()}",
Style = "Normal",
ParagraphAlignment = PdfParagraphAlignmentType.Center
});
CreateTable(new List<string> { "2cm", "3cm", "6cm", "3cm" });
CreateTable(new List<string> { "2cm", "3cm", "6cm", "3cm", "4cm" });
CreateRow(new PdfRowParameters
{
Texts = new List<string> { "Номер", "Дата заказа", "Изделие", "Сумма", "Статус" },
@ -37,7 +39,9 @@ namespace ComputersShopBusinessLogic.OfficePackage
}
CreateParagraph(new PdfParagraph
{
Text = $"Итого: {info.Orders.Sum(x => x.Sum)}\t", Style = "Normal", ParagraphAlignment = PdfParagraphAlignmentType.Right
Text = $"Итого: {info.Orders.Sum(x => x.Sum)}\t",
Style = "Normal",
ParagraphAlignment = PdfParagraphAlignmentType.Right
});
SavePdf(info);
}

View File

@ -7,7 +7,7 @@ namespace ComputersShopContracts.ViewModels
public int Id { get; set; }
public DateTime DateCreate { get; set; }
public string ComputerName { get; set; } = string.Empty;
public string Status { get; set; } = OrderStatus.Неизвестен.ToString();
public double Sum { get; set; }
public string Status { get; set; } = OrderStatus.Неизвестен.ToString();
}
}