public async Task SaveChanges() { State = ModelState.Loading; LoadAnimation = true; Rack modifiedrack = new Rack(); SaveFields(modifiedrack); try { LoadingText = AppResources.RackEditPage_SaveProcessText + " " + modifiedrack.No; int rackid = await NAV.ModifyRack(modifiedrack, ACD.Default).ConfigureAwait(true); int result = await NAV.DeleteBinsFromRack(modifiedrack, ACD.Default).ConfigureAwait(true); int index = 0; int count = BinsViewModel.BinViewModels.Count; foreach (BinViewModel bvm in BinsViewModel.BinViewModels) { index++; await SaveBinChanges(bvm, index, count).ConfigureAwait(true); } LoadAnimation = false; State = ModelState.Normal; await Navigation.PopAsync(); } catch (Exception e) { LoadAnimation = false; State = ModelState.Error; ErrorText = e.Message; } }