¯\_(ツ)_/¯

This commit is contained in:
Илья Федотов 2024-07-27 14:00:54 +04:00
parent a9ec52a3f7
commit 9702c9e624
4 changed files with 3 additions and 8 deletions

View File

@ -114,7 +114,7 @@ namespace ElectronicsShopBusinessLogic.BusinessLogic
{
var document = _saveToExcel.CreateReport(new ExcelInfoClient
{
Title = "Список оплат",
Title = "Список оплат и товаров",
PaymeantProducts = GetPaymeantProducts(_clientID)
});
return document;
@ -123,7 +123,7 @@ namespace ElectronicsShopBusinessLogic.BusinessLogic
public byte[]? SavePaymeantToWordFile(int _clientID)
{
var document = _saveToWord.CreateDoc(new WordInfoClient {
Title = "Список оплат и товаров",
Title = "Список оплат",
ListPaymeant = _paymeantstorage.GetFillteredList(new PaymeantSearchModel { ClientID = _clientID }),
});
return document;

View File

@ -97,4 +97,4 @@ namespace ElectronicsShopBusinessLogic.OfficePackage
// Сохранение файла
protected abstract byte[]? SaveExcel(ExcelInfoClient info);
}
}
}

View File

@ -70,7 +70,6 @@ namespace ElectronicsShopDataBaseImplement.Implements
using var context = new Database();
if (model.ClientID.HasValue) {
return context.Orders
.Include(x => x.Payments)
.Include(x => x.Products)
.ThenInclude(x => x._product)
.OrderBy(x => x.ID)
@ -79,7 +78,6 @@ namespace ElectronicsShopDataBaseImplement.Implements
if (model.ID.HasValue)
{
return context.Orders
.Include(x => x.Payments)
.Include(x => x.Products)
.ThenInclude(x => x._product)
.FirstOrDefault(x => (model.ID.HasValue && x.ID == model.ID))?.GetViewModel;

View File

@ -46,9 +46,6 @@ namespace ElectronicsShopDataBaseImplement.Models
[ForeignKey("OrderID")]
public virtual List<OrderProduct> Products { get; set; } = new();
[ForeignKey("PaymentID")]
public virtual List<Paymeant> Payments { get; set; } = new();
public static Order? Create(Database context ,OrderBindingModel? model)
{
if (model == null)