public async Task <ActionResult> Detail(string id) { TransferDetail transfer = new TransferDetail(); try { _productTransferServices = new ProductTransferServices(); var result = await _productTransferServices.Get(int.Parse(id)); if (result == null) { ModelState.AddModelError("", "Error al cargar la lista de almacenes"); } else { transfer = result; } } catch (System.Exception) { return(null); throw; } return(View("Detail", transfer)); }
private async void loadDetail(int id) { var result = await _productTransferServices.Get(id); if (result != null) { WarehouseOrigin = result.WarehouseOrigin; WarehouseDestiny = result.WarehouseDestiny; DateCreated = result.DateCreated; Status = result.Status; ProductsCollection = new ObservableCollection <ProductTransferDetailExtend>(result.products); Observation = result.Observation; } }