diff --git a/SushiBar/SushiBar/Forms/FormReportOrders.Designer.cs b/SushiBar/SushiBar/Forms/FormReportOrders.Designer.cs
index 4308d29..a2bf192 100644
--- a/SushiBar/SushiBar/Forms/FormReportOrders.Designer.cs
+++ b/SushiBar/SushiBar/Forms/FormReportOrders.Designer.cs
@@ -50,13 +50,13 @@
panel.Dock = DockStyle.Top;
panel.Location = new Point(0, 0);
panel.Name = "panel";
- panel.Size = new Size(800, 51);
+ panel.Size = new Size(1242, 51);
panel.TabIndex = 0;
//
// label2
//
label2.AutoSize = true;
- label2.Location = new Point(272, 19);
+ label2.Location = new Point(317, 19);
label2.Name = "label2";
label2.Size = new Size(27, 20);
label2.TabIndex = 5;
@@ -65,7 +65,7 @@
// label1
//
label1.AutoSize = true;
- label1.Location = new Point(22, 19);
+ label1.Location = new Point(39, 19);
label1.Name = "label1";
label1.Size = new Size(18, 20);
label1.TabIndex = 4;
@@ -73,23 +73,23 @@
//
// dateTimePickerTo
//
- dateTimePickerTo.Location = new Point(320, 14);
+ dateTimePickerTo.Location = new Point(366, 14);
dateTimePickerTo.Name = "dateTimePickerTo";
- dateTimePickerTo.Size = new Size(192, 27);
+ dateTimePickerTo.Size = new Size(210, 27);
dateTimePickerTo.TabIndex = 3;
//
// dateTimePickerFrom
//
- dateTimePickerFrom.Location = new Point(61, 14);
+ dateTimePickerFrom.Location = new Point(73, 14);
dateTimePickerFrom.Name = "dateTimePickerFrom";
- dateTimePickerFrom.Size = new Size(192, 27);
+ dateTimePickerFrom.Size = new Size(214, 27);
dateTimePickerFrom.TabIndex = 2;
//
// buttonToPdf
//
- buttonToPdf.Location = new Point(694, 12);
+ buttonToPdf.Location = new Point(1076, 10);
buttonToPdf.Name = "buttonToPdf";
- buttonToPdf.Size = new Size(94, 29);
+ buttonToPdf.Size = new Size(154, 29);
buttonToPdf.TabIndex = 1;
buttonToPdf.Text = "В PdF";
buttonToPdf.UseVisualStyleBackColor = true;
@@ -97,7 +97,7 @@
//
// buttonMake
//
- buttonMake.Location = new Point(534, 12);
+ buttonMake.Location = new Point(916, 10);
buttonMake.Name = "buttonMake";
buttonMake.Size = new Size(154, 29);
buttonMake.TabIndex = 0;
@@ -109,14 +109,14 @@
//
panelBody.Location = new Point(0, 57);
panelBody.Name = "panelBody";
- panelBody.Size = new Size(800, 393);
+ panelBody.Size = new Size(1242, 515);
panelBody.TabIndex = 1;
//
// FormReportOrders
//
AutoScaleDimensions = new SizeF(8F, 20F);
AutoScaleMode = AutoScaleMode.Font;
- ClientSize = new Size(800, 450);
+ ClientSize = new Size(1242, 575);
Controls.Add(panelBody);
Controls.Add(panel);
Name = "FormReportOrders";
diff --git a/SushiBar/SushiBar/Report/ReportOrders.rdlc b/SushiBar/SushiBar/Report/ReportOrders.rdlc
index 60f5afb..55df95e 100644
--- a/SushiBar/SushiBar/Report/ReportOrders.rdlc
+++ b/SushiBar/SushiBar/Report/ReportOrders.rdlc
@@ -29,14 +29,14 @@
SushiName
System.String
-
- Sum
- System.Decimal
-
OrderStatus
SushiBarDataModels.OrderStatus
+
+ Sum
+ System.Decimal
+
SushiBarContracts.ViewModels
diff --git a/SushiBar/SushiBarBusinessLogic/OfficePackage/AbstractSaveToPdf.cs b/SushiBar/SushiBarBusinessLogic/OfficePackage/AbstractSaveToPdf.cs
index 502436c..e28c538 100644
--- a/SushiBar/SushiBarBusinessLogic/OfficePackage/AbstractSaveToPdf.cs
+++ b/SushiBar/SushiBarBusinessLogic/OfficePackage/AbstractSaveToPdf.cs
@@ -1,10 +1,5 @@
using SushiBarBusinessLogic.OfficePackage.HelperEnums;
using SushiBarBusinessLogic.OfficePackage.HelperModels;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
namespace SushiBarBusinessLogic.OfficePackage
{
@@ -28,7 +23,7 @@ namespace SushiBarBusinessLogic.OfficePackage
CreateTable(new List { "2cm", "3cm", "6cm", "3cm", "4cm" });
CreateRow(new PdfRowParameters
{
- Texts = new List { "Номер", "Дата заказа", "Изделие", "Статус" },
+ Texts = new List { "Номер", "Дата заказа", "Изделие", "Сумма", "Статус" },
Style = "NormalTitle",
ParagraphAlignment = PdfParagraphAlignmentType.Center
});
@@ -40,7 +35,7 @@ namespace SushiBarBusinessLogic.OfficePackage
order.Id.ToString(),
order.DateCreate.ToShortDateString(),
order.SushiName,
- order.Sum.ToString(),
+ $"{order.Sum:C2}",
order.OrderStatus.ToString()
},
Style = "Normal",
@@ -49,7 +44,7 @@ namespace SushiBarBusinessLogic.OfficePackage
}
CreateParagraph(new PdfParagraph
{
- Text = $"Итого: {info.Orders.Sum(x => x.Sum)}\t",
+ Text = $"Итого: {info.Orders.Sum(x => x.Sum):C2}\t",
Style = "Normal",
ParagraphAlignment = PdfParagraphAlignmentType.Rigth
});
diff --git a/SushiBar/SushiBarBusinessLogic/OfficePackage/HelperEnums/PdfParagraphAlignmentType.cs b/SushiBar/SushiBarBusinessLogic/OfficePackage/HelperEnums/PdfParagraphAlignmentType.cs
index ab20545..923795e 100644
--- a/SushiBar/SushiBarBusinessLogic/OfficePackage/HelperEnums/PdfParagraphAlignmentType.cs
+++ b/SushiBar/SushiBarBusinessLogic/OfficePackage/HelperEnums/PdfParagraphAlignmentType.cs
@@ -1,10 +1,4 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace SushiBarBusinessLogic.OfficePackage.HelperEnums
+namespace SushiBarBusinessLogic.OfficePackage.HelperEnums
{
public enum PdfParagraphAlignmentType
{
diff --git a/SushiBar/SushiBarBusinessLogic/OfficePackage/Implements/SaveToPdf.cs b/SushiBar/SushiBarBusinessLogic/OfficePackage/Implements/SaveToPdf.cs
index 933ac9c..a56a2ab 100644
--- a/SushiBar/SushiBarBusinessLogic/OfficePackage/Implements/SaveToPdf.cs
+++ b/SushiBar/SushiBarBusinessLogic/OfficePackage/Implements/SaveToPdf.cs
@@ -12,7 +12,7 @@ namespace SushiBarBusinessLogic.OfficePackage.Implements
private Section? _section;
private Table? _table;
private static ParagraphAlignment
- GetParagraphAlignment(PdfParagraphAlignmentType type)
+ GetParagraphAlignment(PdfParagraphAlignmentType type)
{
return type switch
{
diff --git a/SushiBar/SushiBarBusinessLogic/SushiBarBusinessLogic.csproj b/SushiBar/SushiBarBusinessLogic/SushiBarBusinessLogic.csproj
index 2d6f82b..e944f4d 100644
--- a/SushiBar/SushiBarBusinessLogic/SushiBarBusinessLogic.csproj
+++ b/SushiBar/SushiBarBusinessLogic/SushiBarBusinessLogic.csproj
@@ -8,8 +8,9 @@
+
-
+