все готово, подчистил свой позор (
This commit is contained in:
parent
9ba2e29dad
commit
e0e490cefe
@ -150,10 +150,10 @@ namespace TypographyBusinessLogic.BusinessLogics
|
|||||||
Printeds = new List<Tuple<string, int>>(),
|
Printeds = new List<Tuple<string, int>>(),
|
||||||
Count = 0
|
Count = 0
|
||||||
};
|
};
|
||||||
foreach (var carCount in shop.ShopPrinteds.Values)
|
foreach (var printedCount in shop.ShopPrinteds.Values)
|
||||||
{
|
{
|
||||||
record.Printeds.Add(new Tuple<string, int>(carCount.Item1.PrintedName, carCount.Item2));
|
record.Printeds.Add(new Tuple<string, int>(printedCount.Item1.PrintedName, printedCount.Item2));
|
||||||
record.Count += carCount.Item2;
|
record.Count += printedCount.Item2;
|
||||||
}
|
}
|
||||||
list.Add(record);
|
list.Add(record);
|
||||||
}
|
}
|
||||||
|
@ -81,10 +81,10 @@ namespace TypographyFileImplement.Implements
|
|||||||
private OrderViewModel GetViewModel(Order order)
|
private OrderViewModel GetViewModel(Order order)
|
||||||
{
|
{
|
||||||
var viewModel = order.GetViewModel;
|
var viewModel = order.GetViewModel;
|
||||||
var car = source.Printeds.FirstOrDefault(x => x.Id == order.PrintedId);
|
var printed = source.Printeds.FirstOrDefault(x => x.Id == order.PrintedId);
|
||||||
if (car != null)
|
if (printed != null)
|
||||||
{
|
{
|
||||||
viewModel.PrintedName = car.PrintedName;
|
viewModel.PrintedName = printed.PrintedName;
|
||||||
}
|
}
|
||||||
return viewModel;
|
return viewModel;
|
||||||
}
|
}
|
||||||
|
@ -106,11 +106,11 @@ namespace TypographyListImplement.Implements
|
|||||||
private OrderViewModel GetViewModel(Order order)
|
private OrderViewModel GetViewModel(Order order)
|
||||||
{
|
{
|
||||||
var viewModel = order.GetViewModel;
|
var viewModel = order.GetViewModel;
|
||||||
foreach (var car in _source.Printeds)
|
foreach (var printed in _source.Printeds)
|
||||||
{
|
{
|
||||||
if (car.Id == order.PrintedId)
|
if (printed.Id == order.PrintedId)
|
||||||
{
|
{
|
||||||
viewModel.PrintedName = car.PrintedName;
|
viewModel.PrintedName = printed.PrintedName;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user