public override void Visit(SaleOrder saleOrder) { Console.WriteLine($"开始为销售订单【{saleOrder.Id}】进行销售捡货处理:"); foreach (var item in saleOrder.OrderItems) { Console.WriteLine($"【{item.Product.Name}】商品* {item.Qty}"); } Console.WriteLine($"订单【{saleOrder.Id}】捡货完毕!"); Console.WriteLine("=========================="); }
public override void Visit(SaleOrder saleOrder) { Console.WriteLine($"开始为销售订单【{saleOrder.Id}】进行发货处理:", saleOrder.Id); Console.WriteLine($"一共打包{saleOrder.OrderItems.Sum(line => line.Qty)}件商品。"); Console.WriteLine($"收货人:{saleOrder.Customer.RealName}"); Console.WriteLine($"联系电话:{saleOrder.Customer.Phone}"); Console.WriteLine($"收货地址:{saleOrder.Customer.Address}"); Console.WriteLine($"邮政编码:{saleOrder.Customer.Zip}"); Console.WriteLine($"订单【{saleOrder.Id}】发货完毕!"); Console.WriteLine("=========================="); }