protected async Task CreateReservation() { client.TableId = ParamEmpID; await Http.SendJsonAsync(HttpMethod.Post, "https://localhost:44361/api/clients/create/", client); UrlNavigationManager.NavigateTo("/Completed"); }
protected async Task CreateEmployee() { if (emp.EmployeeId != 0) { await Http.SendJsonAsync(HttpMethod.Put, "api/Employee/Edit", emp); } else { await Http.SendJsonAsync(HttpMethod.Post, "/api/Employee/Create", emp); } UrlNavigationManager.NavigateTo("/employee/fetch"); }
async private Task GetUsers() { try { users = await Http.GetJsonAsync <ApplicationUserDTO[]>("api/User"); } catch (Exception e) { Console.WriteLine(e.Message); // inject a logger UrlNavigationManager.NavigateTo("/unauthorized"); } }
/// <summary> /// Stores/updates fan in the servers' database. /// </summary> protected async Task CreateFan() { if (imageInByte != null) { fan.ImageTitle = imageName; fan.ImageData = imageInByte; } if (fan.FanId != Guid.Empty) { await Http.PutAsJsonAsync(ServiceEndpoint, fan); } else { // create await Http.PostAsJsonAsync(ServiceEndpoint, fan); } imgUrl = string.Empty; UrlNavigationManager.NavigateTo("/pcbuilder/fans/all"); }
/// <summary> /// Deletes specific fan from server. /// </summary> /// <returns></returns> protected async Task DeleteFan() { await Http.DeleteAsync($"{ServiceEndpoint}/{ParamFanId}"); UrlNavigationManager.NavigateTo("/pcbuilder/fans/all"); }
protected void Cancel() { UrlNavigationManager.NavigateTo("/users"); }
public void Refresh() { UrlNavigationManager.NavigateTo("/fetchvehicle"); }
public void Cancel() { UrlNavigationManager.NavigateTo("/employeerecords"); }
public void ToCommish() { UrlNavigationManager.NavigateTo("/commish"); }
public void GoEditOrder(Guid SupplierId) { UrlNavigationManager.NavigateTo("/suppliers/edit/" + SupplierId.ToString()); }
public void GoCreateSupplier() { UrlNavigationManager.NavigateTo("/suppliers/add"); }
protected void Cancel() { Title = "Employee Data"; UrlNavigationManager.NavigateTo("/employee/fetch"); }
protected async Task DeleteEmployee() { await Http.DeleteAsync("api/Employee/Delete/" + ParamEmpID); UrlNavigationManager.NavigateTo("/employee/fetch"); }
public void Cancel() { UrlNavigationManager.NavigateTo("/fetchemployee"); }
public void Refresh() { UrlNavigationManager.NavigateTo("/fetchbrand"); }
public void Cancel() { UrlNavigationManager.NavigateTo("/roles"); }