Esempio n. 1
0
        // GET: Production/Details/5
        public async Task <IActionResult> Details(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            var order = _context.OrderItem.Select(o => o)
                        .Include(o => o.Order)
                        .Include(o => o.Type)
                        .Where(m => m.OrderId == id);

            if (order == null)
            {
                return(NotFound());
            }
            DetailsProductionViewModel detailsProductionViewModel = new DetailsProductionViewModel();

            detailsProductionViewModel.OrderItemCollection = order.ToList();
            detailsProductionViewModel.OrderId             = id;
            return(View(detailsProductionViewModel));
        }
Esempio n. 2
0
 protected override void OnAppearing()
 {
     base.OnAppearing();
     BindingContext = new DetailsProductionViewModel(id);
 }