надеюс все

This commit is contained in:
Ino 2023-04-10 16:40:13 +04:00
parent ad9f05bb00
commit 3a37421bb6
5 changed files with 398 additions and 411 deletions

View File

@ -50,16 +50,10 @@ namespace IceCreamBusinessLogic.OfficePackage
Style = "NormalTitle",
ParagraphAlignment = PdfParagraphAlignmentType.Center
});
CreateParagraph(new PdfParagraph
{
Text = $"с{info.DateFrom.ToShortDateString()} по {info.DateTo.ToShortDateString()}",
Style = "Normal",
ParagraphAlignment = PdfParagraphAlignmentType.Center
});
CreateTable(new List<string> { "3cm", "3cm", "7cm" });
CreateRow(new PdfRowParameters
{
Texts = new List<string> { "Дата заказа", "Количество заказов", "Сумма" },
Texts = new List<string> { "Дата", "Количество", "Сумма" },
Style = "NormalTitle",
ParagraphAlignment = PdfParagraphAlignmentType.Center
});
@ -76,7 +70,7 @@ namespace IceCreamBusinessLogic.OfficePackage
{
Text = $"Итого: {info.DateOrders.Sum(x => x.SumOrders)}\t",
Style = "Normal",
ParagraphAlignment = PdfParagraphAlignmentType.Right
ParagraphAlignment = PdfParagraphAlignmentType.Center
});
SavePdf(info);
}

View File

@ -9,6 +9,7 @@ namespace IceCreamBusinessLogic.OfficePackage.HelperModels
public string Title { get; set; } = string.Empty;
public List<ReportIceCreamComponentViewModel> IceCreamComponents { get; set; } = new();
public List<ReportShopWorkloadViewModel> ShopIceCreams { get; set; } = new();
}
}

View File

@ -25,7 +25,7 @@ namespace IceCreamShopView
{
try
{
_logic.SaveIceCreamsToWordFile(new ReportBindingModel
_logic.SaveShopWorkloadToExcelFile(new ReportBindingModel
{
FileName = dialog.FileName
});

View File

@ -1,9 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2008/01/reportdefinition" xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">
<Body>
<ReportItems>
<Textbox Name="TextboxTitle">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
@ -23,6 +21,7 @@
</Style>
</Paragraph>
</Paragraphs>
<Top>0.24cm</Top>
<Height>1cm</Height>
<Width>21cm</Width>
<Style>
@ -36,7 +35,6 @@
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
<Tablix Name="Tablix1">
<TablixBody>
<TablixColumns>
@ -269,7 +267,7 @@
</TablixMembers>
</TablixRowHierarchy>
<DataSetName>DataSetOrders</DataSetName>
<Top>2.48391cm</Top>
<Top>2.72391cm</Top>
<Left>0.55245cm</Left>
<Height>1.2cm</Height>
<Width>13cm</Width>
@ -280,7 +278,6 @@
</Border>
</Style>
</Tablix>
<Textbox Name="TextboxTotalSum">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
@ -299,7 +296,7 @@
</Style>
</Paragraph>
</Paragraphs>
<Top>4cm</Top>
<Top>4.24cm</Top>
<Left>8.55245cm</Left>
<Height>0.6cm</Height>
<Width>2.5cm</Width>
@ -314,7 +311,6 @@
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
<Textbox Name="SumTotal">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
@ -333,7 +329,7 @@
</Style>
</Paragraph>
</Paragraphs>
<Top>4cm</Top>
<Top>4.24cm</Top>
<Left>11.05245cm</Left>
<Height>0.6cm</Height>
<Width>2.5cm</Width>
@ -348,13 +344,11 @@
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</ReportItems>
<Height>5.72875cm</Height>
<Height>2in</Height>
<Style />
</Body>
<Width>21cm</Width>
<Width>8.26772in</Width>
<Page>
<PageHeight>29.7cm</PageHeight>
<PageWidth>21cm</PageWidth>
@ -366,19 +360,15 @@
<Style />
</Page>
<AutoRefresh>0</AutoRefresh>
<rd:ReportUnitType>Cm</rd:ReportUnitType>
<rd:ReportID>e6968c47-74e2-4a36-be2a-eb9e655f8afd</rd:ReportID>
<DataSources>
<DataSource Name="IceCreamShopContractsViewModels">
<ConnectionProperties>
<DataProvider>System.Data.DataSet</DataProvider>
<ConnectString>/* Local Connection */</ConnectString>
</ConnectionProperties>
<rd:DataSourceID>bf577a27-98a7-43b2-8beb-1a37d37ce5cd</rd:DataSourceID>
<rd:DataSourceID>10791c83-cee8-4a38-bbd0-245fc17cefb3</rd:DataSourceID>
</DataSource>
</DataSources>
<DataSets>
<DataSet Name="DataSetOrders">
<Query>
@ -401,9 +391,11 @@
</Fields>
<rd:DataSetInfo>
<rd:DataSetName>IceCreamShopContracts.ViewModels</rd:DataSetName>
<rd:TableName>ReportOrderViewModel</rd:TableName>
<rd:TableName>ReportDateOrdersViewModel</rd:TableName>
<rd:ObjectDataSourceType>IceCreamShopContracts.ViewModels.ReportDateOrdersViewModel, IceCreamShopContracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null</rd:ObjectDataSourceType>
</rd:DataSetInfo>
</DataSet>
</DataSets>
<rd:ReportUnitType>Cm</rd:ReportUnitType>
<rd:ReportID>cd561cee-f04c-45db-850e-4c793555accd</rd:ReportID>
</Report>

View File

@ -46,9 +46,9 @@ namespace IceCreamShopContracts.BusinessLogicsContracts
/// <param name="model"></param>
void SaveShopsToWordFile(ReportBindingModel model);
public void SaveShopWorkloadToExcelFile(ReportBindingModel model);
void SaveShopWorkloadToExcelFile(ReportBindingModel model);
public List<ReportShopWorkloadViewModel> GetShopIceCreams();
List<ReportShopWorkloadViewModel> GetShopIceCreams();
List<ReportDateOrdersViewModel> GetDateOrders();