async void GetData() { try { response = await cloudStore.GetAssets(); listview.ItemsSource = response; } catch (Exception ex) { } }
async void GetData() { try { response = await cloudStore.GetAssets(); response1 = new List <ViewAsset>(); foreach (var item in response) { response1.Add(new ViewAsset() { assetId = item.assetId, description = item.description, status = item.status, assignee = item.assignee, timeLastScanned = item.timeLastScanned, timeLastUpdated = item.timeLastUpdated, comment = item.comment, assetType = item.assetType, quantity = item.status == "Removed"?0:item.assetType == "single"?1:item.quantity }); } //List<ViewAsset> tempResSplit = new for (int i = 0; i < response1.Count; i++) { ViewAsset tempObj = new ViewAsset(); tempObj = response1[i]; //if(response1[i].assetType == "Removed"){ // AssetType //} if (response1[i].assignee != null) { String[] Stringbreak = response1[i].assignee.Split('#'); tempObj.assignee = Stringbreak[1]; } response1[i] = tempObj; } finalResponse = response1; listView.ItemsSource = response1; } catch (Exception ex) { } }