Быстрая поправка
This commit is contained in:
parent
6b9da32038
commit
3f62f0b923
@ -14,10 +14,7 @@ namespace ComputerShopContracts.ViewModels
|
||||
public double OrderSum { get; set; }
|
||||
public OrderStatus OrderStatus { get; set; }
|
||||
|
||||
//данные заявок
|
||||
public List<(int RequestId, string ClientFIO, DateTime DateRequest)> Requests { get; set; }
|
||||
|
||||
//данные сборок
|
||||
public List<(string AssemblyName, string AssemblyCategory, double AssemblyPrice)> Assemblies { get; set; }
|
||||
//данные заявок и сборок
|
||||
public List<(int RequestId, string ClientFIO, DateTime DateRequest, string AssemblyName, string AssemblyCategory, double AssemblyPrice)> RequestsAssemblies { get; set; }
|
||||
}
|
||||
}
|
||||
|
@ -90,8 +90,10 @@ namespace ComputerShopDatabaseImplement.Implements
|
||||
DateCreateOrder = x.DateCreate,
|
||||
OrderSum = x.Sum,
|
||||
OrderStatus = x.Status,
|
||||
Requests = x.Requests.Select(r => (r.Request.Id, r.Request.ClientFIO, r.Request.DateRequest)).ToList(),
|
||||
Assemblies = x.Requests.Select(r => (r.Request.Assembly.AssemblyName, r.Request.Assembly.Category, r.Request.Assembly.Price)).ToList(),
|
||||
RequestsAssemblies = x.Requests.Select(r => (r.Request.Id, r.Request.ClientFIO, r.Request.DateRequest,
|
||||
(r.Request.Assembly != null) ? r.Request.Assembly.AssemblyName : "Без сборки",
|
||||
(r.Request.Assembly != null) ? r.Request.Assembly.Category : "Без сборки",
|
||||
(r.Request.Assembly != null) ? r.Request.Assembly.Price : 0)).ToList()
|
||||
})
|
||||
.ToList();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user