コード例 #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");
            }
        }
コード例 #2
0
        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);
            }
            ;
        }
コード例 #3
0
        protected async System.Threading.Tasks.Task Load()
        {
            var northwindGetCustomerByCustomerIdResult = await Northwind.GetCustomerByCustomerId($"{CustomerID}");

            customer = northwindGetCustomerByCustomerIdResult;
        }
コード例 #4
0
 protected async System.Threading.Tasks.Task Load()
 {
     customer = new NwBlazor.Models.Northwind.Customer();
 }
コード例 #5
0
        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(); });
        }