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