private async void ConsumeButton_ClickAsync(object sender, RoutedEventArgs e) { ViewModel = DataContext as PatientVM; var fxn = new ConsumeFunction(); fxn.TokenId = string.IsNullOrEmpty(tokenId.Text) || string.IsNullOrWhiteSpace(tokenId.Text) ? BigInteger.Parse(tokenId.Text) : new BigInteger(new Random().Next(10, 1000)); fxn.PatientAddress = ViewModel.SetUp.Accounts.four.Address; fxn.Patient = Convert.ToByte(3); await ViewModel.ConsumptionCommand(fxn); await UpdateTracking(); }