protected override async Task OnInitializedAsync() { IsLoading = true; var result = await ManufacturingOrderService.GetOrder(Id); Order = result.Data; IsLoading = false; }
private async Task GetOrders() { IsLoading = true; Uri uri = NavigationManager.ToAbsoluteUri(NavigationManager.Uri); PagedResponse = await ManufacturingOrderService.GetOrders(uri.Query); IsLoading = false; }
protected override async Task OnInitializedAsync() { IsLoading = true; var result = await ManufacturingOrderService.GetOrder(Id); Order = result.Data; OrderUpdate = new ManufacturingOrderForUpdateDto() { Status = Order.Status }; IsLoading = false; }
protected async Task HandleFormSubmit() { var result = await ManufacturingOrderService.EditOrder(Id, OrderUpdate); if (result != null) { ToastService.ShowSuccess($"Gamybos užsakyms '{Order.Product.Name}' yra sėkmnigai atnaujintas"); NavigationManager.NavigateTo("/morders"); } else { ToastService.ShowError("Nepavyko atnaujinti gamybos užsakymo"); } }
protected async Task HandleFormSubmit() { var result = await ManufacturingOrderService.CreateOrder(Order); if (result != null) { ToastService.ShowSuccess($"Gamybos užsakymas '{Product.Name}' yra sėkmingai sukurtas"); NavigationManager.NavigateTo("/morders"); } else { ToastService.ShowError("Nepavyko sukurti gamybos užsakymo"); } }
public ManufacturingOrderController() { _service = new ManufacturingOrderService(new SweetLifeDbContext()); }