private void LoadShipment(ShipmentInventoryDTO shipmentDTO) { shipment = shipmentDTO; shipmentInventoryList.Clear(); foreach (ShipmentInventoryMapDTO map in shipment.ShipmentInventoryMap) { shipmentInventoryList.Add(new ShipmentInventoryItemDTO() { InventoryId = map.InventoryId, InventoryName = map.InventoryName, Quantity = map.Quantity, ShipmentId = map.ShipmentId, imageMap = map.ShipmentInventoryImageMap }); } ObservableCollection <ShipmentInventoryItemDTO> list1 = new ObservableCollection <ShipmentInventoryItemDTO>(); foreach (ShipmentInventoryItemDTO wo in shipmentInventoryList) { list1.Add(wo); } Device.BeginInvokeOnMainThread(() => { Vendor.SelectedIndex = ((App)App.Current).GetPickerIndex(Vendor, shipment.Shipment.VendorId); Receiver.SelectedIndex = ((App)App.Current).GetPickerIndex(Receiver, shipment.Shipment.ReceiverId); ShipmentItemsListView.ItemsSource = list1; }); }
public async Task <ShipmentInventoryDTO> GetShipment(long shipmentId) { GenericGetRequest request = new GenericGetRequest("GetShipment", "shipmentId", shipmentId); ShipmentInventoryDTO response = await GetRequest <ShipmentInventoryDTO>(request); return(response); }
private void ShipmentReportListView_SelectionChanged(object sender, SelectionChangedEventArgs e) { //they've slected an individual shipment - fill the details list view try { ShipmentDTO item = (sender as ListView).SelectedValue as ShipmentDTO; ShipmentInventoryDTO s = shipments.ShipmentList.Where(a => a.Shipment.ShipmentId == item.ShipmentId).FirstOrDefault(); list2.Clear(); foreach (ShipmentInventoryMapDTO m in s.ShipmentInventoryMap) { list2.Add(m); } ShipmentDetailListView.ItemsSource = list2; } catch (Exception ex) { } }