private async Task UpdateMethodOfPayment() { if (ValidateInputs()) { MethodOfPaymentEditVM methodOfPaymentEditVM = new MethodOfPaymentEditVM() { Id = methodOfPayment.Id, Method = TbMethod.Text }; ls.LblLoading.Text = "Editing"; ls.Show(); bool success = await methodOfPaymentApi.UpdateMethodOfPayment(methodOfPaymentEditVM); ls.Close(); if (success) { Close(); } else { MessageBox.Show("Fail!"); } } else { MessageBox.Show("All input fields are required!"); } }