Example #1
0
        protected async System.Threading.Tasks.Task Form0Submit(NwBlazor.Models.Northwind.Customer args)
        {
            try
            {
                var northwindUpdateCustomerResult = await Northwind.UpdateCustomer($"{CustomerID}", customer);

                DialogService.Close(customer);
            }
            catch (Exception northwindUpdateCustomerException)
            {
                NotificationService.Notify(NotificationSeverity.Error, $"Error", $"Unable to update Customer");
            }
        }
        protected async System.Threading.Tasks.Task Grid0RowExpand(NwBlazor.Models.Northwind.Customer args)
        {
            Customer = args;

            var northwindGetOrdersResult = await Northwind.GetOrders(new Query()
            {
                Filter = $@"i => i.CustomerID == ""{args.CustomerID}"""
            });

            foreach (var r in northwindGetOrdersResult.ToList())
            {
                Customer.Orders.Add(r);
            }
            ;
        }
Example #3
0
        protected async System.Threading.Tasks.Task Load()
        {
            var northwindGetCustomerByCustomerIdResult = await Northwind.GetCustomerByCustomerId($"{CustomerID}");

            customer = northwindGetCustomerByCustomerIdResult;
        }
 protected async System.Threading.Tasks.Task Load()
 {
     customer = new NwBlazor.Models.Northwind.Customer();
 }
        protected async System.Threading.Tasks.Task Grid0RowSelect(NwBlazor.Models.Northwind.Customer args)
        {
            var result = await DialogService.OpenAsync <EditCustomer>("Edit Customer", new Dictionary <string, object>() { { "CustomerID", args.CustomerID } });

            await InvokeAsync(() => { StateHasChanged(); });
        }