Exemple #1
0
        /// <summary>
        /// Load all the customers from database
        /// </summary>
        public async void Load()
        {
            List <Customers> customers = (List <Customers>) await Task.Run(() => _customerDataService.GetAllCustomers());

            Customers.Clear();//No duplicates if load method is called
            foreach (var customer in customers)
            {
                Console.WriteLine(customer.FirstName);
                Customers.Add(customer);
            }
        }
 public async void QuickRegisterCustomer_OnDialogClose()
 {
     Customers = (await CustomerDataService.GetAllCustomers()).ToList();
     StateHasChanged();
 }
 protected override async Task OnInitializedAsync()
 {
     LoggedUser = new Customer();
     Customers  = (await CustomerDataService.GetAllCustomers()).ToList();
 }
 public async void AddCustomerDialog_OnDialogClose()
 {
     Customers = (await CustomerDataService.GetAllCustomers()).Data;
     StateHasChanged();
 }
        protected override async Task OnInitializedAsync()
        {
            Customers = (await CustomerDataService.GetAllCustomers()).Data;

            //AddCustomerDialog.OnDialogClose += AddCustomerDialog_OnDialogClose;
        }
Exemple #6
0
 protected async override Task OnInitializedAsync()
 {
     Customers = await CustomerDataService.GetAllCustomers();
 }