This commit is contained in:
Sergey Kozyrev 2024-04-05 13:34:52 +04:00
parent 7411f7e081
commit aa627f014a
5 changed files with 27 additions and 0 deletions

View File

@ -8,8 +8,13 @@ namespace SewingDressesContracts.BusinessLogicsContracts
{ {
List<ReportDressComponentViewModel> GetDressComponent(); List<ReportDressComponentViewModel> GetDressComponent();
List<ReportOrdersViewModel> GetOrders(ReportBindingModel model); List<ReportOrdersViewModel> GetOrders(ReportBindingModel model);
List<ReportDateOrdersViewModel> GetDateOrders();
List<ReportShopDressViewModel> GetShopsDresses();
void SaveComponentsToWordFile(ReportBindingModel model); void SaveComponentsToWordFile(ReportBindingModel model);
void SaveDressComponentToExcelFile(ReportBindingModel model); void SaveDressComponentToExcelFile(ReportBindingModel model);
void SaveOrdersToPdfFile(ReportBindingModel model); void SaveOrdersToPdfFile(ReportBindingModel model);
void SaveShopsToWordFile(ReportBindingModel model);
void SaveShopsDressesToExcelFile(ReportBindingModel model);
void SaveDatesOrdersToPdfFile(ReportBindingModel model);
} }
} }

View File

@ -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; }
}
}

View File

@ -0,0 +1,10 @@

namespace SewingDressesContracts.ViewModels
{
public class ReportShopDressViewModel
{
public string ShopName { get; set; } = string.Empty;
public int TotalCount { get; set; }
public List<Tuple<string, int>> Dresses { get; set; } = new();
}
}

View File

@ -11,6 +11,7 @@ namespace SewingDressesDataModels.Models
string ShopName { get; } string ShopName { get; }
string Adress { get; } string Adress { get; }
DateTime DateOpen { get; } DateTime DateOpen { get; }
Dictionary<int, (IDressModel, int)> ShopDresses { get; }
int MaxCount { get; } int MaxCount { get; }
} }
} }

View File

@ -31,6 +31,8 @@ namespace SewingDressesDatabaseImplement.Models
public virtual List<DressComponent> Components { get; set; } = new(); public virtual List<DressComponent> Components { get; set; } = new();
[ForeignKey("DressId")] [ForeignKey("DressId")]
public virtual List<Order> Orders { get; set; } = new(); public virtual List<Order> Orders { get; set; } = new();
[ForeignKey("DressId")]
public virtual List<Shop> Shops { get; set; } = new();
public static Dress Create(SewingDressesDatabase context, DressBindingModel model) public static Dress Create(SewingDressesDatabase context, DressBindingModel model)
{ {
return new Dress() return new Dress()