protected override async Task Save()
        {
            IList <string> errors = CheckRequiredFields();

            if (errors.Count > 0)
            {
                await JavascriptFunctions.ShowAlert(errors[0]);
            }

            CustomerType customerType = null;

            if (IsNew())
            {
                customerType = new CustomerType();
            }
            else
            {
                customerType = await AdministrationService.GetCustomerType(Id.Value);
            }

            customerType.Text = this.Text;

            await AdministrationService.SaveCustomerType(customerType);

            UriHelper.NavigateTo("/Administration/CustomerType");
        }
        protected override async Task OnParametersSetAsync()
        {
            if (IsNew())
            {
                this.Title = "Ajouter un type de client";
            }
            else
            {
                this.Title = "Modifier un type de client";

                CustomerType customerType = await AdministrationService.GetCustomerType(Id.Value);

                this.Text = customerType.Text;
            }
        }