private async Task SubmitAsync() { IsLoading = true; Input.MemberUsername = Task.FromResult(await GetListOfContributorAsync()).Result; var result = await _projectsServices.InviteMembers(Input); if (result.Status.IsError) { Console.WriteLine($"IsError: {result.Status.Message}"); } else { if (result.Result.IsSuccessful) { await OnAfterSuccessful.InvokeAsync(true); IsLoading = false; BaseModal.Close(); } else { Console.WriteLine($"ErrorMessage: {result.Result.ErrorMessage}"); } } }
private async void OnSubmitAsync() { IsLoading = true; var result = await _projectsDocumentService.DeleteProjectDocument(new DeleteProjectDocumentRequest() { ProjectDocumentID = ID }); if (result.Status.IsError) { Console.WriteLine($"IsError: {result.Status.Message}"); } else { if (result.Result.IsSuccessful) { IsLoading = false; await OnAfterSuccessful.InvokeAsync(true); BaseModal.Close(); } else { Console.WriteLine($"ErrorMessage: {result.Result.ErrorMessage}"); } } }
private async Task SubmitAsync() { IsLoading = true; var content = new MultipartFormDataContent(); content.Headers.ContentDisposition = new ContentDispositionHeaderValue("form-data"); content.Add(new StringContent(Input.ProjectDocumentID.ToString()), "ProjectDocumentID"); content.Add(new StringContent(Input.Title), "Title"); if (File != null) { content.Add(new StreamContent(File.Data, (int)File.Data.Length), "FormFileProjectDocument", File.Name); } var result = await _projectsDocumentService.UpdateProjectDocument(content); if (!result.IsSuccessStatusCode) { Console.WriteLine($"IsError: {result.Content}"); } else { Console.WriteLine($"IsError: {result.Content}"); await OnAfterSuccessful.InvokeAsync(true); IsLoading = false; BaseModal.Close(); } IsLoading = false; }
private async Task SubmitAsync() { IsLoading = true; var result = await _projectsServices.UpdateProjectStatus(Input); if (result.Status.IsError) { Console.WriteLine($"IsError: {result.Status.Message}"); } else { if (result.Result.IsSuccessful) { if (Input.NewProjectStatus == ProjectStatus.SubmittedForApproval) { _projectState.SetMessage("danger", "Project is submitted for Approval"); } else { _navigationManager.NavigateTo("/projects"); } await OnAfterSuccessful.InvokeAsync(true); IsLoading = false; BaseModal.Close(); } else { Console.WriteLine($"ErrorMessage: {result.Result.ErrorMessage}"); } } }
private async void OnSubmitAsync() { IsLoading = true; var result = await _externalTransfersService.DeleteExternalTransfer(new DeleteExternalTransferRequest() { TransactionID = ID }); if (result.Status.IsError) { Console.WriteLine($"IsError: {result.Status.Message}"); } else { if (result.Result.IsSuccessful) { IsLoading = false; await OnAfterSuccessful.InvokeAsync(true); BaseModal.Close(); } else { Console.WriteLine($"ErrorMessage: {result.Result.ErrorMessage}"); } } }
private async void OnSubmitAsync() { IsLoading = true; var result = await _ownersService.DeleteOwner(new DeleteOwnerRequest() { OwnerID = OwnerID }); if (result.Status.IsError) { System.Console.WriteLine($"IsError: {result.Status.Message}"); } else { if (result.Result.IsSuccessful) { _navigationManager.NavigateTo($"/exchanges"); IsLoading = false; BaseModal.Close(); } else { System.Console.WriteLine($"ErrorMessage: {result.Result.ErrorMessage}"); } } }
private async void OnSubmitEditInternalTransferAsync() { StateHasChanged(); IsLoading = true; var result = await _internalTransfersService.UpdateInternalTransfer(Input); if (result.Status.IsError) { System.Console.WriteLine($"IsError: {result.Status.Message}"); } else { if (result.Result.IsSuccessful) { IsLoading = false; await OnAfterSuccessful.InvokeAsync(true); BaseModal.Close(); } else { System.Console.WriteLine($"ErrorMessage: {result.Result.ErrorMessage}"); } } }
private async void OnSubmitPersonalWalletAsync() { IsLoading = true; var result = await _walletsService.DeleteWallet(new DeleteWalletRequest() { WalletID = Wallet.WalletID }); if (result.Status.IsError) { System.Console.WriteLine($"IsError: {result.Status.Message}"); } else { if (result.Result.IsSuccessful) { if (Wallet.ProviderType == ProviderType.Personal) { _navigationManager.NavigateTo($"/wallets"); } else { _navigationManager.NavigateTo($"/exchanges/details/{Wallet.OwnerID}"); } IsLoading = false; BaseModal.Close(); } else { System.Console.WriteLine($"ErrorMessage: {result.Result.ErrorMessage}"); } } }