¯\_(ツ)_/¯
This commit is contained in:
parent
a9ec52a3f7
commit
9702c9e624
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user