diff --git a/SewingDresses/SewingDressesContracts/BusinessLogicsContracts/IReportLogic.cs b/SewingDresses/SewingDressesContracts/BusinessLogicsContracts/IReportLogic.cs index b92b6c0..0f4fde7 100644 --- a/SewingDresses/SewingDressesContracts/BusinessLogicsContracts/IReportLogic.cs +++ b/SewingDresses/SewingDressesContracts/BusinessLogicsContracts/IReportLogic.cs @@ -8,8 +8,13 @@ namespace SewingDressesContracts.BusinessLogicsContracts { List GetDressComponent(); List GetOrders(ReportBindingModel model); + List GetDateOrders(); + List GetShopsDresses(); void SaveComponentsToWordFile(ReportBindingModel model); void SaveDressComponentToExcelFile(ReportBindingModel model); void SaveOrdersToPdfFile(ReportBindingModel model); + void SaveShopsToWordFile(ReportBindingModel model); + void SaveShopsDressesToExcelFile(ReportBindingModel model); + void SaveDatesOrdersToPdfFile(ReportBindingModel model); } } diff --git a/SewingDresses/SewingDressesContracts/ViewModels/ReportDateOrdersViewModel.cs b/SewingDresses/SewingDressesContracts/ViewModels/ReportDateOrdersViewModel.cs new file mode 100644 index 0000000..859acfc --- /dev/null +++ b/SewingDresses/SewingDressesContracts/ViewModels/ReportDateOrdersViewModel.cs @@ -0,0 +1,9 @@ +namespace SewingDressesContracts.ViewModels +{ + public class ReportDateOrdersViewModel + { + public DateTime DateOfOrders { get; set; } + public int Count { get; set; } + public double Sum { get; set; } + } +} diff --git a/SewingDresses/SewingDressesContracts/ViewModels/ReportShopDressViewModel.cs b/SewingDresses/SewingDressesContracts/ViewModels/ReportShopDressViewModel.cs new file mode 100644 index 0000000..7eb658e --- /dev/null +++ b/SewingDresses/SewingDressesContracts/ViewModels/ReportShopDressViewModel.cs @@ -0,0 +1,10 @@ + +namespace SewingDressesContracts.ViewModels +{ + public class ReportShopDressViewModel + { + public string ShopName { get; set; } = string.Empty; + public int TotalCount { get; set; } + public List> Dresses { get; set; } = new(); + } +} diff --git a/SewingDresses/SewingDressesDataModels/Models/IShopModel.cs b/SewingDresses/SewingDressesDataModels/Models/IShopModel.cs index d39b30a..15d2839 100644 --- a/SewingDresses/SewingDressesDataModels/Models/IShopModel.cs +++ b/SewingDresses/SewingDressesDataModels/Models/IShopModel.cs @@ -11,6 +11,7 @@ namespace SewingDressesDataModels.Models string ShopName { get; } string Adress { get; } DateTime DateOpen { get; } + Dictionary ShopDresses { get; } int MaxCount { get; } } } diff --git a/SewingDresses/SewingDressesDatabaseImplement/Models/Dress.cs b/SewingDresses/SewingDressesDatabaseImplement/Models/Dress.cs index 82dbf42..98b9979 100644 --- a/SewingDresses/SewingDressesDatabaseImplement/Models/Dress.cs +++ b/SewingDresses/SewingDressesDatabaseImplement/Models/Dress.cs @@ -31,6 +31,8 @@ namespace SewingDressesDatabaseImplement.Models public virtual List Components { get; set; } = new(); [ForeignKey("DressId")] public virtual List Orders { get; set; } = new(); + [ForeignKey("DressId")] + public virtual List Shops { get; set; } = new(); public static Dress Create(SewingDressesDatabase context, DressBindingModel model) { return new Dress()