コード例 #1
0
        // protected int CustomerTypeId { get; set; }

        #endregion

        #region Initialisation

        protected override async Task OnInitAsync()
        {
            this.Title         = "Clients";
            this.CustomerTypes = SelectListItems.Convert(await AdministrationService.GetCustomerTypes(), (src, dest) =>
            {
                dest.Id   = src.Id;
                dest.Text = src.Text;
            });
            await LoadCustomers();

            await JavascriptFunctions.InitTable("customerTable");
        }
コード例 #2
0
        protected override async Task OnParametersSetAsync()
        {
            this.CustomerTypes = SelectListItems.Convert(await AdministrationService.GetCustomerTypes(), (src, dest) =>
            {
                dest.Id   = src.Id;
                dest.Text = src.Text;
            });


            if (IsNew())
            {
                this.Title = "Ajouter un client";
            }
            else
            {
                this.Title = "Modifier un client";

                Customer customer = await CustomerService.GetCustomer(Id.Value);

                this.Name           = customer.Name;
                this.FirstName      = customer.FirstName;
                this.CustomerTypeId = customer.CustomerTypeId;
            }
        }
コード例 #3
0
        protected async Task LoadCustomerTypes()
        {
            this.CustomerTypes = await AdministrationService.GetCustomerTypes();

            StateHasChanged();
        }